** a constructor, and a destroy() slot in place of a destructor.
*****************************************************************************/
+
void BSAppBase::fileNew()
{
}
-void BSAppBase::editCopy()
+void BSAppBase::init()
{
-
+ conf = new BSConf();
+ doc = new BSDoc();
+ view = new BSView(this,doc);
+ setCentralWidget(view);
}
void BSAppBase::editPaste()
void BSAppBase::helpAbout()
{
+}
+
+void BSAppBase::battleNew()
+{
+ bool ok = FALSE;
+ QString text = QInputDialog::getText(
+ tr( "Harvalen's Battlesystem" ),
+ tr( "Please enter the name of the battle (for example coords)" ),
+ QLineEdit::Normal, QString::null, &ok, this );
+ if ( ok && !text.isEmpty() )
+ doc->newBattle(text);
+ else
+ {
+ // user entered nothing or pressed Cancel
+ }
+}
+
+void BSAppBase::battleSimulate()
+{
+ QApplication::setOverrideCursor( Qt::WaitCursor );
+
+ doc->runBattleSimulation();
+ QApplication::restoreOverrideCursor();
}
\ No newline at end of file