X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=bs%2Fui%2Fbsappbase.ui.h;fp=bs%2Fui%2Fbsappbase.ui.h;h=e7257447f284070aea24529ba78c00b8e8f2ed8f;hb=e07f49323a1936c90605d06f6f63e4c39b4c4aca;hp=4d70a19dde91d1c83cf471d0f84e9f694de94417;hpb=fb2a45b071b141a63140645c135ade3c731fa503;p=hbs.git diff --git a/bs/ui/bsappbase.ui.h b/bs/ui/bsappbase.ui.h index 4d70a19..e725744 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,11 @@ void BSAppBase::editCut() } -void BSAppBase::editCopy() +void BSAppBase::init() { - + doc = new BSDoc(); + view = new BSView(this,doc); + setCentralWidget(view); } void BSAppBase::editPaste() @@ -80,4 +83,19 @@ 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 + } } \ No newline at end of file