diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2009-01-21 20:46:11 -0500 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2009-01-21 20:46:11 -0500 |
| commit | e287fdb7f62dac39b1c4c580b39ec4e88537bf63 (patch) | |
| tree | b4378fd8cd7c34e908d710db1f497de239eddbc9 | |
| parent | 3effee0d7038589661ddf7a5faabc95227a5e54f (diff) | |
Changed default encyclopedia number in Species and cleaned up widget
| -rw-r--r-- | sigmod/Species.cpp | 4 | ||||
| -rw-r--r-- | sigmod/test/TestSpecies.cpp | 2 | ||||
| -rw-r--r-- | sigmodr/SpeciesUI.cpp | 19 | ||||
| -rw-r--r-- | sigmodr/SpeciesUI.h | 2 | ||||
| -rw-r--r-- | sigmodr/gui/species.ui | 839 |
5 files changed, 520 insertions, 346 deletions
diff --git a/sigmod/Species.cpp b/sigmod/Species.cpp index 70badb92..7e4fb57d 100644 --- a/sigmod/Species.cpp +++ b/sigmod/Species.cpp @@ -48,7 +48,7 @@ Sigmod::Species::Species(const Sigmod* parent, const int id) : m_runChance(1, 1), m_fleeChance(1, 1), m_itemChance(1, 1), - m_encyclopediaNumber(INT_MAX), + m_encyclopediaNumber(-1), m_weight(0), m_height(0), m_frontMaleSprite(-1), @@ -323,7 +323,7 @@ CHECK_END() CHECK(Species, Style, growth) CHECK_BOUNDS(Species, int, experienceValue, 0, INT_MAX) CHECK_BOUNDS(Species, int, catchValue, 1, 255) -CHECK_BOUNDS(Species, int, maxHoldWeight, 0, INT_MAX) +CHECK_BOUNDS(Species, int, maxHoldWeight, -1, INT_MAX) CHECK_BOUNDS(Species, Sigcore::Fraction&, runChance, 0, 1) CHECK_BOUNDS(Species, Sigcore::Fraction&, fleeChance, 0, 1) CHECK_BOUNDS(Species, Sigcore::Fraction&, itemChance, 0, 1) diff --git a/sigmod/test/TestSpecies.cpp b/sigmod/test/TestSpecies.cpp index 6ddbe38c..716f9299 100644 --- a/sigmod/test/TestSpecies.cpp +++ b/sigmod/test/TestSpecies.cpp @@ -705,7 +705,7 @@ void TestSpecies::setCatchValue() void TestSpecies::setMaxHoldWeight() { - m_species2->setMaxHoldWeight(-1); + m_species2->setMaxHoldWeight(-2); QCOMPARE(m_warnings.size(), 0); QCOMPARE(m_errors.size(), 1); diff --git a/sigmodr/SpeciesUI.cpp b/sigmodr/SpeciesUI.cpp index 1c364ccf..84c86f69 100644 --- a/sigmodr/SpeciesUI.cpp +++ b/sigmodr/SpeciesUI.cpp @@ -32,6 +32,8 @@ // Qt includes #include <QtGui/QListWidgetItem> +// TODO: Use QTableView with delegates for stat editing + Sigmodr::SpeciesUI::SpeciesUI(Sigmod::Species* species, QWidget* parent) : ObjectUI(parent) { @@ -92,7 +94,7 @@ void Sigmodr::SpeciesUI::refreshGui() else boxEffortValues->setEnabled(false); if (!sigmod()->rules()->maxHeldItems()) - boxItemChance->setEnabled(false); + varItemChance->setEnabled(false); int maxHeight = 0; int maxWidth = 0; const bool blockedMaleFront = varMaleFront->blockSignals(true); @@ -124,7 +126,8 @@ void Sigmodr::SpeciesUI::refreshGui() varMaleBack->setIconSize(maxSize); varFemaleFront->setIconSize(maxSize); varFemaleBack->setIconSize(maxSize); - boxFemaleSprites->setEnabled(sigmod()->rules()->genderAllowed()); + varFemaleFront->setEnabled(sigmod()->rules()->genderAllowed()); + varFemaleBack->setEnabled(sigmod()->rules()->genderAllowed()); const bool blockedSkin = varSkin->blockSignals(true); varSkin->clear(); for (int i = 0; i < sigmod()->skinCount(); ++i) @@ -141,7 +144,7 @@ void Sigmodr::SpeciesUI::refreshGui() varEggSpecies->addItem(species->name(), species->id()); } varEggSpecies->blockSignals(blockedEggSpecies); - boxEggSpecies->setEnabled(sigmod()->rules()->breedingAllowed()); + varEggSpecies->setEnabled(sigmod()->rules()->breedingAllowed()); varEggSteps->setEnabled(sigmod()->rules()->breedingAllowed()); const bool blockedEggGroups = varEggGroups->blockSignals(true); varEggGroups->availableListWidget()->clear(); @@ -210,13 +213,17 @@ void Sigmodr::SpeciesUI::setGui() varEncyclopediaEntry->setText(qobject_cast<Sigmod::Species*>(modified())->encyclopediaEntry()); varMaleFront->setCurrentIndex(varMaleFront->findData(qobject_cast<Sigmod::Species*>(modified())->frontMaleSprite())); varMaleBack->setCurrentIndex(varMaleBack->findData(qobject_cast<Sigmod::Species*>(modified())->backMaleSprite())); + varMaleFront->setEnabled(qobject_cast<Sigmod::Species*>(modified())->genderFactor() < 1); + varMaleBack->setEnabled(qobject_cast<Sigmod::Species*>(modified())->genderFactor() < 1); if (sigmod()->rules()->genderAllowed()) { varFemaleFront->setCurrentIndex(varFemaleFront->findData(qobject_cast<Sigmod::Species*>(modified())->frontFemaleSprite())); varFemaleBack->setCurrentIndex(varFemaleBack->findData(qobject_cast<Sigmod::Species*>(modified())->backFemaleSprite())); + varFemaleFront->setEnabled(0 < qobject_cast<Sigmod::Species*>(modified())->genderFactor()); + varFemaleBack->setEnabled(0 < qobject_cast<Sigmod::Species*>(modified())->genderFactor()); } varSkin->setCurrentIndex(varSkin->findData(qobject_cast<Sigmod::Species*>(modified())->skin())); - boxGenderChance->setChecked((qobject_cast<Sigmod::Species*>(modified())->genderFactor() < 0) ? Qt::Checked : Qt::Unchecked); + varHasGender->setCheckState((qobject_cast<Sigmod::Species*>(modified())->genderFactor() < 0) ? Qt::Checked : Qt::Unchecked); varGenderChance->setValue(qobject_cast<Sigmod::Species*>(modified())->genderFactor()); varEggSpecies->setCurrentIndex(varEggSpecies->findData(qobject_cast<Sigmod::Species*>(modified())->eggSpecies())); varEggSteps->setValue(qobject_cast<Sigmod::Species*>(modified())->eggSteps()); @@ -386,9 +393,9 @@ void Sigmodr::SpeciesUI::on_varSkin_currentIndexChanged(const int skin) qobject_cast<Sigmod::Species*>(modified())->setSkin(varSkin->itemData(skin).toInt()); } -void Sigmodr::SpeciesUI::on_boxGenderChance_clicked(const bool genderChance) +void Sigmodr::SpeciesUI::on_varHasGender_toggled(const bool hasGender) { - qobject_cast<Sigmod::Species*>(modified())->setGenderFactor(Sigcore::Fraction((genderChance ? 1 : -1), 1)); + qobject_cast<Sigmod::Species*>(modified())->setGenderFactor(Sigcore::Fraction((hasGender ? 1 : -1), 1)); } void Sigmodr::SpeciesUI::on_varGenderChance_valueChanged(const Sigcore::Fraction& genderChance) diff --git a/sigmodr/SpeciesUI.h b/sigmodr/SpeciesUI.h index 204b1f33..29e89f97 100644 --- a/sigmodr/SpeciesUI.h +++ b/sigmodr/SpeciesUI.h @@ -61,7 +61,7 @@ class SpeciesUI : public ObjectUI, private Ui::formSpecies void on_varFemaleFront_currentIndexChanged(const int femaleFront); void on_varFemaleBack_currentIndexChanged(const int femaleBack); void on_varSkin_currentIndexChanged(const int skin); - void on_boxGenderChance_clicked(const bool genderUsed); + void on_varHasGender_toggled(const bool hasGender); void on_varGenderChance_valueChanged(const Sigcore::Fraction& genderChance); void on_varEggSpecies_activated(const int eggSpecies); void on_varEggSteps_valueChanged(const int eggSteps); diff --git a/sigmodr/gui/species.ui b/sigmodr/gui/species.ui index ce049583..a260c650 100644 --- a/sigmodr/gui/species.ui +++ b/sigmodr/gui/species.ui @@ -3,17 +3,27 @@ <widget class="QWidget" name="formSpecies" > <layout class="QVBoxLayout" > <item> - <widget class="KTabWidget" name="notebookSpecies" > - <widget class="QWidget" name="tabGeneral" > + <widget class="KTabWidget" > + <widget class="QWidget" > <attribute name="title" > <string comment="General settings for a species" >General</string> </attribute> - <layout class="QVBoxLayout" > - <item> - <widget class="QGroupBox" name="boxName" > - <property name="title" > - <string comment="Label for the name of the species" >Name</string> + <layout class="QGridLayout" > + <item row="0" column="0" > + <widget class="QLabel" name="labelName" > + <property name="text" > + <string comment="Label for the name of the species" >Name:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> </property> + <property name="buddy" > + <cstring>varName</cstring> + </property> + </widget> + </item> + <item row="0" column="1" > + <widget class="KLineEdit" name="varName" > <property name="toolTip" > <string>Name of the species</string> </property> @@ -23,34 +33,28 @@ <property name="whatsThis" > <string>Name of the species</string> </property> - <layout class="QHBoxLayout" > - <item> - <widget class="KLineEdit" name="varName" > - <property name="showClearButton" stdset="0" > - <bool>true</bool> - </property> - </widget> - </item> - </layout> + <property name="showClearButton" stdset="0" > + <bool>true</bool> + </property> </widget> </item> - <item> + <item row="1" column="0" colspan="2" > <widget class="QGroupBox" name="boxTypes" > <property name="title" > <string>Types</string> </property> - <property name="toolTip" > - <string>The types of the species</string> - </property> - <property name="statusTip" > - <string>The types of the species</string> - </property> - <property name="whatsThis" > - <string>The types of the species</string> - </property> - <layout class="QHBoxLayout" > - <item> + <layout class="QGridLayout" > + <item row="0" column="0" > <widget class="KActionSelector" name="varTypes" > + <property name="toolTip" > + <string>The types of the species</string> + </property> + <property name="statusTip" > + <string>The types of the species</string> + </property> + <property name="whatsThis" > + <string>The types of the species</string> + </property> <property name="showUpDownButtons" > <bool>false</bool> </property> @@ -59,11 +63,21 @@ </layout> </widget> </item> - <item> - <widget class="QGroupBox" name="boxMaxHoldWeight" > - <property name="title" > - <string>Max Hold Weight</string> + <item row="2" column="0" > + <widget class="QLabel" name="labelMaxHoldWeight" > + <property name="text" > + <string>Max hold weight:</string> </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varMaxHoldWeight</cstring> + </property> + </widget> + </item> + <item row="2" column="1" > + <widget class="KIntNumInput" name="varMaxHoldWeight" > <property name="toolTip" > <string>The maximum weight that the species can hold at one time</string> </property> @@ -73,22 +87,26 @@ <property name="whatsThis" > <string>The maximum weight that the species can hold at one time</string> </property> - <layout class="QHBoxLayout" > - <item> - <widget class="KIntNumInput" name="varMaxHoldWeight" > - <property name="minimum" > - <number>0</number> - </property> - </widget> - </item> - </layout> + <property name="minimum" > + <number>-1</number> + </property> </widget> </item> - <item> - <widget class="QGroupBox" name="boxRunChance" > - <property name="title" > - <string>Run Chance</string> + <item row="3" column="0" > + <widget class="QLabel" name="labelRunChance" > + <property name="text" > + <string>Run chance:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varRunChance</cstring> </property> + </widget> + </item> + <item row="3" column="1" > + <widget class="Sigmodr::FractionWidget" name="varRunChance" > <property name="toolTip" > <string>The chance that the species runs in a wild battle each turn</string> </property> @@ -98,22 +116,26 @@ <property name="whatsThis" > <string>The chance that the species runs in a wild battle each turn</string> </property> - <layout class="QHBoxLayout" > - <item> - <widget class="Sigmodr::FractionWidget" name="varRunChance" > - <property name="behavior" > - <enum>Sigmodr::FractionWidget::Proper</enum> - </property> - </widget> - </item> - </layout> + <property name="behavior" > + <enum>Sigmodr::FractionWidget::Proper</enum> + </property> </widget> </item> - <item> - <widget class="QGroupBox" name="boxFleeChance" > - <property name="title" > - <string>Flee Chance</string> + <item row="4" column="0" > + <widget class="QLabel" name="labelFleeChance" > + <property name="text" > + <string>Flee chance:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> </property> + <property name="buddy" > + <cstring>varFleeChance</cstring> + </property> + </widget> + </item> + <item row="4" column="1" > + <widget class="Sigmodr::FractionWidget" name="varFleeChance" > <property name="toolTip" > <string>Chance that the player can flee from a wild battle with this species</string> </property> @@ -123,22 +145,26 @@ <property name="whatsThis" > <string>Chance that the player can flee from a wild battle with this species</string> </property> - <layout class="QHBoxLayout" > - <item> - <widget class="Sigmodr::FractionWidget" name="varFleeChance" > - <property name="behavior" > - <enum>Sigmodr::FractionWidget::Proper</enum> - </property> - </widget> - </item> - </layout> + <property name="behavior" > + <enum>Sigmodr::FractionWidget::Proper</enum> + </property> </widget> </item> - <item> - <widget class="QGroupBox" name="boxItemChance" > - <property name="title" > - <string>Item Chance</string> + <item row="5" column="0" > + <widget class="QLabel" name="labelItemChance" > + <property name="text" > + <string>Item chance:</string> </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varItemChance</cstring> + </property> + </widget> + </item> + <item row="5" column="1" > + <widget class="Sigmodr::FractionWidget" name="varItemChance" > <property name="toolTip" > <string>Chance the species is carrying an item in a wild battle</string> </property> @@ -148,18 +174,12 @@ <property name="whatsThis" > <string>Chance the species is carrying an item in a wild battle</string> </property> - <layout class="QHBoxLayout" > - <item> - <widget class="Sigmodr::FractionWidget" name="varItemChance" > - <property name="behavior" > - <enum>Sigmodr::FractionWidget::Proper</enum> - </property> - </widget> - </item> - </layout> + <property name="behavior" > + <enum>Sigmodr::FractionWidget::Proper</enum> + </property> </widget> </item> - <item> + <item row="6" column="0" colspan="2" > <spacer name="verticalSpacer" > <property name="orientation" > <enum>Qt::Vertical</enum> @@ -174,11 +194,11 @@ </item> </layout> </widget> - <widget class="QWidget" name="tabStats" > + <widget class="QWidget" > <attribute name="title" > <string>Stats</string> </attribute> - <layout class="QVBoxLayout" > + <layout class="QGridLayout" > <item> <widget class="QGroupBox" name="boxBaseStats" > <property name="title" > @@ -273,10 +293,26 @@ </layout> </widget> </item> - <item> - <widget class="QGroupBox" name="boxGrowth" > - <property name="title" > - <string>Growth</string> + <item row="3" column="0" > + <widget class="QLabel" name="labelGrowth" > + <property name="text" > + <string>Growth style:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varGrowth</cstring> + </property> + </widget> + </item> + <item row="3" column="1" > + <widget class="KComboBox" name="varGrowth" > + <property name="sizePolicy" > + <sizepolicy vsizetype="Minimum" hsizetype="Expanding" > + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> <property name="toolTip" > <string>Level growth pattern</string> @@ -287,18 +323,23 @@ <property name="whatsThis" > <string>Level growth pattern</string> </property> - <layout class="QHBoxLayout" > - <item> - <widget class="KComboBox" name="varGrowth" /> - </item> - </layout> </widget> </item> - <item> - <widget class="QGroupBox" name="boxExperienceValue" > - <property name="title" > - <string>Experience Value</string> + <item row="4" column="0" > + <widget class="QLabel" name="labelExperienceValue" > + <property name="text" > + <string>Experience value:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varExperienceValue</cstring> </property> + </widget> + </item> + <item row="4" column="1" > + <widget class="KIntNumInput" name="varExperienceValue" > <property name="toolTip" > <string>Base value for experience points earned</string> </property> @@ -308,22 +349,26 @@ <property name="whatsThis" > <string>Base value for experience points earned</string> </property> - <layout class="QHBoxLayout" > - <item> - <widget class="KIntNumInput" name="varExperienceValue" > - <property name="minimum" > - <number>0</number> - </property> - </widget> - </item> - </layout> + <property name="minimum" > + <number>0</number> + </property> </widget> </item> - <item> - <widget class="QGroupBox" name="boxCatchValue" > - <property name="title" > - <string>Catch Value</string> + <item row="5" column="0" > + <widget class="QLabel" name="labelCatchValue" > + <property name="text" > + <string>Catch value:</string> </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varCatchValue</cstring> + </property> + </widget> + </item> + <item row="5" column="1" > + <widget class="KIntNumInput" name="varCatchValue" > <property name="toolTip" > <string>How easy it is to catch the species</string> </property> @@ -333,18 +378,12 @@ <property name="whatsThis" > <string>How easy it is to catch the species</string> </property> - <layout class="QHBoxLayout" > - <item> - <widget class="KIntNumInput" name="varCatchValue" > - <property name="minimum" > - <number>0</number> - </property> - </widget> - </item> - </layout> + <property name="minimum" > + <number>0</number> + </property> </widget> </item> - <item> + <item row="6" column="0" colspan="2" > <spacer> <property name="orientation" > <enum>Qt::Vertical</enum> @@ -359,26 +398,45 @@ </item> </layout> </widget> - <widget class="QWidget" name="tabIndividuality" > + <widget class="QWidget" > <attribute name="title" > <string>Individuality</string> </attribute> - <layout class="QVBoxLayout" > - <item> + <layout class="QGridLayout" > + <item row="0" column="0" > <widget class="QGroupBox" name="boxAbilities" > <property name="title" > <string>Abilities</string> </property> - <layout class="QVBoxLayout" > - <item> + <layout class="QGridLayout" > + <item row="0" column="0" colspan="0" > <widget class="KActionSelector" name="varAbilities" > <property name="showUpDownButtons" > <bool>false</bool> </property> </widget> </item> - <item> + <item row="1" column="0" > + <widget class="QLabel" name="labelWeight" > + <property name="text" > + <string>Weight:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varAbilityWeight</cstring> + </property> + </widget> + </item> + <item row="1" column="1" > <widget class="KIntNumInput" name="varAbilityWeight" > + <property name="sizePolicy" > + <sizepolicy vsizetype="Minimum" hsizetype="Expanding" > + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="minimum" > <number>1</number> </property> @@ -387,21 +445,40 @@ </layout> </widget> </item> - <item> + <item row="1" column="0" > <widget class="QGroupBox" name="boxItems" > <property name="title" > <string>Items</string> </property> - <layout class="QVBoxLayout" > - <item> + <layout class="QGridLayout" > + <item row="0" column="0" colspan="2" > <widget class="KActionSelector" name="varItems" > <property name="showUpDownButtons" > <bool>false</bool> </property> </widget> </item> - <item> + <item row="1" column="0" > + <widget class="QLabel" name="labelItemWeight" > + <property name="text" > + <string>Weight:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varItemWeight</cstring> + </property> + </widget> + </item> + <item row="1" column="1" > <widget class="KIntNumInput" name="varItemWeight" > + <property name="sizePolicy" > + <sizepolicy vsizetype="Minimum" hsizetype="Expanding" > + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="minimum" > <number>1</number> </property> @@ -410,7 +487,7 @@ </layout> </widget> </item> - <item> + <item row="2" column="0" colspan="2" > <spacer> <property name="orientation" > <enum>Qt::Vertical</enum> @@ -425,16 +502,26 @@ </item> </layout> </widget> - <widget class="QWidget" name="tabEncyclopedia" > + <widget class="QWidget" > <attribute name="title" > <string>Encyclopedia</string> </attribute> - <layout class="QVBoxLayout" > - <item> - <widget class="QGroupBox" name="boxEncyclopediaNumber" > - <property name="title" > - <string>Number</string> + <layout class="QGridLayout" > + <item row="0" column="0" > + <widget class="QLabel" name="labelEncyclopediaNumber" > + <property name="text" > + <string>Number:</string> </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varEncyclopediaNumber</cstring> + </property> + </widget> + </item> + <item row="0" column="1" > + <widget class="KIntNumInput" name="varEncyclopediaNumber" > <property name="toolTip" > <string>The Encyclopedia number of the species</string> </property> @@ -444,25 +531,26 @@ <property name="whatsThis" > <string>The Encyclopedia number of the species</string> </property> - <layout class="QHBoxLayout" > - <item> - <widget class="KIntNumInput" name="varEncyclopediaNumber" > - <property name="toolTip" > - <string>The Encyclopedia number of the species</string> - </property> - <property name="minimum" > - <number>-1</number> - </property> - </widget> - </item> - </layout> + <property name="minimum" > + <number>-1</number> + </property> </widget> </item> - <item> - <widget class="QGroupBox" name="boxWeight" > - <property name="title" > - <string>Number</string> + <item row="1" column="0" > + <widget class="QLabel" name="labelWeight" > + <property name="text" > + <string>Weight:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> </property> + <property name="buddy" > + <cstring>varWeight</cstring> + </property> + </widget> + </item> + <item row="1" column="1" > + <widget class="KIntNumInput" name="varWeight" > <property name="toolTip" > <string>The weight of the species in grams</string> </property> @@ -472,22 +560,26 @@ <property name="whatsThis" > <string>The weight of the species in grams</string> </property> - <layout class="QHBoxLayout" > - <item> - <widget class="KIntNumInput" name="varWeight" > - <property name="minimum" > - <number>0</number> - </property> - </widget> - </item> - </layout> + <property name="minimum" > + <number>0</number> + </property> </widget> </item> - <item> - <widget class="QGroupBox" name="boxHeight" > - <property name="title" > - <string>Height</string> + <item row="2" column="0" > + <widget class="QLabel" name="labelHeight" > + <property name="text" > + <string>Height:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> </property> + <property name="buddy" > + <cstring>varHeight</cstring> + </property> + </widget> + </item> + <item row="2" column="1" > + <widget class="KIntNumInput" name="varHeight" > <property name="toolTip" > <string>Height of the species in centimeters</string> </property> @@ -497,22 +589,26 @@ <property name="whatsThis" > <string>Height of the species in centimeters</string> </property> - <layout class="QVBoxLayout" > - <item> - <widget class="KIntNumInput" name="varHeight" > - <property name="minimum" > - <number>0</number> - </property> - </widget> - </item> - </layout> + <property name="minimum" > + <number>0</number> + </property> </widget> </item> - <item> - <widget class="QGroupBox" name="boxEncyclopediaEntry" > - <property name="title" > - <string>Entry</string> + <item row="3" column="0" > + <widget class="QLabel" name="labelEncyclopediaEntry" > + <property name="text" > + <string>Entry:</string> </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varEncyclopediaEntry</cstring> + </property> + </widget> + </item> + <item row="3" column="1" > + <widget class="KLineEdit" name="varEncyclopediaEntry" > <property name="toolTip" > <string>Information provided in the Encyclopedia about the species</string> </property> @@ -522,18 +618,12 @@ <property name="whatsThis" > <string>Information provided in the Encyclopedia about the species</string> </property> - <layout class="QVBoxLayout" > - <item> - <widget class="KLineEdit" name="varEncyclopediaEntry" > - <property name="showClearButton" stdset="0" > - <bool>true</bool> - </property> - </widget> - </item> - </layout> + <property name="showClearButton" stdset="0" > + <bool>true</bool> + </property> </widget> </item> - <item> + <item row="4" column="0" colspan="2" > <spacer> <property name="orientation" > <enum>Qt::Vertical</enum> @@ -552,40 +642,90 @@ <attribute name="title" > <string>Genetics</string> </attribute> - <layout class="QVBoxLayout" > - <item> - <widget class="QGroupBox" name="boxGenderChance" > - <property name="title" > - <string>Gender Chance</string> + <layout class="QGridLayout" > + <item row="0" column="0" > + <widget class="QLabel" name="labelHasGender" > + <property name="text" > + <string>Has gender:</string> </property> - <property name="checkable" > - <bool>true</bool> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varHasGender</cstring> </property> + </widget> + </item> + <item row="0" column="1" > + <widget class="QCheckBox" name="varHasGender" > <property name="toolTip" > - <string>Chance of getting a female version of the species (negative is genderless)</string> + <string>If checked, the species is gendered</string> </property> <property name="statusTip" > - <string>Chance of getting a female version of the species (negative is genderless)</string> + <string>If checked, the species is gendered</string> </property> <property name="whatsThis" > - <string>Chance of getting a female version of the species (negative is genderless)</string> + <string>If checked, the species is gendered</string> + </property> + <property name="text" > + <string>Enabled</string> </property> - <layout class="QVBoxLayout" > - <item> - <widget class="Sigmodr::FractionWidget" name="varGenderChance" > - <property name="behavior" > - <enum>Sigmodr::FractionWidget::Proper</enum> - </property> - </widget> - </item> - </layout> </widget> </item> - <item> - <widget class="QGroupBox" name="boxEggSpecies" > - <property name="title" > - <string>Egg Species</string> + <item row="1" column="1" > + <layout class="QGridLayout" > + <item row="0" column="0" > + <widget class="QLabel" name="labelGenderChance" > + <property name="text" > + <string>Gender chance:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varGenderChance</cstring> + </property> + </widget> + </item> + <item row="0" column="1" > + <widget class="Sigmodr::FractionWidget" name="varGenderChance" > + <property name="sizePolicy" > + <sizepolicy vsizetype="Minimum" hsizetype="Expanding" > + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip" > + <string>Chance of getting a female version of the species (negative is genderless)</string> + </property> + <property name="statusTip" > + <string>Chance of getting a female version of the species (negative is genderless)</string> + </property> + <property name="whatsThis" > + <string>Chance of getting a female version of the species (negative is genderless)</string> + </property> + <property name="behavior" > + <enum>Sigmodr::FractionWidget::Proper</enum> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="0" > + <widget class="QLabel" name="labelEggSpecies" > + <property name="text" > + <string>Egg species:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> </property> + <property name="buddy" > + <cstring>varEggSpecies</cstring> + </property> + </widget> + </item> + <item row="2" column="1" > + <widget class="KComboBox" name="varEggSpecies" > <property name="toolTip" > <string>The species that hatches from an egg from this species</string> </property> @@ -595,18 +735,23 @@ <property name="whatsThis" > <string>The species that hatches from an egg from this species</string> </property> - <layout class="QVBoxLayout" > - <item> - <widget class="KComboBox" name="varEggSpecies" /> - </item> - </layout> </widget> </item> - <item> - <widget class="QGroupBox" name="boxEggSteps" > - <property name="title" > - <string>Height</string> + <item row="3" column="0" > + <widget class="QLabel" name="labelEggSteps" > + <property name="text" > + <string>Egg steps:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varEggSteps</cstring> </property> + </widget> + </item> + <item row="3" column="1" > + <widget class="KIntNumInput" name="varEggSteps" > <property name="toolTip" > <string>The number of steps it takes to hatch the egg of the species</string> </property> @@ -616,34 +761,28 @@ <property name="whatsThis" > <string>The number of steps it takes to hatch the egg of the species</string> </property> - <layout class="QVBoxLayout" > - <item> - <widget class="KIntNumInput" name="varEggSteps" > - <property name="minimum" > - <number>0</number> - </property> - </widget> - </item> - </layout> + <property name="minimum" > + <number>0</number> + </property> </widget> </item> - <item> + <item row="4" column="0" colspan="2" > <widget class="QGroupBox" name="boxEggGroups" > <property name="title" > <string>Egg Groups</string> </property> - <property name="toolTip" > - <string>The egg groups the species belongs to</string> - </property> - <property name="statusTip" > - <string>The egg groups the species belongs to</string> - </property> - <property name="whatsThis" > - <string>The egg groups the species belongs to</string> - </property> - <layout class="QHBoxLayout" > - <item> + <layout class="QGridLayout" > + <item row="0" column="0" > <widget class="KActionSelector" name="varEggGroups" > + <property name="toolTip" > + <string>The egg groups the species belongs to</string> + </property> + <property name="statusTip" > + <string>The egg groups the species belongs to</string> + </property> + <property name="whatsThis" > + <string>The egg groups the species belongs to</string> + </property> <property name="showUpDownButtons" > <bool>false</bool> </property> @@ -652,127 +791,160 @@ </layout> </widget> </item> - <item> + <item row="5" column="0" colspan="2" > <widget class="QGroupBox" name="boxEvolution" > <property name="title" > <string>Evolution Script</string> </property> - <property name="toolTip" > - <string>The script that controls how the species evolves</string> - </property> - <property name="statusTip" > - <string>The script that controls how the species evolves</string> - </property> - <property name="whatsThis" > - <string>The script that controls how the species evolves</string> - </property> - <layout class="QHBoxLayout" > - <item> - <widget class="Sigmodr::ScriptWidget" name="varEvolution" /> + <layout class="QGridLayout" > + <item row="0" column="0" > + <widget class="Sigmodr::ScriptWidget" name="varEvolution" > + <property name="toolTip" > + <string>The script that controls how the species evolves</string> + </property> + <property name="statusTip" > + <string>The script that controls how the species evolves</string> + </property> + <property name="whatsThis" > + <string>The script that controls how the species evolves</string> + </property> + </widget> </item> </layout> </widget> </item> </layout> </widget> - <widget class="QWidget" name="tabSprites" > + <widget class="QWidget" > <attribute name="title" > <string>Sprites</string> </attribute> - <layout class="QVBoxLayout" > - <item> - <widget class="QGroupBox" name="boxMaleSprites" > - <property name="title" > - <string comment="Label for the male sprites of the species" >Male</string> + <layout class="QGridLayout" > + <item row="0" column="0" > + <widget class="QLabel" name="labelMaleFront" > + <property name="text" > + <string>Male front:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varMaleFront</cstring> + </property> + </widget> + </item> + <item row="0" column="1" > + <widget class="KComboBox" name="varMaleFront" > + <property name="sizePolicy" > + <sizepolicy vsizetype="Minimum" hsizetype="Expanding" > + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> <property name="toolTip" > - <string>Sprites for the males of the species</string> + <string>The front of the males of the species</string> </property> <property name="statusTip" > - <string>Sprites for the males of the species</string> + <string>The front of the males of the species</string> </property> <property name="whatsThis" > - <string>Sprites for the males of the species</string> + <string>The front of the males of the species</string> </property> - <layout class="QVBoxLayout" > - <item> - <widget class="KComboBox" name="varMaleFront" > - <property name="toolTip" > - <string>The front of the males of the species</string> - </property> - <property name="statusTip" > - <string>The front of the males of the species</string> - </property> - <property name="whatsThis" > - <string>The front of the males of the species</string> - </property> - </widget> - </item> - <item> - <widget class="KComboBox" name="varMaleBack" > - <property name="toolTip" > - <string>The back of the males of the species</string> - </property> - <property name="statusTip" > - <string>The back of the males of the species</string> - </property> - <property name="whatsThis" > - <string>The back of the males of the species</string> - </property> - </widget> - </item> - </layout> </widget> </item> - <item> - <widget class="QGroupBox" name="boxFemaleSprites" > - <property name="title" > - <string comment="Label for the female sprites of the species" >Female</string> + <item row="1" column="0" > + <widget class="QLabel" name="labelMaleBack" > + <property name="text" > + <string>Male back:</string> </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varMaleBack</cstring> + </property> + </widget> + </item> + <item row="1" column="1" > + <widget class="KComboBox" name="varMaleBack" > <property name="toolTip" > - <string>Sprites for the females of the species</string> + <string>The back of the males of the species</string> </property> <property name="statusTip" > - <string>Sprites for the females of the species</string> + <string>The back of the males of the species</string> </property> <property name="whatsThis" > - <string>Sprites for the females of the species</string> + <string>The back of the males of the species</string> </property> - <layout class="QHBoxLayout" > - <item> - <widget class="KComboBox" name="varFemaleFront" > - <property name="toolTip" > - <string>The front of the females of the species</string> - </property> - <property name="statusTip" > - <string>The front of the females of the species</string> - </property> - <property name="whatsThis" > - <string>The front of the females of the species</string> - </property> - </widget> - </item> - <item> - <widget class="KComboBox" name="varFemaleBack" > - <property name="toolTip" > - <string>The back of the females of the species</string> - </property> - <property name="statusTip" > - <string>The back of the females of the species</string> - </property> - <property name="whatsThis" > - <string>The back of the females of the species</string> - </property> - </widget> - </item> - </layout> </widget> </item> - <item> - <widget class="QGroupBox" name="boxSkin" > - <property name="title" > - <string>Skin</string> + <item row="2" column="0" > + <widget class="QLabel" name="labelFemaleFront" > + <property name="text" > + <string>Female front:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varFemaleFront</cstring> + </property> + </widget> + </item> + <item row="2" column="1" > + <widget class="KComboBox" name="varFemaleFront" > + <property name="toolTip" > + <string>The front of the females of the species</string> + </property> + <property name="statusTip" > + <string>The front of the females of the species</string> + </property> + <property name="whatsThis" > + <string>The front of the females of the species</string> + </property> + </widget> + </item> + <item row="3" column="0" > + <widget class="QLabel" name="labelFemaleBack" > + <property name="text" > + <string>FemaleBack:</string> </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varFemaleBack</cstring> + </property> + </widget> + </item> + <item row="3" column="1" > + <widget class="KComboBox" name="varFemaleBack" > + <property name="toolTip" > + <string>The back of the females of the species</string> + </property> + <property name="statusTip" > + <string>The back of the females of the species</string> + </property> + <property name="whatsThis" > + <string>The back of the females of the species</string> + </property> + </widget> + </item> + <item row="4" column="0" > + <widget class="QLabel" name="labelSkin" > + <property name="text" > + <string>Skin:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>varSkin</cstring> + </property> + </widget> + </item> + <item row="4" column="1" > + <widget class="KComboBox" name="varSkin" > <property name="toolTip" > <string>The skin that is used to represent the species</string> </property> @@ -782,14 +954,9 @@ <property name="whatsThis" > <string>The skin that is used to represent the species</string> </property> - <layout class="QVBoxLayout" > - <item> - <widget class="KComboBox" name="varSkin" /> - </item> - </layout> </widget> </item> - <item> + <item row="5" column="0" colspan="2" > <spacer> <property name="orientation" > <enum>Qt::Vertical</enum> |
