summaryrefslogtreecommitdiffstats
path: root/sigmodr/tree
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-05-02 14:27:59 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-05-02 14:27:59 -0400
commit8c561edcded6a4eafc3588a23975d0e6f395aab2 (patch)
treef3d7cdeb54feea4a3769a9274529f05c275c8bfb /sigmodr/tree
parent9d3fe7fd1bd92692b8631f6985e66e98a3dd0006 (diff)
downloadsigen-8c561edcded6a4eafc3588a23975d0e6f395aab2.tar.gz
sigen-8c561edcded6a4eafc3588a23975d0e6f395aab2.tar.xz
sigen-8c561edcded6a4eafc3588a23975d0e6f395aab2.zip
Actually use parent when creating the editor widget
Diffstat (limited to 'sigmodr/tree')
-rw-r--r--sigmodr/tree/TreeItem.cpp65
1 files changed, 32 insertions, 33 deletions
diff --git a/sigmodr/tree/TreeItem.cpp b/sigmodr/tree/TreeItem.cpp
index 3612ad4b..dc6e2e27 100644
--- a/sigmodr/tree/TreeItem.cpp
+++ b/sigmodr/tree/TreeItem.cpp
@@ -373,105 +373,104 @@ bool TreeItem::canRemove() const
QWidget* TreeItem::editWidget(QWidget* parent)
{
- // TODO
ObjectUI* editorWidget = NULL;
switch (m_type)
{
case EntryGame:
- editorWidget = new GameUI(qobject_cast<Game*>(m_object), NULL);
+ editorWidget = new GameUI(qobject_cast<Game*>(m_object), parent);
break;
case EntryRules:
- editorWidget = new RulesUI(qobject_cast<Rules*>(m_object), NULL);
+ editorWidget = new RulesUI(qobject_cast<Rules*>(m_object), parent);
break;
case EntryAbility:
- editorWidget = new AbilityUI(qobject_cast<Ability*>(m_object), NULL);
+ editorWidget = new AbilityUI(qobject_cast<Ability*>(m_object), parent);
break;
case EntryAuthor:
- editorWidget = new AuthorUI(qobject_cast<Author*>(m_object), NULL);
+ editorWidget = new AuthorUI(qobject_cast<Author*>(m_object), parent);
break;
case EntryBadge:
- editorWidget = new BadgeUI(qobject_cast<Badge*>(m_object), NULL);
+ editorWidget = new BadgeUI(qobject_cast<Badge*>(m_object), parent);
break;
case EntryCoinList:
- editorWidget = new CoinListUI(qobject_cast<CoinList*>(m_object), NULL);
+ editorWidget = new CoinListUI(qobject_cast<CoinList*>(m_object), parent);
break;
case EntryCoinListItem:
- editorWidget = new CoinListItemUI(qobject_cast<CoinListItem*>(m_object), NULL);
+ editorWidget = new CoinListItemUI(qobject_cast<CoinListItem*>(m_object), parent);
break;
case EntryEggGroup:
- editorWidget = new EggGroupUI(qobject_cast<EggGroup*>(m_object), NULL);
+ editorWidget = new EggGroupUI(qobject_cast<EggGroup*>(m_object), parent);
break;
case EntryGlobalScript:
- editorWidget = new GlobalScriptUI(qobject_cast<GlobalScript*>(m_object), NULL);
+ editorWidget = new GlobalScriptUI(qobject_cast<GlobalScript*>(m_object), parent);
break;
case EntryItem:
- editorWidget = new ItemUI(qobject_cast<Item*>(m_object), NULL);
+ editorWidget = new ItemUI(qobject_cast<Item*>(m_object), parent);
break;
case EntryItemType:
- editorWidget = new ItemTypeUI(qobject_cast<ItemType*>(m_object), NULL);
+ editorWidget = new ItemTypeUI(qobject_cast<ItemType*>(m_object), parent);
break;
case EntryMap:
- editorWidget = new MapUI(qobject_cast<Map*>(m_object), NULL);
+ editorWidget = new MapUI(qobject_cast<Map*>(m_object), parent);
break;
case EntryMapEffect:
- editorWidget = new MapEffectUI(qobject_cast<MapEffect*>(m_object), NULL);
+ editorWidget = new MapEffectUI(qobject_cast<MapEffect*>(m_object), parent);
break;
case EntryMapTrainer:
- editorWidget = new MapTrainerUI(qobject_cast<MapTrainer*>(m_object), NULL);
+ editorWidget = new MapTrainerUI(qobject_cast<MapTrainer*>(m_object), parent);
break;
case EntryMapTrainerTeamMember:
- editorWidget = new MapTrainerTeamMemberUI(qobject_cast<MapTrainerTeamMember*>(m_object), NULL);
+ editorWidget = new MapTrainerTeamMemberUI(qobject_cast<MapTrainerTeamMember*>(m_object), parent);
break;
case EntryMapWarp:
- editorWidget = new MapWarpUI(qobject_cast<MapWarp*>(m_object), NULL);
+ editorWidget = new MapWarpUI(qobject_cast<MapWarp*>(m_object), parent);
break;
case EntryMapWildList:
- editorWidget = new MapWildListUI(qobject_cast<MapWildList*>(m_object), NULL);
+ editorWidget = new MapWildListUI(qobject_cast<MapWildList*>(m_object), parent);
break;
case EntryMapWildListEncounter:
- editorWidget = new MapWildListEncounterUI(qobject_cast<MapWildListEncounter*>(m_object), NULL);
+ editorWidget = new MapWildListEncounterUI(qobject_cast<MapWildListEncounter*>(m_object), parent);
break;
case EntryMove:
- editorWidget = new MoveUI(qobject_cast<Move*>(m_object), NULL);
+ editorWidget = new MoveUI(qobject_cast<Move*>(m_object), parent);
break;
case EntryNature:
- editorWidget = new NatureUI(qobject_cast<Nature*>(m_object), NULL);
+ editorWidget = new NatureUI(qobject_cast<Nature*>(m_object), parent);
break;
case EntrySkin:
- editorWidget = new SkinUI(qobject_cast<Skin*>(m_object), NULL);
+ editorWidget = new SkinUI(qobject_cast<Skin*>(m_object), parent);
break;
case EntrySound:
- editorWidget = new SoundUI(qobject_cast<Sound*>(m_object), NULL);
+ editorWidget = new SoundUI(qobject_cast<Sound*>(m_object), parent);
break;
case EntrySpecies:
- editorWidget = new SpeciesUI(qobject_cast<Species*>(m_object), NULL);
+ editorWidget = new SpeciesUI(qobject_cast<Species*>(m_object), parent);
break;
case EntrySpeciesMove:
- editorWidget = new SpeciesMoveUI(qobject_cast<SpeciesMove*>(m_object), NULL);
+ editorWidget = new SpeciesMoveUI(qobject_cast<SpeciesMove*>(m_object), parent);
break;
case EntrySprite:
- editorWidget = new SpriteUI(qobject_cast<Sprite*>(m_object), NULL);
+ editorWidget = new SpriteUI(qobject_cast<Sprite*>(m_object), parent);
break;
case EntryStatus:
- editorWidget = new StatusUI(qobject_cast<Status*>(m_object), NULL);
+ editorWidget = new StatusUI(qobject_cast<Status*>(m_object), parent);
break;
case EntryStore:
- editorWidget = new StoreUI(qobject_cast<Store*>(m_object), NULL);
+ editorWidget = new StoreUI(qobject_cast<Store*>(m_object), parent);
break;
case EntryTile:
- editorWidget = new TileUI(qobject_cast<Tile*>(m_object), NULL);
+ editorWidget = new TileUI(qobject_cast<Tile*>(m_object), parent);
break;
case EntryTime:
- editorWidget = new TimeUI(qobject_cast<Time*>(m_object), NULL);
+ editorWidget = new TimeUI(qobject_cast<Time*>(m_object), parent);
break;
case EntryTrainer:
- editorWidget = new TrainerUI(qobject_cast<Trainer*>(m_object), NULL);
+ editorWidget = new TrainerUI(qobject_cast<Trainer*>(m_object), parent);
break;
case EntryType:
- editorWidget = new TypeUI(qobject_cast<Type*>(m_object), NULL);
+ editorWidget = new TypeUI(qobject_cast<Type*>(m_object), parent);
break;
case EntryWeather:
- editorWidget = new WeatherUI(qobject_cast<Weather*>(m_object), NULL);
+ editorWidget = new WeatherUI(qobject_cast<Weather*>(m_object), parent);
break;
default:
break;