summaryrefslogtreecommitdiffstats
path: root/pokemod/Rules.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-05-15 19:55:43 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-05-15 19:55:43 +0000
commitfdd0eec1d145fb8ac97b4cc9aaed5218214416ec (patch)
tree2389a0d53fe3eaa644ccb220345995feec748823 /pokemod/Rules.cpp
parent77124f3f105ea3837022d20a49028309a211c4b0 (diff)
downloadsigen-fdd0eec1d145fb8ac97b4cc9aaed5218214416ec.tar.gz
sigen-fdd0eec1d145fb8ac97b4cc9aaed5218214416ec.tar.xz
sigen-fdd0eec1d145fb8ac97b4cc9aaed5218214416ec.zip
[FIX] Refactored out connections made within widgets
[FIX] Flag, Fractiona, and Point widgets fixed to only emit signals when actually changed [FIX] Pokemod classes now emit signals git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@138 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Rules.cpp')
-rw-r--r--pokemod/Rules.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/pokemod/Rules.cpp b/pokemod/Rules.cpp
index f466e42d..fcb63c91 100644
--- a/pokemod/Rules.cpp
+++ b/pokemod/Rules.cpp
@@ -163,6 +163,7 @@ QDomElement Rules::save() const
void Rules::setGenderAllowed(const bool genderAllowed)
{
m_genderAllowed = genderAllowed;
+ emit(changed());
}
void Rules::setBreedingAllowed(const bool breedingAllowed)
@@ -173,31 +174,37 @@ void Rules::setBreedingAllowed(const bool breedingAllowed)
return;
}
m_breedingAllowed = breedingAllowed;
+ emit(changed());
}
void Rules::setHoldItems(const int holdItems)
{
m_holdItems = holdItems;
+ emit(changed());
}
void Rules::setCriticalDomains(const bool criticalDomains)
{
m_criticalDomains = criticalDomains;
+ emit(changed());
}
void Rules::setAbilityAllowed(const bool abilityAllowed)
{
m_abilityAllowed = abilityAllowed;
+ emit(changed());
}
void Rules::setNatureAllowed(const bool natureAllowed)
{
m_natureAllowed = natureAllowed;
+ emit(changed());
}
void Rules::setNumBoxes(const int numBoxes)
{
m_numBoxes = numBoxes;
+ emit(changed());
}
void Rules::setBoxSize(const int boxSize)
@@ -208,6 +215,7 @@ void Rules::setBoxSize(const int boxSize)
return;
}
m_boxSize = boxSize;
+ emit(changed());
}
void Rules::setMaxParty(const int maxParty)
@@ -218,6 +226,7 @@ void Rules::setMaxParty(const int maxParty)
return;
}
m_maxParty = maxParty;
+ emit(changed());
}
void Rules::setMaxFight(const int maxFight)
@@ -228,6 +237,7 @@ void Rules::setMaxFight(const int maxFight)
return;
}
m_maxFight = maxFight;
+ emit(changed());
}
void Rules::setMaxPlayers(const int maxPlayers)
@@ -238,6 +248,7 @@ void Rules::setMaxPlayers(const int maxPlayers)
return;
}
m_maxPlayers = maxPlayers;
+ emit(changed());
}
void Rules::setMaxMoves(const int maxMoves)
@@ -248,6 +259,7 @@ void Rules::setMaxMoves(const int maxMoves)
return;
}
m_maxMoves = maxMoves;
+ emit(changed());
}
void Rules::setMaxLevel(const int maxLevel)
@@ -258,36 +270,42 @@ void Rules::setMaxLevel(const int maxLevel)
return;
}
m_maxLevel = maxLevel;
+ emit(changed());
}
void Rules::setMaxMoney(const int maxMoney)
{
m_maxMoney = maxMoney;
+ emit(changed());
}
void Rules::setHardCash(const bool hardCash)
{
m_hardCash = hardCash;
+ emit(changed());
}
void Rules::setAllowSwitchStyle(const bool allowSwitchStyle)
{
m_allowSwitchStyle = allowSwitchStyle;
+ emit(changed());
}
void Rules::setSpecialSplit(const bool specialSplit)
{
m_specialSplit = specialSplit;
+ emit(changed());
}
void Rules::setSpecialDVSplit(const bool specialDVSplit)
{
- if (specialDVSplit && m_specialSplit)
+ if (!specialDVSplit && m_specialSplit)
{
emit(error(bounds("specialDVSplit")));
return;
}
m_specialDVSplit = specialDVSplit;
+ emit(changed());
}
void Rules::setMaxDVValue(const unsigned char maxDVValue)
@@ -298,31 +316,37 @@ void Rules::setMaxDVValue(const unsigned char maxDVValue)
return;
}
m_maxDVValue = maxDVValue;
+ emit(changed());
}
void Rules::setHappiness(const bool happiness)
{
m_happiness = happiness;
+ emit(changed());
}
void Rules::setHappyFaintLoss(const int happyFaintLoss)
{
m_happyFaintLoss = happyFaintLoss;
+ emit(changed());
}
void Rules::setHappyLevelGain(const int happyLevelGain)
{
m_happyLevelGain = happyLevelGain;
+ emit(changed());
}
void Rules::setHappySteps(const int happySteps)
{
m_happySteps = happySteps;
+ emit(changed());
}
void Rules::setEffortValuesAllowed(const bool effortValuesAllowed)
{
m_effortValuesAllowed = effortValuesAllowed;
+ emit(changed());
}
void Rules::setMaxTotalEV(const int maxTotalEV)
@@ -333,6 +357,7 @@ void Rules::setMaxTotalEV(const int maxTotalEV)
return;
}
m_maxTotalEV = maxTotalEV;
+ emit(changed());
}
void Rules::setMaxEVPerStat(const int maxEVPerStat)
@@ -343,6 +368,7 @@ void Rules::setMaxEVPerStat(const int maxEVPerStat)
return;
}
m_maxEVPerStat = maxEVPerStat;
+ emit(changed());
}
void Rules::setPokerusChance(const Fraction& pokerusChance)
@@ -353,6 +379,7 @@ void Rules::setPokerusChance(const Fraction& pokerusChance)
return;
}
m_pokerusChance = pokerusChance;
+ emit(changed());
}
bool Rules::genderAllowed() const