diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-05-09 22:10:24 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-05-09 22:10:24 +0000 |
| commit | 3d877ca28bcb7c70945ff408bd0273e176472969 (patch) | |
| tree | b7789493be9b11856ea9068ddcf514d22a0ec56b /pokemodr/models/RootModel.cpp | |
| parent | 32a23089b9e2dfe59b3e70be814d8eee9ed9fb61 (diff) | |
| download | sigen-3d877ca28bcb7c70945ff408bd0273e176472969.tar.gz sigen-3d877ca28bcb7c70945ff408bd0273e176472969.tar.xz sigen-3d877ca28bcb7c70945ff408bd0273e176472969.zip | |
[FIX] More test code for the tree bug
[FIX] Rules now a pointer in Pokemod
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@123 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/models/RootModel.cpp')
| -rw-r--r-- | pokemodr/models/RootModel.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pokemodr/models/RootModel.cpp b/pokemodr/models/RootModel.cpp index 7dac9b39..40759f7f 100644 --- a/pokemodr/models/RootModel.cpp +++ b/pokemodr/models/RootModel.cpp @@ -26,6 +26,9 @@ // Test code includes #include <QFile> +#include "../../pokemod/Ability.h" +#include "../../pokemod/AbilityEffect.h" +#include "AbilityModel.h" RootModel::RootModel(const QList<QVariant>& pokemods) : GroupModel(NULL, NULL) @@ -71,6 +74,13 @@ void RootModel::setupData(const QList<QVariant>& pokemods) QDomDocument xml; xml.setContent(&fin); fin.close(); - m_objects.append(new PokemodModel(this, new Pokemod(xml.documentElement()))); + Pokemod* pokemod = new Pokemod(); + Ability* ability = pokemod->newAbility(); + ability->setName("foo"); + ability->newEffect()->setEffect(AbilityEffect::E_PreventDamage); + m_objects.append(new AbilityModel(this, ability)); + m_objects.append(new AbilityGroupModel(this, pokemod)); + Pokemod* full = new Pokemod(xml.documentElement()); + m_objects.append(new PokemodModel(this, full)); // TODO: make sub models from data } |
