]> ruin.nu Git - hbs.git/blobdiff - bs/ui/bsappbase.ui.h
much better indenting.. (thnx vim ;)
[hbs.git] / bs / ui / bsappbase.ui.h
index 0b3b30a46c20c15fa612e4339f3b52b7b0339248..305a4cabf25fa09d254db056f4a30d7c07c20bf6 100644 (file)
@@ -1,12 +1,12 @@
 /****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename slots use Qt Designer which will
-** update this file, preserving your code. Create an init() slot in place of
-** a constructor, and a destroy() slot in place of a destructor.
-*****************************************************************************/
+ ** ui.h extension file, included from the uic-generated form implementation.
+ **
+ ** If you wish to add, delete or rename slots use Qt Designer which will
+ ** update this file, preserving your code. Create an init() slot in place of
+ ** a constructor, and a destroy() slot in place of a destructor.
+ *****************************************************************************/
+
 
-           
 
 void BSAppBase::fileNew()
 {
@@ -55,12 +55,12 @@ void BSAppBase::editCut()
 
 void BSAppBase::init()
 {
-    conf = new BSConf();
-    doc = new BSDoc();
-    view = new BSView(this,doc);
-    connect(this, SIGNAL(ticksChanged(int, int) ), view, SLOT(slotTickChanged(int, int)));
-    connect(this, SIGNAL(resultModeChanged(int) ), view, SLOT(slotResultModeChanged(int)));
-    setCentralWidget(view);
+       conf = new BSConf();
+       doc = new BSDoc();
+       view = new BSView(this,doc);
+       connect(this, SIGNAL(ticksChanged(int, int) ), view, SLOT(slotTickChanged(int, int)));
+       connect(this, SIGNAL(resultModeChanged(int) ), view, SLOT(slotResultModeChanged(int)));
+       setCentralWidget(view);
 }
 
 void BSAppBase::editPaste()
@@ -90,78 +90,78 @@ 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
+       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
+               // user entered nothing or pressed Cancel
        }
 }
 
 void BSAppBase::battleSimulate()
 {
-     QApplication::setOverrideCursor( Qt::WaitCursor );
-     
-     doc->runBattleSimulation();
-     QApplication::restoreOverrideCursor();
+       QApplication::setOverrideCursor( Qt::WaitCursor );
+
+       doc->runBattleSimulation();
+       QApplication::restoreOverrideCursor();
 }
 
 void BSAppBase::oneTickCheck_toggled( bool b)
 {
-     if(b)
-    {
-       maxTickSpin->setMinValue(0);
-       minTickSpin->setDisabled(true);
-       minTickSpin->setMaxValue(99);
-       emit ticksChanged( maxTickSpin->value() - 1, maxTickSpin->value());
-    }
-    else
-    {
-       minTickSpin->setEnabled(true);
-       minTickSpin->setMaxValue( maxTickSpin->value());
-       if (minTickSpin->value() < maxTickSpin->value())
-           maxTickSpin->setMinValue( minTickSpin->value());
+       if(b)
+       {
+               maxTickSpin->setMinValue(0);
+               minTickSpin->setDisabled(true);
+               minTickSpin->setMaxValue(99);
+               emit ticksChanged( maxTickSpin->value() - 1, maxTickSpin->value());
+       }
        else
        {
-               maxTickSpin->setMinValue( maxTickSpin->value());
-               minTickSpin->setValue(maxTickSpin->value());
+               minTickSpin->setEnabled(true);
+               minTickSpin->setMaxValue( maxTickSpin->value());
+               if (minTickSpin->value() < maxTickSpin->value())
+                       maxTickSpin->setMinValue( minTickSpin->value());
+               else
+               {
+                       maxTickSpin->setMinValue( maxTickSpin->value());
+                       minTickSpin->setValue(maxTickSpin->value());
+               }
+               emit ticksChanged( minTickSpin->value(), maxTickSpin->value());
        }
-       emit ticksChanged( minTickSpin->value(), maxTickSpin->value());
-    }
 }
 
 void BSAppBase::minTickSpin_valueChanged( int i )
 {
-         if ( !oneTickCheck->isChecked())
-        maxTickSpin->setMinValue(i);
+       if ( !oneTickCheck->isChecked())
+               maxTickSpin->setMinValue(i);
 }
 
 void BSAppBase::maxTickSpin_valueChanged( int i )
 {
-         if ( !oneTickCheck->isChecked())
-        minTickSpin->setMaxValue(i);
+       if ( !oneTickCheck->isChecked())
+               minTickSpin->setMaxValue(i);
 }
 
 void BSAppBase::slotTicksChanged( int i )
 {
-   if ( oneTickCheck->isChecked())
-    {
-       maxTickSpin->setValue(i);
-       //minTickSpin->setValue(i-1);
-       emit ticksChanged( maxTickSpin->value() - 1, maxTickSpin->value());
-       return;
-    }
-   emit ticksChanged( minTickSpin->value(), maxTickSpin->value());
+       if ( oneTickCheck->isChecked())
+       {
+               maxTickSpin->setValue(i);
+               //minTickSpin->setValue(i-1);
+               emit ticksChanged( maxTickSpin->value() - 1, maxTickSpin->value());
+               return;
+       }
+       emit ticksChanged( minTickSpin->value(), maxTickSpin->value());
 }
 
 
 
 void BSAppBase::resultModeCombo_activated( int i )
 {
-    emit resultModeChanged(i);
+       emit resultModeChanged(i);
 }