]> ruin.nu Git - hbs.git/commitdiff
much better indenting.. (thnx vim ;)
authorMichael Andreen <harv@ruin.nu>
Fri, 10 May 2002 00:26:00 +0000 (00:26 +0000)
committerMichael Andreen <harv@ruin.nu>
Fri, 10 May 2002 00:26:00 +0000 (00:26 +0000)
bs/ui/bsappbase.ui.h
bs/ui/infoview.ui.h
bs/ui/resourceview.ui.h
bs/ui/roidseditview.ui.h
bs/ui/tickviewbase.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);
 }
index 1a7d70d4d473669b41ba6d2f24d71c550b490adc..14ee7ed09b3365d31233f2e4d80d33f57e85eeb8 100644 (file)
@@ -10,42 +10,42 @@ void InfoView::destroy()
 
 void InfoView::setRaces( std::vector<QString> races)
 {
-    for (std::vector<QString>::iterator i = races.begin(); i != races.end(); ++i)
-    {
-       RaceCombo->insertItem((*i));
-    }
-    if ( RaceCombo->count() != 0)
-       NewButton->setEnabled(true);
+       for (std::vector<QString>::iterator i = races.begin(); i != races.end(); ++i)
+       {
+               RaceCombo->insertItem((*i));
+       }
+       if ( RaceCombo->count() != 0)
+               NewButton->setEnabled(true);
 }
 
 void InfoView::setEta( int eta )
 {
-    EtaSpin->setValue(eta);
+       EtaSpin->setValue(eta);
 }
 
 void InfoView::setFleetName( QString name )
 {
-    NameLine->setText(name);
-    m_Name = name;
-    if (m_Name == "Home Planet" && m_Group == "Friendly")
-    {
-       GroupCombo->setEnabled(false);
-       BattleCombo->setEnabled(false);
+       NameLine->setText(name);
+       m_Name = name;
+       if (m_Name == "Home Planet" && m_Group == "Friendly")
+       {
+               GroupCombo->setEnabled(false);
+               BattleCombo->setEnabled(false);
+               ApplyButton->setEnabled(true);
+               NewButton->setEnabled(false);
+               RemoveButton->setEnabled(false);
+               return;
+       }
+       GroupCombo->setEnabled(true);
+       BattleCombo->setEnabled(true);
        ApplyButton->setEnabled(true);
-       NewButton->setEnabled(false);
-       RemoveButton->setEnabled(false);
-       return;
-    }
-    GroupCombo->setEnabled(true);
-    BattleCombo->setEnabled(true);
-    ApplyButton->setEnabled(true);
-    NewButton->setEnabled(true);
-    RemoveButton->setEnabled(true);
+       NewButton->setEnabled(true);
+       RemoveButton->setEnabled(true);
 }
 
 void InfoView::setRace( QString name )
 {
-    RaceCombo->setCurrentText(name);
+       RaceCombo->setCurrentText(name);
 }
 
 void InfoView::InfoView_destroyed( QObject * )
@@ -55,108 +55,108 @@ void InfoView::InfoView_destroyed( QObject * )
 
 void InfoView::CancelButton_clicked()
 {
-    emit cancel();
+       emit cancel();
 }
 
 void InfoView::NewButton_clicked()
 {
-    emit add();
+       emit add();
 }
 
 void InfoView::RemoveButton_clicked()
 {
-    emit remove();
+       emit remove();
 }
 
 void InfoView::setGroup( QString s )
 {
-    GroupCombo->setCurrentText(s);
-    m_Group = s;
+       GroupCombo->setCurrentText(s);
+       m_Group = s;
 }
 
 void InfoView::setBattles( std::vector<QString> battles )
 {
-    BattleCombo->clear();
-    
-    for (std::vector<QString>::iterator i = battles.begin(); i != battles.end(); ++i)
-    {
-       BattleCombo->insertItem(*i);
-    }
+       BattleCombo->clear();
+
+       for (std::vector<QString>::iterator i = battles.begin(); i != battles.end(); ++i)
+       {
+               BattleCombo->insertItem(*i);
+       }
 }
 
 void InfoView::setBattle( QString s )
 {
-    BattleCombo->setCurrentText(s);
-    m_Battle = s;
+       BattleCombo->setCurrentText(s);
+       m_Battle = s;
 }
 
 void InfoView::enableNameChange( bool b )
 {
-    NameLine->setReadOnly(!b);
+       NameLine->setReadOnly(!b);
 }
 
 void InfoView::enableRemove( bool b )
 {
-    RemoveButton->setEnabled(b);
+       RemoveButton->setEnabled(b);
 }
 
 void InfoView::ApplyButton_clicked()
 {
-    emit apply();
+       emit apply();
 }
 
 QString InfoView::battle()
 {
-    return BattleCombo->currentText();
+       return BattleCombo->currentText();
 }
 
 int InfoView::eta()
 {
-    return EtaSpin->value();
+       return EtaSpin->value();
 }
 
 QString InfoView::fleetName()
 {
-    return NameLine->text();
+       return NameLine->text();
 }
 
 QString InfoView::group()
 {
-    return GroupCombo->currentText();
+       return GroupCombo->currentText();
 }
 
 QString InfoView::race()
 {
-    return RaceCombo->currentText();
+       return RaceCombo->currentText();
 }
 
 void InfoView::slotNameChanged( const QString & s )
 {
-    if (s != "Home Planet" && m_Name == "Home Planet" && m_Group == "Friendly")
-    {
-       GroupCombo->setEnabled(true);
-       BattleCombo->setEnabled(true);
-       ApplyButton->setEnabled(false);
-       NewButton->setEnabled(true);
-    }
-    if (s == "Home Planet" && m_Name == "Home Planet" && m_Group == "Friendly")
-    {
-       GroupCombo->setEnabled(false);
-       GroupCombo->setCurrentText(m_Group);
-       BattleCombo->setEnabled(false);
-       BattleCombo->setCurrentText(m_Battle);
-       ApplyButton->setEnabled(true);
-       NewButton->setEnabled(false);
-    }
+       if (s != "Home Planet" && m_Name == "Home Planet" && m_Group == "Friendly")
+       {
+               GroupCombo->setEnabled(true);
+               BattleCombo->setEnabled(true);
+               ApplyButton->setEnabled(false);
+               NewButton->setEnabled(true);
+       }
+       if (s == "Home Planet" && m_Name == "Home Planet" && m_Group == "Friendly")
+       {
+               GroupCombo->setEnabled(false);
+               GroupCombo->setCurrentText(m_Group);
+               BattleCombo->setEnabled(false);
+               BattleCombo->setCurrentText(m_Battle);
+               ApplyButton->setEnabled(true);
+               NewButton->setEnabled(false);
+       }
 }
 
 
 int InfoView::stays()
 {
-    return StaySpin->value();
+       return StaySpin->value();
 }
 
 void InfoView::setStays( int ticks )
 {
-    StaySpin->setValue(ticks);
+       StaySpin->setValue(ticks);
 }
index 485c4e59866db7a75ca779650ddabf2657578441..a1938719e269c6786e2596cf7a1e0720fa1547a1 100644 (file)
@@ -1,27 +1,27 @@
 /****************************************************************************
-** 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.
+ *****************************************************************************/
 
 //test
 
 void ResourceView::setLines( QString type, float i )
 {
-    if (type == tr("metal"))
-       MetalEdit->setText(QString("%1").arg(i));
-    else if (type == tr("crystal"))
-       CrystalEdit->setText(QString("%1").arg(i));
-    else if (type == tr("eonium"))
-       EoniumEdit->setText(QString("%1").arg(i));
-    else if (type == tr("uninit"))
-       UninitEdit->setText(QString("%1").arg(i));
-    else if (type == tr("score"))
-       ScoreEdit->setText(QString("%1").arg(i));
-    else if (type == tr("lost"))
-       ScoreLostEdit->setText(QString("%1").arg(i));
-     else if (type == tr("cost"))
-       CostEdit->setText(QString("%1").arg(i));
-}
\ No newline at end of file
+       if (type == tr("metal"))
+               MetalEdit->setText(QString("%1").arg(i));
+       else if (type == tr("crystal"))
+               CrystalEdit->setText(QString("%1").arg(i));
+       else if (type == tr("eonium"))
+               EoniumEdit->setText(QString("%1").arg(i));
+       else if (type == tr("uninit"))
+               UninitEdit->setText(QString("%1").arg(i));
+       else if (type == tr("score"))
+               ScoreEdit->setText(QString("%1").arg(i));
+       else if (type == tr("lost"))
+               ScoreLostEdit->setText(QString("%1").arg(i));
+       else if (type == tr("cost"))
+               CostEdit->setText(QString("%1").arg(i));
+}
index 55d22b556e3f2c604efcb96f8ba07922ff00a217..075520571d5afac5a7d01f495bab71760bda2f93 100644 (file)
@@ -1,10 +1,10 @@
 /****************************************************************************
-** 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 RoidsEditView::init()
 {
@@ -13,25 +13,25 @@ void RoidsEditView::init()
 
 void RoidsEditView::setValue( const QString & type, unsigned value )
 {
-    if (type == tr("metal"))
-       MetalEdit->setText(QString("%1").arg(value));
-    else if (type == tr("crystal"))
-       CrystalEdit->setText(QString("%1").arg(value));
-    else if (type == tr("eonium"))
-       EoniumEdit->setText(QString("%1").arg(value));
-    else if (type == tr("uninit"))
-       UninitEdit->setText(QString("%1").arg(value));
-    else if (type == tr("score"))
-       ScoreEdit->setText(QString("%1").arg(value));
-     
-    
+       if (type == tr("metal"))
+               MetalEdit->setText(QString("%1").arg(value));
+       else if (type == tr("crystal"))
+               CrystalEdit->setText(QString("%1").arg(value));
+       else if (type == tr("eonium"))
+               EoniumEdit->setText(QString("%1").arg(value));
+       else if (type == tr("uninit"))
+               UninitEdit->setText(QString("%1").arg(value));
+       else if (type == tr("score"))
+               ScoreEdit->setText(QString("%1").arg(value));
+
+
 
 }
 
 void RoidsEditView::slotValueChanged()
 {
        QString type = sender()->name();
-       
+
        if (type == "MetalEdit")
                type = tr("metal");
        else if (type == "CrystalEdit")
@@ -45,22 +45,22 @@ void RoidsEditView::slotValueChanged()
        test = type;
        const QLineEdit *le = dynamic_cast<const QLineEdit*>(sender());
        if (le)
-           emit changed(type, le->text().toInt());
+               emit changed(type, le->text().toInt());
 }
 
 
 void RoidsEditView::slotSetLost( QString type, float i )
 { 
-    if (type == tr("metal"))
-       MetalLostEdit->setText(QString("%1").arg(i));
-    else if (type == tr("crystal"))
-       CrystalLostEdit->setText(QString("%1").arg(i));
-    else if (type == tr("eonium"))
-       EoniumLostEdit->setText(QString("%1").arg(i));
-    else if (type == tr("uninit"))
-       UninitLostEdit->setText(QString("%1").arg(i));
-    else if (type == tr("scorelost"))
-       ScoreLostEdit->setText(QString("%1").arg(i));
-    else if (type == tr("capping"))
-       CappingEdit->setText(QString("%1\%").arg(i*100));
-}
\ No newline at end of file
+       if (type == tr("metal"))
+               MetalLostEdit->setText(QString("%1").arg(i));
+       else if (type == tr("crystal"))
+               CrystalLostEdit->setText(QString("%1").arg(i));
+       else if (type == tr("eonium"))
+               EoniumLostEdit->setText(QString("%1").arg(i));
+       else if (type == tr("uninit"))
+               UninitLostEdit->setText(QString("%1").arg(i));
+       else if (type == tr("scorelost"))
+               ScoreLostEdit->setText(QString("%1").arg(i));
+       else if (type == tr("capping"))
+               CappingEdit->setText(QString("%1\%").arg(i*100));
+}
index 026be8c2d28c392201f9190d58670142a6a7edd6..d37d629fa3460f2501268a1897cd69a2656167b6 100644 (file)
@@ -1,52 +1,52 @@
 /****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-** 
-** Add custom slot implementations here. Use a slot init() for
-** initialization code called during construction, and a slot destroy()
-** for cleanup code called during destruction.
-**
-** This file gets modified by Qt Designer whenever you add, rename or
-** remove custom slots. Implementation code does not get lost.
-*****************************************************************************/
+ ** ui.h extension file, included from the uic-generated form implementation.
+ ** 
+ ** Add custom slot implementations here. Use a slot init() for
+ ** initialization code called during construction, and a slot destroy()
+ ** for cleanup code called during destruction.
+ **
+ ** This file gets modified by Qt Designer whenever you add, rename or
+ ** remove custom slots. Implementation code does not get lost.
+ *****************************************************************************/
 
 
 void CTickViewBase::slotMaxTick(int i)
 {
-     if ( !oneTickCheck->isChecked())
-        minTickSpin->setMaxValue(i);
-     
+       if ( !oneTickCheck->isChecked())
+               minTickSpin->setMaxValue(i);
+
 }
 
 void CTickViewBase::slotMinTick( int i )
 {
-     if ( !oneTickCheck->isChecked())
-        maxTickSpin->setMinValue(i);
+       if ( !oneTickCheck->isChecked())
+               maxTickSpin->setMinValue(i);
 }
 
 void CTickViewBase::slotTickChanged(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 CTickViewBase::slotOneTick( bool b )
 {
-    if(b)
-    {
-       maxTickSpin->setMinValue(0);
-       minTickSpin->setDisabled(true);
-       minTickSpin->setMaxValue(99);
-    }
-    else
-    {
-       minTickSpin->setEnabled(true);
-       maxTickSpin->setMinValue( minTickSpin->value());
-       minTickSpin->setMaxValue( maxTickSpin->value());
-    }
-}
\ No newline at end of file
+       if(b)
+       {
+               maxTickSpin->setMinValue(0);
+               minTickSpin->setDisabled(true);
+               minTickSpin->setMaxValue(99);
+       }
+       else
+       {
+               minTickSpin->setEnabled(true);
+               maxTickSpin->setMinValue( minTickSpin->value());
+               minTickSpin->setMaxValue( maxTickSpin->value());
+       }
+}