]> ruin.nu Git - hbs.git/blobdiff - bs/ui/bsappbase.ui.h
adding, removing and chaning fleets now works.
[hbs.git] / bs / ui / bsappbase.ui.h
index 4d70a19dde91d1c83cf471d0f84e9f694de94417..da293f2786f9c3bbae29da3024db3847ca05953f 100644 (file)
@@ -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