X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=blobdiff_plain;f=bs%2Fui%2Fbsappbase.ui.h;h=da293f2786f9c3bbae29da3024db3847ca05953f;hp=4d70a19dde91d1c83cf471d0f84e9f694de94417;hb=c2dd8856c3d97667953a0b73403b5e5cade5ce9b;hpb=f120305e409710cbb178006b127047e4174788be diff --git a/bs/ui/bsappbase.ui.h b/bs/ui/bsappbase.ui.h index 4d70a19..da293f2 100644 --- a/bs/ui/bsappbase.ui.h +++ b/bs/ui/bsappbase.ui.h @@ -6,6 +6,7 @@ ** a constructor, and a destroy() slot in place of a destructor. *****************************************************************************/ + void BSAppBase::fileNew() { @@ -52,9 +53,12 @@ void BSAppBase::editCut() } -void BSAppBase::editCopy() +void BSAppBase::init() { - + conf = new BSConf(); + doc = new BSDoc(); + view = new BSView(this,doc); + setCentralWidget(view); } void BSAppBase::editPaste() @@ -80,4 +84,27 @@ void BSAppBase::helpContents() 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