summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changelog7
-rw-r--r--sigbattle/ATBArena.cpp10
-rw-r--r--sigbattle/ATBArena.h10
-rw-r--r--sigbattle/ATBTimer.cpp18
-rw-r--r--sigbattle/ATBTimer.h10
-rw-r--r--sigbattle/ActionQueue.h10
-rw-r--r--sigbattle/Arena.cpp30
-rw-r--r--sigbattle/Arena.h16
-rw-r--r--sigbattle/Bot.h14
-rw-r--r--sigbattle/CMakeLists.txt36
-rw-r--r--sigbattle/Containment.cpp8
-rw-r--r--sigbattle/Containment.h18
-rw-r--r--sigbattle/Ghost.cpp6
-rw-r--r--sigbattle/Ghost.h12
-rw-r--r--sigbattle/GhostBot.h10
-rw-r--r--sigbattle/Global.h16
-rw-r--r--sigbattle/Player.cpp8
-rw-r--r--sigbattle/Player.h18
-rw-r--r--sigbattle/Team.cpp24
-rw-r--r--sigbattle/Team.h12
-rw-r--r--sigbattle/TeamMember.cpp300
-rw-r--r--sigbattle/TeamMember.h114
-rw-r--r--sigbattle/TurnArena.cpp20
-rw-r--r--sigbattle/TurnArena.h12
-rw-r--r--sigen/Audio.h4
-rw-r--r--sigen/Sigen.cpp (renamed from sigen/PokeGen.h)9
-rw-r--r--sigen/sigen.tex (renamed from sigen/pokegen.tex)0
-rw-r--r--sigmod/Ability.cpp40
-rw-r--r--sigmod/Ability.h18
-rw-r--r--sigmod/Author.cpp32
-rw-r--r--sigmod/Author.h18
-rw-r--r--sigmod/Badge.cpp52
-rw-r--r--sigmod/Badge.h18
-rw-r--r--sigmod/CMakeLists.txt36
-rw-r--r--sigmod/CoinList.cpp58
-rw-r--r--sigmod/CoinList.h18
-rw-r--r--sigmod/CoinListObject.cpp40
-rw-r--r--sigmod/CoinListObject.h12
-rw-r--r--sigmod/EggGroup.cpp24
-rw-r--r--sigmod/EggGroup.h18
-rw-r--r--sigmod/Fraction.cpp44
-rw-r--r--sigmod/Fraction.h12
-rw-r--r--sigmod/Global.h22
-rw-r--r--sigmod/GlobalScript.cpp30
-rw-r--r--sigmod/GlobalScript.h18
-rw-r--r--sigmod/Hat.h8
-rw-r--r--sigmod/Item.cpp50
-rw-r--r--sigmod/Item.h18
-rw-r--r--sigmod/ItemType.cpp38
-rw-r--r--sigmod/ItemType.h20
-rw-r--r--sigmod/Macros.h6
-rw-r--r--sigmod/Map.cpp170
-rw-r--r--sigmod/Map.h20
-rw-r--r--sigmod/MapEffect.cpp42
-rw-r--r--sigmod/MapEffect.h10
-rw-r--r--sigmod/MapTrainer.cpp78
-rw-r--r--sigmod/MapTrainer.h10
-rw-r--r--sigmod/MapTrainerTeamMember.cpp82
-rw-r--r--sigmod/MapTrainerTeamMember.h10
-rw-r--r--sigmod/MapWarp.cpp52
-rw-r--r--sigmod/MapWarp.h12
-rw-r--r--sigmod/MapWildList.cpp52
-rw-r--r--sigmod/MapWildList.h10
-rw-r--r--sigmod/MapWildListEncounter.cpp36
-rw-r--r--sigmod/MapWildListEncounter.h10
-rw-r--r--sigmod/Matrix.h10
-rw-r--r--sigmod/Move.cpp64
-rw-r--r--sigmod/Move.h18
-rw-r--r--sigmod/Nature.cpp36
-rw-r--r--sigmod/Nature.h18
-rw-r--r--sigmod/Object.cpp30
-rw-r--r--sigmod/Object.h12
-rw-r--r--sigmod/Rules.cpp114
-rw-r--r--sigmod/Rules.h18
-rw-r--r--sigmod/Script.h12
-rw-r--r--sigmod/Sigmod.cpp (renamed from sigmod/Pokemod.cpp)632
-rw-r--r--sigmod/Sigmod.h (renamed from sigmod/Pokemod.h)20
-rw-r--r--sigmod/Skin.cpp28
-rw-r--r--sigmod/Skin.h18
-rw-r--r--sigmod/Sound.cpp34
-rw-r--r--sigmod/Sound.h20
-rw-r--r--sigmod/Species.cpp278
-rw-r--r--sigmod/Species.h32
-rw-r--r--sigmod/SpeciesAbility.cpp30
-rw-r--r--sigmod/SpeciesAbility.h10
-rw-r--r--sigmod/SpeciesItem.cpp30
-rw-r--r--sigmod/SpeciesItem.h10
-rw-r--r--sigmod/SpeciesMove.cpp38
-rw-r--r--sigmod/SpeciesMove.h10
-rw-r--r--sigmod/Sprite.cpp30
-rw-r--r--sigmod/Sprite.h18
-rw-r--r--sigmod/Status.cpp34
-rw-r--r--sigmod/Status.h18
-rw-r--r--sigmod/Store.cpp32
-rw-r--r--sigmod/Store.h18
-rw-r--r--sigmod/Tile.cpp40
-rw-r--r--sigmod/Tile.h18
-rw-r--r--sigmod/Time.cpp32
-rw-r--r--sigmod/Time.h18
-rw-r--r--sigmod/Trainer.cpp60
-rw-r--r--sigmod/Trainer.h20
-rw-r--r--sigmod/Type.cpp28
-rw-r--r--sigmod/Type.h18
-rw-r--r--sigmod/Weather.cpp30
-rw-r--r--sigmod/Weather.h18
-rw-r--r--sigmodr/AbilityUI.cpp50
-rw-r--r--sigmodr/AbilityUI.h16
-rw-r--r--sigmodr/AuthorUI.cpp38
-rw-r--r--sigmodr/AuthorUI.h12
-rw-r--r--sigmodr/BadgeUI.cpp86
-rw-r--r--sigmodr/BadgeUI.h14
-rw-r--r--sigmodr/CMakeLists.txt110
-rw-r--r--sigmodr/CoinListObjectUI.cpp70
-rw-r--r--sigmodr/CoinListObjectUI.h12
-rw-r--r--sigmodr/CoinListUI.cpp34
-rw-r--r--sigmodr/CoinListUI.h14
-rw-r--r--sigmodr/EggGroupUI.cpp26
-rw-r--r--sigmodr/EggGroupUI.h12
-rw-r--r--sigmodr/FractionWidget.cpp22
-rw-r--r--sigmodr/FractionWidget.h20
-rw-r--r--sigmodr/GlobalScriptUI.cpp32
-rw-r--r--sigmodr/GlobalScriptUI.h14
-rw-r--r--sigmodr/ItemTypeUI.cpp50
-rw-r--r--sigmodr/ItemTypeUI.h12
-rw-r--r--sigmodr/ItemUI.cpp70
-rw-r--r--sigmodr/ItemUI.h14
-rw-r--r--sigmodr/MapEffectUI.cpp66
-rw-r--r--sigmodr/MapEffectUI.h14
-rw-r--r--sigmodr/MapTrainerTeamMemberUI.cpp100
-rw-r--r--sigmodr/MapTrainerTeamMemberUI.h12
-rw-r--r--sigmodr/MapTrainerUI.cpp84
-rw-r--r--sigmodr/MapTrainerUI.h14
-rw-r--r--sigmodr/MapUI.cpp94
-rw-r--r--sigmodr/MapUI.h12
-rw-r--r--sigmodr/MapWarpUI.cpp86
-rw-r--r--sigmodr/MapWarpUI.h14
-rw-r--r--sigmodr/MapWildListEncounterUI.cpp52
-rw-r--r--sigmodr/MapWildListEncounterUI.h12
-rw-r--r--sigmodr/MapWildListUI.cpp26
-rw-r--r--sigmodr/MapWildListUI.h12
-rw-r--r--sigmodr/MoveUI.cpp90
-rw-r--r--sigmodr/MoveUI.h18
-rw-r--r--sigmodr/NatureUI.cpp62
-rw-r--r--sigmodr/NatureUI.h14
-rw-r--r--sigmodr/ObjectUI.cpp46
-rw-r--r--sigmodr/ObjectUI.h26
-rw-r--r--sigmodr/PointWidget.cpp12
-rw-r--r--sigmodr/PointWidget.h6
-rw-r--r--sigmodr/PokemodTree.cpp156
-rw-r--r--sigmodr/PokemodUI.cpp146
-rw-r--r--sigmodr/RulesUI.cpp186
-rw-r--r--sigmodr/RulesUI.h12
-rw-r--r--sigmodr/ScriptWidget.cpp20
-rw-r--r--sigmodr/ScriptWidget.h20
-rw-r--r--sigmodr/SigmodTree.cpp156
-rw-r--r--sigmodr/SigmodTree.h (renamed from sigmodr/PokemodTree.h)38
-rw-r--r--sigmodr/SigmodTreeModel.cpp (renamed from sigmodr/PokemodTreeModel.cpp)50
-rw-r--r--sigmodr/SigmodTreeModel.h (renamed from sigmodr/PokemodTreeModel.h)16
-rw-r--r--sigmodr/SigmodUI.cpp146
-rw-r--r--sigmodr/SigmodUI.h (renamed from sigmodr/PokemodUI.h)22
-rw-r--r--sigmodr/Sigmodr.cpp (renamed from sigmodr/Pokemodr.cpp)13
-rw-r--r--sigmodr/SigmodrPreferences.cpp (renamed from sigmodr/PokemodrPreferences.cpp)8
-rw-r--r--sigmodr/SigmodrPreferences.h (renamed from sigmodr/PokemodrPreferences.h)10
-rw-r--r--sigmodr/SigmodrUI.cpp (renamed from sigmodr/PokemodrUI.cpp)232
-rw-r--r--sigmodr/SigmodrUI.h (renamed from sigmodr/PokemodrUI.h)52
-rw-r--r--sigmodr/SkinUI.cpp32
-rw-r--r--sigmodr/SkinUI.h14
-rw-r--r--sigmodr/SoundUI.cpp44
-rw-r--r--sigmodr/SoundUI.h12
-rw-r--r--sigmodr/SpeciesAbilityUI.cpp42
-rw-r--r--sigmodr/SpeciesAbilityUI.h12
-rw-r--r--sigmodr/SpeciesItemUI.cpp42
-rw-r--r--sigmodr/SpeciesItemUI.h12
-rw-r--r--sigmodr/SpeciesMoveUI.cpp54
-rw-r--r--sigmodr/SpeciesMoveUI.h12
-rw-r--r--sigmodr/SpeciesUI.cpp256
-rw-r--r--sigmodr/SpeciesUI.h24
-rw-r--r--sigmodr/SpriteUI.cpp34
-rw-r--r--sigmodr/SpriteUI.h12
-rw-r--r--sigmodr/StatusUI.cpp38
-rw-r--r--sigmodr/StatusUI.h16
-rw-r--r--sigmodr/StoreUI.cpp42
-rw-r--r--sigmodr/StoreUI.h12
-rw-r--r--sigmodr/TileUI.cpp72
-rw-r--r--sigmodr/TileUI.h14
-rw-r--r--sigmodr/TilemapModel.h34
-rw-r--r--sigmodr/TimeUI.cpp34
-rw-r--r--sigmodr/TimeUI.h12
-rw-r--r--sigmodr/TrainerUI.cpp132
-rw-r--r--sigmodr/TrainerUI.h12
-rw-r--r--sigmodr/TypeUI.cpp32
-rw-r--r--sigmodr/TypeUI.h14
-rw-r--r--sigmodr/TypechartModel.h22
-rw-r--r--sigmodr/ValidationDialog.cpp24
-rw-r--r--sigmodr/ValidationDialog.h12
-rw-r--r--sigmodr/WeatherUI.cpp32
-rw-r--r--sigmodr/WeatherUI.h14
-rw-r--r--sigmodr/gui/ability.ui6
-rw-r--r--sigmodr/gui/author.ui6
-rw-r--r--sigmodr/gui/badge.ui6
-rw-r--r--sigmodr/gui/coinlist.ui4
-rw-r--r--sigmodr/gui/globalscript.ui4
-rw-r--r--sigmodr/gui/item.ui4
-rw-r--r--sigmodr/gui/mapeffect.ui8
-rw-r--r--sigmodr/gui/maptrainer.ui8
-rw-r--r--sigmodr/gui/mapwarp.ui8
-rw-r--r--sigmodr/gui/move.ui12
-rw-r--r--sigmodr/gui/nature.ui6
-rw-r--r--sigmodr/gui/sigmod.ui (renamed from sigmodr/gui/pokemod.ui)30
-rw-r--r--sigmodr/gui/sigmodr.ui (renamed from sigmodr/gui/pokemodr.ui)10
-rw-r--r--sigmodr/gui/skin.ui4
-rw-r--r--sigmodr/gui/species.ui46
-rw-r--r--sigmodr/gui/status.ui6
-rw-r--r--sigmodr/gui/tile.ui4
-rw-r--r--sigmodr/gui/type.ui6
-rw-r--r--sigmodr/gui/weather.ui4
-rw-r--r--sigmodr/models/AbilityGroupModel.cpp38
-rw-r--r--sigmodr/models/AbilityGroupModel.h14
-rw-r--r--sigmodr/models/AbilityModel.cpp30
-rw-r--r--sigmodr/models/AbilityModel.h10
-rw-r--r--sigmodr/models/AuthorGroupModel.cpp38
-rw-r--r--sigmodr/models/AuthorGroupModel.h14
-rw-r--r--sigmodr/models/AuthorModel.cpp30
-rw-r--r--sigmodr/models/AuthorModel.h10
-rw-r--r--sigmodr/models/BadgeGroupModel.cpp38
-rw-r--r--sigmodr/models/BadgeGroupModel.h14
-rw-r--r--sigmodr/models/BadgeModel.cpp30
-rw-r--r--sigmodr/models/BadgeModel.h10
-rw-r--r--sigmodr/models/BaseModel.cpp22
-rw-r--r--sigmodr/models/BaseModel.h14
-rw-r--r--sigmodr/models/BaseObjectModel.cpp22
-rw-r--r--sigmodr/models/BaseObjectModel.h8
-rw-r--r--sigmodr/models/CoinListGroupModel.cpp38
-rw-r--r--sigmodr/models/CoinListGroupModel.h14
-rw-r--r--sigmodr/models/CoinListModel.cpp48
-rw-r--r--sigmodr/models/CoinListModel.h12
-rw-r--r--sigmodr/models/CoinListObjectModel.cpp50
-rw-r--r--sigmodr/models/CoinListObjectModel.h10
-rw-r--r--sigmodr/models/EggGroupGroupModel.cpp38
-rw-r--r--sigmodr/models/EggGroupGroupModel.h14
-rw-r--r--sigmodr/models/EggGroupModel.cpp30
-rw-r--r--sigmodr/models/EggGroupModel.h10
-rw-r--r--sigmodr/models/GlobalScriptGroupModel.cpp38
-rw-r--r--sigmodr/models/GlobalScriptGroupModel.h14
-rw-r--r--sigmodr/models/GlobalScriptModel.cpp30
-rw-r--r--sigmodr/models/GlobalScriptModel.h10
-rw-r--r--sigmodr/models/GroupModel.cpp22
-rw-r--r--sigmodr/models/GroupModel.h12
-rw-r--r--sigmodr/models/GroupObjectModel.cpp16
-rw-r--r--sigmodr/models/GroupObjectModel.h10
-rw-r--r--sigmodr/models/ItemGroupModel.cpp38
-rw-r--r--sigmodr/models/ItemGroupModel.h14
-rw-r--r--sigmodr/models/ItemModel.cpp30
-rw-r--r--sigmodr/models/ItemModel.h10
-rw-r--r--sigmodr/models/ItemTypeGroupModel.cpp38
-rw-r--r--sigmodr/models/ItemTypeGroupModel.h14
-rw-r--r--sigmodr/models/ItemTypeModel.cpp30
-rw-r--r--sigmodr/models/ItemTypeModel.h10
-rw-r--r--sigmodr/models/MapEffectGroupModel.cpp30
-rw-r--r--sigmodr/models/MapEffectGroupModel.h12
-rw-r--r--sigmodr/models/MapEffectModel.cpp32
-rw-r--r--sigmodr/models/MapEffectModel.h10
-rw-r--r--sigmodr/models/MapGroupModel.cpp38
-rw-r--r--sigmodr/models/MapGroupModel.h14
-rw-r--r--sigmodr/models/MapModel.cpp38
-rw-r--r--sigmodr/models/MapModel.h12
-rw-r--r--sigmodr/models/MapTrainerGroupModel.cpp30
-rw-r--r--sigmodr/models/MapTrainerGroupModel.h12
-rw-r--r--sigmodr/models/MapTrainerModel.cpp50
-rw-r--r--sigmodr/models/MapTrainerModel.h12
-rw-r--r--sigmodr/models/MapTrainerTeamMemberModel.cpp36
-rw-r--r--sigmodr/models/MapTrainerTeamMemberModel.h10
-rw-r--r--sigmodr/models/MapWarpGroupModel.cpp30
-rw-r--r--sigmodr/models/MapWarpGroupModel.h12
-rw-r--r--sigmodr/models/MapWarpModel.cpp32
-rw-r--r--sigmodr/models/MapWarpModel.h10
-rw-r--r--sigmodr/models/MapWildListEncounterModel.cpp36
-rw-r--r--sigmodr/models/MapWildListEncounterModel.h10
-rw-r--r--sigmodr/models/MapWildListGroupModel.cpp30
-rw-r--r--sigmodr/models/MapWildListGroupModel.h12
-rw-r--r--sigmodr/models/MapWildListModel.cpp50
-rw-r--r--sigmodr/models/MapWildListModel.h12
-rw-r--r--sigmodr/models/MoveGroupModel.cpp38
-rw-r--r--sigmodr/models/MoveGroupModel.h14
-rw-r--r--sigmodr/models/MoveModel.cpp30
-rw-r--r--sigmodr/models/MoveModel.h10
-rw-r--r--sigmodr/models/NatureGroupModel.cpp38
-rw-r--r--sigmodr/models/NatureGroupModel.h14
-rw-r--r--sigmodr/models/NatureModel.cpp32
-rw-r--r--sigmodr/models/NatureModel.h10
-rw-r--r--sigmodr/models/ObjectModel.cpp12
-rw-r--r--sigmodr/models/ObjectModel.h8
-rw-r--r--sigmodr/models/RootModel.cpp24
-rw-r--r--sigmodr/models/RootModel.h16
-rw-r--r--sigmodr/models/RulesModel.cpp28
-rw-r--r--sigmodr/models/RulesModel.h10
-rw-r--r--sigmodr/models/SigmodModel.cpp (renamed from sigmodr/models/PokemodModel.cpp)92
-rw-r--r--sigmodr/models/SigmodModel.h (renamed from sigmodr/models/PokemodModel.h)18
-rw-r--r--sigmodr/models/SkinGroupModel.cpp38
-rw-r--r--sigmodr/models/SkinGroupModel.h14
-rw-r--r--sigmodr/models/SkinModel.cpp30
-rw-r--r--sigmodr/models/SkinModel.h10
-rw-r--r--sigmodr/models/SoundGroupModel.cpp38
-rw-r--r--sigmodr/models/SoundGroupModel.h14
-rw-r--r--sigmodr/models/SoundModel.cpp32
-rw-r--r--sigmodr/models/SoundModel.h10
-rw-r--r--sigmodr/models/SpeciesAbilityGroupModel.cpp32
-rw-r--r--sigmodr/models/SpeciesAbilityGroupModel.h12
-rw-r--r--sigmodr/models/SpeciesAbilityModel.cpp38
-rw-r--r--sigmodr/models/SpeciesAbilityModel.h10
-rw-r--r--sigmodr/models/SpeciesGroupModel.cpp38
-rw-r--r--sigmodr/models/SpeciesGroupModel.h14
-rw-r--r--sigmodr/models/SpeciesItemGroupModel.cpp32
-rw-r--r--sigmodr/models/SpeciesItemGroupModel.h12
-rw-r--r--sigmodr/models/SpeciesItemModel.cpp38
-rw-r--r--sigmodr/models/SpeciesItemModel.h10
-rw-r--r--sigmodr/models/SpeciesModel.cpp40
-rw-r--r--sigmodr/models/SpeciesModel.h12
-rw-r--r--sigmodr/models/SpeciesMoveGroupModel.cpp32
-rw-r--r--sigmodr/models/SpeciesMoveGroupModel.h12
-rw-r--r--sigmodr/models/SpeciesMoveModel.cpp38
-rw-r--r--sigmodr/models/SpeciesMoveModel.h10
-rw-r--r--sigmodr/models/SpriteGroupModel.cpp38
-rw-r--r--sigmodr/models/SpriteGroupModel.h14
-rw-r--r--sigmodr/models/SpriteModel.cpp30
-rw-r--r--sigmodr/models/SpriteModel.h10
-rw-r--r--sigmodr/models/StatusGroupModel.cpp38
-rw-r--r--sigmodr/models/StatusGroupModel.h14
-rw-r--r--sigmodr/models/StatusModel.cpp30
-rw-r--r--sigmodr/models/StatusModel.h10
-rw-r--r--sigmodr/models/StoreGroupModel.cpp38
-rw-r--r--sigmodr/models/StoreGroupModel.h14
-rw-r--r--sigmodr/models/StoreModel.cpp32
-rw-r--r--sigmodr/models/StoreModel.h10
-rw-r--r--sigmodr/models/TileGroupModel.cpp38
-rw-r--r--sigmodr/models/TileGroupModel.h14
-rw-r--r--sigmodr/models/TileModel.cpp32
-rw-r--r--sigmodr/models/TileModel.h10
-rw-r--r--sigmodr/models/TimeGroupModel.cpp38
-rw-r--r--sigmodr/models/TimeGroupModel.h14
-rw-r--r--sigmodr/models/TimeModel.cpp32
-rw-r--r--sigmodr/models/TimeModel.h10
-rw-r--r--sigmodr/models/TrainerGroupModel.cpp38
-rw-r--r--sigmodr/models/TrainerGroupModel.h14
-rw-r--r--sigmodr/models/TrainerModel.cpp32
-rw-r--r--sigmodr/models/TrainerModel.h10
-rw-r--r--sigmodr/models/TypeGroupModel.cpp38
-rw-r--r--sigmodr/models/TypeGroupModel.h14
-rw-r--r--sigmodr/models/TypeModel.cpp32
-rw-r--r--sigmodr/models/TypeModel.h10
-rw-r--r--sigmodr/models/WeatherGroupModel.cpp38
-rw-r--r--sigmodr/models/WeatherGroupModel.h14
-rw-r--r--sigmodr/models/WeatherModel.cpp30
-rw-r--r--sigmodr/models/WeatherModel.h10
-rw-r--r--sigmodr/sigmodr.tex (renamed from sigmodr/pokemodr.tex)0
-rw-r--r--sigmodr/sigmodrui.rc (renamed from sigmodr/pokemodrui.rc)6
-rw-r--r--sigscript/AbilityWrapper.cpp18
-rw-r--r--sigscript/AbilityWrapper.h26
-rw-r--r--sigscript/AuthorWrapper.cpp14
-rw-r--r--sigscript/AuthorWrapper.h22
-rw-r--r--sigscript/BadgeWrapper.cpp22
-rw-r--r--sigscript/BadgeWrapper.h24
-rw-r--r--sigscript/CMakeLists.txt38
-rw-r--r--sigscript/CoinListObjectWrapper.cpp34
-rw-r--r--sigscript/CoinListObjectWrapper.h26
-rw-r--r--sigscript/CoinListWrapper.cpp16
-rw-r--r--sigscript/CoinListWrapper.h26
-rw-r--r--sigscript/Config.cpp16
-rw-r--r--sigscript/Config.h16
-rw-r--r--sigscript/EggGroupWrapper.cpp10
-rw-r--r--sigscript/EggGroupWrapper.h22
-rw-r--r--sigscript/Global.h16
-rw-r--r--sigscript/GlobalScriptWrapper.cpp12
-rw-r--r--sigscript/GlobalScriptWrapper.h24
-rw-r--r--sigscript/ItemTypeWrapper.cpp24
-rw-r--r--sigscript/ItemTypeWrapper.h24
-rw-r--r--sigscript/ItemWrapper.cpp22
-rw-r--r--sigscript/ItemWrapper.h24
-rw-r--r--sigscript/MapEffectWrapper.cpp20
-rw-r--r--sigscript/MapEffectWrapper.h24
-rw-r--r--sigscript/MapTrainerTeamMemberWrapper.cpp30
-rw-r--r--sigscript/MapTrainerTeamMemberWrapper.h22
-rw-r--r--sigscript/MapTrainerWrapper.cpp24
-rw-r--r--sigscript/MapTrainerWrapper.h24
-rw-r--r--sigscript/MapWarpWrapper.cpp32
-rw-r--r--sigscript/MapWarpWrapper.h28
-rw-r--r--sigscript/MapWildListEncounterWrapper.cpp16
-rw-r--r--sigscript/MapWildListEncounterWrapper.h22
-rw-r--r--sigscript/MapWildListWrapper.cpp16
-rw-r--r--sigscript/MapWildListWrapper.h26
-rw-r--r--sigscript/MapWrapper.cpp46
-rw-r--r--sigscript/MapWrapper.h26
-rw-r--r--sigscript/MoveWrapper.cpp34
-rw-r--r--sigscript/MoveWrapper.h28
-rw-r--r--sigscript/NatureWrapper.cpp14
-rw-r--r--sigscript/NatureWrapper.h24
-rw-r--r--sigscript/ObjectWrapper.cpp26
-rw-r--r--sigscript/ObjectWrapper.h26
-rw-r--r--sigscript/PokemodWrapper.cpp460
-rw-r--r--sigscript/RulesWrapper.cpp54
-rw-r--r--sigscript/RulesWrapper.h22
-rw-r--r--sigscript/SigmodWrapper.cpp460
-rw-r--r--sigscript/SigmodWrapper.h (renamed from sigscript/PokemodWrapper.h)32
-rw-r--r--sigscript/SkinWrapper.cpp12
-rw-r--r--sigscript/SkinWrapper.h24
-rw-r--r--sigscript/SoundWrapper.cpp22
-rw-r--r--sigscript/SoundWrapper.h26
-rw-r--r--sigscript/SpeciesAbilityWrapper.cpp14
-rw-r--r--sigscript/SpeciesAbilityWrapper.h22
-rw-r--r--sigscript/SpeciesItemWrapper.cpp14
-rw-r--r--sigscript/SpeciesItemWrapper.h22
-rw-r--r--sigscript/SpeciesMoveWrapper.cpp16
-rw-r--r--sigscript/SpeciesMoveWrapper.h22
-rw-r--r--sigscript/SpeciesWrapper.cpp122
-rw-r--r--sigscript/SpeciesWrapper.h50
-rw-r--r--sigscript/SpriteWrapper.cpp12
-rw-r--r--sigscript/SpriteWrapper.h22
-rw-r--r--sigscript/StatusWrapper.cpp14
-rw-r--r--sigscript/StatusWrapper.h26
-rw-r--r--sigscript/StoreWrapper.cpp14
-rw-r--r--sigscript/StoreWrapper.h22
-rw-r--r--sigscript/TileWrapper.cpp20
-rw-r--r--sigscript/TileWrapper.h26
-rw-r--r--sigscript/TimeWrapper.cpp14
-rw-r--r--sigscript/TimeWrapper.h22
-rw-r--r--sigscript/TrainerWrapper.cpp40
-rw-r--r--sigscript/TrainerWrapper.h34
-rw-r--r--sigscript/TypeWrapper.cpp12
-rw-r--r--sigscript/TypeWrapper.h24
-rw-r--r--sigscript/WeatherWrapper.cpp12
-rw-r--r--sigscript/WeatherWrapper.h24
431 files changed, 7064 insertions, 7061 deletions
diff --git a/Changelog b/Changelog
index de14e7cb..05110da2 100644
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,11 @@
-----------------
+Rev: 250
+Date: 5 September 2008
+User: MathStuf
+-----------------
+[FIX] Renamed everything (in use) away from Poké- prefixes
+
+-----------------
Rev: 249
Date: 5 September 2008
User: MathStuf
diff --git a/sigbattle/ATBArena.cpp b/sigbattle/ATBArena.cpp
index 92a1b71e..75c5c697 100644
--- a/sigbattle/ATBArena.cpp
+++ b/sigbattle/ATBArena.cpp
@@ -18,19 +18,19 @@
// Header includes
#include "ATBArena.h"
-// Pokebattle includes
+// Sigbattle includes
#include "ATBTimer.h"
// Qt includes
#include <QtCore/QTimer>
-Pokebattle::ATBArena::ATBArena(QList<Player*> players, QObject* parent) :
+Sigbattle::ATBArena::ATBArena(QList<Player*> players, QObject* parent) :
Arena(players, parent)
{
setupBattle();
}
-void Pokebattle::ATBArena::handleAction(TeamMember* teamMember, TeamMember::Action action)
+void Sigbattle::ATBArena::handleAction(TeamMember* teamMember, TeamMember::Action action)
{
if (action.first == TeamMember::Skip)
{
@@ -40,7 +40,7 @@ void Pokebattle::ATBArena::handleAction(TeamMember* teamMember, TeamMember::Acti
Arena::handleAction(teamMember, action);
}
-void Pokebattle::ATBArena::processActions()
+void Sigbattle::ATBArena::processActions()
{
if (!m_decisions.isEmpty())
{
@@ -52,7 +52,7 @@ void Pokebattle::ATBArena::processActions()
}
}
-void Pokebattle::ATBArena::setupBattle()
+void Sigbattle::ATBArena::setupBattle()
{
m_atbTimer = new ATBTimer(this, m_decisions);
QTimer* moveTimer = new QTimer(this);
diff --git a/sigbattle/ATBArena.h b/sigbattle/ATBArena.h
index 7cb095ec..5fccf2ec 100644
--- a/sigbattle/ATBArena.h
+++ b/sigbattle/ATBArena.h
@@ -15,19 +15,19 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEBATTLE_ATBARENA__
-#define __POKEBATTLE_ATBARENA__
+#ifndef __SIGBATTLE_ATBARENA__
+#define __SIGBATTLE_ATBARENA__
-// Pokebattle includes
+// Sigbattle includes
#include "ActionQueue.h"
#include "Arena.h"
-namespace Pokebattle
+namespace Sigbattle
{
// Forward declaraions
class ATBTimer;
-class POKEBATTLE_EXPORT ATBArena : public Arena
+class SIGBATTLE_EXPORT ATBArena : public Arena
{
Q_OBJECT
diff --git a/sigbattle/ATBTimer.cpp b/sigbattle/ATBTimer.cpp
index d2f42ce2..874c6fb8 100644
--- a/sigbattle/ATBTimer.cpp
+++ b/sigbattle/ATBTimer.cpp
@@ -18,7 +18,7 @@
// Header include
#include "ATBTimer.h"
-// Pokebattle includes
+// Sigbattle includes
#include "ATBArena.h"
// Qt includes
@@ -31,7 +31,7 @@
// STL includes
#include <functional>
-Pokebattle::ATBTimer::ATBTimer(ATBArena* arena, ActionQueue& actions) :
+Sigbattle::ATBTimer::ATBTimer(ATBArena* arena, ActionQueue& actions) :
QThread(arena),
m_arena(arena),
m_actions(actions),
@@ -40,12 +40,12 @@ Pokebattle::ATBTimer::ATBTimer(ATBArena* arena, ActionQueue& actions) :
connect(m_timer, SIGNAL(timeout()), this, SLOT(update()));
}
-void Pokebattle::ATBTimer::update()
+void Sigbattle::ATBTimer::update()
{
const QList<TeamMember*> active = m_timeStates.keys();
- QtConcurrent::blockingMap(active, std::bind1st(std::mem_fun(&Pokebattle::ATBTimer::increaseMeter), this));
+ QtConcurrent::blockingMap(active, std::bind1st(std::mem_fun(&Sigbattle::ATBTimer::increaseMeter), this));
// TODO: adjust max time if needed
- QList<TeamMember*> overflow = QtConcurrent::blockingFiltered(active, std::bind1st(std::mem_fun(&Pokebattle::ATBTimer::isOverflowed), this));
+ QList<TeamMember*> overflow = QtConcurrent::blockingFiltered(active, std::bind1st(std::mem_fun(&Sigbattle::ATBTimer::isOverflowed), this));
QMultiMap<double, TeamMember*> sorter;
foreach (TeamMember* teamMember, overflow)
sorter.insert(m_timeStates[teamMember], teamMember);
@@ -54,19 +54,19 @@ void Pokebattle::ATBTimer::update()
m_actions.enqueue(requestDecision(teamMember));
}
-void Pokebattle::ATBTimer::run()
+void Sigbattle::ATBTimer::run()
{
m_timer->start(50);
exec();
}
-void Pokebattle::ATBTimer::increaseMeter(const TeamMember* teamMember)
+void Sigbattle::ATBTimer::increaseMeter(const TeamMember* teamMember)
{
// TODO: tweak this(?)
- m_timeStates[const_cast<TeamMember*>(teamMember)] += teamMember->statValue(Pokemod::ST_Speed) / 10;
+ m_timeStates[const_cast<TeamMember*>(teamMember)] += teamMember->statValue(Sigmod::ST_Speed) / 10;
}
-bool Pokebattle::ATBTimer::isOverflowed(const TeamMember* teamMember) const
+bool Sigbattle::ATBTimer::isOverflowed(const TeamMember* teamMember) const
{
return m_threshold < m_timeStates[const_cast<TeamMember*>(teamMember)];
}
diff --git a/sigbattle/ATBTimer.h b/sigbattle/ATBTimer.h
index ff84ce54..ed0edd43 100644
--- a/sigbattle/ATBTimer.h
+++ b/sigbattle/ATBTimer.h
@@ -15,10 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEBATTLE_ATBTIMER__
-#define __POKEBATTLE_ATBTIMER__
+#ifndef __SIGBATTLE_ATBTIMER__
+#define __SIGBATTLE_ATBTIMER__
-// Pokebattle includes
+// Sigbattle includes
#include "Global.h"
// Qt includes
@@ -28,14 +28,14 @@
// Forward declarations
class QTimer;
-namespace Pokebattle
+namespace Sigbattle
{
class ActionQueue;
class ATBArena;
class Player;
class TeamMember;
-class POKEBATTLE_EXPORT ATBTimer : public QThread
+class SIGBATTLE_EXPORT ATBTimer : public QThread
{
Q_OBJECT
diff --git a/sigbattle/ActionQueue.h b/sigbattle/ActionQueue.h
index 3641755b..c1d27a50 100644
--- a/sigbattle/ActionQueue.h
+++ b/sigbattle/ActionQueue.h
@@ -15,10 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEBATTLE_ACTIONQUEUE__
-#define __POKEBATTLE_ACTIONQUEUE__
+#ifndef __SIGBATTLE_ACTIONQUEUE__
+#define __SIGBATTLE_ACTIONQUEUE__
-// Pokebattle includes
+// Sigbattle includes
#include "Global.h"
#include "TeamMember.h"
@@ -27,9 +27,9 @@
#include <QtCore/QMutexLocker>
#include <QtCore/QQueue>
-namespace Pokebattle
+namespace Sigbattle
{
-class POKEBATTLE_EXPORT ActionQueue : public QQueue<TeamMember::RequestedAction>
+class SIGBATTLE_EXPORT ActionQueue : public QQueue<TeamMember::RequestedAction>
{
public:
ActionQueue();
diff --git a/sigbattle/Arena.cpp b/sigbattle/Arena.cpp
index 84c98dd9..d6a819a1 100644
--- a/sigbattle/Arena.cpp
+++ b/sigbattle/Arena.cpp
@@ -18,11 +18,11 @@
// Header include
#include "Arena.h"
-// Pokebattle includes
+// Sigbattle includes
#include "Player.h"
-// Pokemod includes
-#include "../pokemod/Script.h"
+// Sigmod includes
+#include "../sigmod/Script.h"
// Qt includes
#include <QtCore/QtConcurrentRun>
@@ -32,18 +32,18 @@
#include <kross/core/actioncollection.h>
#include <kross/core/manager.h>
-Pokebattle::TeamMember::RequestedAction Pokebattle::requestDecision(TeamMember* teamMember)
+Sigbattle::TeamMember::RequestedAction Sigbattle::requestDecision(TeamMember* teamMember)
{
return TeamMember::RequestedAction(teamMember, QtConcurrent::run(decision, teamMember));
}
-Pokebattle::TeamMember::Action Pokebattle::decision(TeamMember* teamMember)
+Sigbattle::TeamMember::Action Sigbattle::decision(TeamMember* teamMember)
{
return teamMember->requestAction();
}
-Pokebattle::Arena::Arena(QList<Player*> players, QObject* parent) :
- Pokescripting::Config(parent),
+Sigbattle::Arena::Arena(QList<Player*> players, QObject* parent) :
+ Sigscript::Config(parent),
m_players(players),
m_id(QUuid::createUuid())
{
@@ -53,20 +53,20 @@ Pokebattle::Arena::Arena(QList<Player*> players, QObject* parent) :
player->enterArena(this);
}
-Pokebattle::Arena::~Arena()
+Sigbattle::Arena::~Arena()
{
delete m_actions;
}
-QList<Pokebattle::TeamMember*> Pokebattle::Arena::active() const
+QList<Sigbattle::TeamMember*> Sigbattle::Arena::active() const
{
- QList<Pokebattle::TeamMember*> active;
+ QList<Sigbattle::TeamMember*> active;
foreach (Player* player, m_players)
active += player->active();
return active;
}
-int Pokebattle::Arena::numActiveTeams() const
+int Sigbattle::Arena::numActiveTeams() const
{
int active = 0;
foreach (Player* player, m_players)
@@ -74,7 +74,7 @@ int Pokebattle::Arena::numActiveTeams() const
return active;
}
-void Pokebattle::Arena::registerScript(const QString& name, const Pokemod::Script& script)
+void Sigbattle::Arena::registerScript(const QString& name, const Sigmod::Script& script)
{
Kross::Action* action = new Kross::Action(m_actions, name);
action->setInterpreter(script.interpreter());
@@ -83,12 +83,12 @@ void Pokebattle::Arena::registerScript(const QString& name, const Pokemod::Scrip
action->trigger();
}
-void Pokebattle::Arena::cleanUp()
+void Sigbattle::Arena::cleanUp()
{
// TODO: clean up everything
}
-void Pokebattle::Arena::handleAction(TeamMember* teamMember, TeamMember::Action action)
+void Sigbattle::Arena::handleAction(TeamMember* teamMember, TeamMember::Action action)
{
switch (action.first)
{
@@ -111,7 +111,7 @@ void Pokebattle::Arena::handleAction(TeamMember* teamMember, TeamMember::Action
}
}
-void Pokebattle::Arena::setupBattle()
+void Sigbattle::Arena::setupBattle()
{
// TODO: setup all the battle stuff
}
diff --git a/sigbattle/Arena.h b/sigbattle/Arena.h
index 9a3a69e9..b3c53c47 100644
--- a/sigbattle/Arena.h
+++ b/sigbattle/Arena.h
@@ -15,10 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEBATTLE_ARENA__
-#define __POKEBATTLE_ARENA__
+#ifndef __SIGBATTLE_ARENA__
+#define __SIGBATTLE_ARENA__
-// Pokebattle includes
+// Sigbattle includes
#include "Global.h"
#include "Team.h"
#include "TeamMember.h"
@@ -36,16 +36,16 @@ namespace Kross
class Action;
class ActionCollection;
}
-namespace Pokemod
+namespace Sigmod
{
class Script;
}
-namespace Pokebattle
+namespace Sigbattle
{
class Player;
-class POKEBATTLE_EXPORT Arena : public Pokescripting::Config
+class SIGBATTLE_EXPORT Arena : public Sigscript::Config
{
Q_OBJECT
@@ -61,7 +61,7 @@ class POKEBATTLE_EXPORT Arena : public Pokescripting::Config
void battleStart();
void battleEnd();
public slots:
- void registerScript(const QString& name, const Pokemod::Script& script);
+ void registerScript(const QString& name, const Sigmod::Script& script);
protected slots:
void cleanUp();
protected:
@@ -79,6 +79,6 @@ TeamMember::RequestedAction requestDecision(TeamMember* teamMember);
TeamMember::Action decision(TeamMember* teamMember);
}
-Q_DECLARE_METATYPE(Pokebattle::Arena*)
+Q_DECLARE_METATYPE(Sigbattle::Arena*)
#endif
diff --git a/sigbattle/Bot.h b/sigbattle/Bot.h
index fef5d449..b2bb8f9d 100644
--- a/sigbattle/Bot.h
+++ b/sigbattle/Bot.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEBATTLE_BOT__
-#define __POKEBATTLE_BOT__
+#ifndef __SIGBATTLE_BOT__
+#define __SIGBATTLE_BOT__
-// Pokebattle includes
+// Sigbattle includes
#include "Player.h"
// Standard library includes
#include <climits>
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class MapTrainer;
}
-namespace Pokebattle
+namespace Sigbattle
{
class Arena;
class GhostBot;
-class POKEBATTLE_EXPORT Bot : public Player
+class SIGBATTLE_EXPORT Bot : public Player
{
Q_OBJECT
public:
- Bot(const Pokemod::MapTrainer& trainer);
+ Bot(const Sigmod::MapTrainer& trainer);
signals:
public slots:
protected slots:
diff --git a/sigbattle/CMakeLists.txt b/sigbattle/CMakeLists.txt
index ec6ebcc8..5b16acd7 100644
--- a/sigbattle/CMakeLists.txt
+++ b/sigbattle/CMakeLists.txt
@@ -1,12 +1,12 @@
-PROJECT(pokebattle)
+PROJECT(sigbattle)
IF(NOT BUILT_FROM_ROOT)
MESSAGE(FATAL_ERROR "Not built from source root")
ENDIF(NOT BUILT_FROM_ROOT)
-ADD_DEFINITIONS(-DMAKE_POKEBATTLE_LIB)
+ADD_DEFINITIONS(-DMAKE_SIGBATTLE_LIB)
-SET(pokebattle_MOC_HEADERS
+SET(sigbattle_MOC_HEADERS
Arena.h
ATBArena.h
ATBTimer.h
@@ -19,15 +19,15 @@ SET(pokebattle_MOC_HEADERS
TeamMember.h
TurnArena.h
)
-QT4_WRAP_CPP(pokebattle_MOC_SRCS ${pokebattle_MOC_HEADERS})
-SET(pokebattle_HEADERS
- ${pokebattle_MOC_HEADERS}
+QT4_WRAP_CPP(sigbattle_MOC_SRCS ${sigbattle_MOC_HEADERS})
+SET(sigbattle_HEADERS
+ ${sigbattle_MOC_HEADERS}
ActionQueue.h
)
-SET(pokebattle_DEVEL
- ${pokebattle_HEADERS}
+SET(sigbattle_DEVEL
+ ${sigbattle_HEADERS}
)
-SET(pokebattle_SRCS
+SET(sigbattle_SRCS
Arena.cpp
ATBArena.cpp
ATBTimer.cpp
@@ -39,32 +39,32 @@ SET(pokebattle_SRCS
TurnArena.cpp
)
-ADD_LIBRARY(pokebattle
- ${pokebattle_SRCS}
- ${pokebattle_MOC_SRCS}
+ADD_LIBRARY(sigbattle
+ ${sigbattle_SRCS}
+ ${sigbattle_MOC_SRCS}
)
-SET_TARGET_PROPERTIES(pokebattle
+SET_TARGET_PROPERTIES(sigbattle
PROPERTIES
VERSION ${POKEGEN_VERSION}
SOVERSION ${POKEGEN_SOVERSION}
LINK_INTERFACE_LIBRARIES ""
)
-TARGET_LINK_LIBRARIES(pokebattle
+TARGET_LINK_LIBRARIES(sigbattle
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${KDE4_KROSSCORE_LIBRARY}
- pokemod
- pokescripting
+ sigmod
+ sigscript
)
INSTALL(
- TARGETS pokebattle
+ TARGETS sigbattle
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
COMPONENT runtime
)
INSTALL(
- FILES ${pokebattle_DEVEL}
+ FILES ${sigbattle_DEVEL}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${CMAKE_PROJECT_NAME}/${PROJECT_NAME}
COMPONENT development
)
diff --git a/sigbattle/Containment.cpp b/sigbattle/Containment.cpp
index 7dd31002..efe59712 100644
--- a/sigbattle/Containment.cpp
+++ b/sigbattle/Containment.cpp
@@ -18,17 +18,17 @@
// Header include
#include "Containment.h"
-Pokebattle::Containment::Containment(QObject* parent) :
+Sigbattle::Containment::Containment(QObject* parent) :
QObject(parent)
{
}
-QList<Pokebattle::TeamMember*> Pokebattle::Containment::members() const
+QList<Sigbattle::TeamMember*> Sigbattle::Containment::members() const
{
return m_members;
}
-Pokescripting::PokemodWrapper* Pokebattle::Containment::pokemod() const
+Sigscript::SigmodWrapper* Sigbattle::Containment::sigmod() const
{
- // TODO: return PokemodWrapper
+ // TODO: return SigmodWrapper
}
diff --git a/sigbattle/Containment.h b/sigbattle/Containment.h
index e19061e9..52fbfbf2 100644
--- a/sigbattle/Containment.h
+++ b/sigbattle/Containment.h
@@ -15,10 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEBATTLE_CONTAINMENT__
-#define __POKEBATTLE_CONTAINMENT__
+#ifndef __SIGBATTLE_CONTAINMENT__
+#define __SIGBATTLE_CONTAINMENT__
-// Pokebattle includes
+// Sigbattle includes
#include "Global.h"
// Qt includes
@@ -26,16 +26,16 @@
#include <QtCore/QObject>
// Forward declarations
-namespace Pokescripting
+namespace Sigscript
{
-class PokemodWrapper;
+class SigmodWrapper;
}
-namespace Pokebattle
+namespace Sigbattle
{
class TeamMember;
-class POKEBATTLE_EXPORT Containment : public QObject
+class SIGBATTLE_EXPORT Containment : public QObject
{
Q_OBJECT
@@ -46,7 +46,7 @@ class POKEBATTLE_EXPORT Containment : public QObject
virtual bool isMutable() const = 0;
- Pokescripting::PokemodWrapper* pokemod() const;
+ Sigscript::SigmodWrapper* sigmod() const;
signals:
public slots:
protected slots:
@@ -54,6 +54,6 @@ class POKEBATTLE_EXPORT Containment : public QObject
QList<TeamMember*> m_members;
};
}
-Q_DECLARE_METATYPE(Pokebattle::Containment*)
+Q_DECLARE_METATYPE(Sigbattle::Containment*)
#endif
diff --git a/sigbattle/Ghost.cpp b/sigbattle/Ghost.cpp
index 4750636a..d993341e 100644
--- a/sigbattle/Ghost.cpp
+++ b/sigbattle/Ghost.cpp
@@ -18,7 +18,7 @@
// Header include
#include "Ghost.h"
-// Ghost(const PokeMod::Pokemod& par, const unsigned s, const unsigned l, const unsigned t) :
+// Ghost(const PokeMod::Sigmod& par, const unsigned s, const unsigned l, const unsigned t) :
// Pokemon(par, s, l),
// teamSize(t),
// unknownMoves(par->GetMaxMoves())
@@ -28,11 +28,11 @@
// dv[i] = 0;
// statExp[i] = 0;
// minStats[i] = GetStat(i);
-// dv[i] = pokemod->GetMaxDV();
+// dv[i] = sigmod->GetMaxDV();
// statExp[i] = 65535;
// maxStats[i] = GetStat(i);
// }
-// Species* pkmn = pokemod->GetSpeciesByID(s);
+// Species* pkmn = sigmod->GetSpeciesByID(s);
// if (pkmn->GetNumAbilities() == 1)
// FeedAbility(pkmn->GetAbility(0));
// }
diff --git a/sigbattle/Ghost.h b/sigbattle/Ghost.h
index 325f7108..5e187873 100644
--- a/sigbattle/Ghost.h
+++ b/sigbattle/Ghost.h
@@ -15,20 +15,20 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEBATTLE_GHOST__
-#define __POKEBATTLE_GHOST__
+#ifndef __SIGBATTLE_GHOST__
+#define __SIGBATTLE_GHOST__
-// Pokebattle includes
+// Sigbattle includes
#include "TeamMember.h"
-namespace Pokebattle
+namespace Sigbattle
{
-class POKEBATTLE_EXPORT Ghost : public TeamMember
+class SIGBATTLE_EXPORT Ghost : public TeamMember
{
Q_OBJECT
// public:
-// Ghost(const PokeMod::Pokemod& par, const unsigned s, const unsigned l);
+// Ghost(const PokeMod::Sigmod& par, const unsigned s, const unsigned l);
//
// void FeedAttack(const unsigned actualDamage, const unsigned stat, const unsigned otherLevel, const unsigned power, const bool isAttacker);
// void FeedItem(const unsigned i);
diff --git a/sigbattle/GhostBot.h b/sigbattle/GhostBot.h
index 459f2ccf..ae086208 100644
--- a/sigbattle/GhostBot.h
+++ b/sigbattle/GhostBot.h
@@ -15,15 +15,15 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEBATTLE_GHOSTBOT__
-#define __POKEBATTLE_GHOSTBOT__
+#ifndef __SIGBATTLE_GHOSTBOT__
+#define __SIGBATTLE_GHOSTBOT__
-// Pokebattle includes
+// Sigbattle includes
#include "Player.h"
-namespace Pokebattle
+namespace Sigbattle
{
-class POKEBATTLE_EXPORT GhostBot : public Player
+class SIGBATTLE_EXPORT GhostBot : public Player
{
Q_OBJECT
};
diff --git a/sigbattle/Global.h b/sigbattle/Global.h
index 713d8c9d..00b91539 100644
--- a/sigbattle/Global.h
+++ b/sigbattle/Global.h
@@ -15,24 +15,24 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEBATTLE_GLOBAL__
-#define __POKEBATTLE_GLOBAL__
+#ifndef __SIGBATTLE_GLOBAL__
+#define __SIGBATTLE_GLOBAL__
// KDE includes
#include <kdemacros.h>
-#ifndef POKEBATTLE_EXPORT
-# ifdef MAKE_POKEBATTLE_LIB
+#ifndef SIGBATTLE_EXPORT
+# ifdef MAKE_SIGBATTLE_LIB
/* We are building this library */
-# define POKEBATTLE_EXPORT KDE_EXPORT
+# define SIGBATTLE_EXPORT KDE_EXPORT
# else
/* We are using this library */
-# define POKEBATTLE_EXPORT KDE_IMPORT
+# define SIGBATTLE_EXPORT KDE_IMPORT
# endif
#endif
-# ifndef POKEBATTLE_EXPORT_DEPRECATED
-# define POKEBATTLE_EXPORT_DEPRECATED KDE_DEPRECATED POKEBATTLE_EXPORT
+# ifndef SIGBATTLE_EXPORT_DEPRECATED
+# define SIGBATTLE_EXPORT_DEPRECATED KDE_DEPRECATED SIGBATTLE_EXPORT
# endif
#endif
diff --git a/sigbattle/Player.cpp b/sigbattle/Player.cpp
index 13e6076a..20737775 100644
--- a/sigbattle/Player.cpp
+++ b/sigbattle/Player.cpp
@@ -18,24 +18,24 @@
// Header include
#include "Player.h"
-Pokebattle::Player::Player(QObject* parent) :
+Sigbattle::Player::Player(QObject* parent) :
Team(parent),
m_arena(NULL)
{
}
-void Pokebattle::Player::enterArena(Arena* arena)
+void Sigbattle::Player::enterArena(Arena* arena)
{
// TODO: Get a list of the active members
// TODO: Let them know that they are active
}
-QList<Pokebattle::TeamMember*> Pokebattle::Player::active()
+QList<Sigbattle::TeamMember*> Sigbattle::Player::active()
{
// TODO: return active members
}
-void Pokebattle::Player::exitArena()
+void Sigbattle::Player::exitArena()
{
// TODO: Tell all active members that they can leave now
}
diff --git a/sigbattle/Player.h b/sigbattle/Player.h
index 04b3d872..765c0263 100644
--- a/sigbattle/Player.h
+++ b/sigbattle/Player.h
@@ -15,10 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEBATTLE_PLAYER__
-#define __POKEBATTLE_PLAYER__
+#ifndef __SIGBATTLE_PLAYER__
+#define __SIGBATTLE_PLAYER__
-// Pokebattle includes
+// Sigbattle includes
#include "Global.h"
#include "Team.h"
#include "TeamMember.h"
@@ -27,16 +27,16 @@
#include <QtCore/QObject>
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokebattle
+namespace Sigbattle
{
class Team;
-class POKEBATTLE_EXPORT Player : public Team
+class SIGBATTLE_EXPORT Player : public Team
{
Q_OBJECT
@@ -47,7 +47,7 @@ class POKEBATTLE_EXPORT Player : public Team
QList<TeamMember*> active();
- const Pokemod::Pokemod* pokemod() const;
+ const Sigmod::Sigmod* sigmod() const;
signals:
public slots:
void exitArena();
@@ -58,6 +58,6 @@ class POKEBATTLE_EXPORT Player : public Team
Arena* m_arena;
};
}
-Q_DECLARE_METATYPE(Pokebattle::Player*)
+Q_DECLARE_METATYPE(Sigbattle::Player*)
#endif
diff --git a/sigbattle/Team.cpp b/sigbattle/Team.cpp
index 22adea08..91aea643 100644
--- a/sigbattle/Team.cpp
+++ b/sigbattle/Team.cpp
@@ -18,13 +18,13 @@
// Header include
#include "Team.h"
-Pokebattle::Team::Team(QObject* parent) :
+Sigbattle::Team::Team(QObject* parent) :
Containment(parent)
{
// TODO: construct
}
-// Team::Team(const PokeMod::Pokemod& par) :
+// Team::Team(const PokeMod::Sigmod& par) :
// active(0),
// parent(par)
// {
@@ -46,28 +46,28 @@ Pokebattle::Team::Team(QObject* parent) :
// }
// }
//
-// void Team::AddPokemon(Pokemon& p)
+// void Team::AddMember(Member& p)
// {
-// pokemon.append(&p);
+// m_member.append(&p);
// }
//
-// void Team::SwapPokemon(const unsigned a, const unsigned b)
+// void Team::SwapMember(const unsigned a, const unsigned b)
// {
-// if ((a < pokemon.size()) && (b < pokemon.size()))
+// if ((a < m_member.size()) && (b < m_member.size()))
// {
-// Pokemon* p = pokemon[a];
-// pokemon[a] = pokemon[b];
-// pokemon[b] = p;
+// Member* p = m_member[a];
+// m_member[a] = m_member[b];
+// m_member[b] = p;
// }
// }
//
-// bool Team::SetActivePokemon(const unsigned a)
+// bool Team::SetActiveMember(const unsigned a)
// {
-// if ((a < pokemon.size()) && pokemon[a]->CanFight())
+// if ((a < m_member.size()) && m_member[a]->CanFight())
// active = a;
// }
-bool Pokebattle::Team::isMutable() const
+bool Sigbattle::Team::isMutable() const
{
return true;
}
diff --git a/sigbattle/Team.h b/sigbattle/Team.h
index 63a85095..fdb359eb 100644
--- a/sigbattle/Team.h
+++ b/sigbattle/Team.h
@@ -15,18 +15,18 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEBATTLE_TEAM__
-#define __POKEBATTLE_TEAM__
+#ifndef __SIGBATTLE_TEAM__
+#define __SIGBATTLE_TEAM__
-// Pokebattle includes
+// Sigbattle includes
#include "Containment.h"
-namespace Pokebattle
+namespace Sigbattle
{
// Forward declarations
class Arena;
-class POKEBATTLE_EXPORT Team : public Containment
+class SIGBATTLE_EXPORT Team : public Containment
{
Q_OBJECT
@@ -42,6 +42,6 @@ class POKEBATTLE_EXPORT Team : public Containment
Arena* m_arena;
};
}
-Q_DECLARE_METATYPE(Pokebattle::Team*)
+Q_DECLARE_METATYPE(Sigbattle::Team*)
#endif
diff --git a/sigbattle/TeamMember.cpp b/sigbattle/TeamMember.cpp
index 84727cb7..1fa0843c 100644
--- a/sigbattle/TeamMember.cpp
+++ b/sigbattle/TeamMember.cpp
@@ -18,27 +18,27 @@
// Header include
#include "TeamMember.h"
-// Pokebattle includes
+// Sigbattle includes
#include "Arena.h"
#include "Containment.h"
#include "Player.h"
-// Pokescripting includes
-#include "../pokescripting/AbilityWrapper.h"
-#include "../pokescripting/ItemWrapper.h"
-#include "../pokescripting/MapTrainerTeamMemberWrapper.h"
-#include "../pokescripting/MoveWrapper.h"
-#include "../pokescripting/NatureWrapper.h"
-#include "../pokescripting/PokemodWrapper.h"
-#include "../pokescripting/RulesWrapper.h"
-#include "../pokescripting/StatusWrapper.h"
-#include "../pokescripting/SpeciesWrapper.h"
-#include "../pokescripting/SpeciesAbilityWrapper.h"
-#include "../pokescripting/SpeciesItemWrapper.h"
-#include "../pokescripting/SpeciesMoveWrapper.h"
-
-// Pokemod includes
-#include "../pokemod/Hat.h"
+// Sigscript includes
+#include "../sigscript/AbilityWrapper.h"
+#include "../sigscript/ItemWrapper.h"
+#include "../sigscript/MapTrainerTeamMemberWrapper.h"
+#include "../sigscript/MoveWrapper.h"
+#include "../sigscript/NatureWrapper.h"
+#include "../sigscript/RulesWrapper.h"
+#include "../sigscript/SigmodWrapper.h"
+#include "../sigscript/StatusWrapper.h"
+#include "../sigscript/SpeciesWrapper.h"
+#include "../sigscript/SpeciesAbilityWrapper.h"
+#include "../sigscript/SpeciesItemWrapper.h"
+#include "../sigscript/SpeciesMoveWrapper.h"
+
+// Sigmod includes
+#include "../sigmod/Hat.h"
// Qt includes
#include <QtCore/QUuid>
@@ -54,13 +54,13 @@
// TODO: Current HP
// TODO: Script cleanup (battle)
-int Pokebattle::actionPriority(const TeamMember* teamMember, const TeamMember::Action& action)
+int Sigbattle::actionPriority(const TeamMember* teamMember, const TeamMember::Action& action)
{
int priority = INT_MAX;
switch (action.first)
{
case TeamMember::Attack:
- priority = teamMember->pokemod()->move(action.second.first.toString())->priority();
+ priority = teamMember->sigmod()->move(action.second.first.toString())->priority();
break;
case TeamMember::Item:
priority = INT_MIN / 3;
@@ -84,13 +84,13 @@ int Pokebattle::actionPriority(const TeamMember* teamMember, const TeamMember::A
return priority;
}
-Pokebattle::TeamMember::TeamMember(const int speciesId, const QString& name, const int level, Containment* containment, const bool suppressItems) :
- Pokescripting::Config(containment),
+Sigbattle::TeamMember::TeamMember(const int speciesId, const QString& name, const int level, Containment* containment, const bool suppressItems) :
+ Sigscript::Config(containment),
m_containment(containment),
m_id(QUuid::createUuid())
{
makeConnections();
- setSpecies(pokemod()->species(speciesId));
+ setSpecies(sigmod()->species(speciesId));
if (name.isEmpty())
setName(m_species->name());
else
@@ -106,22 +106,22 @@ Pokebattle::TeamMember::TeamMember(const int speciesId, const QString& name, con
m_gender = (m_species->genderFactor().poll() ? Male : Female);
else
m_gender = Genderless;
- for (int i = 0; i < Pokemod::ST_End_GSC; ++i)
+ for (int i = 0; i < Sigmod::ST_End_GSC; ++i)
m_statExp[i] = 0;
if (m_containment->isMutable())
{
- const Pokemod::Script script = m_species->evolution();
+ const Sigmod::Script script = m_species->evolution();
Kross::Action* evolution = new Kross::Action(Kross::Manager::self().actionCollection()->collection("evolutions"), QString("evolution-%1").arg(QUuid::createUuid().toString()));
evolution->setInterpreter(script.interpreter());
evolution->setCode(script.script().toUtf8());
evolution->addObject(this, "owner", Kross::ChildrenInterface::AutoConnectSignals);
evolution->trigger();
}
- m_currentHp = statValue(Pokemod::ST_HP);
+ m_currentHp = statValue(Sigmod::ST_HP);
}
-Pokebattle::TeamMember::TeamMember(Pokescripting::MapTrainerTeamMemberWrapper* teamMember, Containment* containment) :
- Pokescripting::Config(containment),
+Sigbattle::TeamMember::TeamMember(Sigscript::MapTrainerTeamMemberWrapper* teamMember, Containment* containment) :
+ Sigscript::Config(containment),
m_containment(containment),
m_id(QUuid::createUuid())
{
@@ -138,116 +138,116 @@ Pokebattle::TeamMember::TeamMember(Pokescripting::MapTrainerTeamMemberWrapper* t
m_gender = (m_species->genderFactor().poll() ? Male : Female);
else
m_gender = Genderless;
- for (int i = 0; i < Pokemod::ST_End_GSC; ++i)
+ for (int i = 0; i < Sigmod::ST_End_GSC; ++i)
m_statExp[i] = 0;
- m_currentHp = statValue(Pokemod::ST_HP);
+ m_currentHp = statValue(Sigmod::ST_HP);
}
-QUuid Pokebattle::TeamMember::id() const
+QUuid Sigbattle::TeamMember::id() const
{
return m_id;
}
-QString Pokebattle::TeamMember::name() const
+QString Sigbattle::TeamMember::name() const
{
if (value("name").canConvert<QString>())
return value("name").toString();
return m_name;
}
-long long Pokebattle::TeamMember::currentHp() const
+long long Sigbattle::TeamMember::currentHp() const
{
return m_currentHp;
}
-Pokescripting::SpeciesWrapper* Pokebattle::TeamMember::species() const
+Sigscript::SpeciesWrapper* Sigbattle::TeamMember::species() const
{
- if (value("species").canConvert<Pokescripting::SpeciesWrapper*>())
- return value("species").value<Pokescripting::SpeciesWrapper*>();
+ if (value("species").canConvert<Sigscript::SpeciesWrapper*>())
+ return value("species").value<Sigscript::SpeciesWrapper*>();
return m_species;
}
-int Pokebattle::TeamMember::level() const
+int Sigbattle::TeamMember::level() const
{
return m_level;
}
-Pokebattle::TeamMember::Gender Pokebattle::TeamMember::gender() const
+Sigbattle::TeamMember::Gender Sigbattle::TeamMember::gender() const
{
if (value("gender").canConvert<Gender>())
return value("gender").value<Gender>();
return m_gender;
}
-long long Pokebattle::TeamMember::levelExperience() const
+long long Sigbattle::TeamMember::levelExperience() const
{
if (value("levelExperience").canConvert<long long>())
return value("levelExperience").toLongLong();
return m_levelExp;
}
-int Pokebattle::TeamMember::baseStat(const Pokemod::Stat stat) const
+int Sigbattle::TeamMember::baseStat(const Sigmod::Stat stat) const
{
if (value("overrideBaseStats").canConvert<bool>() && value("overrideBaseStats").toBool())
return species()->baseStat(stat);
return m_species->baseStat(stat);
}
-long long Pokebattle::TeamMember::statExperience(const Pokemod::Stat stat) const
+long long Sigbattle::TeamMember::statExperience(const Sigmod::Stat stat) const
{
- const QString valueName = QString("statExperience-%1").arg((pokemod()->rules()->specialSplit() ? Pokemod::StatGSCStr : Pokemod::StatRBYStr)[stat]);
+ const QString valueName = QString("statExperience-%1").arg((sigmod()->rules()->specialSplit() ? Sigmod::StatGSCStr : Sigmod::StatRBYStr)[stat]);
if (value(valueName).canConvert<long long>())
return value(valueName).toLongLong();
return m_statExp[stat];
}
-int Pokebattle::TeamMember::dv(const Pokemod::Stat stat) const
+int Sigbattle::TeamMember::dv(const Sigmod::Stat stat) const
{
- const QString valueName = QString("dv-%1").arg((pokemod()->rules()->specialSplit() ? Pokemod::StatGSCStr : Pokemod::StatRBYStr)[stat]);
+ const QString valueName = QString("dv-%1").arg((sigmod()->rules()->specialSplit() ? Sigmod::StatGSCStr : Sigmod::StatRBYStr)[stat]);
if (value(valueName).canConvert<int>())
{
const int dv = value(valueName).toInt();
- if (dv < (pokemod()->rules()->specialDVSplit() ? 32 : 16))
+ if (dv < (sigmod()->rules()->specialDVSplit() ? 32 : 16))
return dv;
}
return m_dv[stat];
}
-long long Pokebattle::TeamMember::statValue(const Pokemod::Stat stat, const long long exp) const
+long long Sigbattle::TeamMember::statValue(const Sigmod::Stat stat, const long long exp) const
{
long long statValue;
if (exp < 0)
statValue = statExperience(stat);
else
statValue = exp;
- if (!pokemod()->rules()->effortValuesAllowed() && statValue)
+ if (!sigmod()->rules()->effortValuesAllowed() && statValue)
statValue = sqrt(statValue - 1) + 1;
statValue >>= 2;
statValue += baseStat(stat) << 1;
- if (pokemod()->rules()->specialDVSplit())
+ if (sigmod()->rules()->specialDVSplit())
{
- if (stat == Pokemod::ST_SpecialDefense)
- statValue += dv(Pokemod::ST_Special) << 1;
+ if (stat == Sigmod::ST_SpecialDefense)
+ statValue += dv(Sigmod::ST_Special) << 1;
else
statValue += dv(stat) << 1;
}
else
statValue += dv(stat);
- statValue *= double(m_level) / pokemod()->rules()->maxLevel();
- if (stat == Pokemod::ST_HP)
+ statValue *= double(m_level) / sigmod()->rules()->maxLevel();
+ if (stat == Sigmod::ST_HP)
statValue += 10 + m_level;
else
{
statValue += 5;
- Pokemod::Fraction multiplier;
- foreach (Pokescripting::NatureWrapper* nature, m_natures)
+ Sigmod::Fraction multiplier;
+ foreach (Sigscript::NatureWrapper* nature, m_natures)
multiplier *= nature->stat(stat);
statValue *= multiplier;
}
return statValue;
}
-long long Pokebattle::TeamMember::calcExp(int level) const
+long long Sigbattle::TeamMember::calcExp(int level) const
{
if (level < 0)
level = m_level;
@@ -255,7 +255,7 @@ long long Pokebattle::TeamMember::calcExp(int level) const
const long long cube = square * level;
switch (m_species->growth())
{
- case Pokemod::Species::Fluctuating:
+ case Sigmod::Species::Fluctuating:
if (level <= 15)
return cube * ((24 + (level + 1) / 3) / 50.0);
else if (level <= 35)
@@ -267,15 +267,15 @@ long long Pokebattle::TeamMember::calcExp(int level) const
return cube * (23 + level) / 75;
else
return 5 * cube / 3;
- case Pokemod::Species::Fading:
+ case Sigmod::Species::Fading:
return 6 * cube / 5 - 15 * square + 100 * level - 140;
- case Pokemod::Species::Slow:
+ case Sigmod::Species::Slow:
return 5 * cube / 4;
- case Pokemod::Species::Normal:
+ case Sigmod::Species::Normal:
return cube;
- case Pokemod::Species::Fast:
+ case Sigmod::Species::Fast:
return 4 * cube / 5;
- case Pokemod::Species::Erratic:
+ case Sigmod::Species::Erratic:
{
const double p[] = {0.000, 0.008, 0.014};
if (level <= 50)
@@ -296,7 +296,7 @@ long long Pokebattle::TeamMember::calcExp(int level) const
return -1;
}
-bool Pokebattle::TeamMember::canLearnMove(Pokescripting::MoveWrapper* move) const
+bool Sigbattle::TeamMember::canLearnMove(Sigscript::MoveWrapper* move) const
{
for (int i = 0; i < m_species->moveCount(); ++i)
{
@@ -306,63 +306,63 @@ bool Pokebattle::TeamMember::canLearnMove(Pokescripting::MoveWrapper* move) cons
return false;
}
-void Pokebattle::TeamMember::boostLevels(const int levels)
+void Sigbattle::TeamMember::boostLevels(const int levels)
{
- if ((m_level + levels) < pokemod()->rules()->maxLevel())
+ if ((m_level + levels) < sigmod()->rules()->maxLevel())
{
for (int i = 0; i < levels; ++i)
setLevel(m_level + 1);
}
}
-void Pokebattle::TeamMember::evolveInto(Pokescripting::SpeciesWrapper* newSpecies)
+void Sigbattle::TeamMember::evolveInto(Sigscript::SpeciesWrapper* newSpecies)
{
emit(evolveStart());
- int oldStats[Pokemod::ST_End_GSC] = {};
- int newStats[Pokemod::ST_End_GSC] = {};
- oldStats[Pokemod::ST_Attack] = statValue(Pokemod::ST_Attack);
- oldStats[Pokemod::ST_Defense] = statValue(Pokemod::ST_Defense);
- oldStats[Pokemod::ST_Speed] = statValue(Pokemod::ST_Speed);
- if (pokemod()->rules()->specialSplit())
+ int oldStats[Sigmod::ST_End_GSC] = {};
+ int newStats[Sigmod::ST_End_GSC] = {};
+ oldStats[Sigmod::ST_Attack] = statValue(Sigmod::ST_Attack);
+ oldStats[Sigmod::ST_Defense] = statValue(Sigmod::ST_Defense);
+ oldStats[Sigmod::ST_Speed] = statValue(Sigmod::ST_Speed);
+ if (sigmod()->rules()->specialSplit())
{
- oldStats[Pokemod::ST_SpecialAttack] = statValue(Pokemod::ST_SpecialAttack);
- oldStats[Pokemod::ST_SpecialDefense] = statValue(Pokemod::ST_SpecialDefense);
+ oldStats[Sigmod::ST_SpecialAttack] = statValue(Sigmod::ST_SpecialAttack);
+ oldStats[Sigmod::ST_SpecialDefense] = statValue(Sigmod::ST_SpecialDefense);
}
else
- oldStats[Pokemod::ST_Special] = statValue(Pokemod::ST_Special);
+ oldStats[Sigmod::ST_Special] = statValue(Sigmod::ST_Special);
setSpecies(newSpecies);
- newStats[Pokemod::ST_Attack] = statValue(Pokemod::ST_Attack);
- newStats[Pokemod::ST_Defense] = statValue(Pokemod::ST_Defense);
- newStats[Pokemod::ST_Speed] = statValue(Pokemod::ST_Speed);
- if (pokemod()->rules()->specialSplit())
+ newStats[Sigmod::ST_Attack] = statValue(Sigmod::ST_Attack);
+ newStats[Sigmod::ST_Defense] = statValue(Sigmod::ST_Defense);
+ newStats[Sigmod::ST_Speed] = statValue(Sigmod::ST_Speed);
+ if (sigmod()->rules()->specialSplit())
{
- newStats[Pokemod::ST_SpecialAttack] = statValue(Pokemod::ST_SpecialAttack);
- newStats[Pokemod::ST_SpecialDefense] = statValue(Pokemod::ST_SpecialDefense);
+ newStats[Sigmod::ST_SpecialAttack] = statValue(Sigmod::ST_SpecialAttack);
+ newStats[Sigmod::ST_SpecialDefense] = statValue(Sigmod::ST_SpecialDefense);
}
else
- newStats[Pokemod::ST_Special] = statValue(Pokemod::ST_Special);
- if (oldStats[Pokemod::ST_Attack] != newStats[Pokemod::ST_Attack])
- emit(statChanged(Pokemod::ST_Attack, newStats[Pokemod::ST_Attack]));
- if (oldStats[Pokemod::ST_Defense] != newStats[Pokemod::ST_Defense])
- emit(statChanged(Pokemod::ST_Defense, newStats[Pokemod::ST_Defense]));
- if (oldStats[Pokemod::ST_Speed] != newStats[Pokemod::ST_Speed])
- emit(statChanged(Pokemod::ST_Speed, newStats[Pokemod::ST_Speed]));
- if (pokemod()->rules()->specialSplit())
- {
- if (oldStats[Pokemod::ST_SpecialAttack] != newStats[Pokemod::ST_SpecialAttack])
- emit(statChanged(Pokemod::ST_SpecialAttack, newStats[Pokemod::ST_SpecialAttack]));
- if (oldStats[Pokemod::ST_SpecialDefense] != newStats[Pokemod::ST_SpecialDefense])
- emit(statChanged(Pokemod::ST_SpecialDefense, newStats[Pokemod::ST_SpecialDefense]));
+ newStats[Sigmod::ST_Special] = statValue(Sigmod::ST_Special);
+ if (oldStats[Sigmod::ST_Attack] != newStats[Sigmod::ST_Attack])
+ emit(statChanged(Sigmod::ST_Attack, newStats[Sigmod::ST_Attack]));
+ if (oldStats[Sigmod::ST_Defense] != newStats[Sigmod::ST_Defense])
+ emit(statChanged(Sigmod::ST_Defense, newStats[Sigmod::ST_Defense]));
+ if (oldStats[Sigmod::ST_Speed] != newStats[Sigmod::ST_Speed])
+ emit(statChanged(Sigmod::ST_Speed, newStats[Sigmod::ST_Speed]));
+ if (sigmod()->rules()->specialSplit())
+ {
+ if (oldStats[Sigmod::ST_SpecialAttack] != newStats[Sigmod::ST_SpecialAttack])
+ emit(statChanged(Sigmod::ST_SpecialAttack, newStats[Sigmod::ST_SpecialAttack]));
+ if (oldStats[Sigmod::ST_SpecialDefense] != newStats[Sigmod::ST_SpecialDefense])
+ emit(statChanged(Sigmod::ST_SpecialDefense, newStats[Sigmod::ST_SpecialDefense]));
}
else
{
- if (oldStats[Pokemod::ST_Special] != newStats[Pokemod::ST_Special])
- emit(statChanged(Pokemod::ST_Special, newStats[Pokemod::ST_Special]));
+ if (oldStats[Sigmod::ST_Special] != newStats[Sigmod::ST_Special])
+ emit(statChanged(Sigmod::ST_Special, newStats[Sigmod::ST_Special]));
}
emit(evolveEnd());
}
-void Pokebattle::TeamMember::setName(const QString& name)
+void Sigbattle::TeamMember::setName(const QString& name)
{
if (m_name != name)
{
@@ -372,7 +372,7 @@ void Pokebattle::TeamMember::setName(const QString& name)
}
}
-void Pokebattle::TeamMember::cureStatus(Pokescripting::StatusWrapper* status)
+void Sigbattle::TeamMember::cureStatus(Sigscript::StatusWrapper* status)
{
if (m_status.contains(status))
{
@@ -384,12 +384,12 @@ void Pokebattle::TeamMember::cureStatus(Pokescripting::StatusWrapper* status)
}
}
-void Pokebattle::TeamMember::giveStatus(Pokescripting::StatusWrapper* status)
+void Sigbattle::TeamMember::giveStatus(Sigscript::StatusWrapper* status)
{
- Q_ASSERT(pokemod()->statusIndex(status) != INT_MAX);
+ Q_ASSERT(sigmod()->statusIndex(status) != INT_MAX);
if (!m_status.contains(status))
{
- const Pokemod::Script script = status->worldScript();
+ const Sigmod::Script script = status->worldScript();
Kross::Action* statusAction = new Kross::Action(Kross::Manager::self().actionCollection()->collection("status"), QString("status-%1").arg(QUuid::createUuid().toString()));
statusAction->setInterpreter(script.interpreter());
statusAction->setCode(script.script().toUtf8());
@@ -400,9 +400,9 @@ void Pokebattle::TeamMember::giveStatus(Pokescripting::StatusWrapper* status)
}
}
-void Pokebattle::TeamMember::giveLevelExp(const int exp)
+void Sigbattle::TeamMember::giveLevelExp(const int exp)
{
- if (m_level == pokemod()->rules()->maxLevel())
+ if (m_level == sigmod()->rules()->maxLevel())
return;
const int expNeeded = calcExp(m_level + 1) - calcExp();
if (exp < expNeeded)
@@ -418,17 +418,17 @@ void Pokebattle::TeamMember::giveLevelExp(const int exp)
}
}
-void Pokebattle::TeamMember::giveStatExp(const Pokemod::Stat stat, const int exp)
+void Sigbattle::TeamMember::giveStatExp(const Sigmod::Stat stat, const int exp)
{
- Q_ASSERT(stat < (pokemod()->rules()->specialSplit() ? Pokemod::ST_End_GSC : Pokemod::ST_End_RBY));
+ Q_ASSERT(stat < (sigmod()->rules()->specialSplit() ? Sigmod::ST_End_GSC : Sigmod::ST_End_RBY));
const int oldStat = statValue(stat);
int expToGive = exp;
- if (pokemod()->rules()->effortValuesAllowed())
+ if (sigmod()->rules()->effortValuesAllowed())
{
int totalEV = 0;
- for (int i = 0; i < Pokemod::ST_End_GSC; ++i)
+ for (int i = 0; i < Sigmod::ST_End_GSC; ++i)
totalEV += m_statExp[i];
- while (expToGive && (totalEV < pokemod()->rules()->maxTotalEV()) && (m_statExp[stat] < pokemod()->rules()->maxEVPerStat()))
+ while (expToGive && (totalEV < sigmod()->rules()->maxTotalEV()) && (m_statExp[stat] < sigmod()->rules()->maxEVPerStat()))
{
--expToGive;
++totalEV;
@@ -448,7 +448,7 @@ void Pokebattle::TeamMember::giveStatExp(const Pokemod::Stat stat, const int exp
emit(statChanged(stat, newStat));
}
-void Pokebattle::TeamMember::takeItem(Pokescripting::ItemWrapper* item)
+void Sigbattle::TeamMember::takeItem(Sigscript::ItemWrapper* item)
{
if (m_items.contains(item))
{
@@ -457,16 +457,16 @@ void Pokebattle::TeamMember::takeItem(Pokescripting::ItemWrapper* item)
}
}
-void Pokebattle::TeamMember::giveItem(Pokescripting::ItemWrapper* item)
+void Sigbattle::TeamMember::giveItem(Sigscript::ItemWrapper* item)
{
- if (m_items.size() < pokemod()->rules()->maxHeldItems())
+ if (m_items.size() < sigmod()->rules()->maxHeldItems())
{
m_items.append(item);
emit(itemGiven(item));
}
}
-void Pokebattle::TeamMember::forgetMove(Pokescripting::MoveWrapper* move)
+void Sigbattle::TeamMember::forgetMove(Sigscript::MoveWrapper* move)
{
if (m_moves.contains(move))
{
@@ -475,11 +475,11 @@ void Pokebattle::TeamMember::forgetMove(Pokescripting::MoveWrapper* move)
}
}
-void Pokebattle::TeamMember::teachMove(Pokescripting::MoveWrapper* move)
+void Sigbattle::TeamMember::teachMove(Sigscript::MoveWrapper* move)
{
if (canLearnMove(move))
{
- if (m_moves.size() < pokemod()->rules()->maxMoves())
+ if (m_moves.size() < sigmod()->rules()->maxMoves())
{
m_moves.append(move);
emit(moveLearned(move));
@@ -489,7 +489,7 @@ void Pokebattle::TeamMember::teachMove(Pokescripting::MoveWrapper* move)
emit(unlearnableMove(move));
}
-Pokebattle::TeamMember::Action Pokebattle::TeamMember::requestAction() const
+Sigbattle::TeamMember::Action Sigbattle::TeamMember::requestAction() const
{
Player* player = qobject_cast<Player*>(m_containment);
if (player)
@@ -497,12 +497,12 @@ Pokebattle::TeamMember::Action Pokebattle::TeamMember::requestAction() const
return Action(Invalid, ActionData());
}
-void Pokebattle::TeamMember::makeActive(Arena* arena)
+void Sigbattle::TeamMember::makeActive(Arena* arena)
{
- QList<Pokescripting::StatusWrapper*> statuses = m_status.uniqueKeys();
- foreach (Pokescripting::StatusWrapper* status, statuses)
+ QList<Sigscript::StatusWrapper*> statuses = m_status.uniqueKeys();
+ foreach (Sigscript::StatusWrapper* status, statuses)
{
- const Pokemod::Script script = status->battleScript();
+ const Sigmod::Script script = status->battleScript();
Kross::Action* statusScript = new Kross::Action(Kross::Manager::self().actionCollection()->collection("status"), QString("status-%1").arg(QUuid::createUuid().toString()));
statusScript->setInterpreter(script.interpreter());
statusScript->setCode(script.script().toUtf8());
@@ -511,10 +511,10 @@ void Pokebattle::TeamMember::makeActive(Arena* arena)
statusScript->trigger();
m_statusBattleScripts.append(statusScript);
}
- QList<Pokescripting::AbilityWrapper*> abilities = m_abilities.keys();
- foreach (Pokescripting::AbilityWrapper* ability, abilities)
+ QList<Sigscript::AbilityWrapper*> abilities = m_abilities.keys();
+ foreach (Sigscript::AbilityWrapper* ability, abilities)
{
- const Pokemod::Script script = ability->battleScript();
+ const Sigmod::Script script = ability->battleScript();
Kross::Action* abilityScript = new Kross::Action(Kross::Manager::self().actionCollection()->collection("ability"), QString("ability-%1").arg(QUuid::createUuid().toString()));
abilityScript->setInterpreter(script.interpreter());
abilityScript->setCode(script.script().toUtf8());
@@ -525,23 +525,23 @@ void Pokebattle::TeamMember::makeActive(Arena* arena)
}
}
-void Pokebattle::TeamMember::writeBack()
+void Sigbattle::TeamMember::writeBack()
{
// TODO: write back all (applicable) differences between config and local storage
}
-Pokescripting::PokemodWrapper* Pokebattle::TeamMember::pokemod() const
+Sigscript::SigmodWrapper* Sigbattle::TeamMember::sigmod() const
{
- return m_containment->pokemod();
+ return m_containment->sigmod();
}
-void Pokebattle::TeamMember::setSpecies(Pokescripting::SpeciesWrapper* species)
+void Sigbattle::TeamMember::setSpecies(Sigscript::SpeciesWrapper* species)
{
m_species = species;
emit(speciesChanged(m_species));
}
-void Pokebattle::TeamMember::setLevel(const int level)
+void Sigbattle::TeamMember::setLevel(const int level)
{
emit(levelAboutToGrow());
m_level = level;
@@ -549,24 +549,24 @@ void Pokebattle::TeamMember::setLevel(const int level)
m_levelExp = calcExp();
}
-void Pokebattle::TeamMember::levelGrown()
+void Sigbattle::TeamMember::levelGrown()
{
for (int i = 0; i < m_species->moveCount(); ++i)
{
- Pokescripting::SpeciesMoveWrapper* move = m_species->move(i);
+ Sigscript::SpeciesMoveWrapper* move = m_species->move(i);
if (move->level() == m_level)
teachMove(move->move());
}
}
-void Pokebattle::TeamMember::makeConnections()
+void Sigbattle::TeamMember::makeConnections()
{
// TODO: make connections that are necessary (watching Config changes mainly)
}
-void Pokebattle::TeamMember::initAbility(Pokescripting::AbilityWrapper* ability)
+void Sigbattle::TeamMember::initAbility(Sigscript::AbilityWrapper* ability)
{
- const Pokemod::Script script = ability->battleScript();
+ const Sigmod::Script script = ability->battleScript();
Kross::Action* abilityScript = new Kross::Action(Kross::Manager::self().actionCollection()->collection("ability"), QString("ability-%1").arg(QUuid::createUuid().toString()));
abilityScript->setInterpreter(script.interpreter());
abilityScript->setCode(script.script().toUtf8());
@@ -575,63 +575,63 @@ void Pokebattle::TeamMember::initAbility(Pokescripting::AbilityWrapper* ability)
m_abilities[ability] = abilityScript;
}
-void Pokebattle::TeamMember::initItems()
+void Sigbattle::TeamMember::initItems()
{
- Pokemod::Hat<Pokescripting::ItemWrapper*> hat = m_species->itemHat();
- for (int i = 0; i < pokemod()->rules()->maxHeldItems(); ++i)
+ Sigmod::Hat<Sigscript::ItemWrapper*> hat = m_species->itemHat();
+ for (int i = 0; i < sigmod()->rules()->maxHeldItems(); ++i)
{
if (m_species->itemChance().poll())
m_items.append(hat.pick());
}
}
-void Pokebattle::TeamMember::initAbilities(const QList<Pokescripting::AbilityWrapper*>& initial)
+void Sigbattle::TeamMember::initAbilities(const QList<Sigscript::AbilityWrapper*>& initial)
{
- foreach (Pokescripting::AbilityWrapper* ability, initial)
+ foreach (Sigscript::AbilityWrapper* ability, initial)
initAbility(ability);
- Pokemod::Hat<Pokescripting::AbilityWrapper*> hat = m_species->abilityHat();
- while (m_abilities.size() < pokemod()->rules()->maxAbilities())
+ Sigmod::Hat<Sigscript::AbilityWrapper*> hat = m_species->abilityHat();
+ while (m_abilities.size() < sigmod()->rules()->maxAbilities())
{
- Pokescripting::AbilityWrapper* ability = hat.takeAndClear();
+ Sigscript::AbilityWrapper* ability = hat.takeAndClear();
if (!m_abilities.contains(ability))
initAbility(ability);
}
}
-void Pokebattle::TeamMember::initMoves(const QList<Pokescripting::MoveWrapper*>& initial)
+void Sigbattle::TeamMember::initMoves(const QList<Sigscript::MoveWrapper*>& initial)
{
m_moves = initial;
- for (int i = 0; (i < m_species->moveCount()) && (m_moves.size() < pokemod()->rules()->maxMoves()); ++i)
+ for (int i = 0; (i < m_species->moveCount()) && (m_moves.size() < sigmod()->rules()->maxMoves()); ++i)
{
- Pokescripting::SpeciesMoveWrapper* move = m_species->move(i);
+ Sigscript::SpeciesMoveWrapper* move = m_species->move(i);
if (!m_moves.contains(move->move()) && (((move->level() < m_level) && move->level()) || (!m_containment->isMutable() && (move->wild() < m_level))))
m_moves.append(move->move());
}
}
-void Pokebattle::TeamMember::initNatures(const QList<Pokescripting::NatureWrapper*>& initial)
+void Sigbattle::TeamMember::initNatures(const QList<Sigscript::NatureWrapper*>& initial)
{
m_natures = initial;
- Pokemod::Hat<Pokescripting::NatureWrapper*> hat = pokemod()->natureHat();
- while (m_natures.size() < pokemod()->rules()->maxNatures())
+ Sigmod::Hat<Sigscript::NatureWrapper*> hat = sigmod()->natureHat();
+ while (m_natures.size() < sigmod()->rules()->maxNatures())
{
- Pokescripting::NatureWrapper* nature = hat.takeAndClear();
+ Sigscript::NatureWrapper* nature = hat.takeAndClear();
if (!m_natures.contains(nature))
m_natures.append(nature);
}
}
-void Pokebattle::TeamMember::initStats()
+void Sigbattle::TeamMember::initStats()
{
- if (pokemod()->rules()->specialDVSplit())
+ if (sigmod()->rules()->specialDVSplit())
{
- for (int i = 0; i < Pokemod::ST_End_GSC; ++i)
+ for (int i = 0; i < Sigmod::ST_End_GSC; ++i)
m_dv[i] = qrand() & 31;
}
else
{
- for (int i = Pokemod::ST_No_HP_Start; i < Pokemod::ST_End_RBY; ++i)
+ for (int i = Sigmod::ST_No_HP_Start; i < Sigmod::ST_End_RBY; ++i)
m_dv[i] = qrand() & 15;
- m_dv[Pokemod::ST_HP] = ((m_dv[Pokemod::ST_Attack] & 1) << 3) + ((m_dv[Pokemod::ST_Defense] & 1) << 2) + ((m_dv[Pokemod::ST_Speed] & 1) << 1) + (m_dv[Pokemod::ST_Special] & 1);
+ m_dv[Sigmod::ST_HP] = ((m_dv[Sigmod::ST_Attack] & 1) << 3) + ((m_dv[Sigmod::ST_Defense] & 1) << 2) + ((m_dv[Sigmod::ST_Speed] & 1) << 1) + (m_dv[Sigmod::ST_Special] & 1);
}
}
diff --git a/sigbattle/TeamMember.h b/sigbattle/TeamMember.h
index db61571a..84e441d0 100644
--- a/sigbattle/TeamMember.h
+++ b/sigbattle/TeamMember.h
@@ -15,17 +15,17 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEBATTLE_TEAMMEMBER__
-#define __POKEBATTLE_TEAMMEMBER__
+#ifndef __SIGBATTLE_TEAMMEMBER__
+#define __SIGBATTLE_TEAMMEMBER__
-// Pokebattle includes
+// Sigbattle includes
#include "Global.h"
-// Pokescripting includes
-#include "../pokescripting/Config.h"
+// Sigscript includes
+#include "../sigscript/Config.h"
-// Pokemod includes
-#include "../pokemod/Global.h"
+// Sigmod includes
+#include "../sigmod/Global.h"
// Qt includes
#include <QtCore/QFuture>
@@ -38,14 +38,14 @@
#include <QtCore/QUuid>
// Forward declarations
-namespace Pokescripting
+namespace Sigscript
{
class AbilityWrapper;
class ItemWrapper;
class MoveWrapper;
class NatureWrapper;
class MapTrainerTeamMemberWrapper;
-class PokemodWrapper;
+class SigmodWrapper;
class SpeciesWrapper;
class StatusWrapper;
}
@@ -54,12 +54,12 @@ namespace Kross
class Action;
}
-namespace Pokebattle
+namespace Sigbattle
{
class Arena;
class Containment;
-class POKEBATTLE_EXPORT TeamMember : public Pokescripting::Config
+class SIGBATTLE_EXPORT TeamMember : public Sigscript::Config
{
Q_OBJECT
@@ -88,67 +88,67 @@ class POKEBATTLE_EXPORT TeamMember : public Pokescripting::Config
typedef QPair<TeamMember*, QFuture<TeamMember::Action> > RequestedAction;
TeamMember(const int speciesId, const QString& name, const int level, Containment* containment, const bool suppressItems = false);
- TeamMember(Pokescripting::MapTrainerTeamMemberWrapper* teamMember, Containment* containment);
+ TeamMember(Sigscript::MapTrainerTeamMemberWrapper* teamMember, Containment* containment);
QUuid id() const;
QString name() const;
long long currentHp() const;
- Pokescripting::SpeciesWrapper* species() const;
+ Sigscript::SpeciesWrapper* species() const;
int level() const;
Gender gender() const;
long long levelExperience() const;
- int baseStat(const Pokemod::Stat stat) const;
- long long statExperience(const Pokemod::Stat stat) const;
- int dv(const Pokemod::Stat stat) const;
- long long statValue(const Pokemod::Stat stat, const long long exp = -1) const;
+ int baseStat(const Sigmod::Stat stat) const;
+ long long statExperience(const Sigmod::Stat stat) const;
+ int dv(const Sigmod::Stat stat) const;
+ long long statValue(const Sigmod::Stat stat, const long long exp = -1) const;
long long calcExp(int level = -1) const;
- bool canLearnMove(Pokescripting::MoveWrapper* move) const;
+ bool canLearnMove(Sigscript::MoveWrapper* move) const;
- Pokescripting::PokemodWrapper* pokemod() const;
+ Sigscript::SigmodWrapper* sigmod() const;
signals:
- void speciesChanged(Pokescripting::SpeciesWrapper* species);
+ void speciesChanged(Sigscript::SpeciesWrapper* species);
void evolveStart();
void evolveEnd();
void nameChanged(const QString& oldName, const QString& newName);
- void statusCured(Pokescripting::StatusWrapper* status);
- void statusInflicted(Pokescripting::StatusWrapper* status);
+ void statusCured(Sigscript::StatusWrapper* status);
+ void statusInflicted(Sigscript::StatusWrapper* status);
void expGained(const int exp);
void levelAboutToGrow();
void levelGrown(const int newLevel);
- void statChanged(const Pokemod::Stat stat, const int value);
+ void statChanged(const Sigmod::Stat stat, const int value);
void effortFull(const int stat);
void totalEffortFull();
- void itemTaken(Pokescripting::ItemWrapper* item);
- void itemGiven(Pokescripting::ItemWrapper* item);
+ void itemTaken(Sigscript::ItemWrapper* item);
+ void itemGiven(Sigscript::ItemWrapper* item);
- void moveForgotten(Pokescripting::MoveWrapper* move);
- void moveLearned(Pokescripting::MoveWrapper* move);
- void movesFull(Pokescripting::MoveWrapper* move);
- void unlearnableMove(Pokescripting::MoveWrapper* move);
+ void moveForgotten(Sigscript::MoveWrapper* move);
+ void moveLearned(Sigscript::MoveWrapper* move);
+ void movesFull(Sigscript::MoveWrapper* move);
+ void unlearnableMove(Sigscript::MoveWrapper* move);
void knockedOut();
public slots:
void boostLevels(const int levels);
- void evolveInto(Pokescripting::SpeciesWrapper* newSpecies);
+ void evolveInto(Sigscript::SpeciesWrapper* newSpecies);
void setName(const QString& name);
- void cureStatus(Pokescripting::StatusWrapper* status);
- void giveStatus(Pokescripting::StatusWrapper* status);
+ void cureStatus(Sigscript::StatusWrapper* status);
+ void giveStatus(Sigscript::StatusWrapper* status);
void giveLevelExp(const int exp);
- void giveStatExp(const Pokemod::Stat stat, const int exp);
- void takeItem(Pokescripting::ItemWrapper* item);
- void giveItem(Pokescripting::ItemWrapper* item);
- void forgetMove(Pokescripting::MoveWrapper* move);
- void teachMove(Pokescripting::MoveWrapper* move);
+ void giveStatExp(const Sigmod::Stat stat, const int exp);
+ void takeItem(Sigscript::ItemWrapper* item);
+ void giveItem(Sigscript::ItemWrapper* item);
+ void forgetMove(Sigscript::MoveWrapper* move);
+ void teachMove(Sigscript::MoveWrapper* move);
Action requestAction() const;
@@ -156,7 +156,7 @@ class POKEBATTLE_EXPORT TeamMember : public Pokescripting::Config
virtual void writeBack();
protected slots:
- void setSpecies(Pokescripting::SpeciesWrapper* species);
+ void setSpecies(Sigscript::SpeciesWrapper* species);
void setLevel(const int level);
private slots:
void levelGrown();
@@ -167,41 +167,41 @@ class POKEBATTLE_EXPORT TeamMember : public Pokescripting::Config
QString m_name;
long long m_currentHp;
- Pokescripting::SpeciesWrapper* m_species;
+ Sigscript::SpeciesWrapper* m_species;
Gender m_gender;
long long m_levelExp;
int m_level;
- long long m_statExp[Pokemod::ST_End_GSC];
- int m_dv[Pokemod::ST_End_GSC];
- QMultiMap<Pokescripting::StatusWrapper*, Kross::Action*> m_status;
- QMap<Pokescripting::AbilityWrapper*, Kross::Action*> m_abilities;
- QList<Pokescripting::ItemWrapper*> m_items;
- QList<Pokescripting::MoveWrapper*> m_moves;
- QList<Pokescripting::NatureWrapper*> m_natures;
+ long long m_statExp[Sigmod::ST_End_GSC];
+ int m_dv[Sigmod::ST_End_GSC];
+ QMultiMap<Sigscript::StatusWrapper*, Kross::Action*> m_status;
+ QMap<Sigscript::AbilityWrapper*, Kross::Action*> m_abilities;
+ QList<Sigscript::ItemWrapper*> m_items;
+ QList<Sigscript::MoveWrapper*> m_moves;
+ QList<Sigscript::NatureWrapper*> m_natures;
QList<Kross::Action*> m_abilityBattleScripts;
QList<Kross::Action*> m_statusBattleScripts;
private:
void makeConnections();
- void initAbility(Pokescripting::AbilityWrapper* ability);
+ void initAbility(Sigscript::AbilityWrapper* ability);
void initItems();
- void initAbilities(const QList<Pokescripting::AbilityWrapper*>& initial = QList<Pokescripting::AbilityWrapper*>());
- void initMoves(const QList<Pokescripting::MoveWrapper*>& initial = QList<Pokescripting::MoveWrapper*>());
- void initNatures(const QList<Pokescripting::NatureWrapper*>& initial = QList<Pokescripting::NatureWrapper*>());
+ void initAbilities(const QList<Sigscript::AbilityWrapper*>& initial = QList<Sigscript::AbilityWrapper*>());
+ void initMoves(const QList<Sigscript::MoveWrapper*>& initial = QList<Sigscript::MoveWrapper*>());
+ void initNatures(const QList<Sigscript::NatureWrapper*>& initial = QList<Sigscript::NatureWrapper*>());
void initStats();
};
int actionPriority(const TeamMember* teamMember, const TeamMember::Action& action);
}
-Q_DECLARE_METATYPE(Pokebattle::TeamMember*)
-Q_DECLARE_METATYPE(Pokebattle::TeamMember::Gender)
-Q_DECLARE_METATYPE(Pokebattle::TeamMember::ActionType)
-Q_DECLARE_METATYPE(Pokebattle::TeamMember::Targets)
-Q_DECLARE_METATYPE(Pokebattle::TeamMember::ActionData)
-Q_DECLARE_METATYPE(Pokebattle::TeamMember::Action)
-Q_DECLARE_METATYPE(Pokebattle::TeamMember::RequestedAction)
+Q_DECLARE_METATYPE(Sigbattle::TeamMember*)
+Q_DECLARE_METATYPE(Sigbattle::TeamMember::Gender)
+Q_DECLARE_METATYPE(Sigbattle::TeamMember::ActionType)
+Q_DECLARE_METATYPE(Sigbattle::TeamMember::Targets)
+Q_DECLARE_METATYPE(Sigbattle::TeamMember::ActionData)
+Q_DECLARE_METATYPE(Sigbattle::TeamMember::Action)
+Q_DECLARE_METATYPE(Sigbattle::TeamMember::RequestedAction)
#endif
diff --git a/sigbattle/TurnArena.cpp b/sigbattle/TurnArena.cpp
index bf0bece8..a42af480 100644
--- a/sigbattle/TurnArena.cpp
+++ b/sigbattle/TurnArena.cpp
@@ -18,8 +18,8 @@
// Header include
#include "TurnArena.h"
-// Pokemod includes
-#include "../pokemod/Fraction.h"
+// Sigmod includes
+#include "../sigmod/Fraction.h"
// Qt includes
#include <QtAlgorithms>
@@ -27,7 +27,7 @@
#include <QtCore/QFuture>
#include <QtCore/QTimer>
-bool Pokebattle::sortActions(const TeamMember::RequestedAction& reqAction1, const TeamMember::RequestedAction& reqAction2)
+bool Sigbattle::sortActions(const TeamMember::RequestedAction& reqAction1, const TeamMember::RequestedAction& reqAction2)
{
TeamMember::Action action1 = reqAction1.second.isFinished() ? reqAction1.second : TeamMember::Action(TeamMember::Timeout, TeamMember::ActionData());
TeamMember::Action action2 = reqAction2.second.isFinished() ? reqAction2.second : TeamMember::Action(TeamMember::Timeout, TeamMember::ActionData());
@@ -37,17 +37,17 @@ bool Pokebattle::sortActions(const TeamMember::RequestedAction& reqAction1, cons
return true;
else if (priority1 == priority2)
{
- const int speed1 = reqAction1.first->statValue(Pokemod::ST_Speed);
- const int speed2 = reqAction2.first->statValue(Pokemod::ST_Speed);
+ const int speed1 = reqAction1.first->statValue(Sigmod::ST_Speed);
+ const int speed2 = reqAction2.first->statValue(Sigmod::ST_Speed);
if (speed1 < speed2)
return true;
else if (speed1 == speed2)
- return Pokemod::Fraction(1, 2).poll();
+ return Sigmod::Fraction(1, 2).poll();
}
return false;
}
-Pokebattle::TurnArena::TurnArena(QList<Player*> players, QObject* parent) :
+Sigbattle::TurnArena::TurnArena(QList<Player*> players, QObject* parent) :
Arena(players, parent),
m_watcher(new QFutureWatcher<TeamMember::RequestedAction>(this)),
m_timer(new QTimer(this))
@@ -57,11 +57,11 @@ Pokebattle::TurnArena::TurnArena(QList<Player*> players, QObject* parent) :
connect(m_timer, SIGNAL(timeout()), m_watcher, SLOT(cancel()));
}
-void Pokebattle::TurnArena::processRound()
+void Sigbattle::TurnArena::processRound()
{
emit(roundAboutToStart());
emit(roundStart());
- QFuture<TeamMember::RequestedAction> reqActions = QtConcurrent::mapped(active(), &Pokebattle::requestDecision);
+ QFuture<TeamMember::RequestedAction> reqActions = QtConcurrent::mapped(active(), &Sigbattle::requestDecision);
m_watcher->setFuture(reqActions);
m_timer->start(120000);
reqActions.waitForFinished();
@@ -94,7 +94,7 @@ void Pokebattle::TurnArena::processRound()
processRound();
}
-void Pokebattle::TurnArena::setupBattle()
+void Sigbattle::TurnArena::setupBattle()
{
// TODO: setup everything for the arena to do with the turns
Arena::setupBattle();
diff --git a/sigbattle/TurnArena.h b/sigbattle/TurnArena.h
index 636ae501..2a3b2864 100644
--- a/sigbattle/TurnArena.h
+++ b/sigbattle/TurnArena.h
@@ -15,10 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEBATTLE_TURNARENA__
-#define __POKEBATTLE_TURNARENA__
+#ifndef __SIGBATTLE_TURNARENA__
+#define __SIGBATTLE_TURNARENA__
-// Pokebattle includes
+// Sigbattle includes
#include "Arena.h"
#include "TeamMember.h"
@@ -28,9 +28,9 @@
// Forward declarations
class QTimer;
-namespace Pokebattle
+namespace Sigbattle
{
-class POKEBATTLE_EXPORT TurnArena : public Arena
+class SIGBATTLE_EXPORT TurnArena : public Arena
{
Q_OBJECT
@@ -54,6 +54,6 @@ class POKEBATTLE_EXPORT TurnArena : public Arena
bool sortActions(const TeamMember::RequestedAction& reqAction1, const TeamMember::RequestedAction& reqAction2);
}
-Q_DECLARE_METATYPE(Pokebattle::TurnArena*)
+Q_DECLARE_METATYPE(Sigbattle::TurnArena*)
#endif
diff --git a/sigen/Audio.h b/sigen/Audio.h
index 5dcd873e..a9f60aac 100644
--- a/sigen/Audio.h
+++ b/sigen/Audio.h
@@ -15,8 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEGEN_AUDIO__
-#define __POKEGEN_AUDIO__
+#ifndef __SIGEN_AUDIO__
+#define __SIGEN_AUDIO__
// Qt includes
#include <QList>
diff --git a/sigen/PokeGen.h b/sigen/Sigen.cpp
index 3ceb5bc7..e8bdc52f 100644
--- a/sigen/PokeGen.h
+++ b/sigen/Sigen.cpp
@@ -15,9 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEGEN_MAIN__
-#define __POKEGEN_MAIN__
-
// KDE includes
#include <KApplication>
#include <KCmdLineArgs>
@@ -26,13 +23,11 @@ int main(int argc, char* argv[])
{
KApplication app;
// TODO
- KAboutData about("pokegen", "", ki18n("Pokégen"), "0.0.2", ki18n(""), License_Unknown, ki18n("©2007-2008 Ben Boeckel and Nerdy Productions"), ki18n(""), "http://sourceforge.net/projects/pokegen");
+ KAboutData about("sigen", "", ki18n("Sigen"), "0.0.2", ki18n(""), License_GPL_V3, ki18n("©2007-2008 Ben Boeckel and Nerdy Productions"), ki18n(""), "http://sourceforge.net/projects/sigen");
about.setLicenseTextFile(ki18n("LICENSE"));
// TODO
- about.setProgramName(ki18n("Pokégen"));
+ about.setProgramName(ki18n("Sigen"));
about.addAuthor("Ben Boeckel", ki18n("Lead Programmer"), "MathStuf@gmail.com", "http://nerdyproductions.sobertillnoon.com");
about.addCredit("Peter Fernandes", ki18n("Ideas"), "supersonicandtails@gmail.com", "http://www.hypersonicsoft.org");
about.addCredit("Kevin Kofler", ki18n("Qt and KDE help"), "kevin.kofler@chello.at", "http://www.tigen.org/kevin.kofler");
}
-
-#endif
diff --git a/sigen/pokegen.tex b/sigen/sigen.tex
index b09958e6..b09958e6 100644
--- a/sigen/pokegen.tex
+++ b/sigen/sigen.tex
diff --git a/sigmod/Ability.cpp b/sigmod/Ability.cpp
index 02dc7280..ad862298 100644
--- a/sigmod/Ability.cpp
+++ b/sigmod/Ability.cpp
@@ -18,17 +18,17 @@
// Header include
#include "Ability.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-Pokemod::Ability::Ability(const Ability& ability) :
+Sigmod::Ability::Ability(const Ability& ability) :
Object(ability.parent(), ability.id())
{
*this = ability;
}
-Pokemod::Ability::Ability(const Pokemod* parent, const int id) :
+Sigmod::Ability::Ability(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_priority(0),
@@ -38,20 +38,20 @@ Pokemod::Ability::Ability(const Pokemod* parent, const int id) :
{
}
-Pokemod::Ability::Ability(const Ability& ability, const Pokemod* parent, const int id) :
+Sigmod::Ability::Ability(const Ability& ability, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = ability;
}
-Pokemod::Ability::Ability(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Ability::Ability(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::Ability::validate()
+void Sigmod::Ability::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -59,7 +59,7 @@ void Pokemod::Ability::validate()
TEST_END();
}
-void Pokemod::Ability::load(const QDomElement& xml)
+void Sigmod::Ability::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -69,7 +69,7 @@ void Pokemod::Ability::load(const QDomElement& xml)
LOAD(worldScript);
}
-QDomElement Pokemod::Ability::save() const
+QDomElement Sigmod::Ability::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -80,57 +80,57 @@ QDomElement Pokemod::Ability::save() const
return xml;
}
-void Pokemod::Ability::setName(const QString& name)
+void Sigmod::Ability::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Ability::setPriority(const int priority)
+void Sigmod::Ability::setPriority(const int priority)
{
CHECK(priority);
}
-void Pokemod::Ability::setDescription(const QString& description)
+void Sigmod::Ability::setDescription(const QString& description)
{
CHECK(description);
}
-void Pokemod::Ability::setBattleScript(const Script& battleScript)
+void Sigmod::Ability::setBattleScript(const Script& battleScript)
{
CHECK(battleScript);
}
-void Pokemod::Ability::setWorldScript(const Script& worldScript)
+void Sigmod::Ability::setWorldScript(const Script& worldScript)
{
CHECK(worldScript);
}
-QString Pokemod::Ability::name() const
+QString Sigmod::Ability::name() const
{
return m_name;
}
-int Pokemod::Ability::priority() const
+int Sigmod::Ability::priority() const
{
return m_priority;
}
-QString Pokemod::Ability::description() const
+QString Sigmod::Ability::description() const
{
return m_description;
}
-Pokemod::Script Pokemod::Ability::battleScript() const
+Sigmod::Script Sigmod::Ability::battleScript() const
{
return m_battleScript;
}
-Pokemod::Script Pokemod::Ability::worldScript() const
+Sigmod::Script Sigmod::Ability::worldScript() const
{
return m_worldScript;
}
-Pokemod::Ability& Pokemod::Ability::operator=(const Ability& rhs)
+Sigmod::Ability& Sigmod::Ability::operator=(const Ability& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Ability.h b/sigmod/Ability.h
index b654d990..d6ee0f82 100644
--- a/sigmod/Ability.h
+++ b/sigmod/Ability.h
@@ -15,27 +15,27 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_ABILITY__
-#define __POKEMOD_ABILITY__
+#ifndef __SIGMOD_ABILITY__
+#define __SIGMOD_ABILITY__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
#include "Script.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Ability : public Object
+class SIGMOD_EXPORT Ability : public Object
{
Q_OBJECT
public:
Ability(const Ability& ability);
- Ability(const Pokemod* parent, const int id);
- Ability(const Ability& ability, const Pokemod* parent, const int id);
- Ability(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Ability(const Sigmod* parent, const int id);
+ Ability(const Ability& ability, const Sigmod* parent, const int id);
+ Ability(const QDomElement& xml, const Sigmod* parent, const int id = -1);
void validate();
diff --git a/sigmod/Author.cpp b/sigmod/Author.cpp
index f5def288..2cca635f 100644
--- a/sigmod/Author.cpp
+++ b/sigmod/Author.cpp
@@ -18,20 +18,20 @@
// Header include
#include "Author.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
// Qt includes
#include <QtCore/QRegExp>
-Pokemod::Author::Author(const Author& author) :
+Sigmod::Author::Author(const Author& author) :
Object(author.parent(), author.id())
{
*this = author;
}
-Pokemod::Author::Author(const Pokemod* parent, const int id) :
+Sigmod::Author::Author(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_email(""),
@@ -39,20 +39,20 @@ Pokemod::Author::Author(const Pokemod* parent, const int id) :
{
}
-Pokemod::Author::Author(const Author& author, const Pokemod* parent, const int id) :
+Sigmod::Author::Author(const Author& author, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = author;
}
-Pokemod::Author::Author(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Author::Author(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::Author::validate()
+void Sigmod::Author::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -66,7 +66,7 @@ void Pokemod::Author::validate()
TEST_END();
}
-void Pokemod::Author::load(const QDomElement& xml)
+void Sigmod::Author::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -74,7 +74,7 @@ void Pokemod::Author::load(const QDomElement& xml)
LOAD(role);
}
-QDomElement Pokemod::Author::save() const
+QDomElement Sigmod::Author::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -83,37 +83,37 @@ QDomElement Pokemod::Author::save() const
return xml;
}
-void Pokemod::Author::setName(const QString& name)
+void Sigmod::Author::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Author::setEmail(const QString& email)
+void Sigmod::Author::setEmail(const QString& email)
{
CHECK(email);
}
-void Pokemod::Author::setRole(const QString& role)
+void Sigmod::Author::setRole(const QString& role)
{
CHECK(role);
}
-QString Pokemod::Author::name() const
+QString Sigmod::Author::name() const
{
return m_name;
}
-QString Pokemod::Author::email() const
+QString Sigmod::Author::email() const
{
return m_email;
}
-QString Pokemod::Author::role() const
+QString Sigmod::Author::role() const
{
return m_role;
}
-Pokemod::Author& Pokemod::Author::operator=(const Author& rhs)
+Sigmod::Author& Sigmod::Author::operator=(const Author& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Author.h b/sigmod/Author.h
index 23f36b38..d5384ddb 100644
--- a/sigmod/Author.h
+++ b/sigmod/Author.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_AUTHOR__
-#define __POKEMOD_AUTHOR__
+#ifndef __SIGMOD_AUTHOR__
+#define __SIGMOD_AUTHOR__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Author : public Object
+class SIGMOD_EXPORT Author : public Object
{
Q_OBJECT
public:
Author(const Author& author);
- Author(const Pokemod* parent, const int id);
- Author(const Author& author, const Pokemod* parent, const int id);
- Author(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Author(const Sigmod* parent, const int id);
+ Author(const Author& author, const Sigmod* parent, const int id);
+ Author(const QDomElement& xml, const Sigmod* parent, const int id = -1);
void validate();
diff --git a/sigmod/Badge.cpp b/sigmod/Badge.cpp
index 821720af..c1077934 100644
--- a/sigmod/Badge.cpp
+++ b/sigmod/Badge.cpp
@@ -18,20 +18,20 @@
// Header include
#include "Badge.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
#include "Rules.h"
+#include "Sigmod.h"
#include "Sprite.h"
-Pokemod::Badge::Badge(const Badge& badge) :
+Sigmod::Badge::Badge(const Badge& badge) :
Object(badge.parent(), badge.id()),
m_stat(ST_End_GSC - ST_No_HP_Start)
{
*this = badge;
}
-Pokemod::Badge::Badge(const Pokemod* parent, const int id) :
+Sigmod::Badge::Badge(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_face(-1),
@@ -43,14 +43,14 @@ Pokemod::Badge::Badge(const Pokemod* parent, const int id) :
m_stat[i].set(1, 1);
}
-Pokemod::Badge::Badge(const Badge& badge, const Pokemod* parent, const int id) :
+Sigmod::Badge::Badge(const Badge& badge, const Sigmod* parent, const int id) :
Object(parent, id),
m_stat(ST_End_GSC - ST_No_HP_Start)
{
*this = badge;
}
-Pokemod::Badge::Badge(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Badge::Badge(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id),
m_stat(ST_End_GSC - ST_No_HP_Start)
{
@@ -58,7 +58,7 @@ Pokemod::Badge::Badge(const QDomElement& xml, const Pokemod* parent, const int i
load(xml);
}
-void Pokemod::Badge::validate()
+void Sigmod::Badge::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -70,7 +70,7 @@ void Pokemod::Badge::validate()
TEST_END();
}
-void Pokemod::Badge::load(const QDomElement& xml)
+void Sigmod::Badge::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -80,7 +80,7 @@ void Pokemod::Badge::load(const QDomElement& xml)
LOAD_ARRAY(stat);
}
-QDomElement Pokemod::Badge::save() const
+QDomElement Sigmod::Badge::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -91,30 +91,30 @@ QDomElement Pokemod::Badge::save() const
return xml;
}
-void Pokemod::Badge::setName(const QString& name)
+void Sigmod::Badge::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Badge::setFace(const int face)
+void Sigmod::Badge::setFace(const int face)
{
- if (qobject_cast<const Pokemod*>(pokemod())->spriteIndex(face) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->spriteIndex(face) == INT_MAX)
emit(error(bounds("face")));
else
CHECK(face);
}
-void Pokemod::Badge::setBadge(const int badge)
+void Sigmod::Badge::setBadge(const int badge)
{
- if (qobject_cast<const Pokemod*>(pokemod())->spriteIndex(badge) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->spriteIndex(badge) == INT_MAX)
emit(error(bounds("badge")));
else
CHECK(badge);
}
-void Pokemod::Badge::setObey(const int obey)
+void Sigmod::Badge::setObey(const int obey)
{
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->maxLevel() < obey)
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->maxLevel() < obey)
{
emit(error(bounds("obey")));
return;
@@ -122,7 +122,7 @@ void Pokemod::Badge::setObey(const int obey)
CHECK(obey);
}
-void Pokemod::Badge::setStat(const Stat stat, const Fraction& multiplier)
+void Sigmod::Badge::setStat(const Stat stat, const Fraction& multiplier)
{
if (multiplier < 1)
{
@@ -132,7 +132,7 @@ void Pokemod::Badge::setStat(const Stat stat, const Fraction& multiplier)
switch (stat)
{
case ST_SpecialDefense:
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->specialSplit())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->specialSplit())
case ST_Attack ... ST_Special:
break;
default:
@@ -142,38 +142,38 @@ void Pokemod::Badge::setStat(const Stat stat, const Fraction& multiplier)
CHECK_ARRAY(stat[stat - ST_No_HP_Start], multiplier);
}
-void Pokemod::Badge::setStat(const Fraction& multiplier)
+void Sigmod::Badge::setStat(const Fraction& multiplier)
{
if (multiplier < 1)
emit(error(bounds("stat multiplier")));
}
-QString Pokemod::Badge::name() const
+QString Sigmod::Badge::name() const
{
return m_name;
}
-int Pokemod::Badge::face() const
+int Sigmod::Badge::face() const
{
return m_face;
}
-int Pokemod::Badge::badge() const
+int Sigmod::Badge::badge() const
{
return m_badge;
}
-int Pokemod::Badge::obey() const
+int Sigmod::Badge::obey() const
{
return m_obey;
}
-Pokemod::Fraction Pokemod::Badge::stat(const Stat stat) const
+Sigmod::Fraction Sigmod::Badge::stat(const Stat stat) const
{
switch (stat)
{
case ST_SpecialDefense:
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->specialSplit())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->specialSplit())
case ST_Attack ... ST_Special:
return m_stat[stat - ST_No_HP_Start];
default:
@@ -182,7 +182,7 @@ Pokemod::Fraction Pokemod::Badge::stat(const Stat stat) const
}
}
-Pokemod::Badge& Pokemod::Badge::operator=(const Badge& rhs)
+Sigmod::Badge& Sigmod::Badge::operator=(const Badge& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Badge.h b/sigmod/Badge.h
index 1ff97f90..42a9d8a2 100644
--- a/sigmod/Badge.h
+++ b/sigmod/Badge.h
@@ -15,27 +15,27 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_BADGE__
-#define __POKEMOD_BADGE__
+#ifndef __SIGMOD_BADGE__
+#define __SIGMOD_BADGE__
-// Pokemod includes
+// Sigmod includes
#include "Fraction.h"
#include "Object.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Badge : public Object
+class SIGMOD_EXPORT Badge : public Object
{
Q_OBJECT
public:
Badge(const Badge& badge);
- Badge(const Pokemod* parent, const int id);
- Badge(const Badge& badge, const Pokemod* parent, const int id);
- Badge(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Badge(const Sigmod* parent, const int id);
+ Badge(const Badge& badge, const Sigmod* parent, const int id);
+ Badge(const QDomElement& xml, const Sigmod* parent, const int id = -1);
void validate();
diff --git a/sigmod/CMakeLists.txt b/sigmod/CMakeLists.txt
index 06b16f29..b8eee63c 100644
--- a/sigmod/CMakeLists.txt
+++ b/sigmod/CMakeLists.txt
@@ -1,12 +1,12 @@
-PROJECT(pokemod)
+PROJECT(sigmod)
IF(NOT BUILT_FROM_ROOT)
MESSAGE(FATAL_ERROR "Not built from source root")
ENDIF(NOT BUILT_FROM_ROOT)
-ADD_DEFINITIONS(-DMAKE_POKEMOD_LIB)
+ADD_DEFINITIONS(-DMAKE_SIGMOD_LIB)
-SET(pokemod_MOC_HEADERS
+SET(sigmod_MOC_HEADERS
Ability.h
Author.h
Badge.h
@@ -26,8 +26,8 @@ SET(pokemod_MOC_HEADERS
Move.h
Nature.h
Object.h
- Pokemod.h
Rules.h
+ Sigmod.h
Skin.h
Sound.h
Species.h
@@ -43,8 +43,8 @@ SET(pokemod_MOC_HEADERS
Type.h
Weather.h
)
-QT4_WRAP_CPP(pokemod_MOC_SRCS ${pokemod_MOC_HEADERS})
-SET(pokemod_HEADERS
+QT4_WRAP_CPP(sigmod_MOC_SRCS ${sigmod_MOC_HEADERS})
+SET(sigmod_HEADERS
Fraction.h
Global.h
Hat.h
@@ -52,11 +52,11 @@ SET(pokemod_HEADERS
Matrix.h
Script.h
)
-SET(pokemod_DEVEL
- ${pokemod_HEADERS}
- ${pokemod_MOC_HEADERS}
+SET(sigmod_DEVEL
+ ${sigmod_HEADERS}
+ ${sigmod_MOC_HEADERS}
)
-SET(pokemod_SRCS
+SET(sigmod_SRCS
Ability.cpp
Author.cpp
Badge.cpp
@@ -77,8 +77,8 @@ SET(pokemod_SRCS
Move.cpp
Nature.cpp
Object.cpp
- Pokemod.cpp
Rules.cpp
+ Sigmod.cpp
Skin.cpp
Sound.cpp
Species.cpp
@@ -95,30 +95,30 @@ SET(pokemod_SRCS
Weather.cpp
)
-ADD_LIBRARY(pokemod
- ${pokemod_SRCS}
- ${pokemod_MOC_SRCS}
+ADD_LIBRARY(sigmod
+ ${sigmod_SRCS}
+ ${sigmod_MOC_SRCS}
)
-SET_TARGET_PROPERTIES(pokemod
+SET_TARGET_PROPERTIES(sigmod
PROPERTIES
VERSION ${POKEGEN_VERSION}
SOVERSION ${POKEGEN_SOVERSION}
LINK_INTERFACE_LIBRARIES ""
)
-TARGET_LINK_LIBRARIES(pokemod
+TARGET_LINK_LIBRARIES(sigmod
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTXML_LIBRARY}
)
INSTALL(
- TARGETS pokemod
+ TARGETS sigmod
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
COMPONENT runtime
)
INSTALL(
- FILES ${pokemod_DEVEL}
+ FILES ${sigmod_DEVEL}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${CMAKE_PROJECT_NAME}/${PROJECT_NAME}
COMPONENT development
)
diff --git a/sigmod/CoinList.cpp b/sigmod/CoinList.cpp
index c19d325a..47c360cf 100644
--- a/sigmod/CoinList.cpp
+++ b/sigmod/CoinList.cpp
@@ -18,46 +18,46 @@
// Header include
#include "CoinList.h"
-// Pokemod includes
+// Sigmod includes
#include "CoinListObject.h"
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
// Qt includes
#include <QtCore/QSet>
-Pokemod::CoinList::CoinList(const CoinList& coinList) :
+Sigmod::CoinList::CoinList(const CoinList& coinList) :
Object(coinList.parent(), coinList.id())
{
*this = coinList;
}
-Pokemod::CoinList::CoinList(const Pokemod* parent, const int id) :
+Sigmod::CoinList::CoinList(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_script("", "")
{
}
-Pokemod::CoinList::CoinList(const CoinList& coinList, const Pokemod* parent, const int id) :
+Sigmod::CoinList::CoinList(const CoinList& coinList, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = coinList;
}
-Pokemod::CoinList::CoinList(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::CoinList::CoinList(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-Pokemod::CoinList::~CoinList()
+Sigmod::CoinList::~CoinList()
{
clear();
}
-void Pokemod::CoinList::validate()
+void Sigmod::CoinList::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -100,7 +100,7 @@ void Pokemod::CoinList::validate()
TEST_END();
}
-void Pokemod::CoinList::load(const QDomElement& xml)
+void Sigmod::CoinList::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -108,7 +108,7 @@ void Pokemod::CoinList::load(const QDomElement& xml)
LOAD_SUB(newObject, CoinListObject);
}
-QDomElement Pokemod::CoinList::save() const
+QDomElement Sigmod::CoinList::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -117,49 +117,49 @@ QDomElement Pokemod::CoinList::save() const
return xml;
}
-void Pokemod::CoinList::setName(const QString& name)
+void Sigmod::CoinList::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::CoinList::setScript(const Script& script)
+void Sigmod::CoinList::setScript(const Script& script)
{
CHECK(script)
}
-QString Pokemod::CoinList::name() const
+QString Sigmod::CoinList::name() const
{
return m_name;
}
-Pokemod::Script Pokemod::CoinList::script() const
+Sigmod::Script Sigmod::CoinList::script() const
{
return m_script;
}
-const Pokemod::CoinListObject* Pokemod::CoinList::object(const int index) const
+const Sigmod::CoinListObject* Sigmod::CoinList::object(const int index) const
{
Q_ASSERT(index < objectCount());
return m_objects.at(index);
}
-Pokemod::CoinListObject* Pokemod::CoinList::object(const int index)
+Sigmod::CoinListObject* Sigmod::CoinList::object(const int index)
{
Q_ASSERT(index < objectCount());
return m_objects[index];
}
-const Pokemod::CoinListObject* Pokemod::CoinList::objectById(const int id) const
+const Sigmod::CoinListObject* Sigmod::CoinList::objectById(const int id) const
{
return object(objectIndex(id));
}
-Pokemod::CoinListObject* Pokemod::CoinList::objectById(const int id)
+Sigmod::CoinListObject* Sigmod::CoinList::objectById(const int id)
{
return object(objectIndex(id));
}
-int Pokemod::CoinList::objectIndex(const int id) const
+int Sigmod::CoinList::objectIndex(const int id) const
{
for (int i = 0; i < objectCount(); ++i)
{
@@ -169,45 +169,45 @@ int Pokemod::CoinList::objectIndex(const int id) const
return INT_MAX;
}
-int Pokemod::CoinList::objectCount() const
+int Sigmod::CoinList::objectCount() const
{
return m_objects.size();
}
-Pokemod::CoinListObject* Pokemod::CoinList::newObject()
+Sigmod::CoinListObject* Sigmod::CoinList::newObject()
{
return newObject(new CoinListObject(this, objectId()));
}
-Pokemod::CoinListObject* Pokemod::CoinList::newObject(const QDomElement& xml)
+Sigmod::CoinListObject* Sigmod::CoinList::newObject(const QDomElement& xml)
{
return newObject(new CoinListObject(xml, this, objectId()));
}
-Pokemod::CoinListObject* Pokemod::CoinList::newObject(const CoinListObject& object)
+Sigmod::CoinListObject* Sigmod::CoinList::newObject(const CoinListObject& object)
{
return newObject(new CoinListObject(object, this, objectId()));
}
-Pokemod::CoinListObject* Pokemod::CoinList::newObject(CoinListObject* object)
+Sigmod::CoinListObject* Sigmod::CoinList::newObject(CoinListObject* object)
{
m_objects.append(object);
return object;
}
-void Pokemod::CoinList::deleteObject(const int index)
+void Sigmod::CoinList::deleteObject(const int index)
{
Q_ASSERT(index < objectCount());
delete m_objects[index];
m_objects.removeAt(index);
}
-void Pokemod::CoinList::deleteObjectById(const int id)
+void Sigmod::CoinList::deleteObjectById(const int id)
{
deleteObject(objectIndex(id));
}
-int Pokemod::CoinList::objectId() const
+int Sigmod::CoinList::objectId() const
{
int i = 0;
while ((i < objectCount()) && (objectIndex(i) != INT_MAX))
@@ -215,7 +215,7 @@ int Pokemod::CoinList::objectId() const
return i;
}
-Pokemod::CoinList& Pokemod::CoinList::operator=(const CoinList& rhs)
+Sigmod::CoinList& Sigmod::CoinList::operator=(const CoinList& rhs)
{
if (this == &rhs)
return *this;
@@ -226,7 +226,7 @@ Pokemod::CoinList& Pokemod::CoinList::operator=(const CoinList& rhs)
return *this;
}
-void Pokemod::CoinList::clear()
+void Sigmod::CoinList::clear()
{
while (objectCount())
deleteObject(0);
diff --git a/sigmod/CoinList.h b/sigmod/CoinList.h
index a04503cc..0cda0700 100644
--- a/sigmod/CoinList.h
+++ b/sigmod/CoinList.h
@@ -15,31 +15,31 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_COINLIST__
-#define __POKEMOD_COINLIST__
+#ifndef __SIGMOD_COINLIST__
+#define __SIGMOD_COINLIST__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
#include "Script.h"
// Qt includes
#include <QtCore/QList>
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
class CoinListObject;
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT CoinList : public Object
+class SIGMOD_EXPORT CoinList : public Object
{
Q_OBJECT
public:
CoinList(const CoinList& coinList);
- CoinList(const Pokemod* parent, const int id);
- CoinList(const CoinList& coinList, const Pokemod* parent, const int id);
- CoinList(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ CoinList(const Sigmod* parent, const int id);
+ CoinList(const CoinList& coinList, const Sigmod* parent, const int id);
+ CoinList(const QDomElement& xml, const Sigmod* parent, const int id = -1);
~CoinList();
void validate();
diff --git a/sigmod/CoinListObject.cpp b/sigmod/CoinListObject.cpp
index 8ff85afb..a82c3b2a 100644
--- a/sigmod/CoinListObject.cpp
+++ b/sigmod/CoinListObject.cpp
@@ -18,20 +18,20 @@
// Header include
#include "CoinListObject.h"
-// Pokemod includes
+// Sigmod includes
#include "CoinList.h"
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-const QStringList Pokemod::CoinListObject::TypeStr = QStringList() << "Item" << "Team Member";
+const QStringList Sigmod::CoinListObject::TypeStr = QStringList() << "Item" << "Team Member";
-Pokemod::CoinListObject::CoinListObject(const CoinListObject& object) :
+Sigmod::CoinListObject::CoinListObject(const CoinListObject& object) :
Object(object.parent(), object.id())
{
*this = object;
}
-Pokemod::CoinListObject::CoinListObject(const CoinList* parent, const int id) :
+Sigmod::CoinListObject::CoinListObject(const CoinList* parent, const int id) :
Object(parent, id),
m_type(Item),
m_object(INT_MAX),
@@ -40,20 +40,20 @@ Pokemod::CoinListObject::CoinListObject(const CoinList* parent, const int id) :
{
}
-Pokemod::CoinListObject::CoinListObject(const CoinListObject& object, const CoinList* parent, const int id) :
+Sigmod::CoinListObject::CoinListObject(const CoinListObject& object, const CoinList* parent, const int id) :
Object(parent, id)
{
*this = object;
}
-Pokemod::CoinListObject::CoinListObject(const QDomElement& xml, const CoinList* parent, const int id) :
+Sigmod::CoinListObject::CoinListObject(const QDomElement& xml, const CoinList* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::CoinListObject::validate()
+void Sigmod::CoinListObject::validate()
{
TEST_BEGIN();
TEST(setObject, object);
@@ -61,7 +61,7 @@ void Pokemod::CoinListObject::validate()
TEST_END();
}
-void Pokemod::CoinListObject::load(const QDomElement& xml)
+void Sigmod::CoinListObject::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(type);
@@ -70,7 +70,7 @@ void Pokemod::CoinListObject::load(const QDomElement& xml)
LOAD(cost);
}
-QDomElement Pokemod::CoinListObject::save() const
+QDomElement Sigmod::CoinListObject::save() const
{
SAVE_CREATE();
SAVE(type);
@@ -80,20 +80,20 @@ QDomElement Pokemod::CoinListObject::save() const
return xml;
}
-void Pokemod::CoinListObject::setType(const Type type)
+void Sigmod::CoinListObject::setType(const Type type)
{
CHECK(type);
}
-void Pokemod::CoinListObject::setObject(const int object)
+void Sigmod::CoinListObject::setObject(const int object)
{
- if (((Item == m_type) && (qobject_cast<const Pokemod*>(pokemod())->itemIndex(object) == INT_MAX)) || ((Species == m_type) && (qobject_cast<const Pokemod*>(pokemod())->speciesIndex(object) == INT_MAX)))
+ if (((Item == m_type) && (qobject_cast<const Sigmod*>(sigmod())->itemIndex(object) == INT_MAX)) || ((Species == m_type) && (qobject_cast<const Sigmod*>(sigmod())->speciesIndex(object) == INT_MAX)))
emit(error(bounds("object")));
else
CHECK(object);
}
-void Pokemod::CoinListObject::setAmount(const int amount)
+void Sigmod::CoinListObject::setAmount(const int amount)
{
if (!amount || ((Species == m_type) && (1 < amount)))
emit(error(bounds("amount")));
@@ -101,32 +101,32 @@ void Pokemod::CoinListObject::setAmount(const int amount)
CHECK(amount);
}
-void Pokemod::CoinListObject::setCost(const int cost)
+void Sigmod::CoinListObject::setCost(const int cost)
{
CHECK(cost);
}
-Pokemod::CoinListObject::Type Pokemod::CoinListObject::type() const
+Sigmod::CoinListObject::Type Sigmod::CoinListObject::type() const
{
return m_type;
}
-int Pokemod::CoinListObject::object() const
+int Sigmod::CoinListObject::object() const
{
return m_object;
}
-int Pokemod::CoinListObject::amount() const
+int Sigmod::CoinListObject::amount() const
{
return m_amount;
}
-int Pokemod::CoinListObject::cost() const
+int Sigmod::CoinListObject::cost() const
{
return m_cost;
}
-Pokemod::CoinListObject& Pokemod::CoinListObject::operator=(const CoinListObject& rhs)
+Sigmod::CoinListObject& Sigmod::CoinListObject::operator=(const CoinListObject& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/CoinListObject.h b/sigmod/CoinListObject.h
index a1d9ab6b..d824a0ff 100644
--- a/sigmod/CoinListObject.h
+++ b/sigmod/CoinListObject.h
@@ -15,18 +15,18 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_COINLISTOBJECT__
-#define __POKEMOD_COINLISTOBJECT__
+#ifndef __SIGMOD_COINLISTOBJECT__
+#define __SIGMOD_COINLISTOBJECT__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
class CoinList;
-class POKEMOD_EXPORT CoinListObject : public Object
+class SIGMOD_EXPORT CoinListObject : public Object
{
Q_OBJECT
Q_ENUMS(Type)
@@ -67,6 +67,6 @@ class POKEMOD_EXPORT CoinListObject : public Object
int m_cost;
};
}
-Q_DECLARE_METATYPE(Pokemod::CoinListObject::Type)
+Q_DECLARE_METATYPE(Sigmod::CoinListObject::Type)
#endif
diff --git a/sigmod/EggGroup.cpp b/sigmod/EggGroup.cpp
index 4f028611..db40b4de 100644
--- a/sigmod/EggGroup.cpp
+++ b/sigmod/EggGroup.cpp
@@ -18,36 +18,36 @@
// Header include
#include "EggGroup.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-Pokemod::EggGroup::EggGroup(const EggGroup& eggGroup) :
+Sigmod::EggGroup::EggGroup(const EggGroup& eggGroup) :
Object(eggGroup.parent(), eggGroup.id())
{
*this = eggGroup;
}
-Pokemod::EggGroup::EggGroup(const Pokemod* parent, const int id) :
+Sigmod::EggGroup::EggGroup(const Sigmod* parent, const int id) :
Object(parent, id),
m_name("")
{
}
-Pokemod::EggGroup::EggGroup(const EggGroup& eggGroup, const Pokemod* parent, const int id) :
+Sigmod::EggGroup::EggGroup(const EggGroup& eggGroup, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = eggGroup;
}
-Pokemod::EggGroup::EggGroup(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::EggGroup::EggGroup(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::EggGroup::validate()
+void Sigmod::EggGroup::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -55,30 +55,30 @@ void Pokemod::EggGroup::validate()
TEST_END();
}
-void Pokemod::EggGroup::load(const QDomElement& xml)
+void Sigmod::EggGroup::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
}
-QDomElement Pokemod::EggGroup::save() const
+QDomElement Sigmod::EggGroup::save() const
{
SAVE_CREATE();
SAVE(name);
return xml;
}
-void Pokemod::EggGroup::setName(const QString& name)
+void Sigmod::EggGroup::setName(const QString& name)
{
CHECK(name);
}
-QString Pokemod::EggGroup::name() const
+QString Sigmod::EggGroup::name() const
{
return m_name;
}
-Pokemod::EggGroup& Pokemod::EggGroup::operator=(const EggGroup& rhs)
+Sigmod::EggGroup& Sigmod::EggGroup::operator=(const EggGroup& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/EggGroup.h b/sigmod/EggGroup.h
index 5d2927f7..e1377683 100644
--- a/sigmod/EggGroup.h
+++ b/sigmod/EggGroup.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_EGGGROUP__
-#define __POKEMOD_EGGGROUP__
+#ifndef __SIGMOD_EGGGROUP__
+#define __SIGMOD_EGGGROUP__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT EggGroup : public Object
+class SIGMOD_EXPORT EggGroup : public Object
{
Q_OBJECT
public:
EggGroup(const EggGroup& eggGroup);
- EggGroup(const Pokemod* parent, const int id);
- EggGroup(const EggGroup& eggGroup, const Pokemod* parent, const int id);
- EggGroup(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ EggGroup(const Sigmod* parent, const int id);
+ EggGroup(const EggGroup& eggGroup, const Sigmod* parent, const int id);
+ EggGroup(const QDomElement& xml, const Sigmod* parent, const int id = -1);
void validate();
diff --git a/sigmod/Fraction.cpp b/sigmod/Fraction.cpp
index 33c9add0..d10ee376 100644
--- a/sigmod/Fraction.cpp
+++ b/sigmod/Fraction.cpp
@@ -18,46 +18,46 @@
// Header include
#include "Fraction.h"
-Pokemod::Fraction::Fraction(const int numerator, const int denominator)
+Sigmod::Fraction::Fraction(const int numerator, const int denominator)
{
set(numerator, denominator);
reduce();
}
-Pokemod::Fraction::Fraction(const Fraction& fraction)
+Sigmod::Fraction::Fraction(const Fraction& fraction)
{
set(fraction.numerator(), fraction.denominator());
reduce();
}
-void Pokemod::Fraction::set(const int numerator, const int denominator)
+void Sigmod::Fraction::set(const int numerator, const int denominator)
{
m_numerator = numerator;
m_denominator = denominator;
normalize();
}
-void Pokemod::Fraction::setNumerator(const int numerator)
+void Sigmod::Fraction::setNumerator(const int numerator)
{
set(numerator, m_denominator);
}
-void Pokemod::Fraction::setDenominator(const int denominator)
+void Sigmod::Fraction::setDenominator(const int denominator)
{
set(m_numerator, denominator);
}
-int Pokemod::Fraction::numerator() const
+int Sigmod::Fraction::numerator() const
{
return m_numerator;
}
-int Pokemod::Fraction::denominator() const
+int Sigmod::Fraction::denominator() const
{
return m_denominator;
}
-void Pokemod::Fraction::reduce()
+void Sigmod::Fraction::reduce()
{
if (!m_numerator || !m_denominator)
return;
@@ -71,12 +71,12 @@ void Pokemod::Fraction::reduce()
m_denominator /= i;
}
-bool Pokemod::Fraction::poll() const
+bool Sigmod::Fraction::poll() const
{
return (qrand() % m_denominator) < m_numerator;
}
-Pokemod::Fraction& Pokemod::Fraction::operator=(const Fraction& rhs)
+Sigmod::Fraction& Sigmod::Fraction::operator=(const Fraction& rhs)
{
if (this == &rhs)
return *this;
@@ -85,62 +85,62 @@ Pokemod::Fraction& Pokemod::Fraction::operator=(const Fraction& rhs)
return *this;
}
-Pokemod::Fraction::operator double() const
+Sigmod::Fraction::operator double() const
{
return (double(m_numerator) / m_denominator);
}
-Pokemod::Fraction Pokemod::Fraction::operator+(const Fraction& rhs) const
+Sigmod::Fraction Sigmod::Fraction::operator+(const Fraction& rhs) const
{
return Fraction((m_numerator * rhs.m_denominator) + (m_denominator * rhs.m_numerator), m_denominator * rhs.m_denominator);
}
-Pokemod::Fraction Pokemod::Fraction::operator-(const Fraction& rhs) const
+Sigmod::Fraction Sigmod::Fraction::operator-(const Fraction& rhs) const
{
return Fraction((m_numerator * rhs.m_denominator) - (m_denominator * rhs.m_numerator), m_denominator * rhs.m_denominator);
}
-Pokemod::Fraction Pokemod::Fraction::operator*(const Fraction& rhs) const
+Sigmod::Fraction Sigmod::Fraction::operator*(const Fraction& rhs) const
{
return Fraction(m_numerator * rhs.m_numerator, m_denominator * rhs.m_denominator);
}
-Pokemod::Fraction Pokemod::Fraction::operator/(const Fraction& rhs) const
+Sigmod::Fraction Sigmod::Fraction::operator/(const Fraction& rhs) const
{
return Fraction(m_numerator * rhs.m_denominator, m_denominator * rhs.m_numerator);
}
-Pokemod::Fraction& Pokemod::Fraction::operator+=(const Fraction& rhs)
+Sigmod::Fraction& Sigmod::Fraction::operator+=(const Fraction& rhs)
{
return *this = *this + rhs;
}
-Pokemod::Fraction& Pokemod::Fraction::operator-=(const Fraction& rhs)
+Sigmod::Fraction& Sigmod::Fraction::operator-=(const Fraction& rhs)
{
return *this = *this - rhs;
}
-Pokemod::Fraction& Pokemod::Fraction::operator*=(const Fraction& rhs)
+Sigmod::Fraction& Sigmod::Fraction::operator*=(const Fraction& rhs)
{
return *this = *this * rhs;
}
-Pokemod::Fraction& Pokemod::Fraction::operator/=(const Fraction& rhs)
+Sigmod::Fraction& Sigmod::Fraction::operator/=(const Fraction& rhs)
{
return *this = *this / rhs;
}
-bool Pokemod::Fraction::operator==(const Fraction& rhs) const
+bool Sigmod::Fraction::operator==(const Fraction& rhs) const
{
return ((m_numerator == rhs.m_numerator) && (m_denominator == rhs.m_denominator));
}
-bool Pokemod::Fraction::operator!=(const Fraction& rhs) const
+bool Sigmod::Fraction::operator!=(const Fraction& rhs) const
{
return !(*this == rhs);
}
-void Pokemod::Fraction::normalize()
+void Sigmod::Fraction::normalize()
{
if (m_denominator < 0)
{
diff --git a/sigmod/Fraction.h b/sigmod/Fraction.h
index 82f42c2e..0c627d57 100644
--- a/sigmod/Fraction.h
+++ b/sigmod/Fraction.h
@@ -15,18 +15,18 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_FRACTION__
-#define __POKEMOD_FRACTION__
+#ifndef __SIGMOD_FRACTION__
+#define __SIGMOD_FRACTION__
-// Pokemod includes
+// Sigmod includes
#include "Global.h"
// Qt includes
#include <QtCore/QMetaType>
-namespace Pokemod
+namespace Sigmod
{
-class POKEMOD_EXPORT Fraction
+class SIGMOD_EXPORT Fraction
{
public:
explicit Fraction(const int numerator = 1, const int denominator = 1);
@@ -63,6 +63,6 @@ class POKEMOD_EXPORT Fraction
int m_denominator;
};
}
-Q_DECLARE_METATYPE(Pokemod::Fraction)
+Q_DECLARE_METATYPE(Sigmod::Fraction)
#endif
diff --git a/sigmod/Global.h b/sigmod/Global.h
index 4e81f860..5802f86b 100644
--- a/sigmod/Global.h
+++ b/sigmod/Global.h
@@ -15,8 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_GLOBAL__
-#define __POKEMOD_GLOBAL__
+#ifndef __SIGMOD_GLOBAL__
+#define __SIGMOD_GLOBAL__
// Qt includes
#include <QtCore/QMetaType>
@@ -25,21 +25,21 @@
// KDE includes
#include <kdemacros.h>
-#ifndef POKEMOD_EXPORT
-# ifdef MAKE_POKEMOD_LIB
+#ifndef SIGMOD_EXPORT
+# ifdef MAKE_SIGMOD_LIB
/* We are building this library */
-# define POKEMOD_EXPORT KDE_EXPORT
+# define SIGMOD_EXPORT KDE_EXPORT
# else
/* We are using this library */
-# define POKEMOD_EXPORT KDE_IMPORT
+# define SIGMOD_EXPORT KDE_IMPORT
# endif
#endif
-# ifndef POKEMOD_EXPORT_DEPRECATED
-# define POKEMOD_EXPORT_DEPRECATED KDE_DEPRECATED POKEMOD_EXPORT
+# ifndef SIGMOD_EXPORT_DEPRECATED
+# define SIGMOD_EXPORT_DEPRECATED KDE_DEPRECATED SIGMOD_EXPORT
# endif
-namespace Pokemod
+namespace Sigmod
{
enum Stat
{
@@ -72,7 +72,7 @@ enum Direction
const QStringList DirectionStr = QStringList() << "Up" << "Down" << "Left" << "Right" << "None";
}
-Q_DECLARE_METATYPE(Pokemod::Stat)
-Q_DECLARE_METATYPE(Pokemod::Direction)
+Q_DECLARE_METATYPE(Sigmod::Stat)
+Q_DECLARE_METATYPE(Sigmod::Direction)
#endif
diff --git a/sigmod/GlobalScript.cpp b/sigmod/GlobalScript.cpp
index 7014c07d..2b80322b 100644
--- a/sigmod/GlobalScript.cpp
+++ b/sigmod/GlobalScript.cpp
@@ -18,41 +18,41 @@
// Header include
#include "GlobalScript.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-Pokemod::GlobalScript::GlobalScript(const GlobalScript& globalScript) :
+Sigmod::GlobalScript::GlobalScript(const GlobalScript& globalScript) :
Object(globalScript.parent(), globalScript.id())
{
*this = globalScript;
}
-Pokemod::GlobalScript::GlobalScript(const Pokemod* parent, const int id) :
+Sigmod::GlobalScript::GlobalScript(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_script("", "")
{
}
-Pokemod::GlobalScript::GlobalScript(const GlobalScript& globalScript, const Pokemod* parent, const int id) :
+Sigmod::GlobalScript::GlobalScript(const GlobalScript& globalScript, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = globalScript;
}
-Pokemod::GlobalScript::GlobalScript(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::GlobalScript::GlobalScript(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-Pokemod::GlobalScript::~GlobalScript()
+Sigmod::GlobalScript::~GlobalScript()
{
}
-void Pokemod::GlobalScript::validate()
+void Sigmod::GlobalScript::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -60,14 +60,14 @@ void Pokemod::GlobalScript::validate()
TEST_END();
}
-void Pokemod::GlobalScript::load(const QDomElement& xml)
+void Sigmod::GlobalScript::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
LOAD(script);
}
-QDomElement Pokemod::GlobalScript::save() const
+QDomElement Sigmod::GlobalScript::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -75,27 +75,27 @@ QDomElement Pokemod::GlobalScript::save() const
return xml;
}
-void Pokemod::GlobalScript::setName(const QString& name)
+void Sigmod::GlobalScript::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::GlobalScript::setScript(const Script& script)
+void Sigmod::GlobalScript::setScript(const Script& script)
{
CHECK(script);
}
-QString Pokemod::GlobalScript::name() const
+QString Sigmod::GlobalScript::name() const
{
return m_name;
}
-Pokemod::Script Pokemod::GlobalScript::script() const
+Sigmod::Script Sigmod::GlobalScript::script() const
{
return m_script;
}
-Pokemod::GlobalScript& Pokemod::GlobalScript::operator=(const GlobalScript& rhs)
+Sigmod::GlobalScript& Sigmod::GlobalScript::operator=(const GlobalScript& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/GlobalScript.h b/sigmod/GlobalScript.h
index 097cd8a5..0e8855e8 100644
--- a/sigmod/GlobalScript.h
+++ b/sigmod/GlobalScript.h
@@ -15,27 +15,27 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_GLOBALSCRIPT__
-#define __POKEMOD_GLOBALSCRIPT__
+#ifndef __SIGMOD_GLOBALSCRIPT__
+#define __SIGMOD_GLOBALSCRIPT__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
#include "Script.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT GlobalScript : public Object
+class SIGMOD_EXPORT GlobalScript : public Object
{
Q_OBJECT
public:
GlobalScript(const GlobalScript& globalScript);
- GlobalScript(const Pokemod* parent, const int id);
- GlobalScript(const GlobalScript& globalScript, const Pokemod* parent, const int id);
- GlobalScript(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ GlobalScript(const Sigmod* parent, const int id);
+ GlobalScript(const GlobalScript& globalScript, const Sigmod* parent, const int id);
+ GlobalScript(const QDomElement& xml, const Sigmod* parent, const int id = -1);
~GlobalScript();
void validate();
diff --git a/sigmod/Hat.h b/sigmod/Hat.h
index 9fa1a71b..3acf4d58 100644
--- a/sigmod/Hat.h
+++ b/sigmod/Hat.h
@@ -15,17 +15,17 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_HAT__
-#define __POKEMOD_HAT__
+#ifndef __SIGMOD_HAT__
+#define __SIGMOD_HAT__
-// Pokemod includes
+// Sigmod includes
#include "Global.h"
// Qt includes
#include <QtCore/QtGlobal>
#include <QtCore/QMap>
-namespace Pokemod
+namespace Sigmod
{
template<class T> class Hat
{
diff --git a/sigmod/Item.cpp b/sigmod/Item.cpp
index a2a64b0f..1f1fdca6 100644
--- a/sigmod/Item.cpp
+++ b/sigmod/Item.cpp
@@ -18,21 +18,21 @@
// Header include
#include "Item.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
#include "Rules.h"
+#include "Sigmod.h"
// Qt includes
#include <QtCore/QSet>
-Pokemod::Item::Item(const Item& item) :
+Sigmod::Item::Item(const Item& item) :
Object(item.parent(), item.id())
{
*this = item;
}
-Pokemod::Item::Item(const Pokemod* parent, const int id) :
+Sigmod::Item::Item(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_sellable(false),
@@ -43,24 +43,24 @@ Pokemod::Item::Item(const Pokemod* parent, const int id) :
{
}
-Pokemod::Item::Item(const Item& item, const Pokemod* parent, const int id) :
+Sigmod::Item::Item(const Item& item, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = item;
}
-Pokemod::Item::Item(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Item::Item(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-Pokemod::Item::~Item()
+Sigmod::Item::~Item()
{
}
-void Pokemod::Item::validate()
+void Sigmod::Item::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -70,7 +70,7 @@ void Pokemod::Item::validate()
TEST_END();
}
-void Pokemod::Item::load(const QDomElement& xml)
+void Sigmod::Item::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -81,7 +81,7 @@ void Pokemod::Item::load(const QDomElement& xml)
LOAD(script);
}
-QDomElement Pokemod::Item::save() const
+QDomElement Sigmod::Item::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -93,73 +93,73 @@ QDomElement Pokemod::Item::save() const
return xml;
}
-void Pokemod::Item::setName(const QString& name)
+void Sigmod::Item::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Item::setSellable(const bool sellable)
+void Sigmod::Item::setSellable(const bool sellable)
{
CHECK(sellable);
}
-void Pokemod::Item::setType(const int type)
+void Sigmod::Item::setType(const int type)
{
- if (qobject_cast<const Pokemod*>(pokemod())->itemTypeIndex(type) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->itemTypeIndex(type) == INT_MAX)
emit(error(bounds("type")));
else
CHECK(type);
}
-void Pokemod::Item::setPrice(const int price)
+void Sigmod::Item::setPrice(const int price)
{
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->maxMoney() < price)
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->maxMoney() < price)
emit(error(bounds("price")));
else
CHECK(price);
}
-void Pokemod::Item::setDescription(const QString& description)
+void Sigmod::Item::setDescription(const QString& description)
{
CHECK(description);
}
-void Pokemod::Item::setScript(const Script& script)
+void Sigmod::Item::setScript(const Script& script)
{
CHECK(script);
}
-QString Pokemod::Item::name() const
+QString Sigmod::Item::name() const
{
return m_name;
}
-bool Pokemod::Item::sellable() const
+bool Sigmod::Item::sellable() const
{
return m_sellable;
}
-int Pokemod::Item::type() const
+int Sigmod::Item::type() const
{
return m_type;
}
-int Pokemod::Item::price() const
+int Sigmod::Item::price() const
{
return m_price;
}
-QString Pokemod::Item::description() const
+QString Sigmod::Item::description() const
{
return m_description;
}
-Pokemod::Script Pokemod::Item::script() const
+Sigmod::Script Sigmod::Item::script() const
{
return m_script;
}
-Pokemod::Item& Pokemod::Item::operator=(const Item& rhs)
+Sigmod::Item& Sigmod::Item::operator=(const Item& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Item.h b/sigmod/Item.h
index 01583ef9..b05b1b25 100644
--- a/sigmod/Item.h
+++ b/sigmod/Item.h
@@ -15,27 +15,27 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_ITEM__
-#define __POKEMOD_ITEM__
+#ifndef __SIGMOD_ITEM__
+#define __SIGMOD_ITEM__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
#include "Script.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Item : public Object
+class SIGMOD_EXPORT Item : public Object
{
Q_OBJECT
public:
Item(const Item& item);
- Item(const Pokemod* parent, const int id);
- Item(const Item& item, const Pokemod* parent, const int id);
- Item(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Item(const Sigmod* parent, const int id);
+ Item(const Item& item, const Sigmod* parent, const int id);
+ Item(const QDomElement& xml, const Sigmod* parent, const int id = -1);
~Item();
void validate();
diff --git a/sigmod/ItemType.cpp b/sigmod/ItemType.cpp
index 7c5ee9f1..525af757 100644
--- a/sigmod/ItemType.cpp
+++ b/sigmod/ItemType.cpp
@@ -18,19 +18,19 @@
// Header include
#include "ItemType.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-QStringList Pokemod::ItemType::CountStr = QStringList() << "Distinct" << "Total";
+QStringList Sigmod::ItemType::CountStr = QStringList() << "Distinct" << "Total";
-Pokemod::ItemType::ItemType(const ItemType& itemType) :
+Sigmod::ItemType::ItemType(const ItemType& itemType) :
Object(itemType.parent(), itemType.id())
{
*this = itemType;
}
-Pokemod::ItemType::ItemType(const Pokemod* parent, const int id) :
+Sigmod::ItemType::ItemType(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_computer(0),
@@ -39,20 +39,20 @@ Pokemod::ItemType::ItemType(const Pokemod* parent, const int id) :
{
}
-Pokemod::ItemType::ItemType(const ItemType& itemType, const Pokemod* parent, const int id) :
+Sigmod::ItemType::ItemType(const ItemType& itemType, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = itemType;
}
-Pokemod::ItemType::ItemType(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::ItemType::ItemType(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::ItemType::validate()
+void Sigmod::ItemType::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -61,7 +61,7 @@ void Pokemod::ItemType::validate()
TEST_END();
}
-void Pokemod::ItemType::load(const QDomElement& xml)
+void Sigmod::ItemType::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -70,7 +70,7 @@ void Pokemod::ItemType::load(const QDomElement& xml)
LOAD(count);
}
-QDomElement Pokemod::ItemType::save() const
+QDomElement Sigmod::ItemType::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -80,17 +80,17 @@ QDomElement Pokemod::ItemType::save() const
return xml;
}
-void Pokemod::ItemType::setName(const QString& name)
+void Sigmod::ItemType::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::ItemType::setComputer(const int computer)
+void Sigmod::ItemType::setComputer(const int computer)
{
CHECK(computer);
}
-void Pokemod::ItemType::setPlayer(const int player)
+void Sigmod::ItemType::setPlayer(const int player)
{
if (!player)
emit(error(bounds("player")));
@@ -98,32 +98,32 @@ void Pokemod::ItemType::setPlayer(const int player)
CHECK(player);
}
-void Pokemod::ItemType::setCount(const Count count)
+void Sigmod::ItemType::setCount(const Count count)
{
CHECK(count);
}
-QString Pokemod::ItemType::name() const
+QString Sigmod::ItemType::name() const
{
return m_name;
}
-int Pokemod::ItemType::computer() const
+int Sigmod::ItemType::computer() const
{
return m_computer;
}
-int Pokemod::ItemType::player() const
+int Sigmod::ItemType::player() const
{
return m_player;
}
-Pokemod::ItemType::Count Pokemod::ItemType::count() const
+Sigmod::ItemType::Count Sigmod::ItemType::count() const
{
return m_count;
}
-Pokemod::ItemType& Pokemod::ItemType::operator=(const ItemType& rhs)
+Sigmod::ItemType& Sigmod::ItemType::operator=(const ItemType& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/ItemType.h b/sigmod/ItemType.h
index 15b16704..386ca209 100644
--- a/sigmod/ItemType.h
+++ b/sigmod/ItemType.h
@@ -15,18 +15,18 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_ITEMTYPE__
-#define __POKEMOD_ITEMTYPE__
+#ifndef __SIGMOD_ITEMTYPE__
+#define __SIGMOD_ITEMTYPE__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT ItemType : public Object
+class SIGMOD_EXPORT ItemType : public Object
{
Q_OBJECT
Q_ENUMS(Count)
@@ -40,9 +40,9 @@ class POKEMOD_EXPORT ItemType : public Object
static QStringList CountStr;
ItemType(const ItemType& itemType);
- ItemType(const Pokemod* parent, const int id);
- ItemType(const ItemType& itemType, const Pokemod* parent, const int id);
- ItemType(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ ItemType(const Sigmod* parent, const int id);
+ ItemType(const ItemType& itemType, const Sigmod* parent, const int id);
+ ItemType(const QDomElement& xml, const Sigmod* parent, const int id = -1);
void validate();
@@ -67,6 +67,6 @@ class POKEMOD_EXPORT ItemType : public Object
Count m_count;
};
}
-Q_DECLARE_METATYPE(Pokemod::ItemType::Count)
+Q_DECLARE_METATYPE(Sigmod::ItemType::Count)
#endif
diff --git a/sigmod/Macros.h b/sigmod/Macros.h
index bfd4f6c6..50c1085c 100644
--- a/sigmod/Macros.h
+++ b/sigmod/Macros.h
@@ -15,10 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_MACROS__
-#define __POKEMOD_MACROS__
+#ifndef __SIGMOD_MACROS__
+#define __SIGMOD_MACROS__
-#ifdef MAKE_POKEMOD_LIB
+#ifdef MAKE_SIGMOD_LIB
// TODO: The macros should probably be replaced by protected members of Object
diff --git a/sigmod/Map.cpp b/sigmod/Map.cpp
index 6cb92154..07509021 100644
--- a/sigmod/Map.cpp
+++ b/sigmod/Map.cpp
@@ -18,26 +18,26 @@
// Header include
#include "Map.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
#include "MapEffect.h"
#include "MapTrainer.h"
#include "MapWarp.h"
#include "MapWildList.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
// Qt includes
#include <QtCore/QSet>
-const QStringList Pokemod::Map::TypeStr = QStringList() << "Outdoor" << "Dungeon" << "Building";
+const QStringList Sigmod::Map::TypeStr = QStringList() << "Outdoor" << "Dungeon" << "Building";
-Pokemod::Map::Map(const Map& map) :
+Sigmod::Map::Map(const Map& map) :
Object(map.parent(), map.id())
{
*this = map;
}
-Pokemod::Map::Map(const Pokemod* parent, const int id) :
+Sigmod::Map::Map(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_flyWarp(-1),
@@ -45,25 +45,25 @@ Pokemod::Map::Map(const Pokemod* parent, const int id) :
{
}
-Pokemod::Map::Map(const Map& map, const Pokemod* parent, const int id) :
+Sigmod::Map::Map(const Map& map, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = map;
}
-Pokemod::Map::Map(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Map::Map(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-Pokemod::Map::~Map()
+Sigmod::Map::~Map()
{
clear();
}
-void Pokemod::Map::validate()
+void Sigmod::Map::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -104,7 +104,7 @@ void Pokemod::Map::validate()
TEST_END();
}
-void Pokemod::Map::load(const QDomElement& xml)
+void Sigmod::Map::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -117,7 +117,7 @@ void Pokemod::Map::load(const QDomElement& xml)
LOAD_SUB(newWildList, MapWildList);
}
-QDomElement Pokemod::Map::save() const
+QDomElement Sigmod::Map::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -131,12 +131,12 @@ QDomElement Pokemod::Map::save() const
return xml;
}
-void Pokemod::Map::setName(const QString& name)
+void Sigmod::Map::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Map::setFlyWarp(const int flyWarp)
+void Sigmod::Map::setFlyWarp(const int flyWarp)
{
if ((flyWarp != -1) && (warpIndex(flyWarp) == INT_MAX))
emit(error(bounds("flyWarp")));
@@ -144,117 +144,117 @@ void Pokemod::Map::setFlyWarp(const int flyWarp)
CHECK(flyWarp);
}
-void Pokemod::Map::setType(const Type type)
+void Sigmod::Map::setType(const Type type)
{
CHECK(type);
}
-QString Pokemod::Map::name() const
+QString Sigmod::Map::name() const
{
return m_name;
}
-int Pokemod::Map::flyWarp() const
+int Sigmod::Map::flyWarp() const
{
return m_flyWarp;
}
-Pokemod::Map::Type Pokemod::Map::type() const
+Sigmod::Map::Type Sigmod::Map::type() const
{
return m_type;
}
-void Pokemod::Map::setTile(const int row, const int column, const int tile)
+void Sigmod::Map::setTile(const int row, const int column, const int tile)
{
- if (qobject_cast<const Pokemod*>(pokemod())->tileIndex(tile) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->tileIndex(tile) == INT_MAX)
emit(error(bounds("tile")));
else
m_map.set(row, column, tile);
}
-void Pokemod::Map::insertColumn(const int column)
+void Sigmod::Map::insertColumn(const int column)
{
m_map.insertColumn(column, 0);
}
-void Pokemod::Map::insertRow(const int row)
+void Sigmod::Map::insertRow(const int row)
{
m_map.insertRow(row, 0);
}
-void Pokemod::Map::addColumn()
+void Sigmod::Map::addColumn()
{
m_map.addColumn(0);
}
-void Pokemod::Map::addRow()
+void Sigmod::Map::addRow()
{
m_map.addRow(0);
}
-void Pokemod::Map::deleteColumn(const int column)
+void Sigmod::Map::deleteColumn(const int column)
{
m_map.deleteColumn(column);
}
-void Pokemod::Map::deleteRow(const int row)
+void Sigmod::Map::deleteRow(const int row)
{
m_map.deleteRow(row);
}
-const Pokemod::Matrix<int>* Pokemod::Map::map() const
+const Sigmod::Matrix<int>* Sigmod::Map::map() const
{
return &m_map;
}
-Pokemod::Matrix<int>* Pokemod::Map::map()
+Sigmod::Matrix<int>* Sigmod::Map::map()
{
return &m_map;
}
-int Pokemod::Map::tile(const int row, const int column) const
+int Sigmod::Map::tile(const int row, const int column) const
{
return m_map.at(row, column);
}
-int Pokemod::Map::width() const
+int Sigmod::Map::width() const
{
return m_map.width();
}
-int Pokemod::Map::height() const
+int Sigmod::Map::height() const
{
return m_map.height();
}
-QPoint Pokemod::Map::size() const
+QPoint Sigmod::Map::size() const
{
return m_map.size();
}
-const Pokemod::MapEffect* Pokemod::Map::effect(const int index) const
+const Sigmod::MapEffect* Sigmod::Map::effect(const int index) const
{
Q_ASSERT(index < effectCount());
return m_effects.at(index);
}
-Pokemod::MapEffect* Pokemod::Map::effect(const int index)
+Sigmod::MapEffect* Sigmod::Map::effect(const int index)
{
Q_ASSERT(index < effectCount());
return m_effects[index];
}
-const Pokemod::MapEffect* Pokemod::Map::effectById(const int index) const
+const Sigmod::MapEffect* Sigmod::Map::effectById(const int index) const
{
return effect(effectIndex(index));
}
-Pokemod::MapEffect* Pokemod::Map::effectById(const int index)
+Sigmod::MapEffect* Sigmod::Map::effectById(const int index)
{
return effect(effectIndex(index));
}
-int Pokemod::Map::effectIndex(const int id) const
+int Sigmod::Map::effectIndex(const int id) const
{
for (int i = 0; i < effectCount(); ++i)
{
@@ -264,45 +264,45 @@ int Pokemod::Map::effectIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Map::effectCount() const
+int Sigmod::Map::effectCount() const
{
return m_effects.size();
}
-Pokemod::MapEffect* Pokemod::Map::newEffect()
+Sigmod::MapEffect* Sigmod::Map::newEffect()
{
return newEffect(new MapEffect(this, newEffectId()));
}
-Pokemod::MapEffect* Pokemod::Map::newEffect(const QDomElement& xml)
+Sigmod::MapEffect* Sigmod::Map::newEffect(const QDomElement& xml)
{
return newEffect(new MapEffect(xml, this, newEffectId()));
}
-Pokemod::MapEffect* Pokemod::Map::newEffect(const MapEffect& effect)
+Sigmod::MapEffect* Sigmod::Map::newEffect(const MapEffect& effect)
{
return newEffect(new MapEffect(effect, this, newEffectId()));
}
-Pokemod::MapEffect* Pokemod::Map::newEffect(MapEffect* effect)
+Sigmod::MapEffect* Sigmod::Map::newEffect(MapEffect* effect)
{
m_effects.append(effect);
return effect;
}
-void Pokemod::Map::deleteEffect(const int index)
+void Sigmod::Map::deleteEffect(const int index)
{
Q_ASSERT(index < effectCount());
delete m_effects[index];
m_effects.removeAt(index);
}
-void Pokemod::Map::deleteEffectById(const int id)
+void Sigmod::Map::deleteEffectById(const int id)
{
deleteEffect(effectIndex(id));
}
-int Pokemod::Map::newEffectId() const
+int Sigmod::Map::newEffectId() const
{
int i = 0;
while ((i < effectCount()) && (effectIndex(i) != INT_MAX))
@@ -310,29 +310,29 @@ int Pokemod::Map::newEffectId() const
return i;
}
-const Pokemod::MapTrainer* Pokemod::Map::trainer(const int index) const
+const Sigmod::MapTrainer* Sigmod::Map::trainer(const int index) const
{
Q_ASSERT(index < trainerCount());
return m_trainers.at(index);
}
-Pokemod::MapTrainer* Pokemod::Map::trainer(const int index)
+Sigmod::MapTrainer* Sigmod::Map::trainer(const int index)
{
Q_ASSERT(index < trainerCount());
return m_trainers[index];
}
-const Pokemod::MapTrainer* Pokemod::Map::trainerById(const int id) const
+const Sigmod::MapTrainer* Sigmod::Map::trainerById(const int id) const
{
return trainer(trainerIndex(id));
}
-Pokemod::MapTrainer* Pokemod::Map::trainerById(const int id)
+Sigmod::MapTrainer* Sigmod::Map::trainerById(const int id)
{
return trainer(trainerIndex(id));
}
-int Pokemod::Map::trainerIndex(const int id) const
+int Sigmod::Map::trainerIndex(const int id) const
{
for (int i = 0; i < trainerCount(); ++i)
{
@@ -342,45 +342,45 @@ int Pokemod::Map::trainerIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Map::trainerCount() const
+int Sigmod::Map::trainerCount() const
{
return m_trainers.size();
}
-Pokemod::MapTrainer* Pokemod::Map::newTrainer()
+Sigmod::MapTrainer* Sigmod::Map::newTrainer()
{
return newTrainer(new MapTrainer(this, newTrainerId()));
}
-Pokemod::MapTrainer* Pokemod::Map::newTrainer(const QDomElement& xml)
+Sigmod::MapTrainer* Sigmod::Map::newTrainer(const QDomElement& xml)
{
return newTrainer(new MapTrainer(xml, this, newTrainerId()));
}
-Pokemod::MapTrainer* Pokemod::Map::newTrainer(const MapTrainer& trainer)
+Sigmod::MapTrainer* Sigmod::Map::newTrainer(const MapTrainer& trainer)
{
return newTrainer(new MapTrainer(trainer, this, newTrainerId()));
}
-Pokemod::MapTrainer* Pokemod::Map::newTrainer(MapTrainer* trainer)
+Sigmod::MapTrainer* Sigmod::Map::newTrainer(MapTrainer* trainer)
{
m_trainers.append(trainer);
return trainer;
}
-void Pokemod::Map::deleteTrainer(const int index)
+void Sigmod::Map::deleteTrainer(const int index)
{
Q_ASSERT(index < trainerCount());
delete m_trainers[index];
m_trainers.removeAt(index);
}
-void Pokemod::Map::deleteTrainerById(const int id)
+void Sigmod::Map::deleteTrainerById(const int id)
{
deleteTrainer(trainerIndex(id));
}
-int Pokemod::Map::newTrainerId() const
+int Sigmod::Map::newTrainerId() const
{
int i = 0;
while ((i < trainerCount()) && (trainerIndex(i) != INT_MAX))
@@ -388,29 +388,29 @@ int Pokemod::Map::newTrainerId() const
return i;
}
-const Pokemod::MapWarp* Pokemod::Map::warp(const int index) const
+const Sigmod::MapWarp* Sigmod::Map::warp(const int index) const
{
Q_ASSERT(index < warpCount());
return m_warps.at(index);
}
-Pokemod::MapWarp* Pokemod::Map::warp(const int index)
+Sigmod::MapWarp* Sigmod::Map::warp(const int index)
{
Q_ASSERT(index < warpCount());
return m_warps[index];
}
-const Pokemod::MapWarp* Pokemod::Map::warpById(const int id) const
+const Sigmod::MapWarp* Sigmod::Map::warpById(const int id) const
{
return warp(warpIndex(id));
}
-Pokemod::MapWarp* Pokemod::Map::warpById(const int id)
+Sigmod::MapWarp* Sigmod::Map::warpById(const int id)
{
return warp(warpIndex(id));
}
-int Pokemod::Map::warpIndex(const int id) const
+int Sigmod::Map::warpIndex(const int id) const
{
for (int i = 0; i < warpCount(); ++i)
{
@@ -420,45 +420,45 @@ int Pokemod::Map::warpIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Map::warpCount() const
+int Sigmod::Map::warpCount() const
{
return m_warps.size();
}
-Pokemod::MapWarp* Pokemod::Map::newWarp()
+Sigmod::MapWarp* Sigmod::Map::newWarp()
{
return newWarp(new MapWarp(this, newWarpId()));
}
-Pokemod::MapWarp* Pokemod::Map::newWarp(const QDomElement& xml)
+Sigmod::MapWarp* Sigmod::Map::newWarp(const QDomElement& xml)
{
return newWarp(new MapWarp(xml, this, newWarpId()));
}
-Pokemod::MapWarp* Pokemod::Map::newWarp(const MapWarp& warp)
+Sigmod::MapWarp* Sigmod::Map::newWarp(const MapWarp& warp)
{
return newWarp(new MapWarp(warp, this, newWarpId()));
}
-Pokemod::MapWarp* Pokemod::Map::newWarp(MapWarp* warp)
+Sigmod::MapWarp* Sigmod::Map::newWarp(MapWarp* warp)
{
m_warps.append(warp);
return warp;
}
-void Pokemod::Map::deleteWarp(const int index)
+void Sigmod::Map::deleteWarp(const int index)
{
Q_ASSERT(index < warpCount());
delete m_warps[index];
m_warps.removeAt(index);
}
-void Pokemod::Map::deleteWarpById(const int id)
+void Sigmod::Map::deleteWarpById(const int id)
{
deleteWarp(warpIndex(id));
}
-int Pokemod::Map::newWarpId() const
+int Sigmod::Map::newWarpId() const
{
int i = 0;
while ((i < warpCount()) && (warpIndex(i) != INT_MAX))
@@ -466,29 +466,29 @@ int Pokemod::Map::newWarpId() const
return i;
}
-const Pokemod::MapWildList* Pokemod::Map::wildList(const int index) const
+const Sigmod::MapWildList* Sigmod::Map::wildList(const int index) const
{
Q_ASSERT(index < wildListCount());
return m_wildLists.at(index);
}
-Pokemod::MapWildList* Pokemod::Map::wildList(const int index)
+Sigmod::MapWildList* Sigmod::Map::wildList(const int index)
{
Q_ASSERT(index < wildListCount());
return m_wildLists[index];
}
-const Pokemod::MapWildList* Pokemod::Map::wildListById(const int id) const
+const Sigmod::MapWildList* Sigmod::Map::wildListById(const int id) const
{
return wildList(wildListIndex(id));
}
-Pokemod::MapWildList* Pokemod::Map::wildListById(const int id)
+Sigmod::MapWildList* Sigmod::Map::wildListById(const int id)
{
return wildList(wildListIndex(id));
}
-int Pokemod::Map::wildListIndex(const int id) const
+int Sigmod::Map::wildListIndex(const int id) const
{
for (int i = 0; i < wildListCount(); ++i)
{
@@ -498,45 +498,45 @@ int Pokemod::Map::wildListIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Map::wildListCount() const
+int Sigmod::Map::wildListCount() const
{
return m_wildLists.size();
}
-Pokemod::MapWildList* Pokemod::Map::newWildList()
+Sigmod::MapWildList* Sigmod::Map::newWildList()
{
return newWildList(new MapWildList(this, newWildListId()));
}
-Pokemod::MapWildList* Pokemod::Map::newWildList(const QDomElement& xml)
+Sigmod::MapWildList* Sigmod::Map::newWildList(const QDomElement& xml)
{
return newWildList(new MapWildList(xml, this, newWildListId()));
}
-Pokemod::MapWildList* Pokemod::Map::newWildList(const MapWildList& wildList)
+Sigmod::MapWildList* Sigmod::Map::newWildList(const MapWildList& wildList)
{
return newWildList(new MapWildList(wildList, this, newWildListId()));
}
-Pokemod::MapWildList* Pokemod::Map::newWildList(MapWildList* wildList)
+Sigmod::MapWildList* Sigmod::Map::newWildList(MapWildList* wildList)
{
m_wildLists.append(wildList);
return wildList;
}
-void Pokemod::Map::deleteWildList(const int index)
+void Sigmod::Map::deleteWildList(const int index)
{
Q_ASSERT(index < wildListCount());
delete m_wildLists[index];
m_wildLists.removeAt(index);
}
-void Pokemod::Map::deleteWildListById(const int id)
+void Sigmod::Map::deleteWildListById(const int id)
{
deleteWildList(wildListIndex(id));
}
-int Pokemod::Map::newWildListId() const
+int Sigmod::Map::newWildListId() const
{
int i = 0;
while ((i < warpCount()) && (warpIndex(i) != INT_MAX))
@@ -544,7 +544,7 @@ int Pokemod::Map::newWildListId() const
return i;
}
-Pokemod::Map& Pokemod::Map::operator=(const Map& rhs)
+Sigmod::Map& Sigmod::Map::operator=(const Map& rhs)
{
if (this == &rhs)
return *this;
@@ -560,7 +560,7 @@ Pokemod::Map& Pokemod::Map::operator=(const Map& rhs)
return *this;
}
-void Pokemod::Map::clear()
+void Sigmod::Map::clear()
{
while (effectCount())
deleteEffect(0);
diff --git a/sigmod/Map.h b/sigmod/Map.h
index 34b102df..345a00fb 100644
--- a/sigmod/Map.h
+++ b/sigmod/Map.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_MAP__
-#define __POKEMOD_MAP__
+#ifndef __SIGMOD_MAP__
+#define __SIGMOD_MAP__
-// Pokemod includes
+// Sigmod includes
#include "Matrix.h"
#include "Object.h"
// Qt includes
#include <QtCore/QList>
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
class MapEffect;
class MapTrainer;
class MapWarp;
class MapWildList;
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Map : public Object
+class SIGMOD_EXPORT Map : public Object
{
Q_OBJECT
Q_ENUMS(Type)
@@ -49,9 +49,9 @@ class POKEMOD_EXPORT Map : public Object
static const QStringList TypeStr;
Map(const Map& map);
- Map(const Pokemod* parent, const int id);
- Map(const Map& map, const Pokemod* parent, const int id);
- Map(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Map(const Sigmod* parent, const int id);
+ Map(const Map& map, const Sigmod* parent, const int id);
+ Map(const QDomElement& xml, const Sigmod* parent, const int id = -1);
~Map();
void validate();
@@ -156,6 +156,6 @@ class POKEMOD_EXPORT Map : public Object
QList<MapWildList*> m_wildLists;
};
}
-Q_DECLARE_METATYPE(Pokemod::Map::Type)
+Q_DECLARE_METATYPE(Sigmod::Map::Type)
#endif
diff --git a/sigmod/MapEffect.cpp b/sigmod/MapEffect.cpp
index 558596f5..3c232118 100644
--- a/sigmod/MapEffect.cpp
+++ b/sigmod/MapEffect.cpp
@@ -18,18 +18,18 @@
// Header include
#include "MapEffect.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
#include "Map.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-Pokemod::MapEffect::MapEffect(const MapEffect& effect) :
+Sigmod::MapEffect::MapEffect(const MapEffect& effect) :
Object(effect.parent(), effect.id())
{
*this = effect;
}
-Pokemod::MapEffect::MapEffect(const Map* parent, const int id) :
+Sigmod::MapEffect::MapEffect(const Map* parent, const int id) :
Object(parent, id),
m_name(""),
m_coordinate(0, 0),
@@ -39,20 +39,20 @@ Pokemod::MapEffect::MapEffect(const Map* parent, const int id) :
{
}
-Pokemod::MapEffect::MapEffect(const MapEffect& effect, const Map* parent, const int id) :
+Sigmod::MapEffect::MapEffect(const MapEffect& effect, const Map* parent, const int id) :
Object(parent, id)
{
*this = effect;
}
-Pokemod::MapEffect::MapEffect(const QDomElement& xml, const Map* parent, const int id) :
+Sigmod::MapEffect::MapEffect(const QDomElement& xml, const Map* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::MapEffect::validate()
+void Sigmod::MapEffect::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -62,7 +62,7 @@ void Pokemod::MapEffect::validate()
TEST_END();
}
-void Pokemod::MapEffect::load(const QDomElement& xml)
+void Sigmod::MapEffect::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -72,7 +72,7 @@ void Pokemod::MapEffect::load(const QDomElement& xml)
LOAD(script);
}
-QDomElement Pokemod::MapEffect::save() const
+QDomElement Sigmod::MapEffect::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -83,12 +83,12 @@ QDomElement Pokemod::MapEffect::save() const
return xml;
}
-void Pokemod::MapEffect::setName(const QString& name)
+void Sigmod::MapEffect::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::MapEffect::setCoordinate(const QPoint& coordinate)
+void Sigmod::MapEffect::setCoordinate(const QPoint& coordinate)
{
if ((qobject_cast<const Map*>(parent())->width() <= coordinate.x()) || (qobject_cast<const Map*>(parent())->height() <= coordinate.y()))
emit(error(bounds("coordinate")));
@@ -96,50 +96,50 @@ void Pokemod::MapEffect::setCoordinate(const QPoint& coordinate)
CHECK(coordinate);
}
-void Pokemod::MapEffect::setSkin(const int skin)
+void Sigmod::MapEffect::setSkin(const int skin)
{
- if (qobject_cast<const Pokemod*>(pokemod())->skinIndex(skin) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->skinIndex(skin) == INT_MAX)
emit(error(bounds("skin")));
else
CHECK(skin);
}
-void Pokemod::MapEffect::setIsGhost(const bool isGhost)
+void Sigmod::MapEffect::setIsGhost(const bool isGhost)
{
CHECK(isGhost);
}
-void Pokemod::MapEffect::setScript(const Script& script)
+void Sigmod::MapEffect::setScript(const Script& script)
{
CHECK(script);
}
-QString Pokemod::MapEffect::name() const
+QString Sigmod::MapEffect::name() const
{
return m_name;
}
-QPoint Pokemod::MapEffect::coordinate() const
+QPoint Sigmod::MapEffect::coordinate() const
{
return m_coordinate;
}
-int Pokemod::MapEffect::skin() const
+int Sigmod::MapEffect::skin() const
{
return m_skin;
}
-bool Pokemod::MapEffect::isGhost() const
+bool Sigmod::MapEffect::isGhost() const
{
return m_isGhost;
}
-Pokemod::Script Pokemod::MapEffect::script() const
+Sigmod::Script Sigmod::MapEffect::script() const
{
return m_script;
}
-Pokemod::MapEffect& Pokemod::MapEffect::operator=(const MapEffect& rhs)
+Sigmod::MapEffect& Sigmod::MapEffect::operator=(const MapEffect& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/MapEffect.h b/sigmod/MapEffect.h
index 3c4d3f4a..3af1e0ef 100644
--- a/sigmod/MapEffect.h
+++ b/sigmod/MapEffect.h
@@ -15,22 +15,22 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_MAPEFFECT__
-#define __POKEMOD_MAPEFFECT__
+#ifndef __SIGMOD_MAPEFFECT__
+#define __SIGMOD_MAPEFFECT__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
#include "Script.h"
// Qt includes
#include <QtCore/QPoint>
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
class Map;
-class POKEMOD_EXPORT MapEffect : public Object
+class SIGMOD_EXPORT MapEffect : public Object
{
Q_OBJECT
diff --git a/sigmod/MapTrainer.cpp b/sigmod/MapTrainer.cpp
index 4df1cbed..9e3f3e2d 100644
--- a/sigmod/MapTrainer.cpp
+++ b/sigmod/MapTrainer.cpp
@@ -18,23 +18,23 @@
// Header include
#include "MapTrainer.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
#include "Map.h"
#include "MapTrainerTeamMember.h"
-#include "Pokemod.h"
#include "Rules.h"
+#include "Sigmod.h"
// Qt includes
#include <QtCore/QSet>
-Pokemod::MapTrainer::MapTrainer(const MapTrainer& trainer) :
+Sigmod::MapTrainer::MapTrainer(const MapTrainer& trainer) :
Object(trainer.parent(), trainer.id())
{
*this = trainer;
}
-Pokemod::MapTrainer::MapTrainer(const Map* parent, const int id) :
+Sigmod::MapTrainer::MapTrainer(const Map* parent, const int id) :
Object(parent, id),
m_name(""),
m_trainerClass(INT_MAX),
@@ -45,25 +45,25 @@ Pokemod::MapTrainer::MapTrainer(const Map* parent, const int id) :
{
}
-Pokemod::MapTrainer::MapTrainer(const MapTrainer& trainer, const Map* parent, const int id) :
+Sigmod::MapTrainer::MapTrainer(const MapTrainer& trainer, const Map* parent, const int id) :
Object(parent, id)
{
*this = trainer;
}
-Pokemod::MapTrainer::MapTrainer(const QDomElement& xml, const Map* parent, const int id) :
+Sigmod::MapTrainer::MapTrainer(const QDomElement& xml, const Map* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-Pokemod::MapTrainer::~MapTrainer()
+Sigmod::MapTrainer::~MapTrainer()
{
clear();
}
-void Pokemod::MapTrainer::validate()
+void Sigmod::MapTrainer::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -81,7 +81,7 @@ void Pokemod::MapTrainer::validate()
TEST_END();
}
-void Pokemod::MapTrainer::load(const QDomElement& xml)
+void Sigmod::MapTrainer::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -93,7 +93,7 @@ void Pokemod::MapTrainer::load(const QDomElement& xml)
LOAD(leadTeamMember);
}
-QDomElement Pokemod::MapTrainer::save() const
+QDomElement Sigmod::MapTrainer::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -105,20 +105,20 @@ QDomElement Pokemod::MapTrainer::save() const
return xml;
}
-void Pokemod::MapTrainer::setName(const QString& name)
+void Sigmod::MapTrainer::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::MapTrainer::setTrainerClass(const int trainerClass)
+void Sigmod::MapTrainer::setTrainerClass(const int trainerClass)
{
- if (qobject_cast<const Pokemod*>(pokemod())->trainerIndex(trainerClass) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->trainerIndex(trainerClass) == INT_MAX)
emit(error(bounds("trainerClass")));
else
CHECK(trainerClass);
}
-void Pokemod::MapTrainer::setCoordinate(const QPoint& coordinate)
+void Sigmod::MapTrainer::setCoordinate(const QPoint& coordinate)
{
if ((qobject_cast<const Map*>(parent())->width() <= coordinate.x()) || (qobject_cast<const Map*>(parent())->height() <= coordinate.y()))
emit(error(bounds("coordinate")));
@@ -126,20 +126,20 @@ void Pokemod::MapTrainer::setCoordinate(const QPoint& coordinate)
CHECK(coordinate);
}
-void Pokemod::MapTrainer::setNumberFight(const int numberFight)
+void Sigmod::MapTrainer::setNumberFight(const int numberFight)
{
- if (!numberFight || (qobject_cast<const Pokemod*>(pokemod())->rules()->maxFight() < numberFight))
+ if (!numberFight || (qobject_cast<const Sigmod*>(sigmod())->rules()->maxFight() < numberFight))
emit(error(bounds("numberFight")));
else
CHECK(numberFight);
}
-void Pokemod::MapTrainer::setScript(const Script& script)
+void Sigmod::MapTrainer::setScript(const Script& script)
{
CHECK(script);
}
-void Pokemod::MapTrainer::setLeadTeamMember(const int leadTeamMember)
+void Sigmod::MapTrainer::setLeadTeamMember(const int leadTeamMember)
{
if (teamMemberIndex(leadTeamMember) == INT_MAX)
emit(error(bounds("leadTeamMember")));
@@ -147,59 +147,59 @@ void Pokemod::MapTrainer::setLeadTeamMember(const int leadTeamMember)
CHECK(leadTeamMember);
}
-QString Pokemod::MapTrainer::name() const
+QString Sigmod::MapTrainer::name() const
{
return m_name;
}
-int Pokemod::MapTrainer::trainerClass() const
+int Sigmod::MapTrainer::trainerClass() const
{
return m_trainerClass;
}
-QPoint Pokemod::MapTrainer::coordinate() const
+QPoint Sigmod::MapTrainer::coordinate() const
{
return m_coordinate;
}
-int Pokemod::MapTrainer::numberFight() const
+int Sigmod::MapTrainer::numberFight() const
{
return m_numberFight;
}
-Pokemod::Script Pokemod::MapTrainer::script() const
+Sigmod::Script Sigmod::MapTrainer::script() const
{
return m_script;
}
-int Pokemod::MapTrainer::leadTeamMember() const
+int Sigmod::MapTrainer::leadTeamMember() const
{
return m_leadTeamMember;
}
-const Pokemod::MapTrainerTeamMember* Pokemod::MapTrainer::teamMember(const int index) const
+const Sigmod::MapTrainerTeamMember* Sigmod::MapTrainer::teamMember(const int index) const
{
Q_ASSERT(index < teamMemberCount());
return m_teamMembers.at(index);
}
-Pokemod::MapTrainerTeamMember* Pokemod::MapTrainer::teamMember(const int index)
+Sigmod::MapTrainerTeamMember* Sigmod::MapTrainer::teamMember(const int index)
{
Q_ASSERT(index < teamMemberCount());
return m_teamMembers[index];
}
-const Pokemod::MapTrainerTeamMember* Pokemod::MapTrainer::teamMemberById(const int id) const
+const Sigmod::MapTrainerTeamMember* Sigmod::MapTrainer::teamMemberById(const int id) const
{
return teamMember(teamMemberIndex(id));
}
-Pokemod::MapTrainerTeamMember* Pokemod::MapTrainer::teamMemberById(const int id)
+Sigmod::MapTrainerTeamMember* Sigmod::MapTrainer::teamMemberById(const int id)
{
return teamMember(teamMemberIndex(id));
}
-int Pokemod::MapTrainer::teamMemberIndex(const int id) const
+int Sigmod::MapTrainer::teamMemberIndex(const int id) const
{
for (int i = 0; i < teamMemberCount(); ++i)
{
@@ -209,45 +209,45 @@ int Pokemod::MapTrainer::teamMemberIndex(const int id) const
return INT_MAX;
}
-int Pokemod::MapTrainer::teamMemberCount() const
+int Sigmod::MapTrainer::teamMemberCount() const
{
return m_teamMembers.size();
}
-Pokemod::MapTrainerTeamMember* Pokemod::MapTrainer::newTeamMember()
+Sigmod::MapTrainerTeamMember* Sigmod::MapTrainer::newTeamMember()
{
return newTeamMember(new MapTrainerTeamMember(this, newTeamMemberId()));
}
-Pokemod::MapTrainerTeamMember* Pokemod::MapTrainer::newTeamMember(const QDomElement& xml)
+Sigmod::MapTrainerTeamMember* Sigmod::MapTrainer::newTeamMember(const QDomElement& xml)
{
return newTeamMember(new MapTrainerTeamMember(xml, this, newTeamMemberId()));
}
-Pokemod::MapTrainerTeamMember* Pokemod::MapTrainer::newTeamMember(const MapTrainerTeamMember& teamMember)
+Sigmod::MapTrainerTeamMember* Sigmod::MapTrainer::newTeamMember(const MapTrainerTeamMember& teamMember)
{
return newTeamMember(new MapTrainerTeamMember(teamMember, this, newTeamMemberId()));
}
-Pokemod::MapTrainerTeamMember* Pokemod::MapTrainer::newTeamMember(MapTrainerTeamMember* teamMember)
+Sigmod::MapTrainerTeamMember* Sigmod::MapTrainer::newTeamMember(MapTrainerTeamMember* teamMember)
{
m_teamMembers.append(teamMember);
return teamMember;
}
-void Pokemod::MapTrainer::deleteTeamMember(const int index)
+void Sigmod::MapTrainer::deleteTeamMember(const int index)
{
Q_ASSERT(index < teamMemberCount());
delete m_teamMembers[index];
m_teamMembers.removeAt(index);
}
-void Pokemod::MapTrainer::deleteTeamMemberById(const int id)
+void Sigmod::MapTrainer::deleteTeamMemberById(const int id)
{
deleteTeamMember(teamMemberIndex(id));
}
-int Pokemod::MapTrainer::newTeamMemberId() const
+int Sigmod::MapTrainer::newTeamMemberId() const
{
int i = 0;
while ((i < teamMemberCount()) && (teamMemberIndex(i) != INT_MAX))
@@ -255,7 +255,7 @@ int Pokemod::MapTrainer::newTeamMemberId() const
return i;
}
-Pokemod::MapTrainer& Pokemod::MapTrainer::operator=(const MapTrainer& rhs)
+Sigmod::MapTrainer& Sigmod::MapTrainer::operator=(const MapTrainer& rhs)
{
if (this == &rhs)
return *this;
@@ -270,7 +270,7 @@ Pokemod::MapTrainer& Pokemod::MapTrainer::operator=(const MapTrainer& rhs)
return *this;
}
-void Pokemod::MapTrainer::clear()
+void Sigmod::MapTrainer::clear()
{
while (teamMemberCount())
deleteTeamMember(0);
diff --git a/sigmod/MapTrainer.h b/sigmod/MapTrainer.h
index f77d0a97..2d8686bb 100644
--- a/sigmod/MapTrainer.h
+++ b/sigmod/MapTrainer.h
@@ -15,10 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_MAPTRAINER__
-#define __POKEMOD_MAPTRAINER__
+#ifndef __SIGMOD_MAPTRAINER__
+#define __SIGMOD_MAPTRAINER__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
#include "Script.h"
@@ -26,13 +26,13 @@
#include <QtCore/QList>
#include <QtCore/QPoint>
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
class Map;
class MapTrainerTeamMember;
-class POKEMOD_EXPORT MapTrainer : public Object
+class SIGMOD_EXPORT MapTrainer : public Object
{
Q_OBJECT
diff --git a/sigmod/MapTrainerTeamMember.cpp b/sigmod/MapTrainerTeamMember.cpp
index d69411a5..beab6d54 100644
--- a/sigmod/MapTrainerTeamMember.cpp
+++ b/sigmod/MapTrainerTeamMember.cpp
@@ -18,65 +18,65 @@
// Header include
#include "MapTrainerTeamMember.h"
-// Pokemod includes
+// Sigmod includes
#include "Item.h"
#include "Macros.h"
#include "MapTrainer.h"
-#include "Pokemod.h"
#include "Rules.h"
+#include "Sigmod.h"
#include "Species.h"
#include "SpeciesMove.h"
// Qt includes
#include <QtCore/QSet>
-Pokemod::MapTrainerTeamMember::MapTrainerTeamMember(const MapTrainerTeamMember& teamMember) :
+Sigmod::MapTrainerTeamMember::MapTrainerTeamMember(const MapTrainerTeamMember& teamMember) :
Object(teamMember.parent(), teamMember.id())
{
*this = teamMember;
}
-Pokemod::MapTrainerTeamMember::MapTrainerTeamMember(const MapTrainer* parent, const int id) :
+Sigmod::MapTrainerTeamMember::MapTrainerTeamMember(const MapTrainer* parent, const int id) :
Object(parent, id),
m_species(INT_MAX),
m_level(INT_MAX)
{
}
-Pokemod::MapTrainerTeamMember::MapTrainerTeamMember(const MapTrainerTeamMember& teamMember, const MapTrainer* parent, const int id) :
+Sigmod::MapTrainerTeamMember::MapTrainerTeamMember(const MapTrainerTeamMember& teamMember, const MapTrainer* parent, const int id) :
Object(parent, id)
{
*this = teamMember;
}
-Pokemod::MapTrainerTeamMember::MapTrainerTeamMember(const QDomElement& xml, const MapTrainer* parent, const int id) :
+Sigmod::MapTrainerTeamMember::MapTrainerTeamMember(const QDomElement& xml, const MapTrainer* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::MapTrainerTeamMember::validate()
+void Sigmod::MapTrainerTeamMember::validate()
{
TEST_BEGIN();
TEST(setSpecies, species);
TEST(setLevel, level);
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->maxAbilities() < m_ability.size())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->maxAbilities() < m_ability.size())
emit(error("Too many abilities"));
TEST_LIST(setAbility, ability);
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->maxHeldItems() < m_item.size())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->maxHeldItems() < m_item.size())
emit(error("Too many held items"));
TEST_LIST(setItem, item);
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->maxMoves() < m_move.size())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->maxMoves() < m_move.size())
emit(error("Too many moves"));
TEST_LIST(setMove, move);
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->maxNatures() < m_nature.size())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->maxNatures() < m_nature.size())
emit(error("Too many natures"));
TEST_LIST(setNature, nature);
TEST_END();
}
-void Pokemod::MapTrainerTeamMember::load(const QDomElement& xml)
+void Sigmod::MapTrainerTeamMember::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(species);
@@ -87,7 +87,7 @@ void Pokemod::MapTrainerTeamMember::load(const QDomElement& xml)
LOAD_LIST(nature);
}
-QDomElement Pokemod::MapTrainerTeamMember::save() const
+QDomElement Sigmod::MapTrainerTeamMember::save() const
{
SAVE_CREATE();
SAVE(species);
@@ -99,29 +99,29 @@ QDomElement Pokemod::MapTrainerTeamMember::save() const
return xml;
}
-void Pokemod::MapTrainerTeamMember::setSpecies(const int species)
+void Sigmod::MapTrainerTeamMember::setSpecies(const int species)
{
- if (qobject_cast<const Pokemod*>(pokemod())->speciesIndex(species) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->speciesIndex(species) == INT_MAX)
emit(error(bounds("species")));
else
CHECK(species);
}
-void Pokemod::MapTrainerTeamMember::setLevel(const int level)
+void Sigmod::MapTrainerTeamMember::setLevel(const int level)
{
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->maxLevel() < level)
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->maxLevel() < level)
emit(error(bounds("level")));
else
CHECK(level);
}
-void Pokemod::MapTrainerTeamMember::setAbility(const int ability, const bool state)
+void Sigmod::MapTrainerTeamMember::setAbility(const int ability, const bool state)
{
- if (qobject_cast<const Pokemod*>(pokemod())->abilityIndex(ability) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->abilityIndex(ability) == INT_MAX)
emit(error(bounds("ability")));
else if (state && !m_ability.contains(ability))
{
- if (m_ability.size() < qobject_cast<const Pokemod*>(pokemod())->rules()->maxAbilities())
+ if (m_ability.size() < qobject_cast<const Sigmod*>(sigmod())->rules()->maxAbilities())
{
m_ability.append(ability);
emit(changed());
@@ -136,13 +136,13 @@ void Pokemod::MapTrainerTeamMember::setAbility(const int ability, const bool sta
}
}
-void Pokemod::MapTrainerTeamMember::setItem(const int item, const bool state)
+void Sigmod::MapTrainerTeamMember::setItem(const int item, const bool state)
{
- if (qobject_cast<const Pokemod*>(pokemod())->itemIndex(item) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->itemIndex(item) == INT_MAX)
emit(error(bounds("item")));
else if (state && !m_item.contains(item))
{
- if (m_item.size() < qobject_cast<const Pokemod*>(pokemod())->rules()->maxHeldItems())
+ if (m_item.size() < qobject_cast<const Sigmod*>(sigmod())->rules()->maxHeldItems())
{
m_item.append(item);
emit(changed());
@@ -157,19 +157,19 @@ void Pokemod::MapTrainerTeamMember::setItem(const int item, const bool state)
}
}
-void Pokemod::MapTrainerTeamMember::setMove(const int move, const bool state)
+void Sigmod::MapTrainerTeamMember::setMove(const int move, const bool state)
{
- if (qobject_cast<const Pokemod*>(pokemod())->moveIndex(move) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->moveIndex(move) == INT_MAX)
emit(error(bounds("move")));
else if (state && !m_move.contains(move))
{
- const Species* species = qobject_cast<const Pokemod*>(pokemod())->speciesById(move);
+ const Species* species = qobject_cast<const Sigmod*>(sigmod())->speciesById(move);
for (int i = 0; i < species->moveCount(); ++i)
{
const SpeciesMove* speciesMove = species->move(i);
if (speciesMove->move() == move)
{
- if (m_move.size() < qobject_cast<const Pokemod*>(pokemod())->rules()->maxMoves())
+ if (m_move.size() < qobject_cast<const Sigmod*>(sigmod())->rules()->maxMoves())
{
m_move.append(move);
emit(changed());
@@ -188,13 +188,13 @@ void Pokemod::MapTrainerTeamMember::setMove(const int move, const bool state)
}
}
-void Pokemod::MapTrainerTeamMember::setNature(const int nature, const bool state)
+void Sigmod::MapTrainerTeamMember::setNature(const int nature, const bool state)
{
- if (qobject_cast<const Pokemod*>(pokemod())->natureIndex(nature) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->natureIndex(nature) == INT_MAX)
emit(error(bounds("nature")));
else if (state && !m_nature.contains(nature))
{
- if (m_nature.size() < qobject_cast<const Pokemod*>(pokemod())->rules()->maxNatures())
+ if (m_nature.size() < qobject_cast<const Sigmod*>(sigmod())->rules()->maxNatures())
{
m_nature.append(nature);
emit(changed());
@@ -209,57 +209,57 @@ void Pokemod::MapTrainerTeamMember::setNature(const int nature, const bool state
}
}
-int Pokemod::MapTrainerTeamMember::species() const
+int Sigmod::MapTrainerTeamMember::species() const
{
return m_species;
}
-int Pokemod::MapTrainerTeamMember::level() const
+int Sigmod::MapTrainerTeamMember::level() const
{
return m_level;
}
-bool Pokemod::MapTrainerTeamMember::ability(const int ability) const
+bool Sigmod::MapTrainerTeamMember::ability(const int ability) const
{
return m_ability.contains(ability);
}
-QList<int> Pokemod::MapTrainerTeamMember::abilities() const
+QList<int> Sigmod::MapTrainerTeamMember::abilities() const
{
return m_ability;
}
-bool Pokemod::MapTrainerTeamMember::item(const int item) const
+bool Sigmod::MapTrainerTeamMember::item(const int item) const
{
return m_item.contains(item);
}
-QList<int> Pokemod::MapTrainerTeamMember::items() const
+QList<int> Sigmod::MapTrainerTeamMember::items() const
{
return m_item;
}
-bool Pokemod::MapTrainerTeamMember::move(const int move) const
+bool Sigmod::MapTrainerTeamMember::move(const int move) const
{
return m_move.contains(move);
}
-QList<int> Pokemod::MapTrainerTeamMember::moves() const
+QList<int> Sigmod::MapTrainerTeamMember::moves() const
{
return m_move;
}
-bool Pokemod::MapTrainerTeamMember::nature(const int nature) const
+bool Sigmod::MapTrainerTeamMember::nature(const int nature) const
{
return m_nature.contains(nature);
}
-QList<int> Pokemod::MapTrainerTeamMember::natures() const
+QList<int> Sigmod::MapTrainerTeamMember::natures() const
{
return m_nature;
}
-Pokemod::MapTrainerTeamMember& Pokemod::MapTrainerTeamMember::operator=(const MapTrainerTeamMember& rhs)
+Sigmod::MapTrainerTeamMember& Sigmod::MapTrainerTeamMember::operator=(const MapTrainerTeamMember& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/MapTrainerTeamMember.h b/sigmod/MapTrainerTeamMember.h
index f396c041..d1e5836c 100644
--- a/sigmod/MapTrainerTeamMember.h
+++ b/sigmod/MapTrainerTeamMember.h
@@ -15,21 +15,21 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_MAPTRAINERTEAMMEMBER__
-#define __POKEMOD_MAPTRAINERTEAMMEMBER__
+#ifndef __SIGMOD_MAPTRAINERTEAMMEMBER__
+#define __SIGMOD_MAPTRAINERTEAMMEMBER__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
// Qt includes
#include <QtCore/QList>
-namespace Pokemod
+namespace Sigmod
{
// Forward dclarations
class MapTrainer;
-class POKEMOD_EXPORT MapTrainerTeamMember : public Object
+class SIGMOD_EXPORT MapTrainerTeamMember : public Object
{
Q_OBJECT
diff --git a/sigmod/MapWarp.cpp b/sigmod/MapWarp.cpp
index cc922a33..9cd61065 100644
--- a/sigmod/MapWarp.cpp
+++ b/sigmod/MapWarp.cpp
@@ -18,20 +18,20 @@
// Header include
#include "MapWarp.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
#include "Map.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-const QStringList Pokemod::MapWarp::TypeStr = QStringList() << "Door" << "Warp" << "Hole" << "Boundary";
+const QStringList Sigmod::MapWarp::TypeStr = QStringList() << "Door" << "Warp" << "Hole" << "Boundary";
-Pokemod::MapWarp::MapWarp(const MapWarp& warp) :
+Sigmod::MapWarp::MapWarp(const MapWarp& warp) :
Object(warp.parent(), warp.id())
{
*this = warp;
}
-Pokemod::MapWarp::MapWarp(const Map* parent, const int id) :
+Sigmod::MapWarp::MapWarp(const Map* parent, const int id) :
Object(parent, id),
m_name(""),
m_coordinate(0, 0),
@@ -42,20 +42,20 @@ Pokemod::MapWarp::MapWarp(const Map* parent, const int id) :
{
}
-Pokemod::MapWarp::MapWarp(const MapWarp& warp, const Map* parent, const int id) :
+Sigmod::MapWarp::MapWarp(const MapWarp& warp, const Map* parent, const int id) :
Object(parent, id)
{
*this = warp;
}
-Pokemod::MapWarp::MapWarp(const QDomElement& xml, const Map* parent, const int id) :
+Sigmod::MapWarp::MapWarp(const QDomElement& xml, const Map* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::MapWarp::validate()
+void Sigmod::MapWarp::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -65,7 +65,7 @@ void Pokemod::MapWarp::validate()
TEST_END();
}
-void Pokemod::MapWarp::load(const QDomElement& xml)
+void Sigmod::MapWarp::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -76,7 +76,7 @@ void Pokemod::MapWarp::load(const QDomElement& xml)
LOAD(script);
}
-QDomElement Pokemod::MapWarp::save() const
+QDomElement Sigmod::MapWarp::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -88,12 +88,12 @@ QDomElement Pokemod::MapWarp::save() const
return xml;
}
-void Pokemod::MapWarp::setName(const QString& name)
+void Sigmod::MapWarp::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::MapWarp::setCoordinate(const QPoint& coordinate)
+void Sigmod::MapWarp::setCoordinate(const QPoint& coordinate)
{
if ((qobject_cast<const Map*>(parent())->width() <= coordinate.x()) || (qobject_cast<const Map*>(parent())->height() <= coordinate.y()))
emit(error(bounds("coordinate")));
@@ -101,65 +101,65 @@ void Pokemod::MapWarp::setCoordinate(const QPoint& coordinate)
CHECK(coordinate);
}
-void Pokemod::MapWarp::setType(const Type type)
+void Sigmod::MapWarp::setType(const Type type)
{
CHECK(type);
}
-void Pokemod::MapWarp::setToMap(const int toMap)
+void Sigmod::MapWarp::setToMap(const int toMap)
{
- if (qobject_cast<const Pokemod*>(pokemod())->mapIndex(toMap) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->mapIndex(toMap) == INT_MAX)
emit(error(bounds("toMap")));
else
CHECK(toMap);
}
-void Pokemod::MapWarp::setToWarp(const int toWarp)
+void Sigmod::MapWarp::setToWarp(const int toWarp)
{
- if (qobject_cast<const Pokemod*>(pokemod())->mapIndex(m_toMap) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->mapIndex(m_toMap) == INT_MAX)
emit(error(bounds("toMap")));
- else if (qobject_cast<const Pokemod*>(pokemod())->mapById(m_toMap)->warpIndex(toWarp) == INT_MAX)
+ else if (qobject_cast<const Sigmod*>(sigmod())->mapById(m_toMap)->warpIndex(toWarp) == INT_MAX)
emit(error(bounds("toWarp")));
else
CHECK(toWarp);
}
-void Pokemod::MapWarp::setScript(const Script& script)
+void Sigmod::MapWarp::setScript(const Script& script)
{
CHECK(script);
}
-QString Pokemod::MapWarp::name() const
+QString Sigmod::MapWarp::name() const
{
return m_name;
}
-QPoint Pokemod::MapWarp::coordinate() const
+QPoint Sigmod::MapWarp::coordinate() const
{
return m_coordinate;
}
-Pokemod::MapWarp::Type Pokemod::MapWarp::type() const
+Sigmod::MapWarp::Type Sigmod::MapWarp::type() const
{
return m_type;
}
-int Pokemod::MapWarp::toMap() const
+int Sigmod::MapWarp::toMap() const
{
return m_toMap;
}
-int Pokemod::MapWarp::toWarp() const
+int Sigmod::MapWarp::toWarp() const
{
return m_toWarp;
}
-Pokemod::Script Pokemod::MapWarp::script() const
+Sigmod::Script Sigmod::MapWarp::script() const
{
return m_script;
}
-Pokemod::MapWarp& Pokemod::MapWarp::operator=(const MapWarp& rhs)
+Sigmod::MapWarp& Sigmod::MapWarp::operator=(const MapWarp& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/MapWarp.h b/sigmod/MapWarp.h
index 0df7016f..44502a3e 100644
--- a/sigmod/MapWarp.h
+++ b/sigmod/MapWarp.h
@@ -15,22 +15,22 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_MAPWARP__
-#define __POKEMOD_MAPWARP__
+#ifndef __SIGMOD_MAPWARP__
+#define __SIGMOD_MAPWARP__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
#include "Script.h"
// Qt includes
#include <QtCore/QPoint>
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
class Map;
-class POKEMOD_EXPORT MapWarp : public Object
+class SIGMOD_EXPORT MapWarp : public Object
{
Q_OBJECT
Q_ENUMS(Type)
@@ -79,6 +79,6 @@ class POKEMOD_EXPORT MapWarp : public Object
Script m_script;
};
}
-Q_DECLARE_METATYPE(Pokemod::MapWarp::Type)
+Q_DECLARE_METATYPE(Sigmod::MapWarp::Type)
#endif
diff --git a/sigmod/MapWildList.cpp b/sigmod/MapWildList.cpp
index 30a7f56d..502b87ee 100644
--- a/sigmod/MapWildList.cpp
+++ b/sigmod/MapWildList.cpp
@@ -18,7 +18,7 @@
// Header include
#include "MapWildList.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
#include "Map.h"
#include "MapWildListEncounter.h"
@@ -26,37 +26,37 @@
// Qt includes
#include <QtCore/QSet>
-Pokemod::MapWildList::MapWildList(const MapWildList& wildList) :
+Sigmod::MapWildList::MapWildList(const MapWildList& wildList) :
Object(wildList.parent(), wildList.id())
{
*this = wildList;
}
-Pokemod::MapWildList::MapWildList(const Map* parent, const int id) :
+Sigmod::MapWildList::MapWildList(const Map* parent, const int id) :
Object(parent, id),
m_name("")
{
}
-Pokemod::MapWildList::MapWildList(const MapWildList& wildList, const Map* parent, const int id) :
+Sigmod::MapWildList::MapWildList(const MapWildList& wildList, const Map* parent, const int id) :
Object(parent, id)
{
*this = wildList;
}
-Pokemod::MapWildList::MapWildList(const QDomElement& xml, const Map* parent, const int id) :
+Sigmod::MapWildList::MapWildList(const QDomElement& xml, const Map* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-Pokemod::MapWildList::~MapWildList()
+Sigmod::MapWildList::~MapWildList()
{
clear();
}
-void Pokemod::MapWildList::validate()
+void Sigmod::MapWildList::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -70,14 +70,14 @@ void Pokemod::MapWildList::validate()
TEST_END();
}
-void Pokemod::MapWildList::load(const QDomElement& xml)
+void Sigmod::MapWildList::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
LOAD_SUB(newEncounter, MapWildListEncounter);
}
-QDomElement Pokemod::MapWildList::save() const
+QDomElement Sigmod::MapWildList::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -85,39 +85,39 @@ QDomElement Pokemod::MapWildList::save() const
return xml;
}
-void Pokemod::MapWildList::setName(const QString& name)
+void Sigmod::MapWildList::setName(const QString& name)
{
CHECK(name);
}
-QString Pokemod::MapWildList::name() const
+QString Sigmod::MapWildList::name() const
{
return m_name;
}
-const Pokemod::MapWildListEncounter* Pokemod::MapWildList::encounter(const int index) const
+const Sigmod::MapWildListEncounter* Sigmod::MapWildList::encounter(const int index) const
{
Q_ASSERT(index < encounterCount());
return m_encounters.at(index);
}
-Pokemod::MapWildListEncounter* Pokemod::MapWildList::encounter(const int index)
+Sigmod::MapWildListEncounter* Sigmod::MapWildList::encounter(const int index)
{
Q_ASSERT(index < encounterCount());
return m_encounters[index];
}
-const Pokemod::MapWildListEncounter* Pokemod::MapWildList::encounterById(const int id) const
+const Sigmod::MapWildListEncounter* Sigmod::MapWildList::encounterById(const int id) const
{
return encounter(encounterIndex(id));
}
-Pokemod::MapWildListEncounter* Pokemod::MapWildList::encounterById(const int id)
+Sigmod::MapWildListEncounter* Sigmod::MapWildList::encounterById(const int id)
{
return encounter(encounterIndex(id));
}
-int Pokemod::MapWildList::encounterIndex(const int id) const
+int Sigmod::MapWildList::encounterIndex(const int id) const
{
for (int i = 0; i < encounterCount(); ++i)
{
@@ -127,45 +127,45 @@ int Pokemod::MapWildList::encounterIndex(const int id) const
return INT_MAX;
}
-int Pokemod::MapWildList::encounterCount() const
+int Sigmod::MapWildList::encounterCount() const
{
return m_encounters.size();
}
-Pokemod::MapWildListEncounter* Pokemod::MapWildList::newEncounter()
+Sigmod::MapWildListEncounter* Sigmod::MapWildList::newEncounter()
{
return newEncounter(new MapWildListEncounter(this, newEncounterId()));
}
-Pokemod::MapWildListEncounter* Pokemod::MapWildList::newEncounter(const QDomElement& xml)
+Sigmod::MapWildListEncounter* Sigmod::MapWildList::newEncounter(const QDomElement& xml)
{
return newEncounter(new MapWildListEncounter(xml, this, newEncounterId()));
}
-Pokemod::MapWildListEncounter* Pokemod::MapWildList::newEncounter(const MapWildListEncounter& encounter)
+Sigmod::MapWildListEncounter* Sigmod::MapWildList::newEncounter(const MapWildListEncounter& encounter)
{
return newEncounter(new MapWildListEncounter(encounter, this, newEncounterId()));
}
-Pokemod::MapWildListEncounter* Pokemod::MapWildList::newEncounter(MapWildListEncounter* encounter)
+Sigmod::MapWildListEncounter* Sigmod::MapWildList::newEncounter(MapWildListEncounter* encounter)
{
m_encounters.append(encounter);
return encounter;
}
-void Pokemod::MapWildList::deleteEncounter(const int index)
+void Sigmod::MapWildList::deleteEncounter(const int index)
{
Q_ASSERT(index < encounterCount());
delete m_encounters[index];
m_encounters.removeAt(index);
}
-void Pokemod::MapWildList::deleteEncounterById(const int id)
+void Sigmod::MapWildList::deleteEncounterById(const int id)
{
deleteEncounter(encounterIndex(id));
}
-int Pokemod::MapWildList::newEncounterId() const
+int Sigmod::MapWildList::newEncounterId() const
{
int i = 0;
while ((i < encounterCount()) && (encounterIndex(i) != INT_MAX))
@@ -173,7 +173,7 @@ int Pokemod::MapWildList::newEncounterId() const
return i;
}
-Pokemod::MapWildList& Pokemod::MapWildList::operator=(const MapWildList& rhs)
+Sigmod::MapWildList& Sigmod::MapWildList::operator=(const MapWildList& rhs)
{
if (this == &rhs)
return *this;
@@ -183,7 +183,7 @@ Pokemod::MapWildList& Pokemod::MapWildList::operator=(const MapWildList& rhs)
return *this;
}
-void Pokemod::MapWildList::clear()
+void Sigmod::MapWildList::clear()
{
while (encounterCount())
deleteEncounter(0);
diff --git a/sigmod/MapWildList.h b/sigmod/MapWildList.h
index 35027fa7..87d69895 100644
--- a/sigmod/MapWildList.h
+++ b/sigmod/MapWildList.h
@@ -15,22 +15,22 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_MAPWILDLIST__
-#define __POKEMOD_MAPWILDLIST__
+#ifndef __SIGMOD_MAPWILDLIST__
+#define __SIGMOD_MAPWILDLIST__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
// Qt includes
#include <QtCore/QList>
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
class Map;
class MapWildListEncounter;
-class POKEMOD_EXPORT MapWildList : public Object
+class SIGMOD_EXPORT MapWildList : public Object
{
Q_OBJECT
diff --git a/sigmod/MapWildListEncounter.cpp b/sigmod/MapWildListEncounter.cpp
index 4ff41f4a..17482f4f 100644
--- a/sigmod/MapWildListEncounter.cpp
+++ b/sigmod/MapWildListEncounter.cpp
@@ -18,20 +18,20 @@
// Header include
#include "MapWildListEncounter.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
#include "MapWildList.h"
-#include "Pokemod.h"
#include "Rules.h"
+#include "Sigmod.h"
#include "Species.h"
-Pokemod::MapWildListEncounter::MapWildListEncounter(const MapWildListEncounter& encounter) :
+Sigmod::MapWildListEncounter::MapWildListEncounter(const MapWildListEncounter& encounter) :
Object(encounter.parent(), encounter.id())
{
*this = encounter;
}
-Pokemod::MapWildListEncounter::MapWildListEncounter(const MapWildList* parent, const int id) :
+Sigmod::MapWildListEncounter::MapWildListEncounter(const MapWildList* parent, const int id) :
Object(parent, id),
m_species(INT_MAX),
m_level(1),
@@ -39,20 +39,20 @@ Pokemod::MapWildListEncounter::MapWildListEncounter(const MapWildList* parent, c
{
}
-Pokemod::MapWildListEncounter::MapWildListEncounter(const MapWildListEncounter& encounter, const MapWildList* parent, const int id) :
+Sigmod::MapWildListEncounter::MapWildListEncounter(const MapWildListEncounter& encounter, const MapWildList* parent, const int id) :
Object(parent, id)
{
*this = encounter;
}
-Pokemod::MapWildListEncounter::MapWildListEncounter(const QDomElement& xml, const MapWildList* parent, const int id) :
+Sigmod::MapWildListEncounter::MapWildListEncounter(const QDomElement& xml, const MapWildList* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::MapWildListEncounter::validate()
+void Sigmod::MapWildListEncounter::validate()
{
TEST_BEGIN();
TEST(setSpecies, species);
@@ -61,7 +61,7 @@ void Pokemod::MapWildListEncounter::validate()
TEST_END();
}
-void Pokemod::MapWildListEncounter::load(const QDomElement& xml)
+void Sigmod::MapWildListEncounter::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(species);
@@ -69,7 +69,7 @@ void Pokemod::MapWildListEncounter::load(const QDomElement& xml)
LOAD(weight);
}
-QDomElement Pokemod::MapWildListEncounter::save() const
+QDomElement Sigmod::MapWildListEncounter::save() const
{
SAVE_CREATE();
SAVE(species);
@@ -78,23 +78,23 @@ QDomElement Pokemod::MapWildListEncounter::save() const
return xml;
}
-void Pokemod::MapWildListEncounter::setSpecies(const int species)
+void Sigmod::MapWildListEncounter::setSpecies(const int species)
{
- if (qobject_cast<const Pokemod*>(pokemod())->speciesIndex(species) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->speciesIndex(species) == INT_MAX)
emit(error(bounds("species")));
else
CHECK(species);
}
-void Pokemod::MapWildListEncounter::setLevel(const int level)
+void Sigmod::MapWildListEncounter::setLevel(const int level)
{
- if (!level || (qobject_cast<const Pokemod*>(pokemod())->rules()->maxLevel() <= level))
+ if (!level || (qobject_cast<const Sigmod*>(sigmod())->rules()->maxLevel() <= level))
emit(error(bounds("level")));
else
CHECK(level);
}
-void Pokemod::MapWildListEncounter::setWeight(const int weight)
+void Sigmod::MapWildListEncounter::setWeight(const int weight)
{
if (!weight)
emit(error(bounds("weight")));
@@ -102,22 +102,22 @@ void Pokemod::MapWildListEncounter::setWeight(const int weight)
CHECK(weight);
}
-int Pokemod::MapWildListEncounter::species() const
+int Sigmod::MapWildListEncounter::species() const
{
return m_species;
}
-int Pokemod::MapWildListEncounter::level() const
+int Sigmod::MapWildListEncounter::level() const
{
return m_level;
}
-int Pokemod::MapWildListEncounter::weight() const
+int Sigmod::MapWildListEncounter::weight() const
{
return m_weight;
}
-Pokemod::MapWildListEncounter& Pokemod::MapWildListEncounter::operator=(const MapWildListEncounter& rhs)
+Sigmod::MapWildListEncounter& Sigmod::MapWildListEncounter::operator=(const MapWildListEncounter& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/MapWildListEncounter.h b/sigmod/MapWildListEncounter.h
index f6c942b8..dfa3d4ce 100644
--- a/sigmod/MapWildListEncounter.h
+++ b/sigmod/MapWildListEncounter.h
@@ -15,18 +15,18 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_MAPWILDLISTENCOUNTER__
-#define __POKEMOD_MAPWILDLISTENCOUNTER__
+#ifndef __SIGMOD_MAPWILDLISTENCOUNTER__
+#define __SIGMOD_MAPWILDLISTENCOUNTER__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
class MapWildList;
-class POKEMOD_EXPORT MapWildListEncounter: public Object
+class SIGMOD_EXPORT MapWildListEncounter: public Object
{
Q_OBJECT
diff --git a/sigmod/Matrix.h b/sigmod/Matrix.h
index 8fe53fee..bd98353d 100644
--- a/sigmod/Matrix.h
+++ b/sigmod/Matrix.h
@@ -15,19 +15,19 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_MATRIX__
-#define __POKEMOD_MATRIX__
+#ifndef __SIGMOD_MATRIX__
+#define __SIGMOD_MATRIX__
-// Pokemod includes
+// Sigmod includes
#include "Global.h"
// Qt includes
#include <QtCore/QPoint>
#include <QtCore/QVector>
-namespace Pokemod
+namespace Sigmod
{
-template<class T> class POKEMOD_EXPORT Matrix
+template<class T> class SIGMOD_EXPORT Matrix
{
public:
Matrix();
diff --git a/sigmod/Move.cpp b/sigmod/Move.cpp
index 823739e5..39cfef65 100644
--- a/sigmod/Move.cpp
+++ b/sigmod/Move.cpp
@@ -18,20 +18,20 @@
// Header include
#include "Move.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
// Qt includes
#include <QtCore/QSet>
-Pokemod::Move::Move(const Move& move) :
+Sigmod::Move::Move(const Move& move) :
Object(move.parent(), move.id())
{
*this = move;
}
-Pokemod::Move::Move(const Pokemod* parent, const int id) :
+Sigmod::Move::Move(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_accuracy(1, 1),
@@ -46,25 +46,25 @@ Pokemod::Move::Move(const Pokemod* parent, const int id) :
{
}
-Pokemod::Move::Move(const Move& move, const Pokemod* parent, const int id) :
+Sigmod::Move::Move(const Move& move, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = move;
}
-Pokemod::Move::Move(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Move::Move(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-Pokemod::Move::~Move()
+Sigmod::Move::~Move()
{
clear();
}
-void Pokemod::Move::validate()
+void Sigmod::Move::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -75,7 +75,7 @@ void Pokemod::Move::validate()
TEST_END();
}
-void Pokemod::Move::load(const QDomElement& xml)
+void Sigmod::Move::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -90,7 +90,7 @@ void Pokemod::Move::load(const QDomElement& xml)
LOAD(worldScript);
}
-QDomElement Pokemod::Move::save() const
+QDomElement Sigmod::Move::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -106,12 +106,12 @@ QDomElement Pokemod::Move::save() const
return xml;
}
-void Pokemod::Move::setName(const QString& name)
+void Sigmod::Move::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Move::setAccuracy(const Fraction& accuracy)
+void Sigmod::Move::setAccuracy(const Fraction& accuracy)
{
if (!accuracy || (1 < accuracy))
emit(error(bounds("accuracy")));
@@ -119,25 +119,25 @@ void Pokemod::Move::setAccuracy(const Fraction& accuracy)
CHECK(accuracy);
}
-void Pokemod::Move::setPower(const int power)
+void Sigmod::Move::setPower(const int power)
{
CHECK(power);
}
-void Pokemod::Move::setType(const int type)
+void Sigmod::Move::setType(const int type)
{
- if (qobject_cast<const Pokemod*>(pokemod())->typeIndex(type) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->typeIndex(type) == INT_MAX)
emit(error(bounds("type")));
else
CHECK(type);
}
-void Pokemod::Move::setSpecial(const bool special)
+void Sigmod::Move::setSpecial(const bool special)
{
CHECK(special);
}
-void Pokemod::Move::setPowerPoints(const int powerPoints)
+void Sigmod::Move::setPowerPoints(const int powerPoints)
{
if (!powerPoints)
emit(error(bounds("powerPoints")));
@@ -145,77 +145,77 @@ void Pokemod::Move::setPowerPoints(const int powerPoints)
CHECK(powerPoints);
}
-void Pokemod::Move::setPriority(const int priority)
+void Sigmod::Move::setPriority(const int priority)
{
CHECK(priority);
}
-void Pokemod::Move::setDescription(const QString& description)
+void Sigmod::Move::setDescription(const QString& description)
{
CHECK(description);
}
-void Pokemod::Move::setBattleScript(const Script& battleScript)
+void Sigmod::Move::setBattleScript(const Script& battleScript)
{
CHECK(battleScript);
}
-void Pokemod::Move::setWorldScript(const Script& worldScript)
+void Sigmod::Move::setWorldScript(const Script& worldScript)
{
CHECK(worldScript);
}
-QString Pokemod::Move::name() const
+QString Sigmod::Move::name() const
{
return m_name;
}
-Pokemod::Fraction Pokemod::Move::accuracy() const
+Sigmod::Fraction Sigmod::Move::accuracy() const
{
return m_accuracy;
}
-int Pokemod::Move::power() const
+int Sigmod::Move::power() const
{
return m_power;
}
-int Pokemod::Move::type() const
+int Sigmod::Move::type() const
{
return m_type;
}
-bool Pokemod::Move::special() const
+bool Sigmod::Move::special() const
{
return m_special;
}
-int Pokemod::Move::powerPoints() const
+int Sigmod::Move::powerPoints() const
{
return m_powerPoints;
}
-int Pokemod::Move::priority() const
+int Sigmod::Move::priority() const
{
return m_priority;
}
-QString Pokemod::Move::description() const
+QString Sigmod::Move::description() const
{
return m_description;
}
-Pokemod::Script Pokemod::Move::battleScript() const
+Sigmod::Script Sigmod::Move::battleScript() const
{
return m_battleScript;
}
-Pokemod::Script Pokemod::Move::worldScript() const
+Sigmod::Script Sigmod::Move::worldScript() const
{
return m_worldScript;
}
-Pokemod::Move& Pokemod::Move::operator=(const Move& rhs)
+Sigmod::Move& Sigmod::Move::operator=(const Move& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Move.h b/sigmod/Move.h
index 0fe9efa2..12e9f639 100644
--- a/sigmod/Move.h
+++ b/sigmod/Move.h
@@ -15,28 +15,28 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_MOVE__
-#define __POKEMOD_MOVE__
+#ifndef __SIGMOD_MOVE__
+#define __SIGMOD_MOVE__
-// Pokemod includes
+// Sigmod includes
#include "Fraction.h"
#include "Object.h"
#include "Script.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Move : public Object
+class SIGMOD_EXPORT Move : public Object
{
Q_OBJECT
public:
Move(const Move& move);
- Move(const Pokemod* parent, const int id);
- Move(const Move& move, const Pokemod* parent, const int id);
- Move(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Move(const Sigmod* parent, const int id);
+ Move(const Move& move, const Sigmod* parent, const int id);
+ Move(const QDomElement& xml, const Sigmod* parent, const int id = -1);
~Move();
void validate();
diff --git a/sigmod/Nature.cpp b/sigmod/Nature.cpp
index e3018dea..11a301e6 100644
--- a/sigmod/Nature.cpp
+++ b/sigmod/Nature.cpp
@@ -18,19 +18,19 @@
// Header include
#include "Nature.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
#include "Rules.h"
+#include "Sigmod.h"
-Pokemod::Nature::Nature(const Nature& nature) :
+Sigmod::Nature::Nature(const Nature& nature) :
Object(nature.parent(), nature.id()),
m_stat(ST_End_GSC - ST_No_HP_Start)
{
*this = nature;
}
-Pokemod::Nature::Nature(const Pokemod* parent, const int id) :
+Sigmod::Nature::Nature(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_stat(ST_End_GSC - ST_No_HP_Start),
@@ -40,14 +40,14 @@ Pokemod::Nature::Nature(const Pokemod* parent, const int id) :
m_stat[i].set(1, 1);
}
-Pokemod::Nature::Nature(const Nature& nature, const Pokemod* parent, const int id) :
+Sigmod::Nature::Nature(const Nature& nature, const Sigmod* parent, const int id) :
Object(parent, id),
m_stat(ST_End_GSC - ST_No_HP_Start)
{
*this = nature;
}
-Pokemod::Nature::Nature(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Nature::Nature(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id),
m_stat(ST_End_GSC - ST_No_HP_Start)
{
@@ -55,7 +55,7 @@ Pokemod::Nature::Nature(const QDomElement& xml, const Pokemod* parent, const int
load(xml);
}
-void Pokemod::Nature::validate()
+void Sigmod::Nature::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -64,7 +64,7 @@ void Pokemod::Nature::validate()
TEST_END();
}
-void Pokemod::Nature::load(const QDomElement& xml)
+void Sigmod::Nature::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -72,7 +72,7 @@ void Pokemod::Nature::load(const QDomElement& xml)
LOAD(weight);
}
-QDomElement Pokemod::Nature::save() const
+QDomElement Sigmod::Nature::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -81,17 +81,17 @@ QDomElement Pokemod::Nature::save() const
return xml;
}
-void Pokemod::Nature::setName(const QString& name)
+void Sigmod::Nature::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Nature::setStat(const Stat stat, const Fraction& multiplier)
+void Sigmod::Nature::setStat(const Stat stat, const Fraction& multiplier)
{
switch (stat)
{
case ST_SpecialDefense:
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->specialSplit())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->specialSplit())
case ST_Attack ... ST_Special:
break;
default:
@@ -101,7 +101,7 @@ void Pokemod::Nature::setStat(const Stat stat, const Fraction& multiplier)
CHECK_ARRAY(stat[stat - ST_No_HP_Start], multiplier);
}
-void Pokemod::Nature::setWeight(const int weight)
+void Sigmod::Nature::setWeight(const int weight)
{
if (!weight)
emit(error(bounds("weight")));
@@ -109,17 +109,17 @@ void Pokemod::Nature::setWeight(const int weight)
CHECK(weight);
}
-QString Pokemod::Nature::name() const
+QString Sigmod::Nature::name() const
{
return m_name;
}
-Pokemod::Fraction Pokemod::Nature::stat(const Stat stat) const
+Sigmod::Fraction Sigmod::Nature::stat(const Stat stat) const
{
switch (stat)
{
case ST_SpecialDefense:
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->specialSplit())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->specialSplit())
case ST_Attack ... ST_Special:
return m_stat[stat - ST_No_HP_Start];
default:
@@ -128,12 +128,12 @@ Pokemod::Fraction Pokemod::Nature::stat(const Stat stat) const
}
}
-int Pokemod::Nature::weight() const
+int Sigmod::Nature::weight() const
{
return m_weight;
}
-Pokemod::Nature& Pokemod::Nature::operator=(const Nature& rhs)
+Sigmod::Nature& Sigmod::Nature::operator=(const Nature& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Nature.h b/sigmod/Nature.h
index bb9931ca..67d82c91 100644
--- a/sigmod/Nature.h
+++ b/sigmod/Nature.h
@@ -15,27 +15,27 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_NATURE__
-#define __POKEMOD_NATURE__
+#ifndef __SIGMOD_NATURE__
+#define __SIGMOD_NATURE__
-// Pokemod includes
+// Sigmod includes
#include "Fraction.h"
#include "Object.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Nature : public Object
+class SIGMOD_EXPORT Nature : public Object
{
Q_OBJECT
public:
Nature(const Nature& nature);
- Nature(const Pokemod* parent, const int id);
- Nature(const Nature& nature, const Pokemod* parent, const int id);
- Nature(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Nature(const Sigmod* parent, const int id);
+ Nature(const Nature& nature, const Sigmod* parent, const int id);
+ Nature(const QDomElement& xml, const Sigmod* parent, const int id = -1);
void validate();
diff --git a/sigmod/Object.cpp b/sigmod/Object.cpp
index ce2425d8..803dadc5 100644
--- a/sigmod/Object.cpp
+++ b/sigmod/Object.cpp
@@ -18,77 +18,77 @@
// Header include
#include "Object.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-Pokemod::Object::Object(const Object& object) :
+Sigmod::Object::Object(const Object& object) :
QObject(NULL),
m_id(object.id()),
m_parent(object.parent())
{
}
-Pokemod::Object::Object(const Object* parent, const int id) :
+Sigmod::Object::Object(const Object* parent, const int id) :
QObject(NULL),
m_id(id),
m_parent(parent)
{
}
-const Pokemod::Object* Pokemod::Object::parent() const
+const Sigmod::Object* Sigmod::Object::parent() const
{
return m_parent;
}
-const Pokemod::Object* Pokemod::Object::pokemod() const
+const Sigmod::Object* Sigmod::Object::sigmod() const
{
if (m_parent)
- return m_parent->pokemod();
+ return m_parent->sigmod();
return this;
}
-int Pokemod::Object::id() const
+int Sigmod::Object::id() const
{
return m_id;
}
-void Pokemod::Object::setId(const int id)
+void Sigmod::Object::setId(const int id)
{
CHECK(id);
}
-QString Pokemod::Object::className() const
+QString Sigmod::Object::className() const
{
return QString(metaObject()->className()).section(':', -1);
}
-QDomDocument Pokemod::Object::xml(const Object* object)
+QDomDocument Sigmod::Object::xml(const Object* object)
{
QDomDocument xml(object->className());
xml.appendChild(object->save());
return xml;
}
-QString Pokemod::Object::unused(const QString& variable)
+QString Sigmod::Object::unused(const QString& variable)
{
return QString("Setting unused variable %1").arg(variable);
}
-QString Pokemod::Object::bounds(const QString& variable)
+QString Sigmod::Object::bounds(const QString& variable)
{
return QString("Value for %1 out-of-bounds").arg(variable);
}
-QString Pokemod::Object::subclass(const QString& subclass, const int id)
+QString Sigmod::Object::subclass(const QString& subclass, const int id)
{
return QString("Duplicate %1 with id %2").arg(subclass, id);
}
-QString Pokemod::Object::subclass(const QString& subclass, const QString& name)
+QString Sigmod::Object::subclass(const QString& subclass, const QString& name)
{
return QString("Duplicate %1 with name %2").arg(subclass, name);
}
-void Pokemod::Object::clear()
+void Sigmod::Object::clear()
{
}
diff --git a/sigmod/Object.h b/sigmod/Object.h
index 441b1e0d..28496a00 100644
--- a/sigmod/Object.h
+++ b/sigmod/Object.h
@@ -15,10 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_OBJECT__
-#define __POKEMOD_OBJECT__
+#ifndef __SIGMOD_OBJECT__
+#define __SIGMOD_OBJECT__
-// Pokemod includes
+// Sigmod includes
#include "Fraction.h"
#include "Global.h"
#include "Matrix.h"
@@ -36,9 +36,9 @@
// C includes
#include <climits>
-namespace Pokemod
+namespace Sigmod
{
-class POKEMOD_EXPORT Object : public QObject
+class SIGMOD_EXPORT Object : public QObject
{
Q_OBJECT
@@ -48,7 +48,7 @@ class POKEMOD_EXPORT Object : public QObject
virtual ~Object();
const Object* parent() const;
- const Object* pokemod() const;
+ const Object* sigmod() const;
int id() const;
QString className() const;
diff --git a/sigmod/Rules.cpp b/sigmod/Rules.cpp
index b4a1836a..22402a03 100644
--- a/sigmod/Rules.cpp
+++ b/sigmod/Rules.cpp
@@ -18,19 +18,19 @@
// Header include
#include "Rules.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-const QStringList Pokemod::Rules::DVStr = QStringList() << "16" << "32";
+const QStringList Sigmod::Rules::DVStr = QStringList() << "16" << "32";
-Pokemod::Rules::Rules(const Rules& rules) :
+Sigmod::Rules::Rules(const Rules& rules) :
Object(rules.parent(), 0)
{
*this = rules;
}
-Pokemod::Rules::Rules(const Pokemod* parent) :
+Sigmod::Rules::Rules(const Sigmod* parent) :
Object(parent, 0),
m_genderAllowed(false),
m_breedingAllowed(false),
@@ -58,19 +58,19 @@ Pokemod::Rules::Rules(const Pokemod* parent) :
{
}
-Pokemod::Rules::Rules(const Rules& rules, const Pokemod* parent) :
+Sigmod::Rules::Rules(const Rules& rules, const Sigmod* parent) :
Object(parent, 0)
{
*this = rules;
}
-Pokemod::Rules::Rules(const QDomElement& xml, const Pokemod* parent) :
+Sigmod::Rules::Rules(const QDomElement& xml, const Sigmod* parent) :
Object(parent, 0)
{
load(xml);
}
-void Pokemod::Rules::validate()
+void Sigmod::Rules::validate()
{
TEST_BEGIN();
TEST(setBreedingAllowed, breedingAllowed);
@@ -90,7 +90,7 @@ void Pokemod::Rules::validate()
TEST_END();
}
-void Pokemod::Rules::load(const QDomElement& xml)
+void Sigmod::Rules::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(genderAllowed);
@@ -118,7 +118,7 @@ void Pokemod::Rules::load(const QDomElement& xml)
LOAD(maxEVPerStat);
}
-QDomElement Pokemod::Rules::save() const
+QDomElement Sigmod::Rules::save() const
{
QDomElement xml = QDomDocument().createElement(className());
SAVE(genderAllowed);
@@ -147,12 +147,12 @@ QDomElement Pokemod::Rules::save() const
return xml;
}
-void Pokemod::Rules::setGenderAllowed(const bool genderAllowed)
+void Sigmod::Rules::setGenderAllowed(const bool genderAllowed)
{
CHECK(genderAllowed);
}
-void Pokemod::Rules::setBreedingAllowed(const bool breedingAllowed)
+void Sigmod::Rules::setBreedingAllowed(const bool breedingAllowed)
{
if (!m_genderAllowed && breedingAllowed)
emit(error(bounds("breedingAllowed")));
@@ -160,22 +160,22 @@ void Pokemod::Rules::setBreedingAllowed(const bool breedingAllowed)
CHECK(breedingAllowed);
}
-void Pokemod::Rules::setCriticalDomains(const bool criticalDomains)
+void Sigmod::Rules::setCriticalDomains(const bool criticalDomains)
{
CHECK(criticalDomains);
}
-void Pokemod::Rules::setUseTurns(const bool useTurns)
+void Sigmod::Rules::setUseTurns(const bool useTurns)
{
CHECK(useTurns);
}
-void Pokemod::Rules::setNumBoxes(const int numBoxes)
+void Sigmod::Rules::setNumBoxes(const int numBoxes)
{
CHECK(numBoxes);
}
-void Pokemod::Rules::setBoxSize(const int boxSize)
+void Sigmod::Rules::setBoxSize(const int boxSize)
{
if (m_numBoxes && !boxSize)
emit(error(bounds("boxSize")));
@@ -183,7 +183,7 @@ void Pokemod::Rules::setBoxSize(const int boxSize)
CHECK(boxSize);
}
-void Pokemod::Rules::setMaxParty(const int maxParty)
+void Sigmod::Rules::setMaxParty(const int maxParty)
{
if (!maxParty)
emit(error(bounds("maxParty")));
@@ -191,7 +191,7 @@ void Pokemod::Rules::setMaxParty(const int maxParty)
CHECK(maxParty);
}
-void Pokemod::Rules::setMaxFight(const int maxFight)
+void Sigmod::Rules::setMaxFight(const int maxFight)
{
if (m_maxParty < maxFight)
emit(error(bounds("maxFight")));
@@ -199,7 +199,7 @@ void Pokemod::Rules::setMaxFight(const int maxFight)
CHECK(maxFight);
}
-void Pokemod::Rules::setMaxPlayers(const int maxPlayers)
+void Sigmod::Rules::setMaxPlayers(const int maxPlayers)
{
if (maxPlayers < 2)
emit(error(bounds("maxPlayers")));
@@ -207,22 +207,22 @@ void Pokemod::Rules::setMaxPlayers(const int maxPlayers)
CHECK(maxPlayers);
}
-void Pokemod::Rules::setMaxHeldItems(const int maxHeldItems)
+void Sigmod::Rules::setMaxHeldItems(const int maxHeldItems)
{
CHECK(maxHeldItems);
}
-void Pokemod::Rules::setMaxAbilities(const int maxAbilities)
+void Sigmod::Rules::setMaxAbilities(const int maxAbilities)
{
CHECK(maxAbilities);
}
-void Pokemod::Rules::setMaxNatures(const int maxNatures)
+void Sigmod::Rules::setMaxNatures(const int maxNatures)
{
CHECK(maxNatures);
}
-void Pokemod::Rules::setMaxMoves(const int maxMoves)
+void Sigmod::Rules::setMaxMoves(const int maxMoves)
{
if (!maxMoves)
emit(error(bounds("maxMoves")));
@@ -230,7 +230,7 @@ void Pokemod::Rules::setMaxMoves(const int maxMoves)
CHECK(maxMoves);
}
-void Pokemod::Rules::setMaxLevel(const int maxLevel)
+void Sigmod::Rules::setMaxLevel(const int maxLevel)
{
if (!maxLevel)
emit(error(bounds("maxLevel")));
@@ -238,32 +238,32 @@ void Pokemod::Rules::setMaxLevel(const int maxLevel)
CHECK(maxLevel);
}
-void Pokemod::Rules::setMaxStages(const int maxStages)
+void Sigmod::Rules::setMaxStages(const int maxStages)
{
CHECK(maxStages);
}
-void Pokemod::Rules::setMaxMoney(const int maxMoney)
+void Sigmod::Rules::setMaxMoney(const int maxMoney)
{
CHECK(maxMoney);
}
-void Pokemod::Rules::setHardCash(const bool hardCash)
+void Sigmod::Rules::setHardCash(const bool hardCash)
{
CHECK(hardCash);
}
-void Pokemod::Rules::setAllowSwitchStyle(const bool allowSwitchStyle)
+void Sigmod::Rules::setAllowSwitchStyle(const bool allowSwitchStyle)
{
CHECK(allowSwitchStyle);
}
-void Pokemod::Rules::setSpecialSplit(const bool specialSplit)
+void Sigmod::Rules::setSpecialSplit(const bool specialSplit)
{
CHECK(specialSplit);
}
-void Pokemod::Rules::setSpecialDVSplit(const bool specialDVSplit)
+void Sigmod::Rules::setSpecialDVSplit(const bool specialDVSplit)
{
if (!specialDVSplit && m_specialSplit)
emit(error(bounds("specialDVSplit")));
@@ -271,12 +271,12 @@ void Pokemod::Rules::setSpecialDVSplit(const bool specialDVSplit)
CHECK(specialDVSplit);
}
-void Pokemod::Rules::setEffortValuesAllowed(const bool effortValuesAllowed)
+void Sigmod::Rules::setEffortValuesAllowed(const bool effortValuesAllowed)
{
CHECK(effortValuesAllowed);
}
-void Pokemod::Rules::setMaxTotalEV(const int maxTotalEV)
+void Sigmod::Rules::setMaxTotalEV(const int maxTotalEV)
{
if (!maxTotalEV)
emit(error(bounds("maxTotalEV")));
@@ -284,7 +284,7 @@ void Pokemod::Rules::setMaxTotalEV(const int maxTotalEV)
CHECK(maxTotalEV);
}
-void Pokemod::Rules::setMaxEVPerStat(const int maxEVPerStat)
+void Sigmod::Rules::setMaxEVPerStat(const int maxEVPerStat)
{
if ((!maxEVPerStat && m_maxTotalEV) || (m_maxTotalEV < maxEVPerStat))
emit(error(bounds("maxEVPerStat")));
@@ -292,122 +292,122 @@ void Pokemod::Rules::setMaxEVPerStat(const int maxEVPerStat)
CHECK(maxEVPerStat);
}
-bool Pokemod::Rules::genderAllowed() const
+bool Sigmod::Rules::genderAllowed() const
{
return m_genderAllowed;
}
-bool Pokemod::Rules::breedingAllowed() const
+bool Sigmod::Rules::breedingAllowed() const
{
return m_breedingAllowed;
}
-bool Pokemod::Rules::criticalDomains() const
+bool Sigmod::Rules::criticalDomains() const
{
return m_criticalDomains;
}
-bool Pokemod::Rules::useTurns() const
+bool Sigmod::Rules::useTurns() const
{
return m_useTurns;
}
-int Pokemod::Rules::numBoxes() const
+int Sigmod::Rules::numBoxes() const
{
return m_numBoxes;
}
-int Pokemod::Rules::boxSize() const
+int Sigmod::Rules::boxSize() const
{
return m_boxSize;
}
-int Pokemod::Rules::maxParty() const
+int Sigmod::Rules::maxParty() const
{
return m_maxParty;
}
-int Pokemod::Rules::maxFight() const
+int Sigmod::Rules::maxFight() const
{
return m_maxFight;
}
-int Pokemod::Rules::maxPlayers() const
+int Sigmod::Rules::maxPlayers() const
{
return m_maxPlayers;
}
-int Pokemod::Rules::maxHeldItems() const
+int Sigmod::Rules::maxHeldItems() const
{
return m_maxHeldItems;
}
-int Pokemod::Rules::maxAbilities() const
+int Sigmod::Rules::maxAbilities() const
{
return m_maxAbilities;
}
-int Pokemod::Rules::maxNatures() const
+int Sigmod::Rules::maxNatures() const
{
return m_maxNatures;
}
-int Pokemod::Rules::maxMoves() const
+int Sigmod::Rules::maxMoves() const
{
return m_maxMoves;
}
-int Pokemod::Rules::maxLevel() const
+int Sigmod::Rules::maxLevel() const
{
return m_maxLevel;
}
-int Pokemod::Rules::maxStages() const
+int Sigmod::Rules::maxStages() const
{
return m_maxStages;
}
-int Pokemod::Rules::maxMoney() const
+int Sigmod::Rules::maxMoney() const
{
return m_maxMoney;
}
-bool Pokemod::Rules::hardCash() const
+bool Sigmod::Rules::hardCash() const
{
return m_hardCash;
}
-bool Pokemod::Rules::allowSwitchStyle() const
+bool Sigmod::Rules::allowSwitchStyle() const
{
return m_allowSwitchStyle;
}
-bool Pokemod::Rules::specialSplit() const
+bool Sigmod::Rules::specialSplit() const
{
return m_specialSplit;
}
-bool Pokemod::Rules::specialDVSplit() const
+bool Sigmod::Rules::specialDVSplit() const
{
return m_specialDVSplit;
}
-bool Pokemod::Rules::effortValuesAllowed() const
+bool Sigmod::Rules::effortValuesAllowed() const
{
return m_effortValuesAllowed;
}
-int Pokemod::Rules::maxTotalEV() const
+int Sigmod::Rules::maxTotalEV() const
{
return m_maxTotalEV;
}
-int Pokemod::Rules::maxEVPerStat() const
+int Sigmod::Rules::maxEVPerStat() const
{
return m_maxEVPerStat;
}
-Pokemod::Rules& Pokemod::Rules::operator=(const Rules& rhs)
+Sigmod::Rules& Sigmod::Rules::operator=(const Rules& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Rules.h b/sigmod/Rules.h
index 54287ce0..02fbbadf 100644
--- a/sigmod/Rules.h
+++ b/sigmod/Rules.h
@@ -15,18 +15,18 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_RULES__
-#define __POKEMOD_RULES__
+#ifndef __SIGMOD_RULES__
+#define __SIGMOD_RULES__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Rules : public Object
+class SIGMOD_EXPORT Rules : public Object
{
Q_OBJECT
@@ -34,9 +34,9 @@ class POKEMOD_EXPORT Rules : public Object
static const QStringList DVStr;
Rules(const Rules& rules);
- Rules(const Pokemod* parent);
- Rules(const Rules& rules, const Pokemod* parent);
- Rules(const QDomElement& xml, const Pokemod* parent);
+ Rules(const Sigmod* parent);
+ Rules(const Rules& rules, const Sigmod* parent);
+ Rules(const QDomElement& xml, const Sigmod* parent);
void validate();
diff --git a/sigmod/Script.h b/sigmod/Script.h
index 3633e0d3..bf9312ce 100644
--- a/sigmod/Script.h
+++ b/sigmod/Script.h
@@ -15,18 +15,18 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_SCRIPT__
-#define __POKEMOD_SCRIPT__
+#ifndef __SIGMOD_SCRIPT__
+#define __SIGMOD_SCRIPT__
-// Pokemod includes
+// Sigmod includes
#include "Global.h"
// Qt includes
#include <QtCore/QString>
-namespace Pokemod
+namespace Sigmod
{
-class POKEMOD_EXPORT Script
+class SIGMOD_EXPORT Script
{
public:
Script();
@@ -98,6 +98,6 @@ inline bool Script::operator!=(const Script& rhs) const
}
}
-Q_DECLARE_METATYPE(Pokemod::Script)
+Q_DECLARE_METATYPE(Sigmod::Script)
#endif
diff --git a/sigmod/Pokemod.cpp b/sigmod/Sigmod.cpp
index 67355553..cebd5f8d 100644
--- a/sigmod/Pokemod.cpp
+++ b/sigmod/Sigmod.cpp
@@ -16,9 +16,9 @@
*/
// Header include
-#include "Pokemod.h"
+#include "Sigmod.h"
-// Pokemod includes
+// Sigmod includes
#include "Ability.h"
#include "Author.h"
#include "Badge.h"
@@ -47,7 +47,7 @@
// Qt includes
#include <QtCore/QSet>
-Pokemod::Pokemod::Pokemod() :
+Sigmod::Sigmod::Sigmod() :
Object(NULL, 0),
m_title(""),
m_version(""),
@@ -59,27 +59,27 @@ Pokemod::Pokemod::Pokemod() :
{
}
-Pokemod::Pokemod::Pokemod(const Pokemod& pokemod) :
+Sigmod::Sigmod::Sigmod(const Sigmod& sigmod) :
Object(NULL, 0),
m_rules(new Rules(this))
{
- *this = pokemod;
+ *this = sigmod;
}
-Pokemod::Pokemod::Pokemod(const QDomElement& xml) :
+Sigmod::Sigmod::Sigmod(const QDomElement& xml) :
Object(NULL, 0),
m_rules(new Rules(this))
{
load(xml);
}
-Pokemod::Pokemod::~Pokemod()
+Sigmod::Sigmod::~Sigmod()
{
delete m_rules;
clear();
}
-void Pokemod::Pokemod::validate()
+void Sigmod::Sigmod::validate()
{
TEST_BEGIN();
if (m_title.isEmpty())
@@ -271,7 +271,7 @@ void Pokemod::Pokemod::validate()
TEST_END();
}
-void Pokemod::Pokemod::load(const QDomElement& xml)
+void Sigmod::Sigmod::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(title);
@@ -306,7 +306,7 @@ void Pokemod::Pokemod::load(const QDomElement& xml)
m_typechart.resize(typeCount(), typeCount());
}
-QDomElement Pokemod::Pokemod::save() const
+QDomElement Sigmod::Sigmod::save() const
{
QDomElement xml = QDomDocument().createElement(className());
SAVE(title);
@@ -341,22 +341,22 @@ QDomElement Pokemod::Pokemod::save() const
return xml;
}
-void Pokemod::Pokemod::setTitle(const QString& title)
+void Sigmod::Sigmod::setTitle(const QString& title)
{
CHECK(title);
}
-void Pokemod::Pokemod::setVersion(const QString& version)
+void Sigmod::Sigmod::setVersion(const QString& version)
{
CHECK(version);
}
-void Pokemod::Pokemod::setDescription(const QString& description)
+void Sigmod::Sigmod::setDescription(const QString& description)
{
CHECK(description);
}
-void Pokemod::Pokemod::setStartMap(const int startMap)
+void Sigmod::Sigmod::setStartMap(const int startMap)
{
if (mapIndex(startMap) == INT_MAX)
emit(error(bounds("startMap")));
@@ -364,7 +364,7 @@ void Pokemod::Pokemod::setStartMap(const int startMap)
CHECK(startMap);
}
-void Pokemod::Pokemod::setStartWarp(const int startWarp)
+void Sigmod::Sigmod::setStartWarp(const int startWarp)
{
if (mapIndex(m_startMap) == INT_MAX)
emit(error(bounds("startMap")));
@@ -374,94 +374,94 @@ void Pokemod::Pokemod::setStartWarp(const int startWarp)
CHECK(startWarp);
}
-void Pokemod::Pokemod::setTypechart(const int attack, const int defense, const Fraction& multiplier)
+void Sigmod::Sigmod::setTypechart(const int attack, const int defense, const Fraction& multiplier)
{
CHECK_ARRAY(typechart(attack, defense), multiplier);
}
-void Pokemod::Pokemod::setRules(const Rules& rules)
+void Sigmod::Sigmod::setRules(const Rules& rules)
{
*m_rules = rules;
}
-void Pokemod::Pokemod::setRules(const QDomElement& xml)
+void Sigmod::Sigmod::setRules(const QDomElement& xml)
{
m_rules->load(xml);
}
-QString Pokemod::Pokemod::title() const
+QString Sigmod::Sigmod::title() const
{
return m_title;
}
-QString Pokemod::Pokemod::version() const
+QString Sigmod::Sigmod::version() const
{
return m_version;
}
-QString Pokemod::Pokemod::description() const
+QString Sigmod::Sigmod::description() const
{
return m_description;
}
-int Pokemod::Pokemod::startMap() const
+int Sigmod::Sigmod::startMap() const
{
return m_startMap;
}
-int Pokemod::Pokemod::startWarp() const
+int Sigmod::Sigmod::startWarp() const
{
return m_startWarp;
}
-const Pokemod::Matrix<Pokemod::Fraction>* Pokemod::Pokemod::typechart() const
+const Sigmod::Matrix<Sigmod::Fraction>* Sigmod::Sigmod::typechart() const
{
return &m_typechart;
}
-Pokemod::Matrix<Pokemod::Fraction>* Pokemod::Pokemod::typechart()
+Sigmod::Matrix<Sigmod::Fraction>* Sigmod::Sigmod::typechart()
{
return &m_typechart;
}
-Pokemod::Fraction Pokemod::Pokemod::typechart(const int attack, const int defense) const
+Sigmod::Fraction Sigmod::Sigmod::typechart(const int attack, const int defense) const
{
return m_typechart(attack, defense);
}
-const Pokemod::Rules* Pokemod::Pokemod::rules() const
+const Sigmod::Rules* Sigmod::Sigmod::rules() const
{
return m_rules;
}
-Pokemod::Rules* Pokemod::Pokemod::rules()
+Sigmod::Rules* Sigmod::Sigmod::rules()
{
return m_rules;
}
-const Pokemod::Ability* Pokemod::Pokemod::ability(const int index) const
+const Sigmod::Ability* Sigmod::Sigmod::ability(const int index) const
{
Q_ASSERT(index < abilityCount());
return m_abilities.at(index);
}
-Pokemod::Ability* Pokemod::Pokemod::ability(const int index)
+Sigmod::Ability* Sigmod::Sigmod::ability(const int index)
{
Q_ASSERT(index < abilityCount());
return m_abilities[index];
}
-const Pokemod::Ability* Pokemod::Pokemod::abilityById(const int id) const
+const Sigmod::Ability* Sigmod::Sigmod::abilityById(const int id) const
{
return ability(abilityIndex(id));
}
-Pokemod::Ability* Pokemod::Pokemod::abilityById(const int id)
+Sigmod::Ability* Sigmod::Sigmod::abilityById(const int id)
{
return ability(abilityIndex(id));
}
-int Pokemod::Pokemod::abilityIndex(const int id) const
+int Sigmod::Sigmod::abilityIndex(const int id) const
{
for (int i = 0; i < abilityCount(); ++i)
{
@@ -471,45 +471,45 @@ int Pokemod::Pokemod::abilityIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::abilityCount() const
+int Sigmod::Sigmod::abilityCount() const
{
return m_abilities.size();
}
-Pokemod::Ability* Pokemod::Pokemod::newAbility()
+Sigmod::Ability* Sigmod::Sigmod::newAbility()
{
return newAbility(new Ability(this, newAbilityId()));
}
-Pokemod::Ability* Pokemod::Pokemod::newAbility(const QDomElement& xml)
+Sigmod::Ability* Sigmod::Sigmod::newAbility(const QDomElement& xml)
{
return newAbility(new Ability(xml, this, newAbilityId()));
}
-Pokemod::Ability* Pokemod::Pokemod::newAbility(const Ability& ability)
+Sigmod::Ability* Sigmod::Sigmod::newAbility(const Ability& ability)
{
return newAbility(new Ability(ability, this, newAbilityId()));
}
-Pokemod::Ability* Pokemod::Pokemod::newAbility(Ability* ability)
+Sigmod::Ability* Sigmod::Sigmod::newAbility(Ability* ability)
{
m_abilities.append(ability);
return ability;
}
-void Pokemod::Pokemod::deleteAbility(const int index)
+void Sigmod::Sigmod::deleteAbility(const int index)
{
Q_ASSERT(index < abilityCount());
delete m_abilities[index];
m_abilities.removeAt(index);
}
-void Pokemod::Pokemod::deleteAbilityById(const int id)
+void Sigmod::Sigmod::deleteAbilityById(const int id)
{
deleteAbility(abilityIndex(id));
}
-int Pokemod::Pokemod::newAbilityId() const
+int Sigmod::Sigmod::newAbilityId() const
{
int i = 0;
while ((i < abilityCount()) && (abilityIndex(i) != INT_MAX))
@@ -517,29 +517,29 @@ int Pokemod::Pokemod::newAbilityId() const
return i;
}
-const Pokemod::Author* Pokemod::Pokemod::author(const int index) const
+const Sigmod::Author* Sigmod::Sigmod::author(const int index) const
{
Q_ASSERT(index < authorCount());
return m_authors.at(index);
}
-Pokemod::Author* Pokemod::Pokemod::author(const int index)
+Sigmod::Author* Sigmod::Sigmod::author(const int index)
{
Q_ASSERT(index < authorCount());
return m_authors[index];
}
-const Pokemod::Author* Pokemod::Pokemod::authorById(const int id) const
+const Sigmod::Author* Sigmod::Sigmod::authorById(const int id) const
{
return author(authorIndex(id));
}
-Pokemod::Author* Pokemod::Pokemod::authorById(const int id)
+Sigmod::Author* Sigmod::Sigmod::authorById(const int id)
{
return author(authorIndex(id));
}
-int Pokemod::Pokemod::authorIndex(const int id) const
+int Sigmod::Sigmod::authorIndex(const int id) const
{
for (int i = 0; i < authorCount(); ++i)
{
@@ -549,45 +549,45 @@ int Pokemod::Pokemod::authorIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::authorCount() const
+int Sigmod::Sigmod::authorCount() const
{
return m_authors.size();
}
-Pokemod::Author* Pokemod::Pokemod::newAuthor()
+Sigmod::Author* Sigmod::Sigmod::newAuthor()
{
return newAuthor(new Author(this, newAuthorId()));
}
-Pokemod::Author* Pokemod::Pokemod::newAuthor(const QDomElement& xml)
+Sigmod::Author* Sigmod::Sigmod::newAuthor(const QDomElement& xml)
{
return newAuthor(new Author(xml, this, newAuthorId()));
}
-Pokemod::Author* Pokemod::Pokemod::newAuthor(const Author& author)
+Sigmod::Author* Sigmod::Sigmod::newAuthor(const Author& author)
{
return newAuthor(new Author(author, this, newAuthorId()));
}
-Pokemod::Author* Pokemod::Pokemod::newAuthor(Author* author)
+Sigmod::Author* Sigmod::Sigmod::newAuthor(Author* author)
{
m_authors.append(author);
return author;
}
-void Pokemod::Pokemod::deleteAuthor(const int index)
+void Sigmod::Sigmod::deleteAuthor(const int index)
{
Q_ASSERT(index < authorCount());
delete m_authors[index];
m_authors.removeAt(index);
}
-void Pokemod::Pokemod::deleteAuthorById(const int id)
+void Sigmod::Sigmod::deleteAuthorById(const int id)
{
deleteAuthor(authorIndex(id));
}
-int Pokemod::Pokemod::newAuthorId() const
+int Sigmod::Sigmod::newAuthorId() const
{
int i = 0;
while ((i < authorCount()) && (authorIndex(i) != INT_MAX))
@@ -595,29 +595,29 @@ int Pokemod::Pokemod::newAuthorId() const
return i;
}
-const Pokemod::Badge* Pokemod::Pokemod::badge(const int index) const
+const Sigmod::Badge* Sigmod::Sigmod::badge(const int index) const
{
Q_ASSERT(index < badgeCount());
return m_badges.at(index);
}
-Pokemod::Badge* Pokemod::Pokemod::badge(const int index)
+Sigmod::Badge* Sigmod::Sigmod::badge(const int index)
{
Q_ASSERT(index < badgeCount());
return m_badges[index];
}
-const Pokemod::Badge* Pokemod::Pokemod::badgeById(const int id) const
+const Sigmod::Badge* Sigmod::Sigmod::badgeById(const int id) const
{
return badge(badgeIndex(id));
}
-Pokemod::Badge* Pokemod::Pokemod::badgeById(const int id)
+Sigmod::Badge* Sigmod::Sigmod::badgeById(const int id)
{
return badge(badgeIndex(id));
}
-int Pokemod::Pokemod::badgeIndex(const int id) const
+int Sigmod::Sigmod::badgeIndex(const int id) const
{
for (int i = 0; i < badgeCount(); ++i)
{
@@ -627,45 +627,45 @@ int Pokemod::Pokemod::badgeIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::badgeCount() const
+int Sigmod::Sigmod::badgeCount() const
{
return m_badges.size();
}
-Pokemod::Badge* Pokemod::Pokemod::newBadge()
+Sigmod::Badge* Sigmod::Sigmod::newBadge()
{
return newBadge(new Badge(this, newBadgeId()));
}
-Pokemod::Badge* Pokemod::Pokemod::newBadge(const QDomElement& xml)
+Sigmod::Badge* Sigmod::Sigmod::newBadge(const QDomElement& xml)
{
return newBadge(new Badge(xml, this, newBadgeId()));
}
-Pokemod::Badge* Pokemod::Pokemod::newBadge(const Badge& badge)
+Sigmod::Badge* Sigmod::Sigmod::newBadge(const Badge& badge)
{
return newBadge(new Badge(badge, this, newBadgeId()));
}
-Pokemod::Badge* Pokemod::Pokemod::newBadge(Badge* badge)
+Sigmod::Badge* Sigmod::Sigmod::newBadge(Badge* badge)
{
m_badges.append(badge);
return badge;
}
-void Pokemod::Pokemod::deleteBadge(const int index)
+void Sigmod::Sigmod::deleteBadge(const int index)
{
Q_ASSERT(index < badgeCount());
delete m_badges[index];
m_badges.removeAt(index);
}
-void Pokemod::Pokemod::deleteBadgeById(const int id)
+void Sigmod::Sigmod::deleteBadgeById(const int id)
{
deleteBadge(badgeIndex(id));
}
-int Pokemod::Pokemod::newBadgeId() const
+int Sigmod::Sigmod::newBadgeId() const
{
int i = 0;
while ((i < badgeCount()) && (badgeIndex(i) != INT_MAX))
@@ -673,29 +673,29 @@ int Pokemod::Pokemod::newBadgeId() const
return i;
}
-const Pokemod::CoinList* Pokemod::Pokemod::coinList(const int index) const
+const Sigmod::CoinList* Sigmod::Sigmod::coinList(const int index) const
{
Q_ASSERT(index < coinListCount());
return m_coinLists.at(index);
}
-Pokemod::CoinList* Pokemod::Pokemod::coinList(const int index)
+Sigmod::CoinList* Sigmod::Sigmod::coinList(const int index)
{
Q_ASSERT(index < coinListCount());
return m_coinLists[index];
}
-const Pokemod::CoinList* Pokemod::Pokemod::coinListById(const int id) const
+const Sigmod::CoinList* Sigmod::Sigmod::coinListById(const int id) const
{
return coinList(coinListIndex(id));
}
-Pokemod::CoinList* Pokemod::Pokemod::coinListById(const int id)
+Sigmod::CoinList* Sigmod::Sigmod::coinListById(const int id)
{
return coinList(coinListIndex(id));
}
-int Pokemod::Pokemod::coinListIndex(const int id) const
+int Sigmod::Sigmod::coinListIndex(const int id) const
{
for (int i = 0; i < coinListCount(); ++i)
{
@@ -705,45 +705,45 @@ int Pokemod::Pokemod::coinListIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::coinListCount() const
+int Sigmod::Sigmod::coinListCount() const
{
return m_coinLists.size();
}
-Pokemod::CoinList* Pokemod::Pokemod::newCoinList()
+Sigmod::CoinList* Sigmod::Sigmod::newCoinList()
{
return newCoinList(new CoinList(this, newCoinListId()));
}
-Pokemod::CoinList* Pokemod::Pokemod::newCoinList(const QDomElement& xml)
+Sigmod::CoinList* Sigmod::Sigmod::newCoinList(const QDomElement& xml)
{
return newCoinList(new CoinList(xml, this, newCoinListId()));
}
-Pokemod::CoinList* Pokemod::Pokemod::newCoinList(const CoinList& coinList)
+Sigmod::CoinList* Sigmod::Sigmod::newCoinList(const CoinList& coinList)
{
return newCoinList(new CoinList(coinList, this, newCoinListId()));
}
-Pokemod::CoinList* Pokemod::Pokemod::newCoinList(CoinList* coinList)
+Sigmod::CoinList* Sigmod::Sigmod::newCoinList(CoinList* coinList)
{
m_coinLists.append(coinList);
return coinList;
}
-void Pokemod::Pokemod::deleteCoinList(const int index)
+void Sigmod::Sigmod::deleteCoinList(const int index)
{
Q_ASSERT(index < coinListCount());
delete m_coinLists[index];
m_coinLists.removeAt(index);
}
-void Pokemod::Pokemod::deleteCoinListById(const int id)
+void Sigmod::Sigmod::deleteCoinListById(const int id)
{
deleteCoinList(coinListIndex(id));
}
-int Pokemod::Pokemod::newCoinListId() const
+int Sigmod::Sigmod::newCoinListId() const
{
int i = 0;
while ((i < coinListCount()) && (coinListIndex(i) != INT_MAX))
@@ -751,29 +751,29 @@ int Pokemod::Pokemod::newCoinListId() const
return i;
}
-const Pokemod::EggGroup* Pokemod::Pokemod::eggGroup(const int index) const
+const Sigmod::EggGroup* Sigmod::Sigmod::eggGroup(const int index) const
{
Q_ASSERT(index < eggGroupCount());
return m_eggGroups.at(index);
}
-Pokemod::EggGroup* Pokemod::Pokemod::eggGroup(const int index)
+Sigmod::EggGroup* Sigmod::Sigmod::eggGroup(const int index)
{
Q_ASSERT(index < eggGroupCount());
return m_eggGroups[index];
}
-const Pokemod::EggGroup* Pokemod::Pokemod::eggGroupById(const int id) const
+const Sigmod::EggGroup* Sigmod::Sigmod::eggGroupById(const int id) const
{
return eggGroup(eggGroupIndex(id));
}
-Pokemod::EggGroup* Pokemod::Pokemod::eggGroupById(const int id)
+Sigmod::EggGroup* Sigmod::Sigmod::eggGroupById(const int id)
{
return eggGroup(eggGroupIndex(id));
}
-int Pokemod::Pokemod::eggGroupIndex(const int id) const
+int Sigmod::Sigmod::eggGroupIndex(const int id) const
{
for (int i = 0; i < eggGroupCount(); ++i)
{
@@ -783,45 +783,45 @@ int Pokemod::Pokemod::eggGroupIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::eggGroupCount() const
+int Sigmod::Sigmod::eggGroupCount() const
{
return m_eggGroups.size();
}
-Pokemod::EggGroup* Pokemod::Pokemod::newEggGroup()
+Sigmod::EggGroup* Sigmod::Sigmod::newEggGroup()
{
return newEggGroup(new EggGroup(this, newEggGroupId()));
}
-Pokemod::EggGroup* Pokemod::Pokemod::newEggGroup(const QDomElement& xml)
+Sigmod::EggGroup* Sigmod::Sigmod::newEggGroup(const QDomElement& xml)
{
return newEggGroup(new EggGroup(xml, this, newEggGroupId()));
}
-Pokemod::EggGroup* Pokemod::Pokemod::newEggGroup(const EggGroup& eggGroup)
+Sigmod::EggGroup* Sigmod::Sigmod::newEggGroup(const EggGroup& eggGroup)
{
return newEggGroup(new EggGroup(eggGroup, this, newEggGroupId()));
}
-Pokemod::EggGroup* Pokemod::Pokemod::newEggGroup(EggGroup* eggGroup)
+Sigmod::EggGroup* Sigmod::Sigmod::newEggGroup(EggGroup* eggGroup)
{
m_eggGroups.append(eggGroup);
return eggGroup;
}
-void Pokemod::Pokemod::deleteEggGroup(const int index)
+void Sigmod::Sigmod::deleteEggGroup(const int index)
{
Q_ASSERT(index < eggGroupCount());
delete m_eggGroups[index];
m_eggGroups.removeAt(index);
}
-void Pokemod::Pokemod::deleteEggGroupById(const int id)
+void Sigmod::Sigmod::deleteEggGroupById(const int id)
{
deleteEggGroup(eggGroupIndex(id));
}
-int Pokemod::Pokemod::newEggGroupId() const
+int Sigmod::Sigmod::newEggGroupId() const
{
int i = 0;
while ((i < eggGroupCount()) && (eggGroupIndex(i) != INT_MAX))
@@ -829,29 +829,29 @@ int Pokemod::Pokemod::newEggGroupId() const
return i;
}
-const Pokemod::GlobalScript* Pokemod::Pokemod::globalScript(const int index) const
+const Sigmod::GlobalScript* Sigmod::Sigmod::globalScript(const int index) const
{
Q_ASSERT(index < globalScriptCount());
return m_globalScripts.at(index);
}
-Pokemod::GlobalScript* Pokemod::Pokemod::globalScript(const int index)
+Sigmod::GlobalScript* Sigmod::Sigmod::globalScript(const int index)
{
Q_ASSERT(index < globalScriptCount());
return m_globalScripts[index];
}
-const Pokemod::GlobalScript* Pokemod::Pokemod::globalScriptById(const int id) const
+const Sigmod::GlobalScript* Sigmod::Sigmod::globalScriptById(const int id) const
{
return globalScript(globalScriptIndex(id));
}
-Pokemod::GlobalScript* Pokemod::Pokemod::globalScriptById(const int id)
+Sigmod::GlobalScript* Sigmod::Sigmod::globalScriptById(const int id)
{
return globalScript(globalScriptIndex(id));
}
-int Pokemod::Pokemod::globalScriptIndex(const int id) const
+int Sigmod::Sigmod::globalScriptIndex(const int id) const
{
for (int i = 0; i < globalScriptCount(); ++i)
{
@@ -861,45 +861,45 @@ int Pokemod::Pokemod::globalScriptIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::globalScriptCount() const
+int Sigmod::Sigmod::globalScriptCount() const
{
return m_globalScripts.size();
}
-Pokemod::GlobalScript* Pokemod::Pokemod::newGlobalScript()
+Sigmod::GlobalScript* Sigmod::Sigmod::newGlobalScript()
{
return newGlobalScript(new GlobalScript(this, newGlobalScriptId()));
}
-Pokemod::GlobalScript* Pokemod::Pokemod::newGlobalScript(const QDomElement& xml)
+Sigmod::GlobalScript* Sigmod::Sigmod::newGlobalScript(const QDomElement& xml)
{
return newGlobalScript(new GlobalScript(xml, this, newGlobalScriptId()));
}
-Pokemod::GlobalScript* Pokemod::Pokemod::newGlobalScript(const GlobalScript& globalScript)
+Sigmod::GlobalScript* Sigmod::Sigmod::newGlobalScript(const GlobalScript& globalScript)
{
return newGlobalScript(new GlobalScript(globalScript, this, newGlobalScriptId()));
}
-Pokemod::GlobalScript* Pokemod::Pokemod::newGlobalScript(GlobalScript* globalScript)
+Sigmod::GlobalScript* Sigmod::Sigmod::newGlobalScript(GlobalScript* globalScript)
{
m_globalScripts.append(globalScript);
return globalScript;
}
-void Pokemod::Pokemod::deleteGlobalScript(const int index)
+void Sigmod::Sigmod::deleteGlobalScript(const int index)
{
Q_ASSERT(index < globalScriptCount());
delete m_globalScripts[index];
m_globalScripts.removeAt(index);
}
-void Pokemod::Pokemod::deleteGlobalScriptById(const int id)
+void Sigmod::Sigmod::deleteGlobalScriptById(const int id)
{
deleteGlobalScript(globalScriptIndex(id));
}
-int Pokemod::Pokemod::newGlobalScriptId() const
+int Sigmod::Sigmod::newGlobalScriptId() const
{
int i = 0;
while ((i < globalScriptCount()) && (globalScriptIndex(i) != INT_MAX))
@@ -907,29 +907,29 @@ int Pokemod::Pokemod::newGlobalScriptId() const
return i;
}
-const Pokemod::Item* Pokemod::Pokemod::item(const int index) const
+const Sigmod::Item* Sigmod::Sigmod::item(const int index) const
{
Q_ASSERT(index < itemCount());
return m_items.at(index);
}
-Pokemod::Item* Pokemod::Pokemod::item(const int index)
+Sigmod::Item* Sigmod::Sigmod::item(const int index)
{
Q_ASSERT(index < itemCount());
return m_items[index];
}
-const Pokemod::Item* Pokemod::Pokemod::itemById(const int id) const
+const Sigmod::Item* Sigmod::Sigmod::itemById(const int id) const
{
return item(itemIndex(id));
}
-Pokemod::Item* Pokemod::Pokemod::itemById(const int id)
+Sigmod::Item* Sigmod::Sigmod::itemById(const int id)
{
return item(itemIndex(id));
}
-int Pokemod::Pokemod::itemIndex(const int id) const
+int Sigmod::Sigmod::itemIndex(const int id) const
{
for (int i = 0; i < itemCount(); ++i)
{
@@ -939,45 +939,45 @@ int Pokemod::Pokemod::itemIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::itemCount() const
+int Sigmod::Sigmod::itemCount() const
{
return m_items.size();
}
-Pokemod::Item* Pokemod::Pokemod::newItem()
+Sigmod::Item* Sigmod::Sigmod::newItem()
{
return newItem(new Item(this, newItemId()));
}
-Pokemod::Item* Pokemod::Pokemod::newItem(const QDomElement& xml)
+Sigmod::Item* Sigmod::Sigmod::newItem(const QDomElement& xml)
{
return newItem(new Item(xml, this, newItemId()));
}
-Pokemod::Item* Pokemod::Pokemod::newItem(const Item& item)
+Sigmod::Item* Sigmod::Sigmod::newItem(const Item& item)
{
return newItem(new Item(item, this, newItemId()));
}
-Pokemod::Item* Pokemod::Pokemod::newItem(Item* item)
+Sigmod::Item* Sigmod::Sigmod::newItem(Item* item)
{
m_items.append(item);
return item;
}
-void Pokemod::Pokemod::deleteItem(const int index)
+void Sigmod::Sigmod::deleteItem(const int index)
{
Q_ASSERT(index < itemCount());
delete m_items[index];
m_items.removeAt(index);
}
-void Pokemod::Pokemod::deleteItemById(const int id)
+void Sigmod::Sigmod::deleteItemById(const int id)
{
deleteItem(itemIndex(id));
}
-int Pokemod::Pokemod::newItemId() const
+int Sigmod::Sigmod::newItemId() const
{
int i = 0;
for (; (i < itemCount()) && (itemIndex(i) != INT_MAX); ++i)
@@ -985,29 +985,29 @@ int Pokemod::Pokemod::newItemId() const
return i;
}
-const Pokemod::ItemType* Pokemod::Pokemod::itemType(const int index) const
+const Sigmod::ItemType* Sigmod::Sigmod::itemType(const int index) const
{
Q_ASSERT(index < itemTypeCount());
return m_itemTypes.at(index);
}
-Pokemod::ItemType* Pokemod::Pokemod::itemType(const int index)
+Sigmod::ItemType* Sigmod::Sigmod::itemType(const int index)
{
Q_ASSERT(index < itemTypeCount());
return m_itemTypes[index];
}
-const Pokemod::ItemType* Pokemod::Pokemod::itemTypeById(const int id) const
+const Sigmod::ItemType* Sigmod::Sigmod::itemTypeById(const int id) const
{
return itemType(itemTypeIndex(id));
}
-Pokemod::ItemType* Pokemod::Pokemod::itemTypeById(const int id)
+Sigmod::ItemType* Sigmod::Sigmod::itemTypeById(const int id)
{
return itemType(itemTypeIndex(id));
}
-int Pokemod::Pokemod::itemTypeIndex(const int id) const
+int Sigmod::Sigmod::itemTypeIndex(const int id) const
{
for (int i = 0; i < itemTypeCount(); ++i)
{
@@ -1017,45 +1017,45 @@ int Pokemod::Pokemod::itemTypeIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::itemTypeCount() const
+int Sigmod::Sigmod::itemTypeCount() const
{
return m_itemTypes.size();
}
-Pokemod::ItemType* Pokemod::Pokemod::newItemType()
+Sigmod::ItemType* Sigmod::Sigmod::newItemType()
{
return newItemType(new ItemType(this, newItemTypeId()));
}
-Pokemod::ItemType* Pokemod::Pokemod::newItemType(const QDomElement& xml)
+Sigmod::ItemType* Sigmod::Sigmod::newItemType(const QDomElement& xml)
{
return newItemType(new ItemType(xml, this, newItemTypeId()));
}
-Pokemod::ItemType* Pokemod::Pokemod::newItemType(const ItemType& itemType)
+Sigmod::ItemType* Sigmod::Sigmod::newItemType(const ItemType& itemType)
{
return newItemType(new ItemType(itemType, this, newItemTypeId()));
}
-Pokemod::ItemType* Pokemod::Pokemod::newItemType(ItemType* itemType)
+Sigmod::ItemType* Sigmod::Sigmod::newItemType(ItemType* itemType)
{
m_itemTypes.append(itemType);
return itemType;
}
-void Pokemod::Pokemod::deleteItemType(const int index)
+void Sigmod::Sigmod::deleteItemType(const int index)
{
Q_ASSERT(index < itemTypeCount());
delete m_itemTypes[index];
m_itemTypes.removeAt(index);
}
-void Pokemod::Pokemod::deleteItemTypeById(const int id)
+void Sigmod::Sigmod::deleteItemTypeById(const int id)
{
deleteItemType(itemTypeIndex(id));
}
-int Pokemod::Pokemod::newItemTypeId() const
+int Sigmod::Sigmod::newItemTypeId() const
{
int i = 0;
while ((i < itemTypeCount()) && (itemTypeIndex(i) != INT_MAX))
@@ -1063,29 +1063,29 @@ int Pokemod::Pokemod::newItemTypeId() const
return i;
}
-const Pokemod::Map* Pokemod::Pokemod::map(const int index) const
+const Sigmod::Map* Sigmod::Sigmod::map(const int index) const
{
Q_ASSERT(index < mapCount());
return m_maps.at(index);
}
-Pokemod::Map* Pokemod::Pokemod::map(const int index)
+Sigmod::Map* Sigmod::Sigmod::map(const int index)
{
Q_ASSERT(index < mapCount());
return m_maps[index];
}
-const Pokemod::Map* Pokemod::Pokemod::mapById(const int id) const
+const Sigmod::Map* Sigmod::Sigmod::mapById(const int id) const
{
return map(mapIndex(id));
}
-Pokemod::Map* Pokemod::Pokemod::mapById(const int id)
+Sigmod::Map* Sigmod::Sigmod::mapById(const int id)
{
return map(mapIndex(id));
}
-int Pokemod::Pokemod::mapIndex(const int id) const
+int Sigmod::Sigmod::mapIndex(const int id) const
{
for (int i = 0; i < mapCount(); ++i)
{
@@ -1095,45 +1095,45 @@ int Pokemod::Pokemod::mapIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::mapCount() const
+int Sigmod::Sigmod::mapCount() const
{
return m_maps.size();
}
-Pokemod::Map* Pokemod::Pokemod::newMap()
+Sigmod::Map* Sigmod::Sigmod::newMap()
{
return newMap(new Map(this, newMapId()));
}
-Pokemod::Map* Pokemod::Pokemod::newMap(const QDomElement& xml)
+Sigmod::Map* Sigmod::Sigmod::newMap(const QDomElement& xml)
{
return newMap(new Map(xml, this, newMapId()));
}
-Pokemod::Map* Pokemod::Pokemod::newMap(const Map& map)
+Sigmod::Map* Sigmod::Sigmod::newMap(const Map& map)
{
return newMap(new Map(map, this, newMapId()));
}
-Pokemod::Map* Pokemod::Pokemod::newMap(Map* map)
+Sigmod::Map* Sigmod::Sigmod::newMap(Map* map)
{
m_maps.append(map);
return map;
}
-void Pokemod::Pokemod::deleteMap(const int index)
+void Sigmod::Sigmod::deleteMap(const int index)
{
Q_ASSERT(index < mapCount());
delete m_maps[index];
m_maps.removeAt(index);
}
-void Pokemod::Pokemod::deleteMapById(const int id)
+void Sigmod::Sigmod::deleteMapById(const int id)
{
deleteMap(mapIndex(id));
}
-int Pokemod::Pokemod::newMapId() const
+int Sigmod::Sigmod::newMapId() const
{
int i = 0;
while ((i < mapCount()) && (mapIndex(i) != INT_MAX))
@@ -1141,29 +1141,29 @@ int Pokemod::Pokemod::newMapId() const
return i;
}
-const Pokemod::Move* Pokemod::Pokemod::move(const int index) const
+const Sigmod::Move* Sigmod::Sigmod::move(const int index) const
{
Q_ASSERT(index < moveCount());
return m_moves.at(index);
}
-Pokemod::Move* Pokemod::Pokemod::move(const int index)
+Sigmod::Move* Sigmod::Sigmod::move(const int index)
{
Q_ASSERT(index < moveCount());
return m_moves[index];
}
-const Pokemod::Move* Pokemod::Pokemod::moveById(const int id) const
+const Sigmod::Move* Sigmod::Sigmod::moveById(const int id) const
{
return move(moveIndex(id));
}
-Pokemod::Move* Pokemod::Pokemod::moveById(const int id)
+Sigmod::Move* Sigmod::Sigmod::moveById(const int id)
{
return move(moveIndex(id));
}
-int Pokemod::Pokemod::moveIndex(const int id) const
+int Sigmod::Sigmod::moveIndex(const int id) const
{
for (int i = 0; i < moveCount(); ++i)
{
@@ -1173,45 +1173,45 @@ int Pokemod::Pokemod::moveIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::moveCount() const
+int Sigmod::Sigmod::moveCount() const
{
return m_moves.size();
}
-Pokemod::Move* Pokemod::Pokemod::newMove()
+Sigmod::Move* Sigmod::Sigmod::newMove()
{
return newMove(new Move(this, newMoveId()));
}
-Pokemod::Move* Pokemod::Pokemod::newMove(const QDomElement& xml)
+Sigmod::Move* Sigmod::Sigmod::newMove(const QDomElement& xml)
{
return newMove(new Move(xml, this, newMoveId()));
}
-Pokemod::Move* Pokemod::Pokemod::newMove(const Move& move)
+Sigmod::Move* Sigmod::Sigmod::newMove(const Move& move)
{
return newMove(new Move(move, this, newMoveId()));
}
-Pokemod::Move* Pokemod::Pokemod::newMove(Move* move)
+Sigmod::Move* Sigmod::Sigmod::newMove(Move* move)
{
m_moves.append(move);
return move;
}
-void Pokemod::Pokemod::deleteMove(const int index)
+void Sigmod::Sigmod::deleteMove(const int index)
{
Q_ASSERT(index < moveCount());
delete m_moves[index];
m_moves.removeAt(index);
}
-void Pokemod::Pokemod::deleteMoveById(const int id)
+void Sigmod::Sigmod::deleteMoveById(const int id)
{
deleteMove(moveIndex(id));
}
-int Pokemod::Pokemod::newMoveId() const
+int Sigmod::Sigmod::newMoveId() const
{
int i = 0;
while ((i < moveCount()) && (moveIndex(i) != INT_MAX))
@@ -1219,29 +1219,29 @@ int Pokemod::Pokemod::newMoveId() const
return i;
}
-const Pokemod::Nature* Pokemod::Pokemod::nature(const int index) const
+const Sigmod::Nature* Sigmod::Sigmod::nature(const int index) const
{
Q_ASSERT(index < natureCount());
return m_natures.at(index);
}
-Pokemod::Nature* Pokemod::Pokemod::nature(const int index)
+Sigmod::Nature* Sigmod::Sigmod::nature(const int index)
{
Q_ASSERT(index < natureCount());
return m_natures[index];
}
-const Pokemod::Nature* Pokemod::Pokemod::natureById(const int id) const
+const Sigmod::Nature* Sigmod::Sigmod::natureById(const int id) const
{
return nature(natureIndex(id));
}
-Pokemod::Nature* Pokemod::Pokemod::natureById(const int id)
+Sigmod::Nature* Sigmod::Sigmod::natureById(const int id)
{
return nature(natureIndex(id));
}
-int Pokemod::Pokemod::natureIndex(const int id) const
+int Sigmod::Sigmod::natureIndex(const int id) const
{
for (int i = 0; i < natureCount(); ++i)
{
@@ -1251,45 +1251,45 @@ int Pokemod::Pokemod::natureIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::natureCount() const
+int Sigmod::Sigmod::natureCount() const
{
return m_natures.size();
}
-Pokemod::Nature* Pokemod::Pokemod::newNature()
+Sigmod::Nature* Sigmod::Sigmod::newNature()
{
return newNature(new Nature(this, newNatureId()));
}
-Pokemod::Nature* Pokemod::Pokemod::newNature(const QDomElement& xml)
+Sigmod::Nature* Sigmod::Sigmod::newNature(const QDomElement& xml)
{
return newNature(new Nature(xml, this, newNatureId()));
}
-Pokemod::Nature* Pokemod::Pokemod::newNature(const Nature& nature)
+Sigmod::Nature* Sigmod::Sigmod::newNature(const Nature& nature)
{
return newNature(new Nature(nature, this, newNatureId()));
}
-Pokemod::Nature* Pokemod::Pokemod::newNature(Nature* nature)
+Sigmod::Nature* Sigmod::Sigmod::newNature(Nature* nature)
{
m_natures.append(nature);
return nature;
}
-void Pokemod::Pokemod::deleteNature(const int index)
+void Sigmod::Sigmod::deleteNature(const int index)
{
Q_ASSERT(index < natureCount());
delete m_natures[index];
m_natures.removeAt(index);
}
-void Pokemod::Pokemod::deleteNatureById(const int id)
+void Sigmod::Sigmod::deleteNatureById(const int id)
{
deleteNature(natureIndex(id));
}
-int Pokemod::Pokemod::newNatureId() const
+int Sigmod::Sigmod::newNatureId() const
{
int i = 0;
while ((i < natureCount()) && (natureIndex(i) != INT_MAX))
@@ -1297,29 +1297,29 @@ int Pokemod::Pokemod::newNatureId() const
return i;
}
-const Pokemod::Skin* Pokemod::Pokemod::skin(const int index) const
+const Sigmod::Skin* Sigmod::Sigmod::skin(const int index) const
{
Q_ASSERT(index < skinCount());
return m_skins.at(index);
}
-Pokemod::Skin* Pokemod::Pokemod::skin(const int index)
+Sigmod::Skin* Sigmod::Sigmod::skin(const int index)
{
Q_ASSERT(index < skinCount());
return m_skins[index];
}
-const Pokemod::Skin* Pokemod::Pokemod::skinById(const int id) const
+const Sigmod::Skin* Sigmod::Sigmod::skinById(const int id) const
{
return skin(skinIndex(id));
}
-Pokemod::Skin* Pokemod::Pokemod::skinById(const int id)
+Sigmod::Skin* Sigmod::Sigmod::skinById(const int id)
{
return skin(skinIndex(id));
}
-int Pokemod::Pokemod::skinIndex(const int id) const
+int Sigmod::Sigmod::skinIndex(const int id) const
{
for (int i = 0; i < skinCount(); ++i)
{
@@ -1329,45 +1329,45 @@ int Pokemod::Pokemod::skinIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::skinCount() const
+int Sigmod::Sigmod::skinCount() const
{
return m_skins.size();
}
-Pokemod::Skin* Pokemod::Pokemod::newSkin()
+Sigmod::Skin* Sigmod::Sigmod::newSkin()
{
return newSkin(new Skin(this, newSkinId()));
}
-Pokemod::Skin* Pokemod::Pokemod::newSkin(const QDomElement& xml)
+Sigmod::Skin* Sigmod::Sigmod::newSkin(const QDomElement& xml)
{
return newSkin(new Skin(xml, this, newSkinId()));
}
-Pokemod::Skin* Pokemod::Pokemod::newSkin(const Skin& skin)
+Sigmod::Skin* Sigmod::Sigmod::newSkin(const Skin& skin)
{
return newSkin(new Skin(skin, this, newSkinId()));
}
-Pokemod::Skin* Pokemod::Pokemod::newSkin(Skin* skin)
+Sigmod::Skin* Sigmod::Sigmod::newSkin(Skin* skin)
{
m_skins.append(skin);
return skin;
}
-void Pokemod::Pokemod::deleteSkin(const int index)
+void Sigmod::Sigmod::deleteSkin(const int index)
{
Q_ASSERT(index < skinCount());
delete m_skins[index];
m_skins.removeAt(index);
}
-void Pokemod::Pokemod::deleteSkinById(const int id)
+void Sigmod::Sigmod::deleteSkinById(const int id)
{
deleteSkin(skinIndex(id));
}
-int Pokemod::Pokemod::newSkinId() const
+int Sigmod::Sigmod::newSkinId() const
{
int i = 0;
while ((i < skinCount()) && (skinIndex(i) != INT_MAX))
@@ -1375,29 +1375,29 @@ int Pokemod::Pokemod::newSkinId() const
return i;
}
-const Pokemod::Sound* Pokemod::Pokemod::sound(const int index) const
+const Sigmod::Sound* Sigmod::Sigmod::sound(const int index) const
{
Q_ASSERT(index < soundCount());
return m_sounds.at(index);
}
-Pokemod::Sound* Pokemod::Pokemod::sound(const int index)
+Sigmod::Sound* Sigmod::Sigmod::sound(const int index)
{
Q_ASSERT(index < soundCount());
return m_sounds[index];
}
-const Pokemod::Sound* Pokemod::Pokemod::soundById(const int id) const
+const Sigmod::Sound* Sigmod::Sigmod::soundById(const int id) const
{
return sound(soundIndex(id));
}
-Pokemod::Sound* Pokemod::Pokemod::soundById(const int id)
+Sigmod::Sound* Sigmod::Sigmod::soundById(const int id)
{
return sound(soundIndex(id));
}
-int Pokemod::Pokemod::soundIndex(const int id) const
+int Sigmod::Sigmod::soundIndex(const int id) const
{
for (int i = 0; i < soundCount(); ++i)
{
@@ -1407,45 +1407,45 @@ int Pokemod::Pokemod::soundIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::soundCount() const
+int Sigmod::Sigmod::soundCount() const
{
return m_sounds.size();
}
-Pokemod::Sound* Pokemod::Pokemod::newSound()
+Sigmod::Sound* Sigmod::Sigmod::newSound()
{
return newSound(new Sound(this, newSoundId()));
}
-Pokemod::Sound* Pokemod::Pokemod::newSound(const QDomElement& xml)
+Sigmod::Sound* Sigmod::Sigmod::newSound(const QDomElement& xml)
{
return newSound(new Sound(xml, this, newSoundId()));
}
-Pokemod::Sound* Pokemod::Pokemod::newSound(const Sound& sound)
+Sigmod::Sound* Sigmod::Sigmod::newSound(const Sound& sound)
{
return newSound(new Sound(sound, this, newSoundId()));
}
-Pokemod::Sound* Pokemod::Pokemod::newSound(Sound* sound)
+Sigmod::Sound* Sigmod::Sigmod::newSound(Sound* sound)
{
m_sounds.append(sound);
return sound;
}
-void Pokemod::Pokemod::deleteSound(const int index)
+void Sigmod::Sigmod::deleteSound(const int index)
{
Q_ASSERT(index < soundCount());
delete m_sounds[index];
m_sounds.removeAt(index);
}
-void Pokemod::Pokemod::deleteSoundById(const int id)
+void Sigmod::Sigmod::deleteSoundById(const int id)
{
deleteSound(soundIndex(id));
}
-int Pokemod::Pokemod::newSoundId() const
+int Sigmod::Sigmod::newSoundId() const
{
int i = 0;
while ((i < soundCount()) && (soundIndex(i) != INT_MAX))
@@ -1453,29 +1453,29 @@ int Pokemod::Pokemod::newSoundId() const
return i;
}
-const Pokemod::Species* Pokemod::Pokemod::species(const int index) const
+const Sigmod::Species* Sigmod::Sigmod::species(const int index) const
{
Q_ASSERT(index < speciesCount());
return m_species.at(index);
}
-Pokemod::Species* Pokemod::Pokemod::species(const int index)
+Sigmod::Species* Sigmod::Sigmod::species(const int index)
{
Q_ASSERT(index < speciesCount());
return m_species[index];
}
-const Pokemod::Species* Pokemod::Pokemod::speciesById(const int id) const
+const Sigmod::Species* Sigmod::Sigmod::speciesById(const int id) const
{
return species(speciesIndex(id));
}
-Pokemod::Species* Pokemod::Pokemod::speciesById(const int id)
+Sigmod::Species* Sigmod::Sigmod::speciesById(const int id)
{
return species(speciesIndex(id));
}
-int Pokemod::Pokemod::speciesIndex(const int id) const
+int Sigmod::Sigmod::speciesIndex(const int id) const
{
for (int i = 0; i < speciesCount(); ++i)
{
@@ -1485,45 +1485,45 @@ int Pokemod::Pokemod::speciesIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::speciesCount() const
+int Sigmod::Sigmod::speciesCount() const
{
return m_species.size();
}
-Pokemod::Species* Pokemod::Pokemod::newSpecies()
+Sigmod::Species* Sigmod::Sigmod::newSpecies()
{
return newSpecies(new Species(this, newSpeciesId()));
}
-Pokemod::Species* Pokemod::Pokemod::newSpecies(const QDomElement& xml)
+Sigmod::Species* Sigmod::Sigmod::newSpecies(const QDomElement& xml)
{
return newSpecies(new Species(xml, this, newSpeciesId()));
}
-Pokemod::Species* Pokemod::Pokemod::newSpecies(const Species& species)
+Sigmod::Species* Sigmod::Sigmod::newSpecies(const Species& species)
{
return newSpecies(new Species(species, this, newSpeciesId()));
}
-Pokemod::Species* Pokemod::Pokemod::newSpecies(Species* species)
+Sigmod::Species* Sigmod::Sigmod::newSpecies(Species* species)
{
m_species.append(species);
return species;
}
-void Pokemod::Pokemod::deleteSpecies(const int index)
+void Sigmod::Sigmod::deleteSpecies(const int index)
{
Q_ASSERT(index < speciesCount());
delete m_species[index];
m_species.removeAt(index);
}
-void Pokemod::Pokemod::deleteSpeciesById(const int id)
+void Sigmod::Sigmod::deleteSpeciesById(const int id)
{
deleteSpecies(speciesIndex(id));
}
-int Pokemod::Pokemod::newSpeciesId() const
+int Sigmod::Sigmod::newSpeciesId() const
{
int i = 0;
while ((i < speciesCount()) && (speciesIndex(i) != INT_MAX))
@@ -1531,29 +1531,29 @@ int Pokemod::Pokemod::newSpeciesId() const
return i;
}
-const Pokemod::Sprite* Pokemod::Pokemod::sprite(const int index) const
+const Sigmod::Sprite* Sigmod::Sigmod::sprite(const int index) const
{
Q_ASSERT(index < spriteCount());
return m_sprites.at(index);
}
-Pokemod::Sprite* Pokemod::Pokemod::sprite(const int index)
+Sigmod::Sprite* Sigmod::Sigmod::sprite(const int index)
{
Q_ASSERT(index < spriteCount());
return m_sprites[index];
}
-const Pokemod::Sprite* Pokemod::Pokemod::spriteById(const int id) const
+const Sigmod::Sprite* Sigmod::Sigmod::spriteById(const int id) const
{
return sprite(spriteIndex(id));
}
-Pokemod::Sprite* Pokemod::Pokemod::spriteById(const int id)
+Sigmod::Sprite* Sigmod::Sigmod::spriteById(const int id)
{
return sprite(spriteIndex(id));
}
-int Pokemod::Pokemod::spriteIndex(const int id) const
+int Sigmod::Sigmod::spriteIndex(const int id) const
{
for (int i = 0; i < spriteCount(); ++i)
{
@@ -1563,45 +1563,45 @@ int Pokemod::Pokemod::spriteIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::spriteCount() const
+int Sigmod::Sigmod::spriteCount() const
{
return m_sprites.size();
}
-Pokemod::Sprite* Pokemod::Pokemod::newSprite()
+Sigmod::Sprite* Sigmod::Sigmod::newSprite()
{
return newSprite(new Sprite(this, newSpriteId()));
}
-Pokemod::Sprite* Pokemod::Pokemod::newSprite(const QDomElement& xml)
+Sigmod::Sprite* Sigmod::Sigmod::newSprite(const QDomElement& xml)
{
return newSprite(new Sprite(xml, this, newSpriteId()));
}
-Pokemod::Sprite* Pokemod::Pokemod::newSprite(const Sprite& sprite)
+Sigmod::Sprite* Sigmod::Sigmod::newSprite(const Sprite& sprite)
{
return newSprite(new Sprite(sprite, this, newSpriteId()));
}
-Pokemod::Sprite* Pokemod::Pokemod::newSprite(Sprite* sprite)
+Sigmod::Sprite* Sigmod::Sigmod::newSprite(Sprite* sprite)
{
m_sprites.append(sprite);
return sprite;
}
-void Pokemod::Pokemod::deleteSprite(const int index)
+void Sigmod::Sigmod::deleteSprite(const int index)
{
Q_ASSERT(index < spriteCount());
delete m_sprites[index];
m_sprites.removeAt(index);
}
-void Pokemod::Pokemod::deleteSpriteById(const int id)
+void Sigmod::Sigmod::deleteSpriteById(const int id)
{
deleteSprite(spriteIndex(id));
}
-int Pokemod::Pokemod::newSpriteId() const
+int Sigmod::Sigmod::newSpriteId() const
{
int i = 0;
while ((i < spriteCount()) && (spriteIndex(i) != INT_MAX))
@@ -1609,29 +1609,29 @@ int Pokemod::Pokemod::newSpriteId() const
return i;
}
-const Pokemod::Status* Pokemod::Pokemod::status(const int index) const
+const Sigmod::Status* Sigmod::Sigmod::status(const int index) const
{
Q_ASSERT(index < statusCount());
return m_status.at(index);
}
-Pokemod::Status* Pokemod::Pokemod::status(const int index)
+Sigmod::Status* Sigmod::Sigmod::status(const int index)
{
Q_ASSERT(index < statusCount());
return m_status[index];
}
-const Pokemod::Status* Pokemod::Pokemod::statusById(const int id) const
+const Sigmod::Status* Sigmod::Sigmod::statusById(const int id) const
{
return status(statusIndex(id));
}
-Pokemod::Status* Pokemod::Pokemod::statusById(const int id)
+Sigmod::Status* Sigmod::Sigmod::statusById(const int id)
{
return status(statusIndex(id));
}
-int Pokemod::Pokemod::statusIndex(const int id) const
+int Sigmod::Sigmod::statusIndex(const int id) const
{
for (int i = 0; i < statusCount(); ++i)
{
@@ -1641,45 +1641,45 @@ int Pokemod::Pokemod::statusIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::statusCount() const
+int Sigmod::Sigmod::statusCount() const
{
return m_status.size();
}
-Pokemod::Status* Pokemod::Pokemod::newStatus()
+Sigmod::Status* Sigmod::Sigmod::newStatus()
{
return newStatus(new Status(this, newStatusId()));
}
-Pokemod::Status* Pokemod::Pokemod::newStatus(const QDomElement& xml)
+Sigmod::Status* Sigmod::Sigmod::newStatus(const QDomElement& xml)
{
return newStatus(new Status(xml, this, newStatusId()));
}
-Pokemod::Status* Pokemod::Pokemod::newStatus(const Status& status)
+Sigmod::Status* Sigmod::Sigmod::newStatus(const Status& status)
{
return newStatus(new Status(status, this, newStatusId()));
}
-Pokemod::Status* Pokemod::Pokemod::newStatus(Status* status)
+Sigmod::Status* Sigmod::Sigmod::newStatus(Status* status)
{
m_status.append(status);
return status;
}
-void Pokemod::Pokemod::deleteStatus(const int index)
+void Sigmod::Sigmod::deleteStatus(const int index)
{
Q_ASSERT(index < statusCount());
delete m_status[index];
m_status.removeAt(index);
}
-void Pokemod::Pokemod::deleteStatusById(const int id)
+void Sigmod::Sigmod::deleteStatusById(const int id)
{
deleteStatus(statusIndex(id));
}
-int Pokemod::Pokemod::newStatusId() const
+int Sigmod::Sigmod::newStatusId() const
{
int i = 0;
while ((i < statusCount()) && (statusIndex(i) != INT_MAX))
@@ -1687,29 +1687,29 @@ int Pokemod::Pokemod::newStatusId() const
return i;
}
-const Pokemod::Store* Pokemod::Pokemod::store(const int index) const
+const Sigmod::Store* Sigmod::Sigmod::store(const int index) const
{
Q_ASSERT(index < storeCount());
return m_stores.at(index);
}
-Pokemod::Store* Pokemod::Pokemod::store(const int index)
+Sigmod::Store* Sigmod::Sigmod::store(const int index)
{
Q_ASSERT(index < storeCount());
return m_stores[index];
}
-const Pokemod::Store* Pokemod::Pokemod::storeById(const int id) const
+const Sigmod::Store* Sigmod::Sigmod::storeById(const int id) const
{
return store(storeIndex(id));
}
-Pokemod::Store* Pokemod::Pokemod::storeById(const int id)
+Sigmod::Store* Sigmod::Sigmod::storeById(const int id)
{
return store(storeIndex(id));
}
-int Pokemod::Pokemod::storeIndex(const int id) const
+int Sigmod::Sigmod::storeIndex(const int id) const
{
for (int i = 0; i < storeCount(); ++i)
{
@@ -1719,45 +1719,45 @@ int Pokemod::Pokemod::storeIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::storeCount() const
+int Sigmod::Sigmod::storeCount() const
{
return m_stores.size();
}
-Pokemod::Store* Pokemod::Pokemod::newStore()
+Sigmod::Store* Sigmod::Sigmod::newStore()
{
return newStore(new Store(this, newStoreId()));
}
-Pokemod::Store* Pokemod::Pokemod::newStore(const QDomElement& xml)
+Sigmod::Store* Sigmod::Sigmod::newStore(const QDomElement& xml)
{
return newStore(new Store(xml, this, newStoreId()));
}
-Pokemod::Store* Pokemod::Pokemod::newStore(const Store& store)
+Sigmod::Store* Sigmod::Sigmod::newStore(const Store& store)
{
return newStore(new Store(store, this, newStoreId()));
}
-Pokemod::Store* Pokemod::Pokemod::newStore(Store* store)
+Sigmod::Store* Sigmod::Sigmod::newStore(Store* store)
{
m_stores.append(store);
return store;
}
-void Pokemod::Pokemod::deleteStore(const int index)
+void Sigmod::Sigmod::deleteStore(const int index)
{
Q_ASSERT(index < storeCount());
delete m_stores[index];
m_stores.removeAt(index);
}
-void Pokemod::Pokemod::deleteStoreById(const int id)
+void Sigmod::Sigmod::deleteStoreById(const int id)
{
deleteStore(storeIndex(id));
}
-int Pokemod::Pokemod::newStoreId() const
+int Sigmod::Sigmod::newStoreId() const
{
int i = 0;
while ((i < storeCount()) && (storeIndex(i) != INT_MAX))
@@ -1765,29 +1765,29 @@ int Pokemod::Pokemod::newStoreId() const
return i;
}
-const Pokemod::Tile* Pokemod::Pokemod::tile(const int index) const
+const Sigmod::Tile* Sigmod::Sigmod::tile(const int index) const
{
Q_ASSERT(index < tileCount());
return m_tiles.at(index);
}
-Pokemod::Tile* Pokemod::Pokemod::tile(const int index)
+Sigmod::Tile* Sigmod::Sigmod::tile(const int index)
{
Q_ASSERT(index < tileCount());
return m_tiles[index];
}
-const Pokemod::Tile* Pokemod::Pokemod::tileById(const int id) const
+const Sigmod::Tile* Sigmod::Sigmod::tileById(const int id) const
{
return tile(tileIndex(id));
}
-Pokemod::Tile* Pokemod::Pokemod::tileById(const int id)
+Sigmod::Tile* Sigmod::Sigmod::tileById(const int id)
{
return tile(tileIndex(id));
}
-int Pokemod::Pokemod::tileIndex(const int id) const
+int Sigmod::Sigmod::tileIndex(const int id) const
{
for (int i = 0; i < tileCount(); ++i)
{
@@ -1797,45 +1797,45 @@ int Pokemod::Pokemod::tileIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::tileCount() const
+int Sigmod::Sigmod::tileCount() const
{
return m_tiles.size();
}
-Pokemod::Tile* Pokemod::Pokemod::newTile()
+Sigmod::Tile* Sigmod::Sigmod::newTile()
{
return newTile(new Tile(this, newTileId()));
}
-Pokemod::Tile* Pokemod::Pokemod::newTile(const QDomElement& xml)
+Sigmod::Tile* Sigmod::Sigmod::newTile(const QDomElement& xml)
{
return newTile(new Tile(xml, this, newTileId()));
}
-Pokemod::Tile* Pokemod::Pokemod::newTile(const Tile& tile)
+Sigmod::Tile* Sigmod::Sigmod::newTile(const Tile& tile)
{
return newTile(new Tile(tile, this, newTileId()));
}
-Pokemod::Tile* Pokemod::Pokemod::newTile(Tile* tile)
+Sigmod::Tile* Sigmod::Sigmod::newTile(Tile* tile)
{
m_tiles.append(tile);
return tile;
}
-void Pokemod::Pokemod::deleteTile(const int index)
+void Sigmod::Sigmod::deleteTile(const int index)
{
Q_ASSERT(index < tileCount());
delete m_tiles[index];
m_tiles.removeAt(index);
}
-void Pokemod::Pokemod::deleteTileById(const int id)
+void Sigmod::Sigmod::deleteTileById(const int id)
{
deleteTile(tileIndex(id));
}
-int Pokemod::Pokemod::newTileId() const
+int Sigmod::Sigmod::newTileId() const
{
int i = 0;
while ((i < tileCount()) && (tileIndex(i) != INT_MAX))
@@ -1843,29 +1843,29 @@ int Pokemod::Pokemod::newTileId() const
return i;
}
-const Pokemod::Time* Pokemod::Pokemod::time(const int index) const
+const Sigmod::Time* Sigmod::Sigmod::time(const int index) const
{
Q_ASSERT(index < timeCount());
return m_times.at(index);
}
-Pokemod::Time* Pokemod::Pokemod::time(const int index)
+Sigmod::Time* Sigmod::Sigmod::time(const int index)
{
Q_ASSERT(index < timeCount());
return m_times[index];
}
-const Pokemod::Time* Pokemod::Pokemod::timeById(const int id) const
+const Sigmod::Time* Sigmod::Sigmod::timeById(const int id) const
{
return time(timeIndex(id));
}
-Pokemod::Time* Pokemod::Pokemod::timeById(const int id)
+Sigmod::Time* Sigmod::Sigmod::timeById(const int id)
{
return time(timeIndex(id));
}
-int Pokemod::Pokemod::timeIndex(const int id) const
+int Sigmod::Sigmod::timeIndex(const int id) const
{
for (int i = 0; i < timeCount(); ++i)
{
@@ -1875,45 +1875,45 @@ int Pokemod::Pokemod::timeIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::timeCount() const
+int Sigmod::Sigmod::timeCount() const
{
return m_times.size();
}
-Pokemod::Time* Pokemod::Pokemod::newTime()
+Sigmod::Time* Sigmod::Sigmod::newTime()
{
return newTime(new Time(this, newTimeId()));
}
-Pokemod::Time* Pokemod::Pokemod::newTime(const QDomElement& xml)
+Sigmod::Time* Sigmod::Sigmod::newTime(const QDomElement& xml)
{
return newTime(new Time(xml, this, newTimeId()));
}
-Pokemod::Time* Pokemod::Pokemod::newTime(const Time& time)
+Sigmod::Time* Sigmod::Sigmod::newTime(const Time& time)
{
return newTime(new Time(time, this, newTimeId()));
}
-Pokemod::Time* Pokemod::Pokemod::newTime(Time* time)
+Sigmod::Time* Sigmod::Sigmod::newTime(Time* time)
{
m_times.append(time);
return time;
}
-void Pokemod::Pokemod::deleteTime(const int index)
+void Sigmod::Sigmod::deleteTime(const int index)
{
Q_ASSERT(index < timeCount());
delete m_times[index];
m_times.removeAt(index);
}
-void Pokemod::Pokemod::deleteTimeById(const int id)
+void Sigmod::Sigmod::deleteTimeById(const int id)
{
deleteTime(timeIndex(id));
}
-int Pokemod::Pokemod::newTimeId() const
+int Sigmod::Sigmod::newTimeId() const
{
int i = 0;
while ((i < timeCount()) && (timeIndex(i) != INT_MAX))
@@ -1921,29 +1921,29 @@ int Pokemod::Pokemod::newTimeId() const
return i;
}
-const Pokemod::Trainer* Pokemod::Pokemod::trainer(const int index) const
+const Sigmod::Trainer* Sigmod::Sigmod::trainer(const int index) const
{
Q_ASSERT(index < trainerCount());
return m_trainers.at(index);
}
-Pokemod::Trainer* Pokemod::Pokemod::trainer(const int index)
+Sigmod::Trainer* Sigmod::Sigmod::trainer(const int index)
{
Q_ASSERT(index < trainerCount());
return m_trainers[index];
}
-const Pokemod::Trainer* Pokemod::Pokemod::trainerById(const int id) const
+const Sigmod::Trainer* Sigmod::Sigmod::trainerById(const int id) const
{
return trainer(trainerIndex(id));
}
-Pokemod::Trainer* Pokemod::Pokemod::trainerById(const int id)
+Sigmod::Trainer* Sigmod::Sigmod::trainerById(const int id)
{
return trainer(trainerIndex(id));
}
-int Pokemod::Pokemod::trainerIndex(const int id) const
+int Sigmod::Sigmod::trainerIndex(const int id) const
{
for (int i = 0; i < trainerCount(); ++i)
{
@@ -1953,45 +1953,45 @@ int Pokemod::Pokemod::trainerIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::trainerCount() const
+int Sigmod::Sigmod::trainerCount() const
{
return m_trainers.size();
}
-Pokemod::Trainer* Pokemod::Pokemod::newTrainer()
+Sigmod::Trainer* Sigmod::Sigmod::newTrainer()
{
return newTrainer(new Trainer(this, newTrainerId()));
}
-Pokemod::Trainer* Pokemod::Pokemod::newTrainer(const QDomElement& xml)
+Sigmod::Trainer* Sigmod::Sigmod::newTrainer(const QDomElement& xml)
{
return newTrainer(new Trainer(xml, this, newTrainerId()));
}
-Pokemod::Trainer* Pokemod::Pokemod::newTrainer(const Trainer& trainer)
+Sigmod::Trainer* Sigmod::Sigmod::newTrainer(const Trainer& trainer)
{
return newTrainer(new Trainer(trainer, this, newTrainerId()));
}
-Pokemod::Trainer* Pokemod::Pokemod::newTrainer(Trainer* trainer)
+Sigmod::Trainer* Sigmod::Sigmod::newTrainer(Trainer* trainer)
{
m_trainers.append(trainer);
return trainer;
}
-void Pokemod::Pokemod::deleteTrainer(const int index)
+void Sigmod::Sigmod::deleteTrainer(const int index)
{
Q_ASSERT(index < trainerCount());
delete m_trainers[index];
m_trainers.removeAt(index);
}
-void Pokemod::Pokemod::deleteTrainerById(const int id)
+void Sigmod::Sigmod::deleteTrainerById(const int id)
{
deleteTrainer(trainerIndex(id));
}
-int Pokemod::Pokemod::newTrainerId() const
+int Sigmod::Sigmod::newTrainerId() const
{
int i = 0;
while ((i < trainerCount()) && (trainerIndex(i) != INT_MAX))
@@ -1999,29 +1999,29 @@ int Pokemod::Pokemod::newTrainerId() const
return i;
}
-const Pokemod::Type* Pokemod::Pokemod::type(const int index) const
+const Sigmod::Type* Sigmod::Sigmod::type(const int index) const
{
Q_ASSERT(index < typeCount());
return m_types.at(index);
}
-Pokemod::Type* Pokemod::Pokemod::type(const int index)
+Sigmod::Type* Sigmod::Sigmod::type(const int index)
{
Q_ASSERT(index < typeCount());
return m_types[index];
}
-const Pokemod::Type* Pokemod::Pokemod::typeById(const int id) const
+const Sigmod::Type* Sigmod::Sigmod::typeById(const int id) const
{
return type(typeIndex(id));
}
-Pokemod::Type* Pokemod::Pokemod::typeById(const int id)
+Sigmod::Type* Sigmod::Sigmod::typeById(const int id)
{
return type(typeIndex(id));
}
-int Pokemod::Pokemod::typeIndex(const int id) const
+int Sigmod::Sigmod::typeIndex(const int id) const
{
for (int i = 0; i < typeCount(); ++i)
{
@@ -2031,34 +2031,34 @@ int Pokemod::Pokemod::typeIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::typeCount() const
+int Sigmod::Sigmod::typeCount() const
{
return m_types.size();
}
-Pokemod::Type* Pokemod::Pokemod::newType()
+Sigmod::Type* Sigmod::Sigmod::newType()
{
return newType(new Type(this, newTypeId()));
}
-Pokemod::Type* Pokemod::Pokemod::newType(const QDomElement& xml)
+Sigmod::Type* Sigmod::Sigmod::newType(const QDomElement& xml)
{
return newType(new Type(xml, this, newTypeId()));
}
-Pokemod::Type* Pokemod::Pokemod::newType(const Type& type)
+Sigmod::Type* Sigmod::Sigmod::newType(const Type& type)
{
return newType(new Type(type, this, newTypeId()));
}
-Pokemod::Type* Pokemod::Pokemod::newType(Type* type)
+Sigmod::Type* Sigmod::Sigmod::newType(Type* type)
{
m_types.append(type);
m_typechart.resize(typeCount(), typeCount(), Fraction(1, 1));
return type;
}
-void Pokemod::Pokemod::deleteType(const int index)
+void Sigmod::Sigmod::deleteType(const int index)
{
Q_ASSERT(index < typeCount());
delete m_types[index];
@@ -2066,12 +2066,12 @@ void Pokemod::Pokemod::deleteType(const int index)
m_typechart.resize(typeCount(), typeCount(), Fraction(1, 1));
}
-void Pokemod::Pokemod::deleteTypeById(const int id)
+void Sigmod::Sigmod::deleteTypeById(const int id)
{
deleteType(typeIndex(id));
}
-int Pokemod::Pokemod::newTypeId() const
+int Sigmod::Sigmod::newTypeId() const
{
int i = 0;
while ((i < typeCount()) && (typeIndex(i) != INT_MAX))
@@ -2079,29 +2079,29 @@ int Pokemod::Pokemod::newTypeId() const
return i;
}
-const Pokemod::Weather* Pokemod::Pokemod::weather(const int index) const
+const Sigmod::Weather* Sigmod::Sigmod::weather(const int index) const
{
Q_ASSERT(index < weatherCount());
return m_weathers.at(index);
}
-Pokemod::Weather* Pokemod::Pokemod::weather(const int index)
+Sigmod::Weather* Sigmod::Sigmod::weather(const int index)
{
Q_ASSERT(index < weatherCount());
return m_weathers[index];
}
-const Pokemod::Weather* Pokemod::Pokemod::weatherById(const int id) const
+const Sigmod::Weather* Sigmod::Sigmod::weatherById(const int id) const
{
return weather(weatherIndex(id));
}
-Pokemod::Weather* Pokemod::Pokemod::weatherById(const int id)
+Sigmod::Weather* Sigmod::Sigmod::weatherById(const int id)
{
return weather(weatherIndex(id));
}
-int Pokemod::Pokemod::weatherIndex(const int id) const
+int Sigmod::Sigmod::weatherIndex(const int id) const
{
for (int i = 0; i < weatherCount(); ++i)
{
@@ -2111,45 +2111,45 @@ int Pokemod::Pokemod::weatherIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Pokemod::weatherCount() const
+int Sigmod::Sigmod::weatherCount() const
{
return m_weathers.size();
}
-Pokemod::Weather* Pokemod::Pokemod::newWeather()
+Sigmod::Weather* Sigmod::Sigmod::newWeather()
{
return newWeather(new Weather(this, newWeatherId()));
}
-Pokemod::Weather* Pokemod::Pokemod::newWeather(const QDomElement& xml)
+Sigmod::Weather* Sigmod::Sigmod::newWeather(const QDomElement& xml)
{
return newWeather(new Weather(xml, this, newWeatherId()));
}
-Pokemod::Weather* Pokemod::Pokemod::newWeather(const Weather& weather)
+Sigmod::Weather* Sigmod::Sigmod::newWeather(const Weather& weather)
{
return newWeather(new Weather(weather, this, newWeatherId()));
}
-Pokemod::Weather* Pokemod::Pokemod::newWeather(Weather* weather)
+Sigmod::Weather* Sigmod::Sigmod::newWeather(Weather* weather)
{
m_weathers.append(weather);
return weather;
}
-void Pokemod::Pokemod::deleteWeather(const int index)
+void Sigmod::Sigmod::deleteWeather(const int index)
{
Q_ASSERT(index < weatherCount());
delete m_weathers[index];
m_weathers.removeAt(index);
}
-void Pokemod::Pokemod::deleteWeatherById(const int id)
+void Sigmod::Sigmod::deleteWeatherById(const int id)
{
deleteWeather(weatherIndex(id));
}
-int Pokemod::Pokemod::newWeatherId() const
+int Sigmod::Sigmod::newWeatherId() const
{
int i = 0;
while ((i < weatherCount()) && (weatherIndex(i) != INT_MAX))
@@ -2157,7 +2157,7 @@ int Pokemod::Pokemod::newWeatherId() const
return i;
}
-Pokemod::Pokemod& Pokemod::Pokemod::operator=(const Pokemod& rhs)
+Sigmod::Sigmod& Sigmod::Sigmod::operator=(const Sigmod& rhs)
{
if (this == &rhs)
return *this;
@@ -2195,7 +2195,7 @@ Pokemod::Pokemod& Pokemod::Pokemod::operator=(const Pokemod& rhs)
return *this;
}
-void Pokemod::Pokemod::clear()
+void Sigmod::Sigmod::clear()
{
while (abilityCount())
deleteAbility(0);
diff --git a/sigmod/Pokemod.h b/sigmod/Sigmod.h
index d5539d21..ac5b96ed 100644
--- a/sigmod/Pokemod.h
+++ b/sigmod/Sigmod.h
@@ -15,10 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_POKEMOD__
-#define __POKEMOD_POKEMOD__
+#ifndef __SIGMOD_SIGMOD__
+#define __SIGMOD_SIGMOD__
-// Pokemod includes
+// Sigmod includes
#include "Fraction.h"
#include "Matrix.h"
#include "Object.h"
@@ -26,7 +26,7 @@
// Qt includes
#include <QtCore/QList>
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
class Ability;
@@ -53,15 +53,15 @@ class Trainer;
class Type;
class Weather;
-class POKEMOD_EXPORT Pokemod : public Object
+class SIGMOD_EXPORT Sigmod : public Object
{
Q_OBJECT
public:
- Pokemod();
- Pokemod(const Pokemod& pokemod);
- Pokemod(const QDomElement& xml);
- ~Pokemod();
+ Sigmod();
+ Sigmod(const Sigmod& sigmod);
+ Sigmod(const QDomElement& xml);
+ ~Sigmod();
void load(const QDomElement& xml);
QDomElement save() const;
@@ -350,7 +350,7 @@ class POKEMOD_EXPORT Pokemod : public Object
void deleteWeather(const int index);
void deleteWeatherById(const int id);
- Pokemod& operator=(const Pokemod& rhs);
+ Sigmod& operator=(const Sigmod& rhs);
private:
void validate();
diff --git a/sigmod/Skin.cpp b/sigmod/Skin.cpp
index b352acd6..a2b46263 100644
--- a/sigmod/Skin.cpp
+++ b/sigmod/Skin.cpp
@@ -18,38 +18,38 @@
// Header include
#include "Skin.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
#include "Script.h"
-Pokemod::Skin::Skin(const Skin& skin) :
+Sigmod::Skin::Skin(const Skin& skin) :
Object(skin.parent(), skin.id())
{
*this = skin;
}
-Pokemod::Skin::Skin(const Pokemod* parent, const int id) :
+Sigmod::Skin::Skin(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_script("", "")
{
}
-Pokemod::Skin::Skin(const Skin& skin, const Pokemod* parent, const int id) :
+Sigmod::Skin::Skin(const Skin& skin, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = skin;
}
-Pokemod::Skin::Skin(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Skin::Skin(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::Skin::validate()
+void Sigmod::Skin::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -57,14 +57,14 @@ void Pokemod::Skin::validate()
TEST_END();
}
-void Pokemod::Skin::load(const QDomElement& xml)
+void Sigmod::Skin::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
LOAD(script);
}
-QDomElement Pokemod::Skin::save() const
+QDomElement Sigmod::Skin::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -72,27 +72,27 @@ QDomElement Pokemod::Skin::save() const
return xml;
}
-void Pokemod::Skin::setName(const QString& name)
+void Sigmod::Skin::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Skin::setScript(const Script& script)
+void Sigmod::Skin::setScript(const Script& script)
{
CHECK(script);
}
-QString Pokemod::Skin::name() const
+QString Sigmod::Skin::name() const
{
return m_name;
}
-Pokemod::Script Pokemod::Skin::script() const
+Sigmod::Script Sigmod::Skin::script() const
{
return m_script;
}
-Pokemod::Skin& Pokemod::Skin::operator=(const Skin& rhs)
+Sigmod::Skin& Sigmod::Skin::operator=(const Skin& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Skin.h b/sigmod/Skin.h
index b3bfd2d2..a911fb15 100644
--- a/sigmod/Skin.h
+++ b/sigmod/Skin.h
@@ -15,27 +15,27 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_SKIN__
-#define __POKEMOD_SKIN__
+#ifndef __SIGMOD_SKIN__
+#define __SIGMOD_SKIN__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
#include "Script.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Skin : public Object
+class SIGMOD_EXPORT Skin : public Object
{
Q_OBJECT
public:
Skin(const Skin& skin);
- Skin(const Pokemod* parent, const int id);
- Skin(const Skin& skin, const Pokemod* parent, const int id);
- Skin(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Skin(const Sigmod* parent, const int id);
+ Skin(const Skin& skin, const Sigmod* parent, const int id);
+ Skin(const QDomElement& xml, const Sigmod* parent, const int id = -1);
void validate();
diff --git a/sigmod/Sound.cpp b/sigmod/Sound.cpp
index a625274f..ff1f0706 100644
--- a/sigmod/Sound.cpp
+++ b/sigmod/Sound.cpp
@@ -18,19 +18,19 @@
// Header include
#include "Sound.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-const QStringList Pokemod::Sound::TypeStr = QStringList() << "Sound Effect" << "Music";
+const QStringList Sigmod::Sound::TypeStr = QStringList() << "Sound Effect" << "Music";
-Pokemod::Sound::Sound(const Sound& sound) :
+Sigmod::Sound::Sound(const Sound& sound) :
Object(sound.parent(), sound.id())
{
*this = sound;
}
-Pokemod::Sound::Sound(const Pokemod* parent, const int id) :
+Sigmod::Sound::Sound(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_type(SoundEffect),
@@ -38,20 +38,20 @@ Pokemod::Sound::Sound(const Pokemod* parent, const int id) :
{
}
-Pokemod::Sound::Sound(const Sound& sound, const Pokemod* parent, const int id) :
+Sigmod::Sound::Sound(const Sound& sound, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = sound;
}
-Pokemod::Sound::Sound(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Sound::Sound(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::Sound::validate()
+void Sigmod::Sound::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -61,7 +61,7 @@ void Pokemod::Sound::validate()
TEST_END();
}
-void Pokemod::Sound::load(const QDomElement& xml)
+void Sigmod::Sound::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -69,7 +69,7 @@ void Pokemod::Sound::load(const QDomElement& xml)
LOAD(data);
}
-QDomElement Pokemod::Sound::save() const
+QDomElement Sigmod::Sound::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -78,37 +78,37 @@ QDomElement Pokemod::Sound::save() const
return xml;
}
-void Pokemod::Sound::setName(const QString& name)
+void Sigmod::Sound::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Sound::setType(const Type type)
+void Sigmod::Sound::setType(const Type type)
{
CHECK(type);
}
-void Pokemod::Sound::setData(const QByteArray& data)
+void Sigmod::Sound::setData(const QByteArray& data)
{
CHECK(data);
}
-QString Pokemod::Sound::name() const
+QString Sigmod::Sound::name() const
{
return m_name;
}
-Pokemod::Sound::Type Pokemod::Sound::type() const
+Sigmod::Sound::Type Sigmod::Sound::type() const
{
return m_type;
}
-QByteArray Pokemod::Sound::data() const
+QByteArray Sigmod::Sound::data() const
{
return m_data;
}
-Pokemod::Sound& Pokemod::Sound::operator=(const Sound& rhs)
+Sigmod::Sound& Sigmod::Sound::operator=(const Sound& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Sound.h b/sigmod/Sound.h
index 0f4033ce..789718b3 100644
--- a/sigmod/Sound.h
+++ b/sigmod/Sound.h
@@ -15,22 +15,22 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_SOUND__
-#define __POKEMOD_SOUND__
+#ifndef __SIGMOD_SOUND__
+#define __SIGMOD_SOUND__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
// Qt includes
#include <QtCore/QByteArray>
#include <QtCore/QString>
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Sound : public Object
+class SIGMOD_EXPORT Sound : public Object
{
Q_OBJECT
Q_ENUMS(Type)
@@ -44,9 +44,9 @@ class POKEMOD_EXPORT Sound : public Object
static const QStringList TypeStr;
Sound(const Sound& sound);
- Sound(const Pokemod* parent, const int id);
- Sound(const Sound& sound, const Pokemod* parent, const int id);
- Sound(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Sound(const Sigmod* parent, const int id);
+ Sound(const Sound& sound, const Sigmod* parent, const int id);
+ Sound(const QDomElement& xml, const Sigmod* parent, const int id = -1);
void validate();
@@ -68,6 +68,6 @@ class POKEMOD_EXPORT Sound : public Object
QByteArray m_data;
};
}
-Q_DECLARE_METATYPE(Pokemod::Sound::Type)
+Q_DECLARE_METATYPE(Sigmod::Sound::Type)
#endif
diff --git a/sigmod/Species.cpp b/sigmod/Species.cpp
index bab59446..3fc72932 100644
--- a/sigmod/Species.cpp
+++ b/sigmod/Species.cpp
@@ -18,10 +18,10 @@
// Header include
#include "Species.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
#include "Rules.h"
+#include "Sigmod.h"
#include "SpeciesAbility.h"
#include "SpeciesItem.h"
#include "SpeciesMove.h"
@@ -29,9 +29,9 @@
// Qt includes
#include <QtCore/QSet>
-const QStringList Pokemod::Species::StyleStr = QStringList() << "Fluctuating" << "Fading" << "Slow" << "Normal" << "Fast" << "Erratic";
+const QStringList Sigmod::Species::StyleStr = QStringList() << "Fluctuating" << "Fading" << "Slow" << "Normal" << "Fast" << "Erratic";
-Pokemod::Species::Species(const Species& species) :
+Sigmod::Species::Species(const Species& species) :
Object(species.parent(), species.id()),
m_baseStat(ST_End_GSC),
m_effortValue(ST_End_GSC)
@@ -39,7 +39,7 @@ Pokemod::Species::Species(const Species& species) :
*this = species;
}
-Pokemod::Species::Species(const Pokemod* parent, const int id) :
+Sigmod::Species::Species(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_baseStat(ST_End_GSC),
@@ -49,7 +49,7 @@ Pokemod::Species::Species(const Pokemod* parent, const int id) :
m_runChance(1, 1),
m_fleeChance(1, 1),
m_itemChance(1, 1),
- m_pokedexNumber(INT_MAX),
+ m_encyclopediaNumber(INT_MAX),
m_weight(0),
m_height(0),
m_frontMaleSprite(-1),
@@ -57,7 +57,7 @@ Pokemod::Species::Species(const Pokemod* parent, const int id) :
m_frontFemaleSprite(-1),
m_backFemaleSprite(-1),
m_skin(-1),
- m_pokedexEntry(""),
+ m_encyclopediaEntry(""),
m_genderFactor(1, 1),
m_eggSpecies(INT_MAX),
m_eggSteps(0),
@@ -69,7 +69,7 @@ Pokemod::Species::Species(const Pokemod* parent, const int id) :
m_effortValue[i] = 0;
}
-Pokemod::Species::Species(const Species& species, const Pokemod* parent, const int id) :
+Sigmod::Species::Species(const Species& species, const Sigmod* parent, const int id) :
Object(parent, id),
m_baseStat(ST_End_GSC),
m_effortValue(ST_End_GSC)
@@ -77,7 +77,7 @@ Pokemod::Species::Species(const Species& species, const Pokemod* parent, const i
*this = species;
}
-Pokemod::Species::Species(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Species::Species(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id),
m_baseStat(ST_End_GSC),
m_effortValue(ST_End_GSC)
@@ -86,12 +86,12 @@ Pokemod::Species::Species(const QDomElement& xml, const Pokemod* parent, const i
load(xml);
}
-Pokemod::Species::~Species()
+Sigmod::Species::~Species()
{
clear();
}
-void Pokemod::Species::validate()
+void Sigmod::Species::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -107,16 +107,16 @@ void Pokemod::Species::validate()
TEST(setFrontFemaleSprite, frontFemaleSprite);
TEST(setBackFemaleSprite, backFemaleSprite);
TEST(setSkin, skin);
- if ((m_pokedexNumber != INT_MAX) && m_pokedexEntry.isEmpty())
- emit(error("Pokedex entry is empty"));
+ if ((m_encyclopediaNumber != INT_MAX) && m_encyclopediaEntry.isEmpty())
+ emit(error("Encyclopedia entry is empty"));
TEST(setGenderFactor, genderFactor);
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->breedingAllowed())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->breedingAllowed())
{
- if (qobject_cast<const Pokemod*>(pokemod())->speciesIndex(m_eggSpecies) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->speciesIndex(m_eggSpecies) == INT_MAX)
emit(error(bounds("egg species")));
else
{
- if (qobject_cast<const Pokemod*>(pokemod())->species(m_eggSpecies)->growth() != m_growth)
+ if (qobject_cast<const Sigmod*>(sigmod())->species(m_eggSpecies)->growth() != m_growth)
emit(error("Growth mismatch with egg species"));
TEST(setEggSteps, eggSteps);
}
@@ -125,7 +125,7 @@ void Pokemod::Species::validate()
TEST_LIST(setEggGroup, eggGroup);
QSet<int> idChecker;
QSet<int> valueChecker;
- if (abilityCount() < qobject_cast<const Pokemod*>(pokemod())->rules()->maxAbilities())
+ if (abilityCount() < qobject_cast<const Sigmod*>(sigmod())->rules()->maxAbilities())
emit(warning("There are too few abilities"));
TEST_SUB_BEGIN(SpeciesAbility, abilities);
TEST_SUB("ability", id);
@@ -133,7 +133,7 @@ void Pokemod::Species::validate()
TEST_SUB_END();
idChecker.clear();
valueChecker.clear();
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->maxHeldItems() && !itemCount())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->maxHeldItems() && !itemCount())
emit(warning("There are no items"));
TEST_SUB_BEGIN(SpeciesItem, items);
TEST_SUB("item", id);
@@ -150,7 +150,7 @@ void Pokemod::Species::validate()
TEST_END();
}
-void Pokemod::Species::load(const QDomElement& xml)
+void Sigmod::Species::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -162,7 +162,7 @@ void Pokemod::Species::load(const QDomElement& xml)
LOAD(runChance);
LOAD(fleeChance);
LOAD(itemChance);
- LOAD(pokedexNumber);
+ LOAD(encyclopediaNumber);
LOAD(weight);
LOAD(height);
LOAD(frontMaleSprite);
@@ -170,7 +170,7 @@ void Pokemod::Species::load(const QDomElement& xml)
LOAD(frontFemaleSprite);
LOAD(backFemaleSprite);
LOAD(skin);
- LOAD(pokedexEntry);
+ LOAD(encyclopediaEntry);
LOAD(genderFactor);
LOAD(eggSpecies);
LOAD(eggSteps);
@@ -182,7 +182,7 @@ void Pokemod::Species::load(const QDomElement& xml)
LOAD_SUB(newMove, SpeciesMove);
}
-QDomElement Pokemod::Species::save() const
+QDomElement Sigmod::Species::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -194,7 +194,7 @@ QDomElement Pokemod::Species::save() const
SAVE(runChance);
SAVE(fleeChance);
SAVE(itemChance);
- SAVE(pokedexNumber);
+ SAVE(encyclopediaNumber);
SAVE(weight);
SAVE(height);
SAVE(frontMaleSprite);
@@ -202,7 +202,7 @@ QDomElement Pokemod::Species::save() const
SAVE(frontFemaleSprite);
SAVE(backFemaleSprite);
SAVE(skin);
- SAVE(pokedexEntry);
+ SAVE(encyclopediaEntry);
SAVE(genderFactor);
SAVE(eggSpecies);
SAVE(eggSteps);
@@ -215,17 +215,17 @@ QDomElement Pokemod::Species::save() const
return xml;
}
-void Pokemod::Species::setName(const QString& name)
+void Sigmod::Species::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Species::setBaseStat(const Stat stat, const int baseStat)
+void Sigmod::Species::setBaseStat(const Stat stat, const int baseStat)
{
switch (stat)
{
case ST_SpecialDefense:
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->specialSplit())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->specialSplit())
case ST_HP ... ST_Special:
break;
default:
@@ -235,16 +235,16 @@ void Pokemod::Species::setBaseStat(const Stat stat, const int baseStat)
CHECK_ARRAY(baseStat[stat], baseStat);
}
-void Pokemod::Species::setEffortValue(const Stat stat, const int effortValue)
+void Sigmod::Species::setEffortValue(const Stat stat, const int effortValue)
{
- if (!qobject_cast<const Pokemod*>(pokemod())->rules()->effortValuesAllowed())
+ if (!qobject_cast<const Sigmod*>(sigmod())->rules()->effortValuesAllowed())
emit(error("Effort Values not allowed"));
- else if (qobject_cast<const Pokemod*>(pokemod())->rules()->maxEVPerStat() < effortValue)
+ else if (qobject_cast<const Sigmod*>(sigmod())->rules()->maxEVPerStat() < effortValue)
emit(error(bounds("effortValue")));
switch (stat)
{
case ST_SpecialDefense:
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->specialSplit())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->specialSplit())
case ST_HP ... ST_Special:
break;
default:
@@ -254,23 +254,23 @@ void Pokemod::Species::setEffortValue(const Stat stat, const int effortValue)
CHECK_ARRAY(effortValue[stat], effortValue);
}
-void Pokemod::Species::setEffortValue(const int effortValue)
+void Sigmod::Species::setEffortValue(const int effortValue)
{
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->effortValuesAllowed() && qobject_cast<const Pokemod*>(pokemod())->rules()->maxEVPerStat() < effortValue)
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->effortValuesAllowed() && qobject_cast<const Sigmod*>(sigmod())->rules()->maxEVPerStat() < effortValue)
emit(error(bounds("effortValue")));
}
-void Pokemod::Species::setGrowth(const Style growth)
+void Sigmod::Species::setGrowth(const Style growth)
{
CHECK(growth);
}
-void Pokemod::Species::setExperienceValue(const int experienceValue)
+void Sigmod::Species::setExperienceValue(const int experienceValue)
{
CHECK(experienceValue);
}
-void Pokemod::Species::setCatchValue(const int catchValue)
+void Sigmod::Species::setCatchValue(const int catchValue)
{
if (255 < catchValue)
emit(error(bounds("catchValue")));
@@ -278,7 +278,7 @@ void Pokemod::Species::setCatchValue(const int catchValue)
CHECK(catchValue);
}
-void Pokemod::Species::setRunChance(const Fraction& runChance)
+void Sigmod::Species::setRunChance(const Fraction& runChance)
{
if (1 < runChance)
emit(error(bounds("runChance")));
@@ -286,7 +286,7 @@ void Pokemod::Species::setRunChance(const Fraction& runChance)
CHECK(runChance);
}
-void Pokemod::Species::setFleeChance(const Fraction& fleeChance)
+void Sigmod::Species::setFleeChance(const Fraction& fleeChance)
{
if (1 < fleeChance)
emit(error(bounds("fleeChance")));
@@ -294,7 +294,7 @@ void Pokemod::Species::setFleeChance(const Fraction& fleeChance)
CHECK(fleeChance);
}
-void Pokemod::Species::setItemChance(const Fraction& itemChance)
+void Sigmod::Species::setItemChance(const Fraction& itemChance)
{
if (1 < itemChance)
emit(error(bounds("itemChance")));
@@ -302,103 +302,103 @@ void Pokemod::Species::setItemChance(const Fraction& itemChance)
CHECK(itemChance);
}
-void Pokemod::Species::setPokedexNumber(const int pokedexNumber)
+void Sigmod::Species::setEncyclopediaNumber(const int encyclopediaNumber)
{
- CHECK(pokedexNumber);
+ CHECK(encyclopediaNumber);
}
-void Pokemod::Species::setWeight(const int weight)
+void Sigmod::Species::setWeight(const int weight)
{
CHECK(weight);
}
-void Pokemod::Species::setHeight(const int height)
+void Sigmod::Species::setHeight(const int height)
{
CHECK(height);
}
-void Pokemod::Species::setPokedexEntry(const QString& pokedexEntry)
+void Sigmod::Species::setEncyclopediaEntry(const QString& encyclopediaEntry)
{
- CHECK(pokedexEntry);
+ CHECK(encyclopediaEntry);
}
-void Pokemod::Species::setFrontMaleSprite(const int frontMaleSprite)
+void Sigmod::Species::setFrontMaleSprite(const int frontMaleSprite)
{
if (m_genderFactor.numerator() == m_genderFactor.denominator())
emit(error("Cannot be male"));
- else if (qobject_cast<const Pokemod*>(pokemod())->spriteIndex(frontMaleSprite) == INT_MAX)
+ else if (qobject_cast<const Sigmod*>(sigmod())->spriteIndex(frontMaleSprite) == INT_MAX)
emit(error(bounds("frontMaleSprite")));
else
CHECK(frontMaleSprite);
}
-void Pokemod::Species::setBackMaleSprite(const int backMaleSprite)
+void Sigmod::Species::setBackMaleSprite(const int backMaleSprite)
{
if (m_genderFactor.numerator() == m_genderFactor.denominator())
emit(error("Cannot be male"));
- else if (qobject_cast<const Pokemod*>(pokemod())->spriteIndex(backMaleSprite) == INT_MAX)
+ else if (qobject_cast<const Sigmod*>(sigmod())->spriteIndex(backMaleSprite) == INT_MAX)
emit(error(bounds("backMaleSprite")));
else
CHECK(backMaleSprite);
}
-void Pokemod::Species::setFrontFemaleSprite(const int frontFemaleSprite)
+void Sigmod::Species::setFrontFemaleSprite(const int frontFemaleSprite)
{
- if (!qobject_cast<const Pokemod*>(pokemod())->rules()->genderAllowed())
+ if (!qobject_cast<const Sigmod*>(sigmod())->rules()->genderAllowed())
emit(error("Gender is not allowed"));
else if (!m_genderFactor.numerator())
emit(error("Cannot be female"));
else if (1 < m_genderFactor)
emit(error("Genderless uses male sprites"));
- else if (qobject_cast<const Pokemod*>(pokemod())->spriteIndex(frontFemaleSprite) == INT_MAX)
+ else if (qobject_cast<const Sigmod*>(sigmod())->spriteIndex(frontFemaleSprite) == INT_MAX)
emit(error(bounds("frontFemaleSprite")));
else
CHECK(frontFemaleSprite);
}
-void Pokemod::Species::setBackFemaleSprite(const int backFemaleSprite)
+void Sigmod::Species::setBackFemaleSprite(const int backFemaleSprite)
{
- if (!qobject_cast<const Pokemod*>(pokemod())->rules()->genderAllowed())
+ if (!qobject_cast<const Sigmod*>(sigmod())->rules()->genderAllowed())
emit(error("Gender is not allowed"));
else if (!m_genderFactor.numerator())
emit(error("Cannot be female"));
else if (1 < m_genderFactor)
emit(error("Genderless uses male sprites"));
- else if (qobject_cast<const Pokemod*>(pokemod())->spriteIndex(backFemaleSprite) == INT_MAX)
+ else if (qobject_cast<const Sigmod*>(sigmod())->spriteIndex(backFemaleSprite) == INT_MAX)
emit(error(bounds("backFemaleSprite")));
else
CHECK(backFemaleSprite);
}
-void Pokemod::Species::setSkin(const int skin)
+void Sigmod::Species::setSkin(const int skin)
{
- if (qobject_cast<const Pokemod*>(pokemod())->skinIndex(skin) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->skinIndex(skin) == INT_MAX)
emit(error(bounds("skin")));
else
CHECK(skin);
}
-void Pokemod::Species::setGenderFactor(const Fraction& genderFactor)
+void Sigmod::Species::setGenderFactor(const Fraction& genderFactor)
{
CHECK(genderFactor);
}
-void Pokemod::Species::setEggSpecies(const int eggSpecies)
+void Sigmod::Species::setEggSpecies(const int eggSpecies)
{
- if (qobject_cast<const Pokemod*>(pokemod())->speciesIndex(eggSpecies) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->speciesIndex(eggSpecies) == INT_MAX)
emit(error(bounds("eggSpecies")));
else
CHECK(eggSpecies);
}
-void Pokemod::Species::setEggSteps(const int eggSteps)
+void Sigmod::Species::setEggSteps(const int eggSteps)
{
CHECK(eggSteps);
}
-void Pokemod::Species::setType(const int type, const bool state)
+void Sigmod::Species::setType(const int type, const bool state)
{
- if (qobject_cast<const Pokemod*>(pokemod())->typeIndex(type) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->typeIndex(type) == INT_MAX)
emit(error(bounds("type")));
else if (state && !m_type.contains(type))
{
@@ -412,9 +412,9 @@ void Pokemod::Species::setType(const int type, const bool state)
}
}
-void Pokemod::Species::setEggGroup(const int eggGroup, const bool state)
+void Sigmod::Species::setEggGroup(const int eggGroup, const bool state)
{
- if (qobject_cast<const Pokemod*>(pokemod())->eggGroupIndex(eggGroup) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->eggGroupIndex(eggGroup) == INT_MAX)
emit(error(bounds("egg group")));
else if (state && !m_eggGroup.contains(eggGroup))
{
@@ -428,22 +428,22 @@ void Pokemod::Species::setEggGroup(const int eggGroup, const bool state)
}
}
-void Pokemod::Species::setEvolution(const Script& evolution)
+void Sigmod::Species::setEvolution(const Script& evolution)
{
CHECK(evolution);
}
-QString Pokemod::Species::name() const
+QString Sigmod::Species::name() const
{
return m_name;
}
-int Pokemod::Species::baseStat(const Stat stat) const
+int Sigmod::Species::baseStat(const Stat stat) const
{
switch (stat)
{
case ST_SpecialDefense:
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->specialSplit())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->specialSplit())
case ST_HP ... ST_Special:
return m_effortValue[stat];
default:
@@ -452,12 +452,12 @@ int Pokemod::Species::baseStat(const Stat stat) const
}
}
-int Pokemod::Species::effortValue(const Stat stat) const
+int Sigmod::Species::effortValue(const Stat stat) const
{
switch (stat)
{
case ST_SpecialDefense:
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->specialSplit())
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->specialSplit())
case ST_HP ... ST_Special:
return m_effortValue[stat];
default:
@@ -466,144 +466,144 @@ int Pokemod::Species::effortValue(const Stat stat) const
}
}
-Pokemod::Species::Style Pokemod::Species::growth() const
+Sigmod::Species::Style Sigmod::Species::growth() const
{
return m_growth;
}
-int Pokemod::Species::experienceValue() const
+int Sigmod::Species::experienceValue() const
{
return m_experienceValue;
}
-int Pokemod::Species::catchValue() const
+int Sigmod::Species::catchValue() const
{
return m_catchValue;
}
-Pokemod::Fraction Pokemod::Species::runChance() const
+Sigmod::Fraction Sigmod::Species::runChance() const
{
return m_runChance;
}
-Pokemod::Fraction Pokemod::Species::fleeChance() const
+Sigmod::Fraction Sigmod::Species::fleeChance() const
{
return m_fleeChance;
}
-Pokemod::Fraction Pokemod::Species::itemChance() const
+Sigmod::Fraction Sigmod::Species::itemChance() const
{
return m_itemChance;
}
-int Pokemod::Species::pokedexNumber() const
+int Sigmod::Species::encyclopediaNumber() const
{
- return m_pokedexNumber;
+ return m_encyclopediaNumber;
}
-int Pokemod::Species::weight() const
+int Sigmod::Species::weight() const
{
return m_weight;
}
-int Pokemod::Species::height() const
+int Sigmod::Species::height() const
{
return m_height;
}
-QString Pokemod::Species::pokedexEntry() const
+QString Sigmod::Species::encyclopediaEntry() const
{
- return m_pokedexEntry;
+ return m_encyclopediaEntry;
}
-int Pokemod::Species::frontMaleSprite() const
+int Sigmod::Species::frontMaleSprite() const
{
return m_frontMaleSprite;
}
-int Pokemod::Species::backMaleSprite() const
+int Sigmod::Species::backMaleSprite() const
{
return m_backMaleSprite;
}
-int Pokemod::Species::frontFemaleSprite() const
+int Sigmod::Species::frontFemaleSprite() const
{
return m_frontFemaleSprite;
}
-int Pokemod::Species::backFemaleSprite() const
+int Sigmod::Species::backFemaleSprite() const
{
return m_backFemaleSprite;
}
-int Pokemod::Species::skin() const
+int Sigmod::Species::skin() const
{
return m_skin;
}
-Pokemod::Fraction Pokemod::Species::genderFactor() const
+Sigmod::Fraction Sigmod::Species::genderFactor() const
{
return m_genderFactor;
}
-int Pokemod::Species::eggSpecies() const
+int Sigmod::Species::eggSpecies() const
{
return m_eggSpecies;
}
-int Pokemod::Species::eggSteps() const
+int Sigmod::Species::eggSteps() const
{
return m_eggSteps;
}
-bool Pokemod::Species::type(const int type) const
+bool Sigmod::Species::type(const int type) const
{
return m_type.contains(type);
}
-QList<int> Pokemod::Species::types() const
+QList<int> Sigmod::Species::types() const
{
return m_type;
}
-bool Pokemod::Species::eggGroup(const int eggGroup) const
+bool Sigmod::Species::eggGroup(const int eggGroup) const
{
return m_eggGroup.contains(eggGroup);
}
-QList<int> Pokemod::Species::eggGroups() const
+QList<int> Sigmod::Species::eggGroups() const
{
return m_eggGroup;
}
-Pokemod::Script Pokemod::Species::evolution() const
+Sigmod::Script Sigmod::Species::evolution() const
{
return m_evolution;
}
-const Pokemod::SpeciesAbility* Pokemod::Species::ability(const int index) const
+const Sigmod::SpeciesAbility* Sigmod::Species::ability(const int index) const
{
Q_ASSERT(index < abilityCount());
return m_abilities.at(index);
}
-Pokemod::SpeciesAbility* Pokemod::Species::ability(const int index)
+Sigmod::SpeciesAbility* Sigmod::Species::ability(const int index)
{
Q_ASSERT(index < abilityCount());
return m_abilities[index];
}
-const Pokemod::SpeciesAbility* Pokemod::Species::abilityById(const int id) const
+const Sigmod::SpeciesAbility* Sigmod::Species::abilityById(const int id) const
{
return ability(abilityIndex(id));
}
-Pokemod::SpeciesAbility* Pokemod::Species::abilityById(const int id)
+Sigmod::SpeciesAbility* Sigmod::Species::abilityById(const int id)
{
return ability(abilityIndex(id));
}
-int Pokemod::Species::abilityIndex(const int id) const
+int Sigmod::Species::abilityIndex(const int id) const
{
for (int i = 0; i < abilityCount(); ++i)
{
@@ -613,45 +613,45 @@ int Pokemod::Species::abilityIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Species::abilityCount() const
+int Sigmod::Species::abilityCount() const
{
return m_abilities.size();
}
-Pokemod::SpeciesAbility* Pokemod::Species::newAbility()
+Sigmod::SpeciesAbility* Sigmod::Species::newAbility()
{
return newAbility(new SpeciesAbility(this, newAbilityId()));
}
-Pokemod::SpeciesAbility* Pokemod::Species::newAbility(const QDomElement& xml)
+Sigmod::SpeciesAbility* Sigmod::Species::newAbility(const QDomElement& xml)
{
return newAbility(new SpeciesAbility(xml, this, newAbilityId()));
}
-Pokemod::SpeciesAbility* Pokemod::Species::newAbility(const SpeciesAbility& ability)
+Sigmod::SpeciesAbility* Sigmod::Species::newAbility(const SpeciesAbility& ability)
{
return newAbility(new SpeciesAbility(ability, this, newAbilityId()));
}
-Pokemod::SpeciesAbility* Pokemod::Species::newAbility(SpeciesAbility* ability)
+Sigmod::SpeciesAbility* Sigmod::Species::newAbility(SpeciesAbility* ability)
{
m_abilities.append(ability);
return ability;
}
-void Pokemod::Species::deleteAbility(const int index)
+void Sigmod::Species::deleteAbility(const int index)
{
Q_ASSERT(index < abilityCount());
delete m_abilities[index];
m_abilities.removeAt(index);
}
-void Pokemod::Species::deleteAbilityById(const int id)
+void Sigmod::Species::deleteAbilityById(const int id)
{
deleteAbility(abilityIndex(id));
}
-int Pokemod::Species::newAbilityId() const
+int Sigmod::Species::newAbilityId() const
{
int i = 0;
while ((i < abilityCount()) && (abilityIndex(i) != INT_MAX))
@@ -659,29 +659,29 @@ int Pokemod::Species::newAbilityId() const
return i;
}
-const Pokemod::SpeciesItem* Pokemod::Species::item(const int index) const
+const Sigmod::SpeciesItem* Sigmod::Species::item(const int index) const
{
Q_ASSERT(index < itemCount());
return m_items.at(index);
}
-Pokemod::SpeciesItem* Pokemod::Species::item(const int index)
+Sigmod::SpeciesItem* Sigmod::Species::item(const int index)
{
Q_ASSERT(index < itemCount());
return m_items[index];
}
-const Pokemod::SpeciesItem* Pokemod::Species::itemById(const int id) const
+const Sigmod::SpeciesItem* Sigmod::Species::itemById(const int id) const
{
return item(itemIndex(id));
}
-Pokemod::SpeciesItem* Pokemod::Species::itemById(const int id)
+Sigmod::SpeciesItem* Sigmod::Species::itemById(const int id)
{
return item(itemIndex(id));
}
-int Pokemod::Species::itemIndex(const int id) const
+int Sigmod::Species::itemIndex(const int id) const
{
for (int i = 0; i < itemCount(); ++i)
{
@@ -691,45 +691,45 @@ int Pokemod::Species::itemIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Species::itemCount() const
+int Sigmod::Species::itemCount() const
{
return m_items.size();
}
-Pokemod::SpeciesItem* Pokemod::Species::newItem()
+Sigmod::SpeciesItem* Sigmod::Species::newItem()
{
return newItem(new SpeciesItem(this, newItemId()));
}
-Pokemod::SpeciesItem* Pokemod::Species::newItem(const QDomElement& xml)
+Sigmod::SpeciesItem* Sigmod::Species::newItem(const QDomElement& xml)
{
return newItem(new SpeciesItem(xml, this, newItemId()));
}
-Pokemod::SpeciesItem* Pokemod::Species::newItem(const SpeciesItem& item)
+Sigmod::SpeciesItem* Sigmod::Species::newItem(const SpeciesItem& item)
{
return newItem(new SpeciesItem(item, this, newItemId()));
}
-Pokemod::SpeciesItem* Pokemod::Species::newItem(SpeciesItem* item)
+Sigmod::SpeciesItem* Sigmod::Species::newItem(SpeciesItem* item)
{
m_items.append(item);
return item;
}
-void Pokemod::Species::deleteItem(const int index)
+void Sigmod::Species::deleteItem(const int index)
{
Q_ASSERT(index < itemCount());
delete m_items[index];
m_items.removeAt(index);
}
-void Pokemod::Species::deleteItemById(const int id)
+void Sigmod::Species::deleteItemById(const int id)
{
deleteItem(itemIndex(id));
}
-int Pokemod::Species::newItemId() const
+int Sigmod::Species::newItemId() const
{
int i = 0;
while ((i < itemCount()) && (itemIndex(i) != INT_MAX))
@@ -737,29 +737,29 @@ int Pokemod::Species::newItemId() const
return i;
}
-const Pokemod::SpeciesMove* Pokemod::Species::move(const int index) const
+const Sigmod::SpeciesMove* Sigmod::Species::move(const int index) const
{
Q_ASSERT(index < moveCount());
return m_moves.at(index);
}
-Pokemod::SpeciesMove* Pokemod::Species::move(const int index)
+Sigmod::SpeciesMove* Sigmod::Species::move(const int index)
{
Q_ASSERT(index < moveCount());
return m_moves[index];
}
-const Pokemod::SpeciesMove* Pokemod::Species::moveById(const int id) const
+const Sigmod::SpeciesMove* Sigmod::Species::moveById(const int id) const
{
return move(moveIndex(id));
}
-Pokemod::SpeciesMove* Pokemod::Species::moveById(const int id)
+Sigmod::SpeciesMove* Sigmod::Species::moveById(const int id)
{
return move(moveIndex(id));
}
-int Pokemod::Species::moveIndex(const int id) const
+int Sigmod::Species::moveIndex(const int id) const
{
for (int i = 0; i < moveCount(); ++i)
{
@@ -769,45 +769,45 @@ int Pokemod::Species::moveIndex(const int id) const
return INT_MAX;
}
-int Pokemod::Species::moveCount() const
+int Sigmod::Species::moveCount() const
{
return m_moves.size();
}
-Pokemod::SpeciesMove* Pokemod::Species::newMove()
+Sigmod::SpeciesMove* Sigmod::Species::newMove()
{
return newMove(new SpeciesMove(this, newMoveId()));
}
-Pokemod::SpeciesMove* Pokemod::Species::newMove(const QDomElement& xml)
+Sigmod::SpeciesMove* Sigmod::Species::newMove(const QDomElement& xml)
{
return newMove(new SpeciesMove(xml, this, newMoveId()));
}
-Pokemod::SpeciesMove* Pokemod::Species::newMove(const SpeciesMove& move)
+Sigmod::SpeciesMove* Sigmod::Species::newMove(const SpeciesMove& move)
{
return newMove(new SpeciesMove(move, this, newMoveId()));
}
-Pokemod::SpeciesMove* Pokemod::Species::newMove(SpeciesMove* move)
+Sigmod::SpeciesMove* Sigmod::Species::newMove(SpeciesMove* move)
{
m_moves.append(move);
return move;
}
-void Pokemod::Species::deleteMove(const int index)
+void Sigmod::Species::deleteMove(const int index)
{
Q_ASSERT(index < moveCount());
delete m_moves[index];
m_moves.removeAt(index);
}
-void Pokemod::Species::deleteMoveById(const int id)
+void Sigmod::Species::deleteMoveById(const int id)
{
deleteMove(moveIndex(id));
}
-int Pokemod::Species::newMoveId() const
+int Sigmod::Species::newMoveId() const
{
int i = 0;
while ((i < moveCount()) && (moveIndex(i) != INT_MAX))
@@ -815,7 +815,7 @@ int Pokemod::Species::newMoveId() const
return i;
}
-Pokemod::Species& Pokemod::Species::operator=(const Species& rhs)
+Sigmod::Species& Sigmod::Species::operator=(const Species& rhs)
{
if (this == &rhs)
return *this;
@@ -829,7 +829,7 @@ Pokemod::Species& Pokemod::Species::operator=(const Species& rhs)
COPY(runChance);
COPY(fleeChance);
COPY(itemChance);
- COPY(pokedexNumber);
+ COPY(encyclopediaNumber);
COPY(weight);
COPY(height);
COPY(frontMaleSprite);
@@ -837,7 +837,7 @@ Pokemod::Species& Pokemod::Species::operator=(const Species& rhs)
COPY(frontFemaleSprite);
COPY(backFemaleSprite);
COPY(skin);
- COPY(pokedexEntry);
+ COPY(encyclopediaEntry);
COPY(genderFactor);
COPY(eggSpecies);
COPY(eggSteps);
@@ -850,7 +850,7 @@ Pokemod::Species& Pokemod::Species::operator=(const Species& rhs)
return *this;
}
-void Pokemod::Species::clear()
+void Sigmod::Species::clear()
{
while (abilityCount())
deleteAbility(0);
diff --git a/sigmod/Species.h b/sigmod/Species.h
index d63fb4ec..8bf59bb4 100644
--- a/sigmod/Species.h
+++ b/sigmod/Species.h
@@ -15,10 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_SPECIES__
-#define __POKEMOD_SPECIES__
+#ifndef __SIGMOD_SPECIES__
+#define __SIGMOD_SPECIES__
-// Pokemod includes
+// Sigmod includes
#include "Fraction.h"
#include "Object.h"
#include "Script.h"
@@ -26,15 +26,15 @@
// Qt includes
#include <QtCore/QList>
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
class SpeciesAbility;
class SpeciesItem;
class SpeciesMove;
-class POKEMOD_EXPORT Species : public Object
+class SIGMOD_EXPORT Species : public Object
{
Q_OBJECT
Q_ENUMS(Style)
@@ -52,9 +52,9 @@ class POKEMOD_EXPORT Species : public Object
static const QStringList StyleStr;
Species(const Species& species);
- Species(const Pokemod* parent, const int id);
- Species(const Species& species, const Pokemod* parent, const int id);
- Species(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Species(const Sigmod* parent, const int id);
+ Species(const Species& species, const Sigmod* parent, const int id);
+ Species(const QDomElement& xml, const Sigmod* parent, const int id = -1);
~Species();
void validate();
@@ -71,10 +71,10 @@ class POKEMOD_EXPORT Species : public Object
void setRunChance(const Fraction& runChance);
void setFleeChance(const Fraction& fleeChance);
void setItemChance(const Fraction& itemChance);
- void setPokedexNumber(const int pokedexNumber);
+ void setEncyclopediaNumber(const int encyclopediaNumber);
void setWeight(const int weight);
void setHeight(const int height);
- void setPokedexEntry(const QString& pokedexEntry);
+ void setEncyclopediaEntry(const QString& encyclopediaEntry);
void setFrontMaleSprite(const int frontMaleSprite);
void setBackMaleSprite(const int backMaleSprite);
void setFrontFemaleSprite(const int frontFemaleSprite);
@@ -96,10 +96,10 @@ class POKEMOD_EXPORT Species : public Object
Fraction runChance() const;
Fraction fleeChance() const;
Fraction itemChance() const;
- int pokedexNumber() const;
+ int encyclopediaNumber() const;
int weight() const;
int height() const;
- QString pokedexEntry() const;
+ QString encyclopediaEntry() const;
int frontMaleSprite() const;
int backMaleSprite() const;
int frontFemaleSprite() const;
@@ -174,7 +174,7 @@ class POKEMOD_EXPORT Species : public Object
Fraction m_runChance;
Fraction m_fleeChance;
Fraction m_itemChance;
- int m_pokedexNumber;
+ int m_encyclopediaNumber;
int m_weight;
int m_height;
int m_frontMaleSprite;
@@ -182,7 +182,7 @@ class POKEMOD_EXPORT Species : public Object
int m_frontFemaleSprite;
int m_backFemaleSprite;
int m_skin;
- QString m_pokedexEntry;
+ QString m_encyclopediaEntry;
Fraction m_genderFactor;
int m_eggSpecies;
int m_eggSteps;
@@ -194,6 +194,6 @@ class POKEMOD_EXPORT Species : public Object
QList<SpeciesMove*> m_moves;
};
}
-Q_DECLARE_METATYPE(Pokemod::Species::Style)
+Q_DECLARE_METATYPE(Sigmod::Species::Style)
#endif
diff --git a/sigmod/SpeciesAbility.cpp b/sigmod/SpeciesAbility.cpp
index a95e0358..4afc6785 100644
--- a/sigmod/SpeciesAbility.cpp
+++ b/sigmod/SpeciesAbility.cpp
@@ -18,38 +18,38 @@
// Header include
#include "SpeciesAbility.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
#include "Species.h"
-Pokemod::SpeciesAbility::SpeciesAbility(const SpeciesAbility& ability) :
+Sigmod::SpeciesAbility::SpeciesAbility(const SpeciesAbility& ability) :
Object(ability.parent(), ability.id())
{
*this = ability;
}
-Pokemod::SpeciesAbility::SpeciesAbility(const Species* parent, const int id) :
+Sigmod::SpeciesAbility::SpeciesAbility(const Species* parent, const int id) :
Object(parent, id),
m_ability(INT_MAX),
m_weight(1)
{
}
-Pokemod::SpeciesAbility::SpeciesAbility(const SpeciesAbility& ability, const Species* parent, const int id) :
+Sigmod::SpeciesAbility::SpeciesAbility(const SpeciesAbility& ability, const Species* parent, const int id) :
Object(parent, id)
{
*this = ability;
}
-Pokemod::SpeciesAbility::SpeciesAbility(const QDomElement& xml, const Species* parent, const int id) :
+Sigmod::SpeciesAbility::SpeciesAbility(const QDomElement& xml, const Species* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::SpeciesAbility::validate()
+void Sigmod::SpeciesAbility::validate()
{
TEST_BEGIN();
TEST(setAbility, ability);
@@ -57,14 +57,14 @@ void Pokemod::SpeciesAbility::validate()
TEST_END();
}
-void Pokemod::SpeciesAbility::load(const QDomElement& xml)
+void Sigmod::SpeciesAbility::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(ability);
LOAD(weight);
}
-QDomElement Pokemod::SpeciesAbility::save() const
+QDomElement Sigmod::SpeciesAbility::save() const
{
SAVE_CREATE();
SAVE(ability);
@@ -72,15 +72,15 @@ QDomElement Pokemod::SpeciesAbility::save() const
return xml;
}
-void Pokemod::SpeciesAbility::setAbility(const int ability)
+void Sigmod::SpeciesAbility::setAbility(const int ability)
{
- if (qobject_cast<const Pokemod*>(pokemod())->abilityIndex(ability) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->abilityIndex(ability) == INT_MAX)
emit(error(bounds("ability")));
else
CHECK(ability);
}
-void Pokemod::SpeciesAbility::setWeight(const int weight)
+void Sigmod::SpeciesAbility::setWeight(const int weight)
{
if (!weight)
emit(error(bounds("weight")));
@@ -88,17 +88,17 @@ void Pokemod::SpeciesAbility::setWeight(const int weight)
CHECK(weight);
}
-int Pokemod::SpeciesAbility::ability() const
+int Sigmod::SpeciesAbility::ability() const
{
return m_ability;
}
-int Pokemod::SpeciesAbility::weight() const
+int Sigmod::SpeciesAbility::weight() const
{
return m_weight;
}
-Pokemod::SpeciesAbility& Pokemod::SpeciesAbility::operator=(const SpeciesAbility& rhs)
+Sigmod::SpeciesAbility& Sigmod::SpeciesAbility::operator=(const SpeciesAbility& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/SpeciesAbility.h b/sigmod/SpeciesAbility.h
index 346f974a..7c17a525 100644
--- a/sigmod/SpeciesAbility.h
+++ b/sigmod/SpeciesAbility.h
@@ -15,18 +15,18 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_SPECIESABILITY__
-#define __POKEMOD_SPECIESABILITY__
+#ifndef __SIGMOD_SPECIESABILITY__
+#define __SIGMOD_SPECIESABILITY__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
class Species;
-class POKEMOD_EXPORT SpeciesAbility : public Object
+class SIGMOD_EXPORT SpeciesAbility : public Object
{
Q_OBJECT
diff --git a/sigmod/SpeciesItem.cpp b/sigmod/SpeciesItem.cpp
index 4cc27088..ba7733f2 100644
--- a/sigmod/SpeciesItem.cpp
+++ b/sigmod/SpeciesItem.cpp
@@ -18,38 +18,38 @@
// Header include
#include "SpeciesItem.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
#include "Species.h"
-Pokemod::SpeciesItem::SpeciesItem(const SpeciesItem& item) :
+Sigmod::SpeciesItem::SpeciesItem(const SpeciesItem& item) :
Object(item.parent(), item.id())
{
*this = item;
}
-Pokemod::SpeciesItem::SpeciesItem(const Species* parent, const int id) :
+Sigmod::SpeciesItem::SpeciesItem(const Species* parent, const int id) :
Object(parent, id),
m_item(INT_MAX),
m_weight(1)
{
}
-Pokemod::SpeciesItem::SpeciesItem(const SpeciesItem& item, const Species* parent, const int id) :
+Sigmod::SpeciesItem::SpeciesItem(const SpeciesItem& item, const Species* parent, const int id) :
Object(parent, id)
{
*this = item;
}
-Pokemod::SpeciesItem::SpeciesItem(const QDomElement& xml, const Species* parent, const int id) :
+Sigmod::SpeciesItem::SpeciesItem(const QDomElement& xml, const Species* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::SpeciesItem::validate()
+void Sigmod::SpeciesItem::validate()
{
TEST_BEGIN();
TEST(setItem, item);
@@ -57,14 +57,14 @@ void Pokemod::SpeciesItem::validate()
TEST_END();
}
-void Pokemod::SpeciesItem::load(const QDomElement& xml)
+void Sigmod::SpeciesItem::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(item);
LOAD(weight);
}
-QDomElement Pokemod::SpeciesItem::save() const
+QDomElement Sigmod::SpeciesItem::save() const
{
SAVE_CREATE();
SAVE(item);
@@ -72,15 +72,15 @@ QDomElement Pokemod::SpeciesItem::save() const
return xml;
}
-void Pokemod::SpeciesItem::setItem(const int item)
+void Sigmod::SpeciesItem::setItem(const int item)
{
- if (qobject_cast<const Pokemod*>(pokemod())->itemIndex(item) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->itemIndex(item) == INT_MAX)
emit(error(bounds("item")));
else
CHECK(item);
}
-void Pokemod::SpeciesItem::setWeight(const int weight)
+void Sigmod::SpeciesItem::setWeight(const int weight)
{
if (!weight)
emit(error(bounds("weight")));
@@ -88,17 +88,17 @@ void Pokemod::SpeciesItem::setWeight(const int weight)
CHECK(weight);
}
-int Pokemod::SpeciesItem::item() const
+int Sigmod::SpeciesItem::item() const
{
return m_item;
}
-int Pokemod::SpeciesItem::weight() const
+int Sigmod::SpeciesItem::weight() const
{
return m_weight;
}
-Pokemod::SpeciesItem& Pokemod::SpeciesItem::operator=(const SpeciesItem& rhs)
+Sigmod::SpeciesItem& Sigmod::SpeciesItem::operator=(const SpeciesItem& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/SpeciesItem.h b/sigmod/SpeciesItem.h
index 93f4fc3c..680d95de 100644
--- a/sigmod/SpeciesItem.h
+++ b/sigmod/SpeciesItem.h
@@ -15,18 +15,18 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_SPECIESITEM__
-#define __POKEMOD_SPECIESITEM__
+#ifndef __SIGMOD_SPECIESITEM__
+#define __SIGMOD_SPECIESITEM__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
class Species;
-class POKEMOD_EXPORT SpeciesItem : public Object
+class SIGMOD_EXPORT SpeciesItem : public Object
{
Q_OBJECT
diff --git a/sigmod/SpeciesMove.cpp b/sigmod/SpeciesMove.cpp
index da1ae662..1764ba99 100644
--- a/sigmod/SpeciesMove.cpp
+++ b/sigmod/SpeciesMove.cpp
@@ -18,19 +18,19 @@
// Header include
#include "SpeciesMove.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
#include "Rules.h"
+#include "Sigmod.h"
#include "Species.h"
-Pokemod::SpeciesMove::SpeciesMove(const SpeciesMove& move) :
+Sigmod::SpeciesMove::SpeciesMove(const SpeciesMove& move) :
Object(move.parent(), move.id())
{
*this = move;
}
-Pokemod::SpeciesMove::SpeciesMove(const Species* parent, const int id) :
+Sigmod::SpeciesMove::SpeciesMove(const Species* parent, const int id) :
Object(parent, id),
m_move(INT_MAX),
m_level(0),
@@ -38,20 +38,20 @@ Pokemod::SpeciesMove::SpeciesMove(const Species* parent, const int id) :
{
}
-Pokemod::SpeciesMove::SpeciesMove(const SpeciesMove& move, const Species* parent, const int id) :
+Sigmod::SpeciesMove::SpeciesMove(const SpeciesMove& move, const Species* parent, const int id) :
Object(parent, id)
{
*this = move;
}
-Pokemod::SpeciesMove::SpeciesMove(const QDomElement& xml, const Species* parent, const int id) :
+Sigmod::SpeciesMove::SpeciesMove(const QDomElement& xml, const Species* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::SpeciesMove::validate()
+void Sigmod::SpeciesMove::validate()
{
TEST_BEGIN();
TEST(setMove, move);
@@ -60,7 +60,7 @@ void Pokemod::SpeciesMove::validate()
TEST_END();
}
-void Pokemod::SpeciesMove::load(const QDomElement& xml)
+void Sigmod::SpeciesMove::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(move);
@@ -68,7 +68,7 @@ void Pokemod::SpeciesMove::load(const QDomElement& xml)
LOAD(wild);
}
-QDomElement Pokemod::SpeciesMove::save() const
+QDomElement Sigmod::SpeciesMove::save() const
{
SAVE_CREATE();
SAVE(move);
@@ -77,46 +77,46 @@ QDomElement Pokemod::SpeciesMove::save() const
return xml;
}
-void Pokemod::SpeciesMove::setMove(const int move)
+void Sigmod::SpeciesMove::setMove(const int move)
{
- if (qobject_cast<const Pokemod*>(pokemod())->moveIndex(move) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->moveIndex(move) == INT_MAX)
emit(error(bounds("move")));
else
CHECK(move);
}
-void Pokemod::SpeciesMove::setLevel(const int level)
+void Sigmod::SpeciesMove::setLevel(const int level)
{
- if (qobject_cast<const Pokemod*>(pokemod())->rules()->maxLevel() <= level)
+ if (qobject_cast<const Sigmod*>(sigmod())->rules()->maxLevel() <= level)
emit(error(bounds("level")));
else
CHECK(level);
}
-void Pokemod::SpeciesMove::setWild(const int wild)
+void Sigmod::SpeciesMove::setWild(const int wild)
{
- if (!wild || (qobject_cast<const Pokemod*>(pokemod())->rules()->maxLevel() <= wild))
+ if (!wild || (qobject_cast<const Sigmod*>(sigmod())->rules()->maxLevel() <= wild))
emit(error(bounds("wild")));
else
CHECK(wild);
}
-int Pokemod::SpeciesMove::move() const
+int Sigmod::SpeciesMove::move() const
{
return m_move;
}
-int Pokemod::SpeciesMove::level() const
+int Sigmod::SpeciesMove::level() const
{
return m_level;
}
-int Pokemod::SpeciesMove::wild() const
+int Sigmod::SpeciesMove::wild() const
{
return m_wild;
}
-Pokemod::SpeciesMove& Pokemod::SpeciesMove::operator=(const SpeciesMove& rhs)
+Sigmod::SpeciesMove& Sigmod::SpeciesMove::operator=(const SpeciesMove& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/SpeciesMove.h b/sigmod/SpeciesMove.h
index affc9530..2d479d69 100644
--- a/sigmod/SpeciesMove.h
+++ b/sigmod/SpeciesMove.h
@@ -15,18 +15,18 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_SPECIESMOVE__
-#define __POKEMOD_SPECIESMOVE__
+#ifndef __SIGMOD_SPECIESMOVE__
+#define __SIGMOD_SPECIESMOVE__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
class Species;
-class POKEMOD_EXPORT SpeciesMove : public Object
+class SIGMOD_EXPORT SpeciesMove : public Object
{
Q_OBJECT
diff --git a/sigmod/Sprite.cpp b/sigmod/Sprite.cpp
index 2000bf86..0261385a 100644
--- a/sigmod/Sprite.cpp
+++ b/sigmod/Sprite.cpp
@@ -18,41 +18,41 @@
// Header include
#include "Sprite.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-Pokemod::Sprite::Sprite(const Sprite& sprite) :
+Sigmod::Sprite::Sprite(const Sprite& sprite) :
Object(sprite.parent(), sprite.id())
{
*this = sprite;
}
-Pokemod::Sprite::Sprite(const Pokemod* parent, const int id) :
+Sigmod::Sprite::Sprite(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_sprite()
{
}
-Pokemod::Sprite::Sprite(const Sprite& sprite, const Pokemod* parent, const int id) :
+Sigmod::Sprite::Sprite(const Sprite& sprite, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = sprite;
}
-Pokemod::Sprite::Sprite(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Sprite::Sprite(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-Pokemod::Sprite::~Sprite()
+Sigmod::Sprite::~Sprite()
{
}
-void Pokemod::Sprite::validate()
+void Sigmod::Sprite::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -60,14 +60,14 @@ void Pokemod::Sprite::validate()
TEST_END();
}
-void Pokemod::Sprite::load(const QDomElement& xml)
+void Sigmod::Sprite::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
LOAD(sprite);
}
-QDomElement Pokemod::Sprite::save() const
+QDomElement Sigmod::Sprite::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -75,28 +75,28 @@ QDomElement Pokemod::Sprite::save() const
return xml;
}
-void Pokemod::Sprite::setName(const QString& name)
+void Sigmod::Sprite::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Sprite::setSprite(const QImage& sprite)
+void Sigmod::Sprite::setSprite(const QImage& sprite)
{
m_sprite = sprite;
emit(changed());
}
-QString Pokemod::Sprite::name() const
+QString Sigmod::Sprite::name() const
{
return m_name;
}
-QImage Pokemod::Sprite::sprite() const
+QImage Sigmod::Sprite::sprite() const
{
return m_sprite;
}
-Pokemod::Sprite& Pokemod::Sprite::operator=(const Sprite& rhs)
+Sigmod::Sprite& Sigmod::Sprite::operator=(const Sprite& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Sprite.h b/sigmod/Sprite.h
index f23422a0..014ca8eb 100644
--- a/sigmod/Sprite.h
+++ b/sigmod/Sprite.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_SPRITE__
-#define __POKEMOD_SPRITE__
+#ifndef __SIGMOD_SPRITE__
+#define __SIGMOD_SPRITE__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
// Qt includes
#include <QtGui/QImage>
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Sprite : public Object
+class SIGMOD_EXPORT Sprite : public Object
{
Q_OBJECT
public:
Sprite(const Sprite& sprite);
- Sprite(const Pokemod* parent, const int id);
- Sprite(const Sprite& sprite, const Pokemod* parent, const int id);
- Sprite(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Sprite(const Sigmod* parent, const int id);
+ Sprite(const Sprite& sprite, const Sigmod* parent, const int id);
+ Sprite(const QDomElement& xml, const Sigmod* parent, const int id = -1);
~Sprite();
void validate();
diff --git a/sigmod/Status.cpp b/sigmod/Status.cpp
index 04702d48..fccb85d0 100644
--- a/sigmod/Status.cpp
+++ b/sigmod/Status.cpp
@@ -18,18 +18,18 @@
// Header include
#include "Status.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
#include "Script.h"
-Pokemod::Status::Status(const Status& status) :
+Sigmod::Status::Status(const Status& status) :
Object(status.parent(), status.id())
{
*this = status;
}
-Pokemod::Status::Status(const Pokemod* parent, const int id) :
+Sigmod::Status::Status(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_battleScript("", ""),
@@ -37,24 +37,24 @@ Pokemod::Status::Status(const Pokemod* parent, const int id) :
{
}
-Pokemod::Status::Status(const Status& status, const Pokemod* parent, const int id) :
+Sigmod::Status::Status(const Status& status, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = status;
}
-Pokemod::Status::Status(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Status::Status(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-Pokemod::Status::~Status()
+Sigmod::Status::~Status()
{
}
-void Pokemod::Status::validate()
+void Sigmod::Status::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -62,7 +62,7 @@ void Pokemod::Status::validate()
TEST_END();
}
-void Pokemod::Status::load(const QDomElement& xml)
+void Sigmod::Status::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -70,7 +70,7 @@ void Pokemod::Status::load(const QDomElement& xml)
LOAD(worldScript);
}
-QDomElement Pokemod::Status::save() const
+QDomElement Sigmod::Status::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -79,37 +79,37 @@ QDomElement Pokemod::Status::save() const
return xml;
}
-void Pokemod::Status::setName(const QString& name)
+void Sigmod::Status::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Status::setBattleScript(const Script& battleScript)
+void Sigmod::Status::setBattleScript(const Script& battleScript)
{
CHECK(battleScript);
}
-void Pokemod::Status::setWorldScript(const Script& worldScript)
+void Sigmod::Status::setWorldScript(const Script& worldScript)
{
CHECK(worldScript);
}
-QString Pokemod::Status::name() const
+QString Sigmod::Status::name() const
{
return m_name;
}
-Pokemod::Script Pokemod::Status::battleScript() const
+Sigmod::Script Sigmod::Status::battleScript() const
{
return m_battleScript;
}
-Pokemod::Script Pokemod::Status::worldScript() const
+Sigmod::Script Sigmod::Status::worldScript() const
{
return m_worldScript;
}
-Pokemod::Status& Pokemod::Status::operator=(const Status& rhs)
+Sigmod::Status& Sigmod::Status::operator=(const Status& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Status.h b/sigmod/Status.h
index af801957..e6c96f02 100644
--- a/sigmod/Status.h
+++ b/sigmod/Status.h
@@ -15,27 +15,27 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_STATUS__
-#define __POKEMOD_STATUS__
+#ifndef __SIGMOD_STATUS__
+#define __SIGMOD_STATUS__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
#include "Script.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Status : public Object
+class SIGMOD_EXPORT Status : public Object
{
Q_OBJECT
public:
Status(const Status& status);
- Status(const Pokemod* parent, const int id);
- Status(const Status& status, const Pokemod* parent, const int id);
- Status(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Status(const Sigmod* parent, const int id);
+ Status(const Status& status, const Sigmod* parent, const int id);
+ Status(const QDomElement& xml, const Sigmod* parent, const int id = -1);
~Status();
void validate();
diff --git a/sigmod/Store.cpp b/sigmod/Store.cpp
index 977bf6a9..bee0cd36 100644
--- a/sigmod/Store.cpp
+++ b/sigmod/Store.cpp
@@ -18,36 +18,36 @@
// Header include
#include "Store.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-Pokemod::Store::Store(const Store& store) :
+Sigmod::Store::Store(const Store& store) :
Object(store.parent(), store.id())
{
*this = store;
}
-Pokemod::Store::Store(const Pokemod* parent, const int id) :
+Sigmod::Store::Store(const Sigmod* parent, const int id) :
Object(parent, id),
m_name("")
{
}
-Pokemod::Store::Store(const Store& store, const Pokemod* parent, const int id) :
+Sigmod::Store::Store(const Store& store, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = store;
}
-Pokemod::Store::Store(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Store::Store(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::Store::validate()
+void Sigmod::Store::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -59,27 +59,27 @@ void Pokemod::Store::validate()
TEST_END();
}
-void Pokemod::Store::load(const QDomElement& xml)
+void Sigmod::Store::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD_LIST(item);
}
-QDomElement Pokemod::Store::save() const
+QDomElement Sigmod::Store::save() const
{
SAVE_CREATE();
SAVE_LIST(item);
return xml;
}
-void Pokemod::Store::setName(const QString& name)
+void Sigmod::Store::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Store::setItem(const int item, const bool state)
+void Sigmod::Store::setItem(const int item, const bool state)
{
- if (qobject_cast<const Pokemod*>(pokemod())->itemIndex(item) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->itemIndex(item) == INT_MAX)
emit(error(bounds("item")));
else if (state && !m_item.contains(item))
{
@@ -93,22 +93,22 @@ void Pokemod::Store::setItem(const int item, const bool state)
}
}
-QString Pokemod::Store::name() const
+QString Sigmod::Store::name() const
{
return m_name;
}
-bool Pokemod::Store::item(const int item) const
+bool Sigmod::Store::item(const int item) const
{
return m_item.contains(item);
}
-QList<int> Pokemod::Store::items() const
+QList<int> Sigmod::Store::items() const
{
return m_item;
}
-Pokemod::Store& Pokemod::Store::operator=(const Store& rhs)
+Sigmod::Store& Sigmod::Store::operator=(const Store& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Store.h b/sigmod/Store.h
index 48ae4342..881ce304 100644
--- a/sigmod/Store.h
+++ b/sigmod/Store.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_STORE__
-#define __POKEMOD_STORE__
+#ifndef __SIGMOD_STORE__
+#define __SIGMOD_STORE__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
// Qt includes
#include <QtCore/QList>
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Store : public Object
+class SIGMOD_EXPORT Store : public Object
{
Q_OBJECT
public:
Store(const Store& store);
- Store(const Pokemod* parent, const int id);
- Store(const Store& store, const Pokemod* parent, const int id);
- Store(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Store(const Sigmod* parent, const int id);
+ Store(const Store& store, const Sigmod* parent, const int id);
+ Store(const QDomElement& xml, const Sigmod* parent, const int id = -1);
void validate();
diff --git a/sigmod/Tile.cpp b/sigmod/Tile.cpp
index c58f7e01..37854648 100644
--- a/sigmod/Tile.cpp
+++ b/sigmod/Tile.cpp
@@ -18,18 +18,18 @@
// Header include
#include "Tile.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
#include "Sprite.h"
-Pokemod::Tile::Tile(const Tile& tile) :
+Sigmod::Tile::Tile(const Tile& tile) :
Object(tile.parent(), tile.id())
{
*this = tile;
}
-Pokemod::Tile::Tile(const Pokemod* parent, const int id) :
+Sigmod::Tile::Tile(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_sprite(-1),
@@ -40,20 +40,20 @@ Pokemod::Tile::Tile(const Pokemod* parent, const int id) :
m_from[i] = false;
}
-Pokemod::Tile::Tile(const Tile& tile, const Pokemod* parent, const int id) :
+Sigmod::Tile::Tile(const Tile& tile, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = tile;
}
-Pokemod::Tile::Tile(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Tile::Tile(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::Tile::validate()
+void Sigmod::Tile::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -62,7 +62,7 @@ void Pokemod::Tile::validate()
TEST_END();
}
-void Pokemod::Tile::load(const QDomElement& xml)
+void Sigmod::Tile::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -71,7 +71,7 @@ void Pokemod::Tile::load(const QDomElement& xml)
LOAD(script);
}
-QDomElement Pokemod::Tile::save() const
+QDomElement Sigmod::Tile::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -81,53 +81,53 @@ QDomElement Pokemod::Tile::save() const
return xml;
}
-void Pokemod::Tile::setName(const QString& name)
+void Sigmod::Tile::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Tile::setSprite(const int sprite)
+void Sigmod::Tile::setSprite(const int sprite)
{
- if (qobject_cast<const Pokemod*>(pokemod())->spriteIndex(sprite) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->spriteIndex(sprite) == INT_MAX)
emit(error(bounds("sprite")));
// FIXME: remove if doing collaging
- else if (qobject_cast<const Pokemod*>(pokemod())->spriteById(sprite)->sprite().size() != QSize(64, 64))
+ else if (qobject_cast<const Sigmod*>(sigmod())->spriteById(sprite)->sprite().size() != QSize(64, 64))
emit(error("Sprite is the wrong dimensions"));
else
CHECK(sprite);
}
-void Pokemod::Tile::setFrom(const Direction direction, const bool state)
+void Sigmod::Tile::setFrom(const Direction direction, const bool state)
{
CHECK_ARRAY(from[direction], state);
}
-void Pokemod::Tile::setScript(const Script& script)
+void Sigmod::Tile::setScript(const Script& script)
{
CHECK(script);
}
-QString Pokemod::Tile::name() const
+QString Sigmod::Tile::name() const
{
return m_name;
}
-int Pokemod::Tile::sprite() const
+int Sigmod::Tile::sprite() const
{
return m_sprite;
}
-bool Pokemod::Tile::from(const Direction direction) const
+bool Sigmod::Tile::from(const Direction direction) const
{
return m_from[direction];
}
-Pokemod::Script Pokemod::Tile::script() const
+Sigmod::Script Sigmod::Tile::script() const
{
return m_script;
}
-Pokemod::Tile& Pokemod::Tile::operator=(const Tile& rhs)
+Sigmod::Tile& Sigmod::Tile::operator=(const Tile& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Tile.h b/sigmod/Tile.h
index 0cba7563..2475bd68 100644
--- a/sigmod/Tile.h
+++ b/sigmod/Tile.h
@@ -15,27 +15,27 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_TILE__
-#define __POKEMOD_TILE__
+#ifndef __SIGMOD_TILE__
+#define __SIGMOD_TILE__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
#include "Script.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Tile : public Object
+class SIGMOD_EXPORT Tile : public Object
{
Q_OBJECT
public:
Tile(const Tile& tile);
- Tile(const Pokemod* parent, const int id);
- Tile(const Tile& tile, const Pokemod* parent, const int id);
- Tile(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Tile(const Sigmod* parent, const int id);
+ Tile(const Tile& tile, const Sigmod* parent, const int id);
+ Tile(const QDomElement& xml, const Sigmod* parent, const int id = -1);
void validate();
diff --git a/sigmod/Time.cpp b/sigmod/Time.cpp
index e1ced90a..32939e92 100644
--- a/sigmod/Time.cpp
+++ b/sigmod/Time.cpp
@@ -18,17 +18,17 @@
// Header include
#include "Time.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-Pokemod::Time::Time(const Time& time) :
+Sigmod::Time::Time(const Time& time) :
Object(time.parent(), time.id())
{
*this = time;
}
-Pokemod::Time::Time(const Pokemod* parent, const int id) :
+Sigmod::Time::Time(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_hour(0),
@@ -36,20 +36,20 @@ Pokemod::Time::Time(const Pokemod* parent, const int id) :
{
}
-Pokemod::Time::Time(const Time& time, const Pokemod* parent, const int id) :
+Sigmod::Time::Time(const Time& time, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = time;
}
-Pokemod::Time::Time(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Time::Time(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::Time::validate()
+void Sigmod::Time::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -59,7 +59,7 @@ void Pokemod::Time::validate()
TEST_END();
}
-void Pokemod::Time::load(const QDomElement& xml)
+void Sigmod::Time::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -67,7 +67,7 @@ void Pokemod::Time::load(const QDomElement& xml)
LOAD(minute);
}
-QDomElement Pokemod::Time::save() const
+QDomElement Sigmod::Time::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -76,12 +76,12 @@ QDomElement Pokemod::Time::save() const
return xml;
}
-void Pokemod::Time::setName(const QString& name)
+void Sigmod::Time::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Time::setHour(const int hour)
+void Sigmod::Time::setHour(const int hour)
{
if (24 <= hour)
emit(error(bounds("hour")));
@@ -89,7 +89,7 @@ void Pokemod::Time::setHour(const int hour)
CHECK(hour);
}
-void Pokemod::Time::setMinute(const int minute)
+void Sigmod::Time::setMinute(const int minute)
{
if (60 <= minute)
emit(error(bounds("minute")));
@@ -97,22 +97,22 @@ void Pokemod::Time::setMinute(const int minute)
CHECK(minute);
}
-QString Pokemod::Time::name() const
+QString Sigmod::Time::name() const
{
return m_name;
}
-int Pokemod::Time::hour() const
+int Sigmod::Time::hour() const
{
return m_hour;
}
-int Pokemod::Time::minute() const
+int Sigmod::Time::minute() const
{
return m_minute;
}
-Pokemod::Time& Pokemod::Time::operator=(const Time& rhs)
+Sigmod::Time& Sigmod::Time::operator=(const Time& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Time.h b/sigmod/Time.h
index 9799f328..015fd8d1 100644
--- a/sigmod/Time.h
+++ b/sigmod/Time.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_TIME__
-#define __POKEMOD_TIME__
+#ifndef __SIGMOD_TIME__
+#define __SIGMOD_TIME__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Time : public Object
+class SIGMOD_EXPORT Time : public Object
{
Q_OBJECT
public:
Time(const Time& time);
- Time(const Pokemod* parent, const int id);
- Time(const Time& time, const Pokemod* parent, const int id);
- Time(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Time(const Sigmod* parent, const int id);
+ Time(const Time& time, const Sigmod* parent, const int id);
+ Time(const QDomElement& xml, const Sigmod* parent, const int id = -1);
void validate();
diff --git a/sigmod/Trainer.cpp b/sigmod/Trainer.cpp
index 0c80fc57..d169d2d6 100644
--- a/sigmod/Trainer.cpp
+++ b/sigmod/Trainer.cpp
@@ -18,19 +18,19 @@
// Header include
#include "Trainer.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-const QStringList Pokemod::Trainer::IntelligenceStr = QStringList() << "Ignorant" << "Remember" << "Cheating";
+const QStringList Sigmod::Trainer::IntelligenceStr = QStringList() << "Ignorant" << "Remember" << "Cheating";
-Pokemod::Trainer::Trainer(const Trainer& trainer) :
+Sigmod::Trainer::Trainer(const Trainer& trainer) :
Object(trainer.parent(), trainer.id())
{
*this = trainer;
}
-Pokemod::Trainer::Trainer(const Pokemod* parent, const int id) :
+Sigmod::Trainer::Trainer(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_moneyFactor(0),
@@ -44,20 +44,20 @@ Pokemod::Trainer::Trainer(const Pokemod* parent, const int id) :
{
}
-Pokemod::Trainer::Trainer(const Trainer& trainer, const Pokemod* parent, const int id) :
+Sigmod::Trainer::Trainer(const Trainer& trainer, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = trainer;
}
-Pokemod::Trainer::Trainer(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Trainer::Trainer(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::Trainer::validate()
+void Sigmod::Trainer::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -67,7 +67,7 @@ void Pokemod::Trainer::validate()
TEST_END();
}
-void Pokemod::Trainer::load(const QDomElement& xml)
+void Sigmod::Trainer::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
@@ -81,7 +81,7 @@ void Pokemod::Trainer::load(const QDomElement& xml)
LOAD(statIntel);
}
-QDomElement Pokemod::Trainer::save() const
+QDomElement Sigmod::Trainer::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -96,12 +96,12 @@ QDomElement Pokemod::Trainer::save() const
return xml;
}
-void Pokemod::Trainer::setName(const QString& name)
+void Sigmod::Trainer::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Trainer::setMoneyFactor(const int moneyFactor)
+void Sigmod::Trainer::setMoneyFactor(const int moneyFactor)
{
if (moneyFactor < 0)
emit(error(bounds("moneyFactor")));
@@ -109,90 +109,90 @@ void Pokemod::Trainer::setMoneyFactor(const int moneyFactor)
CHECK(moneyFactor);
}
-void Pokemod::Trainer::setSkin(const int skin)
+void Sigmod::Trainer::setSkin(const int skin)
{
- if (qobject_cast<const Pokemod*>(pokemod())->skinIndex(skin) == INT_MAX)
+ if (qobject_cast<const Sigmod*>(sigmod())->skinIndex(skin) == INT_MAX)
emit(error(bounds("skin")));
else
CHECK(skin);
}
-void Pokemod::Trainer::setDepth(const int depth)
+void Sigmod::Trainer::setDepth(const int depth)
{
CHECK(depth);
}
-void Pokemod::Trainer::setTeamIntel(const Intelligence teamIntel)
+void Sigmod::Trainer::setTeamIntel(const Intelligence teamIntel)
{
CHECK(teamIntel);
}
-void Pokemod::Trainer::setMoveIntel(const Intelligence moveIntel)
+void Sigmod::Trainer::setMoveIntel(const Intelligence moveIntel)
{
CHECK(moveIntel);
}
-void Pokemod::Trainer::setItemIntel(const Intelligence itemIntel)
+void Sigmod::Trainer::setItemIntel(const Intelligence itemIntel)
{
CHECK(itemIntel);
}
-void Pokemod::Trainer::setAbilityIntel(const Intelligence abilityIntel)
+void Sigmod::Trainer::setAbilityIntel(const Intelligence abilityIntel)
{
CHECK(abilityIntel);
}
-void Pokemod::Trainer::setStatIntel(const Intelligence statIntel)
+void Sigmod::Trainer::setStatIntel(const Intelligence statIntel)
{
CHECK(statIntel);
}
-QString Pokemod::Trainer::name() const
+QString Sigmod::Trainer::name() const
{
return m_name;
}
-int Pokemod::Trainer::moneyFactor() const
+int Sigmod::Trainer::moneyFactor() const
{
return m_moneyFactor;
}
-int Pokemod::Trainer::skin() const
+int Sigmod::Trainer::skin() const
{
return m_skin;
}
-int Pokemod::Trainer::depth() const
+int Sigmod::Trainer::depth() const
{
return m_depth;
}
-Pokemod::Trainer::Intelligence Pokemod::Trainer::teamIntel() const
+Sigmod::Trainer::Intelligence Sigmod::Trainer::teamIntel() const
{
return m_teamIntel;
}
-Pokemod::Trainer::Intelligence Pokemod::Trainer::moveIntel() const
+Sigmod::Trainer::Intelligence Sigmod::Trainer::moveIntel() const
{
return m_moveIntel;
}
-Pokemod::Trainer::Intelligence Pokemod::Trainer::itemIntel() const
+Sigmod::Trainer::Intelligence Sigmod::Trainer::itemIntel() const
{
return m_itemIntel;
}
-Pokemod::Trainer::Intelligence Pokemod::Trainer::abilityIntel() const
+Sigmod::Trainer::Intelligence Sigmod::Trainer::abilityIntel() const
{
return m_abilityIntel;
}
-Pokemod::Trainer::Intelligence Pokemod::Trainer::statIntel() const
+Sigmod::Trainer::Intelligence Sigmod::Trainer::statIntel() const
{
return m_statIntel;
}
-Pokemod::Trainer& Pokemod::Trainer::operator=(const Trainer& rhs)
+Sigmod::Trainer& Sigmod::Trainer::operator=(const Trainer& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Trainer.h b/sigmod/Trainer.h
index 8d4caa89..224743dd 100644
--- a/sigmod/Trainer.h
+++ b/sigmod/Trainer.h
@@ -15,21 +15,21 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_TRAINER__
-#define __POKEMOD_TRAINER__
+#ifndef __SIGMOD_TRAINER__
+#define __SIGMOD_TRAINER__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
// Qt includes
#include <QtCore/QStringList>
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Trainer : public Object
+class SIGMOD_EXPORT Trainer : public Object
{
Q_OBJECT
Q_ENUMS(Intelligence)
@@ -45,9 +45,9 @@ class POKEMOD_EXPORT Trainer : public Object
static const QStringList IntelligenceStr;
Trainer(const Trainer& trainer);
- Trainer(const Pokemod* parent, const int id);
- Trainer(const Trainer& trainer, const Pokemod* parent, const int id);
- Trainer(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Trainer(const Sigmod* parent, const int id);
+ Trainer(const Trainer& trainer, const Sigmod* parent, const int id);
+ Trainer(const QDomElement& xml, const Sigmod* parent, const int id = -1);
void validate();
@@ -87,6 +87,6 @@ class POKEMOD_EXPORT Trainer : public Object
Intelligence m_statIntel;
};
}
-Q_DECLARE_METATYPE(Pokemod::Trainer::Intelligence)
+Q_DECLARE_METATYPE(Sigmod::Trainer::Intelligence)
#endif
diff --git a/sigmod/Type.cpp b/sigmod/Type.cpp
index 2eb9202a..9be9c0ac 100644
--- a/sigmod/Type.cpp
+++ b/sigmod/Type.cpp
@@ -18,37 +18,37 @@
// Header include
#include "Type.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
-Pokemod::Type::Type(const Type& type) :
+Sigmod::Type::Type(const Type& type) :
Object(type.parent(), type.id())
{
*this = type;
}
-Pokemod::Type::Type(const Pokemod* parent, const int id) :
+Sigmod::Type::Type(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_stab(1, 1)
{
}
-Pokemod::Type::Type(const Type& type, const Pokemod* parent, const int id) :
+Sigmod::Type::Type(const Type& type, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = type;
}
-Pokemod::Type::Type(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Type::Type(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-void Pokemod::Type::validate()
+void Sigmod::Type::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -56,14 +56,14 @@ void Pokemod::Type::validate()
TEST_END();
}
-void Pokemod::Type::load(const QDomElement& xml)
+void Sigmod::Type::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
LOAD(stab);
}
-QDomElement Pokemod::Type::save() const
+QDomElement Sigmod::Type::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -71,12 +71,12 @@ QDomElement Pokemod::Type::save() const
return xml;
}
-void Pokemod::Type::setName(const QString& name)
+void Sigmod::Type::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Type::setStab(const Fraction& stab)
+void Sigmod::Type::setStab(const Fraction& stab)
{
if (stab < 1)
emit(error(bounds("stab")));
@@ -84,17 +84,17 @@ void Pokemod::Type::setStab(const Fraction& stab)
CHECK(stab);
}
-QString Pokemod::Type::name() const
+QString Sigmod::Type::name() const
{
return m_name;
}
-Pokemod::Fraction Pokemod::Type::stab() const
+Sigmod::Fraction Sigmod::Type::stab() const
{
return m_stab;
}
-Pokemod::Type& Pokemod::Type::operator=(const Type& rhs)
+Sigmod::Type& Sigmod::Type::operator=(const Type& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Type.h b/sigmod/Type.h
index 374537f6..a6c57d73 100644
--- a/sigmod/Type.h
+++ b/sigmod/Type.h
@@ -15,27 +15,27 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_TYPE__
-#define __POKEMOD_TYPE__
+#ifndef __SIGMOD_TYPE__
+#define __SIGMOD_TYPE__
-// Pokemod includes
+// Sigmod includes
#include "Fraction.h"
#include "Object.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Type : public Object
+class SIGMOD_EXPORT Type : public Object
{
Q_OBJECT
public:
Type(const Type& type);
- Type(const Pokemod* parent, const int id);
- Type(const Type& type, const Pokemod* parent, const int id);
- Type(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Type(const Sigmod* parent, const int id);
+ Type(const Type& type, const Sigmod* parent, const int id);
+ Type(const QDomElement& xml, const Sigmod* parent, const int id = -1);
void validate();
diff --git a/sigmod/Weather.cpp b/sigmod/Weather.cpp
index 05d70d1c..5f8ac537 100644
--- a/sigmod/Weather.cpp
+++ b/sigmod/Weather.cpp
@@ -18,42 +18,42 @@
// Header include
#include "Weather.h"
-// Pokemod includes
+// Sigmod includes
#include "Macros.h"
-#include "Pokemod.h"
+#include "Sigmod.h"
#include "Script.h"
-Pokemod::Weather::Weather(const Weather& weather) :
+Sigmod::Weather::Weather(const Weather& weather) :
Object(weather.parent(), weather.id())
{
*this = weather;
}
-Pokemod::Weather::Weather(const Pokemod* parent, const int id) :
+Sigmod::Weather::Weather(const Sigmod* parent, const int id) :
Object(parent, id),
m_name(""),
m_script("", "")
{
}
-Pokemod::Weather::Weather(const Weather& weather, const Pokemod* parent, const int id) :
+Sigmod::Weather::Weather(const Weather& weather, const Sigmod* parent, const int id) :
Object(parent, id)
{
*this = weather;
}
-Pokemod::Weather::Weather(const QDomElement& xml, const Pokemod* parent, const int id) :
+Sigmod::Weather::Weather(const QDomElement& xml, const Sigmod* parent, const int id) :
Object(parent, id)
{
LOAD_ID();
load(xml);
}
-Pokemod::Weather::~Weather()
+Sigmod::Weather::~Weather()
{
}
-void Pokemod::Weather::validate()
+void Sigmod::Weather::validate()
{
TEST_BEGIN();
if (m_name.isEmpty())
@@ -61,14 +61,14 @@ void Pokemod::Weather::validate()
TEST_END();
}
-void Pokemod::Weather::load(const QDomElement& xml)
+void Sigmod::Weather::load(const QDomElement& xml)
{
LOAD_BEGIN();
LOAD(name);
LOAD(script);
}
-QDomElement Pokemod::Weather::save() const
+QDomElement Sigmod::Weather::save() const
{
SAVE_CREATE();
SAVE(name);
@@ -76,27 +76,27 @@ QDomElement Pokemod::Weather::save() const
return xml;
}
-void Pokemod::Weather::setName(const QString& name)
+void Sigmod::Weather::setName(const QString& name)
{
CHECK(name);
}
-void Pokemod::Weather::setScript(const Script& script)
+void Sigmod::Weather::setScript(const Script& script)
{
CHECK(script);
}
-QString Pokemod::Weather::name() const
+QString Sigmod::Weather::name() const
{
return m_name;
}
-Pokemod::Script Pokemod::Weather::script() const
+Sigmod::Script Sigmod::Weather::script() const
{
return m_script;
}
-Pokemod::Weather& Pokemod::Weather::operator=(const Weather& rhs)
+Sigmod::Weather& Sigmod::Weather::operator=(const Weather& rhs)
{
if (this == &rhs)
return *this;
diff --git a/sigmod/Weather.h b/sigmod/Weather.h
index cd9fa874..a5a4e6b0 100644
--- a/sigmod/Weather.h
+++ b/sigmod/Weather.h
@@ -15,27 +15,27 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMOD_WEATHER__
-#define __POKEMOD_WEATHER__
+#ifndef __SIGMOD_WEATHER__
+#define __SIGMOD_WEATHER__
-// Pokemod includes
+// Sigmod includes
#include "Object.h"
#include "Script.h"
-namespace Pokemod
+namespace Sigmod
{
// Forward declarations
-class Pokemod;
+class Sigmod;
-class POKEMOD_EXPORT Weather : public Object
+class SIGMOD_EXPORT Weather : public Object
{
Q_OBJECT
public:
Weather(const Weather& weather);
- Weather(const Pokemod* parent, const int id);
- Weather(const Weather& weather, const Pokemod* parent, const int id);
- Weather(const QDomElement& xml, const Pokemod* parent, const int id = -1);
+ Weather(const Sigmod* parent, const int id);
+ Weather(const Weather& weather, const Sigmod* parent, const int id);
+ Weather(const QDomElement& xml, const Sigmod* parent, const int id = -1);
~Weather();
void validate();
diff --git a/sigmodr/AbilityUI.cpp b/sigmodr/AbilityUI.cpp
index 88014b44..76a58089 100644
--- a/sigmodr/AbilityUI.cpp
+++ b/sigmodr/AbilityUI.cpp
@@ -18,65 +18,65 @@
// Header include
#include "AbilityUI.h"
-// Pokemod includes
-#include "../pokemod/Ability.h"
+// Sigmod includes
+#include "../sigmod/Ability.h"
-Pokemodr::AbilityUI::AbilityUI(Pokemod::Ability* ability, QWidget* parent) :
+Sigmodr::AbilityUI::AbilityUI(Sigmod::Ability* ability, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(ability, new Pokemod::Ability(*ability));
+ setObjects(ability, new Sigmod::Ability(*ability));
}
-Pokemodr::AbilityUI::~AbilityUI()
+Sigmodr::AbilityUI::~AbilityUI()
{
}
-void Pokemodr::AbilityUI::setGui()
+void Sigmodr::AbilityUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Ability*>(modified())->name());
- varPriority->setValue(qobject_cast<Pokemod::Ability*>(modified())->priority());
- varDescription->setText(qobject_cast<Pokemod::Ability*>(modified())->description());
- varBattleScript->setValue(qobject_cast<Pokemod::Ability*>(modified())->battleScript());
- varWorldScript->setValue(qobject_cast<Pokemod::Ability*>(modified())->worldScript());
+ varName->setText(qobject_cast<Sigmod::Ability*>(modified())->name());
+ varPriority->setValue(qobject_cast<Sigmod::Ability*>(modified())->priority());
+ varDescription->setText(qobject_cast<Sigmod::Ability*>(modified())->description());
+ varBattleScript->setValue(qobject_cast<Sigmod::Ability*>(modified())->battleScript());
+ varWorldScript->setValue(qobject_cast<Sigmod::Ability*>(modified())->worldScript());
}
-void Pokemodr::AbilityUI::apply()
+void Sigmodr::AbilityUI::apply()
{
- *qobject_cast<Pokemod::Ability*>(original()) = *qobject_cast<Pokemod::Ability*>(modified());
+ *qobject_cast<Sigmod::Ability*>(original()) = *qobject_cast<Sigmod::Ability*>(modified());
emit(changed(false));
}
-void Pokemodr::AbilityUI::discard()
+void Sigmodr::AbilityUI::discard()
{
- *qobject_cast<Pokemod::Ability*>(modified()) = *qobject_cast<Pokemod::Ability*>(original());
+ *qobject_cast<Sigmod::Ability*>(modified()) = *qobject_cast<Sigmod::Ability*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::AbilityUI::on_varName_textChanged(const QString& name)
+void Sigmodr::AbilityUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Ability*>(modified())->setName(name);
+ qobject_cast<Sigmod::Ability*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::AbilityUI::on_varPriority_valueChanged(const int priority)
+void Sigmodr::AbilityUI::on_varPriority_valueChanged(const int priority)
{
- qobject_cast<Pokemod::Ability*>(modified())->setPriority(priority);
+ qobject_cast<Sigmod::Ability*>(modified())->setPriority(priority);
}
-void Pokemodr::AbilityUI::on_varDescription_textChanged(const QString& description)
+void Sigmodr::AbilityUI::on_varDescription_textChanged(const QString& description)
{
- qobject_cast<Pokemod::Ability*>(modified())->setDescription(description);
+ qobject_cast<Sigmod::Ability*>(modified())->setDescription(description);
}
-void Pokemodr::AbilityUI::on_varBattleScript_valueChanged(const Pokemod::Script& battleScript)
+void Sigmodr::AbilityUI::on_varBattleScript_valueChanged(const Sigmod::Script& battleScript)
{
- qobject_cast<Pokemod::Ability*>(modified())->setBattleScript(battleScript);
+ qobject_cast<Sigmod::Ability*>(modified())->setBattleScript(battleScript);
}
-void Pokemodr::AbilityUI::on_varWorldScript_valueChanged(const Pokemod::Script& worldScript)
+void Sigmodr::AbilityUI::on_varWorldScript_valueChanged(const Sigmod::Script& worldScript)
{
- qobject_cast<Pokemod::Ability*>(modified())->setWorldScript(worldScript);
+ qobject_cast<Sigmod::Ability*>(modified())->setWorldScript(worldScript);
}
diff --git a/sigmodr/AbilityUI.h b/sigmodr/AbilityUI.h
index a58e26be..d362d043 100644
--- a/sigmodr/AbilityUI.h
+++ b/sigmodr/AbilityUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_ABILITYUI__
-#define __POKEMODR_ABILITYUI__
+#ifndef __SIGMODR_ABILITYUI__
+#define __SIGMODR_ABILITYUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_ability.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Ability;
}
-namespace Pokemodr
+namespace Sigmodr
{
class AbilityUI : public ObjectUI, private Ui::formAbility
{
Q_OBJECT
public:
- AbilityUI(Pokemod::Ability* ability, QWidget* parent);
+ AbilityUI(Sigmod::Ability* ability, QWidget* parent);
~AbilityUI();
public slots:
void apply();
@@ -46,8 +46,8 @@ class AbilityUI : public ObjectUI, private Ui::formAbility
void on_varName_textChanged(const QString& name);
void on_varPriority_valueChanged(const int priority);
void on_varDescription_textChanged(const QString& description);
- void on_varBattleScript_valueChanged(const Pokemod::Script& battleScript);
- void on_varWorldScript_valueChanged(const Pokemod::Script& worldScript);
+ void on_varBattleScript_valueChanged(const Sigmod::Script& battleScript);
+ void on_varWorldScript_valueChanged(const Sigmod::Script& worldScript);
private slots:
void setGui();
};
diff --git a/sigmodr/AuthorUI.cpp b/sigmodr/AuthorUI.cpp
index 4eb89566..f551b6fc 100644
--- a/sigmodr/AuthorUI.cpp
+++ b/sigmodr/AuthorUI.cpp
@@ -18,57 +18,57 @@
// Header include
#include "AuthorUI.h"
-// Pokemod includes
-#include "../pokemod/Author.h"
+// Sigmod includes
+#include "../sigmod/Author.h"
-Pokemodr::AuthorUI::AuthorUI(Pokemod::Author* author, QWidget* parent) :
+Sigmodr::AuthorUI::AuthorUI(Sigmod::Author* author, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(author, new Pokemod::Author(*author));
+ setObjects(author, new Sigmod::Author(*author));
}
-Pokemodr::AuthorUI::~AuthorUI()
+Sigmodr::AuthorUI::~AuthorUI()
{
}
-void Pokemodr::AuthorUI::setGui()
+void Sigmodr::AuthorUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Author*>(modified())->name());
- varEmail->setText(qobject_cast<Pokemod::Author*>(modified())->email());
- varRole->setText(qobject_cast<Pokemod::Author*>(modified())->role());
+ varName->setText(qobject_cast<Sigmod::Author*>(modified())->name());
+ varEmail->setText(qobject_cast<Sigmod::Author*>(modified())->email());
+ varRole->setText(qobject_cast<Sigmod::Author*>(modified())->role());
}
-void Pokemodr::AuthorUI::apply()
+void Sigmodr::AuthorUI::apply()
{
- *qobject_cast<Pokemod::Author*>(original()) = *qobject_cast<Pokemod::Author*>(modified());
+ *qobject_cast<Sigmod::Author*>(original()) = *qobject_cast<Sigmod::Author*>(modified());
emit(changed(false));
}
-void Pokemodr::AuthorUI::discard()
+void Sigmodr::AuthorUI::discard()
{
- *qobject_cast<Pokemod::Author*>(modified()) = *qobject_cast<Pokemod::Author*>(original());
+ *qobject_cast<Sigmod::Author*>(modified()) = *qobject_cast<Sigmod::Author*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::AuthorUI::on_varName_textChanged(const QString& name)
+void Sigmodr::AuthorUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Author*>(modified())->setName(name);
+ qobject_cast<Sigmod::Author*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::AuthorUI::on_varEmail_textChanged(const QString& email)
+void Sigmodr::AuthorUI::on_varEmail_textChanged(const QString& email)
{
const int cursor = varEmail->cursorPosition();
- qobject_cast<Pokemod::Author*>(modified())->setEmail(email);
+ qobject_cast<Sigmod::Author*>(modified())->setEmail(email);
varEmail->setCursorPosition(cursor);
}
-void Pokemodr::AuthorUI::on_varRole_textChanged(const QString& role)
+void Sigmodr::AuthorUI::on_varRole_textChanged(const QString& role)
{
const int cursor = varRole->cursorPosition();
- qobject_cast<Pokemod::Author*>(modified())->setRole(role);
+ qobject_cast<Sigmod::Author*>(modified())->setRole(role);
varRole->setCursorPosition(cursor);
}
diff --git a/sigmodr/AuthorUI.h b/sigmodr/AuthorUI.h
index 90b95295..c64fd477 100644
--- a/sigmodr/AuthorUI.h
+++ b/sigmodr/AuthorUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_AUTHORUI__
-#define __POKEMODR_AUTHORUI__
+#ifndef __SIGMODR_AUTHORUI__
+#define __SIGMODR_AUTHORUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_author.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Author;
}
-namespace Pokemodr
+namespace Sigmodr
{
class AuthorUI : public ObjectUI, private Ui::formAuthor
{
Q_OBJECT
public:
- AuthorUI(Pokemod::Author* author, QWidget* parent);
+ AuthorUI(Sigmod::Author* author, QWidget* parent);
~AuthorUI();
public slots:
void apply();
diff --git a/sigmodr/BadgeUI.cpp b/sigmodr/BadgeUI.cpp
index af7e033b..e6c02d04 100644
--- a/sigmodr/BadgeUI.cpp
+++ b/sigmodr/BadgeUI.cpp
@@ -18,101 +18,101 @@
// Header include
#include "BadgeUI.h"
-// Pokemod includes
-#include "../pokemod/Badge.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Rules.h"
-#include "../pokemod/Sprite.h"
+// Sigmod includes
+#include "../sigmod/Badge.h"
+#include "../sigmod/Rules.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Sprite.h"
-Pokemodr::BadgeUI::BadgeUI(Pokemod::Badge* badge, QWidget* parent) :
+Sigmodr::BadgeUI::BadgeUI(Sigmod::Badge* badge, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(badge, new Pokemod::Badge(*badge));
+ setObjects(badge, new Sigmod::Badge(*badge));
}
-Pokemodr::BadgeUI::~BadgeUI()
+Sigmodr::BadgeUI::~BadgeUI()
{
}
-void Pokemodr::BadgeUI::initGui()
+void Sigmodr::BadgeUI::initGui()
{
connect(varStat, SIGNAL(activated(const int)), this, SLOT(setGui()));
}
-void Pokemodr::BadgeUI::refreshGui()
+void Sigmodr::BadgeUI::refreshGui()
{
- varObey->setMaximum(pokemod()->rules()->maxLevel());
+ varObey->setMaximum(sigmod()->rules()->maxLevel());
varFace->clear();
varBadge->clear();
- for (int i = 0; i < pokemod()->spriteCount(); ++i)
+ for (int i = 0; i < sigmod()->spriteCount(); ++i)
{
- const Pokemod::Sprite* sprite = pokemod()->sprite(i);
+ const Sigmod::Sprite* sprite = sigmod()->sprite(i);
varFace->addItem(QPixmap::fromImage(sprite->sprite()), sprite->name(), sprite->id());
varBadge->addItem(QPixmap::fromImage(sprite->sprite()), sprite->name(), sprite->id());
}
varStat->clear();
- const bool isSplit = pokemod()->rules()->specialSplit();
- const QStringList& statNames = (isSplit ? Pokemod::StatGSCStr : Pokemod::StatRBYStr);
- varStat->addItem(statNames[Pokemod::ST_Attack], QVariant::fromValue(Pokemod::ST_Attack));
- varStat->addItem(statNames[Pokemod::ST_Defense], QVariant::fromValue(Pokemod::ST_Defense));
- varStat->addItem(statNames[Pokemod::ST_Speed], QVariant::fromValue(Pokemod::ST_Speed));
+ const bool isSplit = sigmod()->rules()->specialSplit();
+ const QStringList& statNames = (isSplit ? Sigmod::StatGSCStr : Sigmod::StatRBYStr);
+ varStat->addItem(statNames[Sigmod::ST_Attack], QVariant::fromValue(Sigmod::ST_Attack));
+ varStat->addItem(statNames[Sigmod::ST_Defense], QVariant::fromValue(Sigmod::ST_Defense));
+ varStat->addItem(statNames[Sigmod::ST_Speed], QVariant::fromValue(Sigmod::ST_Speed));
if (isSplit)
{
- varStat->addItem(statNames[Pokemod::ST_SpecialAttack], QVariant::fromValue(Pokemod::ST_SpecialAttack));
- varStat->addItem(statNames[Pokemod::ST_SpecialDefense], QVariant::fromValue(Pokemod::ST_SpecialDefense));
+ varStat->addItem(statNames[Sigmod::ST_SpecialAttack], QVariant::fromValue(Sigmod::ST_SpecialAttack));
+ varStat->addItem(statNames[Sigmod::ST_SpecialDefense], QVariant::fromValue(Sigmod::ST_SpecialDefense));
}
else
- varStat->addItem(statNames[Pokemod::ST_Special], QVariant::fromValue(Pokemod::ST_Special));
+ varStat->addItem(statNames[Sigmod::ST_Special], QVariant::fromValue(Sigmod::ST_Special));
}
-void Pokemodr::BadgeUI::setGui()
+void Sigmodr::BadgeUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Badge*>(modified())->name());
- varObey->setValue(qobject_cast<Pokemod::Badge*>(modified())->obey());
- varFace->setCurrentIndex(varFace->findData(qobject_cast<Pokemod::Badge*>(modified())->face()));
- varBadge->setCurrentIndex(varBadge->findData(qobject_cast<Pokemod::Badge*>(modified())->badge()));
- Pokemod::Stat stat = varStat->itemData(varStat->currentIndex()).value<Pokemod::Stat>();
- Pokemod::Fraction multiplier = qobject_cast<Pokemod::Badge*>(modified())->stat(stat);
- varStatMultiplier->setValue(qobject_cast<Pokemod::Badge*>(modified())->stat(varStat->itemData(varStat->currentIndex()).value<Pokemod::Stat>()));
+ varName->setText(qobject_cast<Sigmod::Badge*>(modified())->name());
+ varObey->setValue(qobject_cast<Sigmod::Badge*>(modified())->obey());
+ varFace->setCurrentIndex(varFace->findData(qobject_cast<Sigmod::Badge*>(modified())->face()));
+ varBadge->setCurrentIndex(varBadge->findData(qobject_cast<Sigmod::Badge*>(modified())->badge()));
+ Sigmod::Stat stat = varStat->itemData(varStat->currentIndex()).value<Sigmod::Stat>();
+ Sigmod::Fraction multiplier = qobject_cast<Sigmod::Badge*>(modified())->stat(stat);
+ varStatMultiplier->setValue(qobject_cast<Sigmod::Badge*>(modified())->stat(varStat->itemData(varStat->currentIndex()).value<Sigmod::Stat>()));
}
-void Pokemodr::BadgeUI::apply()
+void Sigmodr::BadgeUI::apply()
{
- *qobject_cast<Pokemod::Badge*>(original()) = *qobject_cast<Pokemod::Badge*>(modified());
+ *qobject_cast<Sigmod::Badge*>(original()) = *qobject_cast<Sigmod::Badge*>(modified());
emit(changed(false));
}
-void Pokemodr::BadgeUI::discard()
+void Sigmodr::BadgeUI::discard()
{
- *qobject_cast<Pokemod::Badge*>(modified()) = *qobject_cast<Pokemod::Badge*>(original());
+ *qobject_cast<Sigmod::Badge*>(modified()) = *qobject_cast<Sigmod::Badge*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::BadgeUI::on_varName_textChanged(const QString& name)
+void Sigmodr::BadgeUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Badge*>(modified())->setName(name);
+ qobject_cast<Sigmod::Badge*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::BadgeUI::on_varObey_valueChanged(const int obey)
+void Sigmodr::BadgeUI::on_varObey_valueChanged(const int obey)
{
- qobject_cast<Pokemod::Badge*>(modified())->setObey(obey);
+ qobject_cast<Sigmod::Badge*>(modified())->setObey(obey);
}
-void Pokemodr::BadgeUI::on_varFace_currentIndexChanged(const int face)
+void Sigmodr::BadgeUI::on_varFace_currentIndexChanged(const int face)
{
- qobject_cast<Pokemod::Badge*>(modified())->setFace(varFace->itemData(face).toInt());
+ qobject_cast<Sigmod::Badge*>(modified())->setFace(varFace->itemData(face).toInt());
}
-void Pokemodr::BadgeUI::on_varBadge_currentIndexChanged(const int badge)
+void Sigmodr::BadgeUI::on_varBadge_currentIndexChanged(const int badge)
{
- qobject_cast<Pokemod::Badge*>(modified())->setBadge(varFace->itemData(badge).toInt());
+ qobject_cast<Sigmod::Badge*>(modified())->setBadge(varFace->itemData(badge).toInt());
}
-void Pokemodr::BadgeUI::on_varStatMultiplier_valueChanged(const Pokemod::Fraction& multiplier)
+void Sigmodr::BadgeUI::on_varStatMultiplier_valueChanged(const Sigmod::Fraction& multiplier)
{
- qobject_cast<Pokemod::Badge*>(modified())->setStat(varStat->itemData(varStat->currentIndex()).value<Pokemod::Stat>(), multiplier);
+ qobject_cast<Sigmod::Badge*>(modified())->setStat(varStat->itemData(varStat->currentIndex()).value<Sigmod::Stat>(), multiplier);
}
diff --git a/sigmodr/BadgeUI.h b/sigmodr/BadgeUI.h
index de2c06dd..64d60b96 100644
--- a/sigmodr/BadgeUI.h
+++ b/sigmodr/BadgeUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_BADGEUI__
-#define __POKEMODR_BADGEUI__
+#ifndef __SIGMODR_BADGEUI__
+#define __SIGMODR_BADGEUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_badge.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Badge;
}
-namespace Pokemodr
+namespace Sigmodr
{
class BadgeUI : public ObjectUI, private Ui::formBadge
{
Q_OBJECT
public:
- BadgeUI(Pokemod::Badge* badge, QWidget* parent);
+ BadgeUI(Sigmod::Badge* badge, QWidget* parent);
~BadgeUI();
public slots:
void apply();
@@ -47,7 +47,7 @@ class BadgeUI : public ObjectUI, private Ui::formBadge
void on_varObey_valueChanged(const int obey);
void on_varFace_currentIndexChanged(const int face);
void on_varBadge_currentIndexChanged(const int badge);
- void on_varStatMultiplier_valueChanged(const Pokemod::Fraction& multiplier);
+ void on_varStatMultiplier_valueChanged(const Sigmod::Fraction& multiplier);
private slots:
void initGui();
void refreshGui();
diff --git a/sigmodr/CMakeLists.txt b/sigmodr/CMakeLists.txt
index fdc6f2e3..d85142c2 100644
--- a/sigmodr/CMakeLists.txt
+++ b/sigmodr/CMakeLists.txt
@@ -1,4 +1,4 @@
-PROJECT(pokemodr)
+PROJECT(sigmodr)
IF(NOT BUILT_FROM_ROOT)
MESSAGE(FATAL_ERROR "Not built from source root")
@@ -11,11 +11,11 @@ INCLUDE_DIRECTORIES(
INCLUDE(../latex.cmake)
-SET(pokemodr_RESOURCES
+SET(sigmodr_RESOURCES
overlays/overlays.qrc
)
-QT4_ADD_RESOURCES(pokemodr_RESOURCE_SRCS ${pokemodr_RESOURCES})
-SET(pokemodr_FORMS
+QT4_ADD_RESOURCES(sigmodr_RESOURCE_SRCS ${sigmodr_RESOURCES})
+SET(sigmodr_FORMS
gui/ability.ui
gui/author.ui
gui/badge.ui
@@ -36,10 +36,10 @@ SET(pokemodr_FORMS
gui/move.ui
gui/nature.ui
gui/point.ui
- gui/pokemod.ui
- gui/pokemodr.ui
gui/rules.ui
gui/script.ui
+ gui/sigmod.ui
+ gui/sigmodr.ui
gui/skin.ui
gui/sound.ui
gui/species.ui
@@ -55,8 +55,8 @@ SET(pokemodr_FORMS
gui/type.ui
gui/weather.ui
)
-QT4_WRAP_UI(pokemodr_UI_HEADERS ${pokemodr_FORMS})
-SET(pokemodr_WIDGET_HEADERS
+QT4_WRAP_UI(sigmodr_UI_HEADERS ${sigmodr_FORMS})
+SET(sigmodr_WIDGET_HEADERS
AbilityUI.h
AuthorUI.h
BadgeUI.h
@@ -76,8 +76,8 @@ SET(pokemodr_WIDGET_HEADERS
MoveUI.h
NatureUI.h
ObjectUI.h
- PokemodUI.h
RulesUI.h
+ SigmodUI.h
SkinUI.h
SoundUI.h
SpeciesUI.h
@@ -93,7 +93,7 @@ SET(pokemodr_WIDGET_HEADERS
TypeUI.h
WeatherUI.h
)
-SET(pokemodr_MODEL_HEADERS
+SET(sigmodr_MODEL_HEADERS
models/AbilityGroupModel.h
models/AbilityModel.h
models/AuthorGroupModel.h
@@ -132,9 +132,9 @@ SET(pokemodr_MODEL_HEADERS
models/NatureGroupModel.h
models/NatureModel.h
models/ObjectModel.h
- models/PokemodModel.h
models/RootModel.h
models/RulesModel.h
+ models/SigmodModel.h
models/SkinGroupModel.h
models/SkinModel.h
models/SoundGroupModel.h
@@ -164,34 +164,34 @@ SET(pokemodr_MODEL_HEADERS
models/WeatherGroupModel.h
models/WeatherModel.h
)
-SET(pokemodr_MAIN_HEADERS
+SET(sigmodr_MAIN_HEADERS
FractionWidget.h
PointWidget.h
- PokemodTree.h
- PokemodTreeModel.h
- PokemodrPreferences.h
- PokemodrUI.h
ScriptWidget.h
+ SigmodTree.h
+ SigmodTreeModel.h
+ SigmodrPreferences.h
+ SigmodrUI.h
TilemapModel.h
TypechartModel.h
ValidationDialog.h
)
-SET(pokemodr_MOC_HEADERS
- ${pokemodr_MAIN_HEADERS}
- ${pokemodr_WIDGET_HEADERS}
- ${pokemodr_MODEL_HEADERS}
+SET(sigmodr_MOC_HEADERS
+ ${sigmodr_MAIN_HEADERS}
+ ${sigmodr_WIDGET_HEADERS}
+ ${sigmodr_MODEL_HEADERS}
)
-QT4_WRAP_CPP(pokemodr_MOC_SRCS ${pokemodr_MOC_HEADERS})
-SET(pokemodr_HEADERS
- ${pokemodr_WIDGET_HEADERS}
- ${pokemodr_MODEL_HEADERS}
+QT4_WRAP_CPP(sigmodr_MOC_SRCS ${sigmodr_MOC_HEADERS})
+SET(sigmodr_HEADERS
+ ${sigmodr_WIDGET_HEADERS}
+ ${sigmodr_MODEL_HEADERS}
)
-SET(pokemodr_DEVEL
- ${pokemodr_MAIN_HEADERS}
- ${pokemodr_UI_HEADERS}
- ${pokemodr_FORMS}
+SET(sigmodr_DEVEL
+ ${sigmodr_MAIN_HEADERS}
+ ${sigmodr_UI_HEADERS}
+ ${sigmodr_FORMS}
)
-SET(pokemodr_WIDGET_SRCS
+SET(sigmodr_WIDGET_SRCS
AbilityUI.cpp
AuthorUI.cpp
BadgeUI.cpp
@@ -211,8 +211,8 @@ SET(pokemodr_WIDGET_SRCS
MoveUI.cpp
NatureUI.cpp
ObjectUI.cpp
- PokemodUI.cpp
RulesUI.cpp
+ SigmodUI.cpp
SkinUI.cpp
SoundUI.cpp
SpeciesUI.cpp
@@ -228,7 +228,7 @@ SET(pokemodr_WIDGET_SRCS
TypeUI.cpp
WeatherUI.cpp
)
-SET(pokemodr_MODEL_SRCS
+SET(sigmodr_MODEL_SRCS
models/AbilityGroupModel.cpp
models/AbilityModel.cpp
models/AuthorGroupModel.cpp
@@ -267,9 +267,9 @@ SET(pokemodr_MODEL_SRCS
models/NatureGroupModel.cpp
models/NatureModel.cpp
models/ObjectModel.cpp
- models/PokemodModel.cpp
models/RootModel.cpp
models/RulesModel.cpp
+ models/SigmodModel.cpp
models/SkinGroupModel.cpp
models/SkinModel.cpp
models/SoundGroupModel.cpp
@@ -299,34 +299,34 @@ SET(pokemodr_MODEL_SRCS
models/WeatherGroupModel.cpp
models/WeatherModel.cpp
)
-SET(pokemodr_SRCS
+SET(sigmodr_SRCS
FractionWidget.cpp
PointWidget.cpp
- PokemodTree.cpp
- PokemodTreeModel.cpp
- Pokemodr.cpp
- PokemodrPreferences.cpp
- PokemodrUI.cpp
ScriptWidget.cpp
+ SigmodTree.cpp
+ SigmodTreeModel.cpp
+ Sigmodr.cpp
+ SigmodrPreferences.cpp
+ SigmodrUI.cpp
ValidationDialog.cpp
- ${pokemodr_WIDGET_SRCS}
- ${pokemodr_MODEL_SRCS}
+ ${sigmodr_WIDGET_SRCS}
+ ${sigmodr_MODEL_SRCS}
)
-SET(pokemodr_RC_FILES
- pokemodrui.rc
+SET(sigmodr_RC_FILES
+ sigmodrui.rc
)
-ADD_EXECUTABLE(pokemodr
- ${pokemodr_SRCS}
- ${pokemodr_MOC_SRCS}
- ${pokemodr_RESOURCE_SRCS}
- ${pokemodr_UI_HEADERS}
+ADD_EXECUTABLE(sigmodr
+ ${sigmodr_SRCS}
+ ${sigmodr_MOC_SRCS}
+ ${sigmodr_RESOURCE_SRCS}
+ ${sigmodr_UI_HEADERS}
)
-SET_TARGET_PROPERTIES(pokemodr
+SET_TARGET_PROPERTIES(sigmodr
PROPERTIES
LINK_INTERFACE_LIBRARIES ""
)
-TARGET_LINK_LIBRARIES(pokemodr
+TARGET_LINK_LIBRARIES(sigmodr
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTXML_LIBRARY}
@@ -337,29 +337,29 @@ TARGET_LINK_LIBRARIES(pokemodr
${KDE4_KFILE_LIBRARY}
${KDE4_KTEXTEDITOR_LIBRARY}
${KDE4_KNEWSTUFF2_LIBRARY}
- pokemod
+ sigmod
)
INSTALL(
- TARGETS pokemodr
+ TARGETS sigmodr
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
COMPONENT runtime
)
INSTALL(
- FILES ${pokemodr_RC_FILES}
- DESTINATION ${DATA_INSTALL_DIR}/pokemodr
+ FILES ${sigmodr_RC_FILES}
+ DESTINATION ${DATA_INSTALL_DIR}/sigmodr
COMPONENT runtime
)
INSTALL(
- FILES ${pokemodr_DEVEL}
+ FILES ${sigmodr_DEVEL}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${CMAKE_PROJECT_NAME}/${PROJECT_NAME}
COMPONENT development
)
INSTALL(
- FILES ${pokemodr_MODEL_HEADERS}
+ FILES ${sigmodr_MODEL_HEADERS}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${CMAKE_PROJECT_NAME}/${PROJECT_NAME}/models
COMPONENT development
)
diff --git a/sigmodr/CoinListObjectUI.cpp b/sigmodr/CoinListObjectUI.cpp
index 81c57041..67fb8e02 100644
--- a/sigmodr/CoinListObjectUI.cpp
+++ b/sigmodr/CoinListObjectUI.cpp
@@ -18,92 +18,92 @@
// Header include
#include "CoinListObjectUI.h"
-// Pokemod includes
-#include "../pokemod/CoinListObject.h"
-#include "../pokemod/Item.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Species.h"
+// Sigmod includes
+#include "../sigmod/CoinListObject.h"
+#include "../sigmod/Item.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Species.h"
-Pokemodr::CoinListObjectUI::CoinListObjectUI(Pokemod::CoinListObject* object, QWidget* parent) :
+Sigmodr::CoinListObjectUI::CoinListObjectUI(Sigmod::CoinListObject* object, QWidget* parent) :
ObjectUI(parent),
m_lastType(-1)
{
setupUi(this);
- setObjects(object, new Pokemod::CoinListObject(*object));
+ setObjects(object, new Sigmod::CoinListObject(*object));
}
-Pokemodr::CoinListObjectUI::~CoinListObjectUI()
+Sigmodr::CoinListObjectUI::~CoinListObjectUI()
{
}
-void Pokemodr::CoinListObjectUI::initGui()
+void Sigmodr::CoinListObjectUI::initGui()
{
connect(varType, SIGNAL(activated(const int)), this, SLOT(setGui()));
- varType->addItem(Pokemod::CoinListObject::TypeStr[Pokemod::CoinListObject::Item], QVariant::fromValue(Pokemod::CoinListObject::Item));
- varType->addItem(Pokemod::CoinListObject::TypeStr[Pokemod::CoinListObject::Species], QVariant::fromValue(Pokemod::CoinListObject::Species));
+ varType->addItem(Sigmod::CoinListObject::TypeStr[Sigmod::CoinListObject::Item], QVariant::fromValue(Sigmod::CoinListObject::Item));
+ varType->addItem(Sigmod::CoinListObject::TypeStr[Sigmod::CoinListObject::Species], QVariant::fromValue(Sigmod::CoinListObject::Species));
}
-void Pokemodr::CoinListObjectUI::setGui()
+void Sigmodr::CoinListObjectUI::setGui()
{
- bool resetObjects = (qobject_cast<Pokemod::CoinListObject*>(modified())->type() != m_lastType);
- varType->setCurrentIndex(qobject_cast<Pokemod::CoinListObject*>(modified())->type());
- m_lastType = qobject_cast<Pokemod::CoinListObject*>(modified())->type();
+ bool resetObjects = (qobject_cast<Sigmod::CoinListObject*>(modified())->type() != m_lastType);
+ varType->setCurrentIndex(qobject_cast<Sigmod::CoinListObject*>(modified())->type());
+ m_lastType = qobject_cast<Sigmod::CoinListObject*>(modified())->type();
if (resetObjects)
{
varObject->clear();
- if (qobject_cast<Pokemod::CoinListObject*>(modified())->type() == Pokemod::CoinListObject::Item)
+ if (qobject_cast<Sigmod::CoinListObject*>(modified())->type() == Sigmod::CoinListObject::Item)
{
- for (int i = 0; i < pokemod()->itemCount(); ++i)
+ for (int i = 0; i < sigmod()->itemCount(); ++i)
{
- const Pokemod::Item* item = pokemod()->item(i);
+ const Sigmod::Item* item = sigmod()->item(i);
varObject->addItem(item->name(), item->id());
}
varAmount->setMaximum(INT_MAX);
}
else
{
- for (int i = 0; i < pokemod()->speciesCount(); ++i)
+ for (int i = 0; i < sigmod()->speciesCount(); ++i)
{
- const Pokemod::Species* species = pokemod()->species(i);
+ const Sigmod::Species* species = sigmod()->species(i);
varObject->addItem(species->name(), species->id());
}
varAmount->setMaximum(1);
}
}
- varObject->setCurrentIndex(varObject->findData(qobject_cast<Pokemod::CoinListObject*>(modified())->object()));
- varAmount->setValue(qobject_cast<Pokemod::CoinListObject*>(modified())->amount());
- varCost->setValue(qobject_cast<Pokemod::CoinListObject*>(modified())->cost());
+ varObject->setCurrentIndex(varObject->findData(qobject_cast<Sigmod::CoinListObject*>(modified())->object()));
+ varAmount->setValue(qobject_cast<Sigmod::CoinListObject*>(modified())->amount());
+ varCost->setValue(qobject_cast<Sigmod::CoinListObject*>(modified())->cost());
}
-void Pokemodr::CoinListObjectUI::apply()
+void Sigmodr::CoinListObjectUI::apply()
{
- *qobject_cast<Pokemod::CoinListObject*>(original()) = *qobject_cast<Pokemod::CoinListObject*>(modified());
+ *qobject_cast<Sigmod::CoinListObject*>(original()) = *qobject_cast<Sigmod::CoinListObject*>(modified());
emit(changed(false));
}
-void Pokemodr::CoinListObjectUI::discard()
+void Sigmodr::CoinListObjectUI::discard()
{
- *qobject_cast<Pokemod::CoinListObject*>(modified()) = *qobject_cast<Pokemod::CoinListObject*>(original());
+ *qobject_cast<Sigmod::CoinListObject*>(modified()) = *qobject_cast<Sigmod::CoinListObject*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::CoinListObjectUI::on_varType_activated(const int type)
+void Sigmodr::CoinListObjectUI::on_varType_activated(const int type)
{
- qobject_cast<Pokemod::CoinListObject*>(modified())->setType(varType->itemData(type).value<Pokemod::CoinListObject::Type>());
+ qobject_cast<Sigmod::CoinListObject*>(modified())->setType(varType->itemData(type).value<Sigmod::CoinListObject::Type>());
}
-void Pokemodr::CoinListObjectUI::on_varObject_activated(const int obey)
+void Sigmodr::CoinListObjectUI::on_varObject_activated(const int obey)
{
- qobject_cast<Pokemod::CoinListObject*>(modified())->setObject(varObject->itemData(obey).toInt());
+ qobject_cast<Sigmod::CoinListObject*>(modified())->setObject(varObject->itemData(obey).toInt());
}
-void Pokemodr::CoinListObjectUI::on_varAmount_valueChanged(const int amount)
+void Sigmodr::CoinListObjectUI::on_varAmount_valueChanged(const int amount)
{
- qobject_cast<Pokemod::CoinListObject*>(modified())->setAmount(amount);
+ qobject_cast<Sigmod::CoinListObject*>(modified())->setAmount(amount);
}
-void Pokemodr::CoinListObjectUI::on_varCost_valueChanged(const int cost)
+void Sigmodr::CoinListObjectUI::on_varCost_valueChanged(const int cost)
{
- qobject_cast<Pokemod::CoinListObject*>(modified())->setCost(cost);
+ qobject_cast<Sigmod::CoinListObject*>(modified())->setCost(cost);
}
diff --git a/sigmodr/CoinListObjectUI.h b/sigmodr/CoinListObjectUI.h
index d71f465a..2031cbbe 100644
--- a/sigmodr/CoinListObjectUI.h
+++ b/sigmodr/CoinListObjectUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_COINLISTOBJECTUI__
-#define __POKEMODR_COINLISTOBJECTUI__
+#ifndef __SIGMODR_COINLISTOBJECTUI__
+#define __SIGMODR_COINLISTOBJECTUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_coinlistobject.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class CoinListObject;
}
-namespace Pokemodr
+namespace Sigmodr
{
class CoinListObjectUI : public ObjectUI, private Ui::formCoinListObject
{
Q_OBJECT
public:
- CoinListObjectUI(Pokemod::CoinListObject* object, QWidget* parent);
+ CoinListObjectUI(Sigmod::CoinListObject* object, QWidget* parent);
~CoinListObjectUI();
public slots:
void apply();
diff --git a/sigmodr/CoinListUI.cpp b/sigmodr/CoinListUI.cpp
index 0cd7c6b3..61fb31df 100644
--- a/sigmodr/CoinListUI.cpp
+++ b/sigmodr/CoinListUI.cpp
@@ -18,48 +18,48 @@
// Header include
#include "CoinListUI.h"
-// Pokemod includes
-#include "../pokemod/CoinList.h"
-#include "../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../sigmod/CoinList.h"
+#include "../sigmod/Sigmod.h"
-Pokemodr::CoinListUI::CoinListUI(Pokemod::CoinList* coinList, QWidget* parent) :
+Sigmodr::CoinListUI::CoinListUI(Sigmod::CoinList* coinList, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(coinList, new Pokemod::CoinList(*coinList));
+ setObjects(coinList, new Sigmod::CoinList(*coinList));
}
-Pokemodr::CoinListUI::~CoinListUI()
+Sigmodr::CoinListUI::~CoinListUI()
{
}
-void Pokemodr::CoinListUI::setGui()
+void Sigmodr::CoinListUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::CoinList*>(modified())->name());
- varScript->setValue(qobject_cast<Pokemod::CoinList*>(modified())->script());
+ varName->setText(qobject_cast<Sigmod::CoinList*>(modified())->name());
+ varScript->setValue(qobject_cast<Sigmod::CoinList*>(modified())->script());
}
-void Pokemodr::CoinListUI::apply()
+void Sigmodr::CoinListUI::apply()
{
- *qobject_cast<Pokemod::CoinList*>(original()) = *qobject_cast<Pokemod::CoinList*>(modified());
+ *qobject_cast<Sigmod::CoinList*>(original()) = *qobject_cast<Sigmod::CoinList*>(modified());
emit(changed(false));
}
-void Pokemodr::CoinListUI::discard()
+void Sigmodr::CoinListUI::discard()
{
- *qobject_cast<Pokemod::CoinList*>(modified()) = *qobject_cast<Pokemod::CoinList*>(original());
+ *qobject_cast<Sigmod::CoinList*>(modified()) = *qobject_cast<Sigmod::CoinList*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::CoinListUI::on_varName_textChanged(const QString& name)
+void Sigmodr::CoinListUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::CoinList*>(modified())->setName(name);
+ qobject_cast<Sigmod::CoinList*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::CoinListUI::on_varScript_valueChanged(const Pokemod::Script& script)
+void Sigmodr::CoinListUI::on_varScript_valueChanged(const Sigmod::Script& script)
{
- qobject_cast<Pokemod::CoinList*>(modified())->setScript(script);
+ qobject_cast<Sigmod::CoinList*>(modified())->setScript(script);
}
diff --git a/sigmodr/CoinListUI.h b/sigmodr/CoinListUI.h
index 46b9c946..937e566b 100644
--- a/sigmodr/CoinListUI.h
+++ b/sigmodr/CoinListUI.h
@@ -15,36 +15,36 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_COINLISTUI__
-#define __POKEMODR_COINLISTUI__
+#ifndef __SIGMODR_COINLISTUI__
+#define __SIGMODR_COINLISTUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_coinlist.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class CoinList;
}
-namespace Pokemodr
+namespace Sigmodr
{
class CoinListUI : public ObjectUI, private Ui::formCoinList
{
Q_OBJECT
public:
- CoinListUI(Pokemod::CoinList* coinList, QWidget* parent);
+ CoinListUI(Sigmod::CoinList* coinList, QWidget* parent);
~CoinListUI();
public slots:
void apply();
void discard();
protected slots:
void on_varName_textChanged(const QString& name);
- void on_varScript_valueChanged(const Pokemod::Script& script);
+ void on_varScript_valueChanged(const Sigmod::Script& script);
private slots:
void setGui();
};
diff --git a/sigmodr/EggGroupUI.cpp b/sigmodr/EggGroupUI.cpp
index fc8cf8b7..ac2d36c7 100644
--- a/sigmodr/EggGroupUI.cpp
+++ b/sigmodr/EggGroupUI.cpp
@@ -18,41 +18,41 @@
// Header include
#include "EggGroupUI.h"
-// Pokemod includes
-#include "../pokemod/EggGroup.h"
+// Sigmod includes
+#include "../sigmod/EggGroup.h"
-Pokemodr::EggGroupUI::EggGroupUI(Pokemod::EggGroup* eggGroup, QWidget* parent) :
+Sigmodr::EggGroupUI::EggGroupUI(Sigmod::EggGroup* eggGroup, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(eggGroup, new Pokemod::EggGroup(*eggGroup));
+ setObjects(eggGroup, new Sigmod::EggGroup(*eggGroup));
}
-Pokemodr::EggGroupUI::~EggGroupUI()
+Sigmodr::EggGroupUI::~EggGroupUI()
{
}
-void Pokemodr::EggGroupUI::setGui()
+void Sigmodr::EggGroupUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::EggGroup*>(modified())->name());
+ varName->setText(qobject_cast<Sigmod::EggGroup*>(modified())->name());
}
-void Pokemodr::EggGroupUI::apply()
+void Sigmodr::EggGroupUI::apply()
{
- *qobject_cast<Pokemod::EggGroup*>(original()) = *qobject_cast<Pokemod::EggGroup*>(modified());
+ *qobject_cast<Sigmod::EggGroup*>(original()) = *qobject_cast<Sigmod::EggGroup*>(modified());
emit(changed(false));
}
-void Pokemodr::EggGroupUI::discard()
+void Sigmodr::EggGroupUI::discard()
{
- *qobject_cast<Pokemod::EggGroup*>(modified()) = *qobject_cast<Pokemod::EggGroup*>(original());
+ *qobject_cast<Sigmod::EggGroup*>(modified()) = *qobject_cast<Sigmod::EggGroup*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::EggGroupUI::on_varName_textChanged(const QString& name)
+void Sigmodr::EggGroupUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::EggGroup*>(modified())->setName(name);
+ qobject_cast<Sigmod::EggGroup*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
diff --git a/sigmodr/EggGroupUI.h b/sigmodr/EggGroupUI.h
index 193f44ca..1acbd36e 100644
--- a/sigmodr/EggGroupUI.h
+++ b/sigmodr/EggGroupUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_EGGGROUPUI__
-#define __POKEMODR_EGGGROUPUI__
+#ifndef __SIGMODR_EGGGROUPUI__
+#define __SIGMODR_EGGGROUPUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_egggroup.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class EggGroup;
}
-namespace Pokemodr
+namespace Sigmodr
{
class EggGroupUI : public ObjectUI, private Ui::formEggGroup
{
Q_OBJECT
public:
- EggGroupUI(Pokemod::EggGroup* eggGroup, QWidget* parent);
+ EggGroupUI(Sigmod::EggGroup* eggGroup, QWidget* parent);
~EggGroupUI();
public slots:
void apply();
diff --git a/sigmodr/FractionWidget.cpp b/sigmodr/FractionWidget.cpp
index bd136456..1048af8c 100644
--- a/sigmodr/FractionWidget.cpp
+++ b/sigmodr/FractionWidget.cpp
@@ -18,35 +18,35 @@
// Header include
#include "FractionWidget.h"
-Pokemodr::FractionWidget::FractionWidget(QWidget* parent, const Pokemod::Fraction& value) :
+Sigmodr::FractionWidget::FractionWidget(QWidget* parent, const Sigmod::Fraction& value) :
QWidget(parent),
m_behavior(Any),
m_value(value)
{
setupUi(this);
- connect(this, SIGNAL(valueChanged(Pokemod::Fraction)), SLOT(updateValue()));
- connect(this, SIGNAL(valueChanged(Pokemod::Fraction)), SLOT(resetRanges()));
+ connect(this, SIGNAL(valueChanged(Sigmod::Fraction)), SLOT(updateValue()));
+ connect(this, SIGNAL(valueChanged(Sigmod::Fraction)), SLOT(resetRanges()));
connect(this, SIGNAL(behaviorChanged(const Behavior)), SLOT(resetRanges()));
resetRanges();
}
-Pokemodr::FractionWidget::Behavior Pokemodr::FractionWidget::behavior() const
+Sigmodr::FractionWidget::Behavior Sigmodr::FractionWidget::behavior() const
{
return m_behavior;
}
-Pokemod::Fraction Pokemodr::FractionWidget::value() const
+Sigmod::Fraction Sigmodr::FractionWidget::value() const
{
return m_value;
}
-void Pokemodr::FractionWidget::setBehavior(const Behavior behavior)
+void Sigmodr::FractionWidget::setBehavior(const Behavior behavior)
{
m_behavior = behavior;
emit(behaviorChanged(m_behavior));
}
-void Pokemodr::FractionWidget::setValue(const Pokemod::Fraction& value)
+void Sigmodr::FractionWidget::setValue(const Sigmod::Fraction& value)
{
if (!varValue->text().isEmpty() && (m_value == value))
return;
@@ -54,24 +54,24 @@ void Pokemodr::FractionWidget::setValue(const Pokemod::Fraction& value)
emit(valueChanged(m_value));
}
-void Pokemodr::FractionWidget::updateValue()
+void Sigmodr::FractionWidget::updateValue()
{
varValue->setText(QString::number(double(m_value), 'g', 7));
}
-void Pokemodr::FractionWidget::on_varNumerator_valueChanged(const int numerator)
+void Sigmodr::FractionWidget::on_varNumerator_valueChanged(const int numerator)
{
m_value.setNumerator(numerator);
emit(valueChanged(m_value));
}
-void Pokemodr::FractionWidget::on_varDenominator_valueChanged(const int denominator)
+void Sigmodr::FractionWidget::on_varDenominator_valueChanged(const int denominator)
{
m_value.setDenominator(denominator);
emit(valueChanged(m_value));
}
-void Pokemodr::FractionWidget::resetRanges()
+void Sigmodr::FractionWidget::resetRanges()
{
varNumerator->setValue(m_value.numerator());
varDenominator->setValue(m_value.denominator());
diff --git a/sigmodr/FractionWidget.h b/sigmodr/FractionWidget.h
index 0b6262e8..11aafaaa 100644
--- a/sigmodr/FractionWidget.h
+++ b/sigmodr/FractionWidget.h
@@ -15,11 +15,11 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_FRACTIONWIDGET__
-#define __POKEMODR_FRACTIONWIDGET__
+#ifndef __SIGMODR_FRACTIONWIDGET__
+#define __SIGMODR_FRACTIONWIDGET__
-// Pokemod includes
-#include "../pokemod/Fraction.h"
+// Sigmod includes
+#include "../sigmod/Fraction.h"
// Qt includes
#include <QtGui/QWidget>
@@ -27,7 +27,7 @@
// Form include
#include "ui_fraction.h"
-namespace Pokemodr
+namespace Sigmodr
{
class FractionWidget : public QWidget, private Ui::formFraction
{
@@ -45,16 +45,16 @@ class FractionWidget : public QWidget, private Ui::formFraction
Improper = 4
};
- explicit FractionWidget(QWidget* parent, const Pokemod::Fraction& value = Pokemod::Fraction(1, 1));
+ explicit FractionWidget(QWidget* parent, const Sigmod::Fraction& value = Sigmod::Fraction(1, 1));
Behavior behavior() const;
- Pokemod::Fraction value() const;
+ Sigmod::Fraction value() const;
signals:
- void valueChanged(const Pokemod::Fraction&);
+ void valueChanged(const Sigmod::Fraction&);
void behaviorChanged(const Behavior);
public slots:
void setBehavior(const Behavior behavior);
- void setValue(const Pokemod::Fraction& value);
+ void setValue(const Sigmod::Fraction& value);
void updateValue();
protected slots:
@@ -64,7 +64,7 @@ class FractionWidget : public QWidget, private Ui::formFraction
void resetRanges();
private:
Behavior m_behavior;
- Pokemod::Fraction m_value;
+ Sigmod::Fraction m_value;
};
}
diff --git a/sigmodr/GlobalScriptUI.cpp b/sigmodr/GlobalScriptUI.cpp
index 6811544e..ed598f0a 100644
--- a/sigmodr/GlobalScriptUI.cpp
+++ b/sigmodr/GlobalScriptUI.cpp
@@ -18,47 +18,47 @@
// Header include
#include "GlobalScriptUI.h"
-// Pokemod includes
-#include "../pokemod/GlobalScript.h"
+// Sigmod includes
+#include "../sigmod/GlobalScript.h"
-Pokemodr::GlobalScriptUI::GlobalScriptUI(Pokemod::GlobalScript* globalScript, QWidget* parent) :
+Sigmodr::GlobalScriptUI::GlobalScriptUI(Sigmod::GlobalScript* globalScript, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(globalScript, new Pokemod::GlobalScript(*globalScript));
+ setObjects(globalScript, new Sigmod::GlobalScript(*globalScript));
}
-Pokemodr::GlobalScriptUI::~GlobalScriptUI()
+Sigmodr::GlobalScriptUI::~GlobalScriptUI()
{
}
-void Pokemodr::GlobalScriptUI::setGui()
+void Sigmodr::GlobalScriptUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::GlobalScript*>(modified())->name());
- varScript->setValue(qobject_cast<Pokemod::GlobalScript*>(modified())->script());
+ varName->setText(qobject_cast<Sigmod::GlobalScript*>(modified())->name());
+ varScript->setValue(qobject_cast<Sigmod::GlobalScript*>(modified())->script());
}
-void Pokemodr::GlobalScriptUI::apply()
+void Sigmodr::GlobalScriptUI::apply()
{
- *qobject_cast<Pokemod::GlobalScript*>(original()) = *qobject_cast<Pokemod::GlobalScript*>(modified());
+ *qobject_cast<Sigmod::GlobalScript*>(original()) = *qobject_cast<Sigmod::GlobalScript*>(modified());
emit(changed(false));
}
-void Pokemodr::GlobalScriptUI::discard()
+void Sigmodr::GlobalScriptUI::discard()
{
- *qobject_cast<Pokemod::GlobalScript*>(modified()) = *qobject_cast<Pokemod::GlobalScript*>(original());
+ *qobject_cast<Sigmod::GlobalScript*>(modified()) = *qobject_cast<Sigmod::GlobalScript*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::GlobalScriptUI::on_varName_textChanged(const QString& name)
+void Sigmodr::GlobalScriptUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::GlobalScript*>(modified())->setName(name);
+ qobject_cast<Sigmod::GlobalScript*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::GlobalScriptUI::on_varScript_valueChanged(const Pokemod::Script& script)
+void Sigmodr::GlobalScriptUI::on_varScript_valueChanged(const Sigmod::Script& script)
{
- qobject_cast<Pokemod::GlobalScript*>(modified())->setScript(script);
+ qobject_cast<Sigmod::GlobalScript*>(modified())->setScript(script);
}
diff --git a/sigmodr/GlobalScriptUI.h b/sigmodr/GlobalScriptUI.h
index 02b57551..e1ea09c6 100644
--- a/sigmodr/GlobalScriptUI.h
+++ b/sigmodr/GlobalScriptUI.h
@@ -15,36 +15,36 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_GLOBALSCRIPTUI__
-#define __POKEMODR_GLOBALSCRIPTUI__
+#ifndef __SIGMODR_GLOBALSCRIPTUI__
+#define __SIGMODR_GLOBALSCRIPTUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_globalscript.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class GlobalScript;
}
-namespace Pokemodr
+namespace Sigmodr
{
class GlobalScriptUI : public ObjectUI, private Ui::formGlobalScript
{
Q_OBJECT
public:
- GlobalScriptUI(Pokemod::GlobalScript* globalScript, QWidget* parent);
+ GlobalScriptUI(Sigmod::GlobalScript* globalScript, QWidget* parent);
~GlobalScriptUI();
public slots:
void apply();
void discard();
protected slots:
void on_varName_textChanged(const QString& name);
- void on_varScript_valueChanged(const Pokemod::Script& script);
+ void on_varScript_valueChanged(const Sigmod::Script& script);
private slots:
void setGui();
};
diff --git a/sigmodr/ItemTypeUI.cpp b/sigmodr/ItemTypeUI.cpp
index 75cf2a56..7c25c0b9 100644
--- a/sigmodr/ItemTypeUI.cpp
+++ b/sigmodr/ItemTypeUI.cpp
@@ -18,65 +18,65 @@
// Header include
#include "ItemTypeUI.h"
-// Pokemod includes
-#include "../pokemod/ItemType.h"
+// Sigmod includes
+#include "../sigmod/ItemType.h"
-Pokemodr::ItemTypeUI::ItemTypeUI(Pokemod::ItemType* itemType, QWidget* parent) :
+Sigmodr::ItemTypeUI::ItemTypeUI(Sigmod::ItemType* itemType, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(itemType, new Pokemod::ItemType(*itemType));
+ setObjects(itemType, new Sigmod::ItemType(*itemType));
}
-Pokemodr::ItemTypeUI::~ItemTypeUI()
+Sigmodr::ItemTypeUI::~ItemTypeUI()
{
}
-void Pokemodr::ItemTypeUI::initGui()
+void Sigmodr::ItemTypeUI::initGui()
{
- varCount->addItem(Pokemod::ItemType::CountStr[Pokemod::ItemType::Distinct], QVariant::fromValue(Pokemod::ItemType::Distinct));
- varCount->addItem(Pokemod::ItemType::CountStr[Pokemod::ItemType::Total], QVariant::fromValue(Pokemod::ItemType::Total));
+ varCount->addItem(Sigmod::ItemType::CountStr[Sigmod::ItemType::Distinct], QVariant::fromValue(Sigmod::ItemType::Distinct));
+ varCount->addItem(Sigmod::ItemType::CountStr[Sigmod::ItemType::Total], QVariant::fromValue(Sigmod::ItemType::Total));
}
-void Pokemodr::ItemTypeUI::setGui()
+void Sigmodr::ItemTypeUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::ItemType*>(modified())->name());
- varComputer->setValue(qobject_cast<Pokemod::ItemType*>(modified())->computer());
- varPlayer->setValue(qobject_cast<Pokemod::ItemType*>(modified())->player());
- varCount->setCurrentIndex(qobject_cast<Pokemod::ItemType*>(modified())->count());
+ varName->setText(qobject_cast<Sigmod::ItemType*>(modified())->name());
+ varComputer->setValue(qobject_cast<Sigmod::ItemType*>(modified())->computer());
+ varPlayer->setValue(qobject_cast<Sigmod::ItemType*>(modified())->player());
+ varCount->setCurrentIndex(qobject_cast<Sigmod::ItemType*>(modified())->count());
}
-void Pokemodr::ItemTypeUI::apply()
+void Sigmodr::ItemTypeUI::apply()
{
- *qobject_cast<Pokemod::ItemType*>(original()) = *qobject_cast<Pokemod::ItemType*>(modified());
+ *qobject_cast<Sigmod::ItemType*>(original()) = *qobject_cast<Sigmod::ItemType*>(modified());
emit(changed(false));
}
-void Pokemodr::ItemTypeUI::discard()
+void Sigmodr::ItemTypeUI::discard()
{
- *qobject_cast<Pokemod::ItemType*>(modified()) = *qobject_cast<Pokemod::ItemType*>(original());
+ *qobject_cast<Sigmod::ItemType*>(modified()) = *qobject_cast<Sigmod::ItemType*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::ItemTypeUI::on_varName_textChanged(const QString& name)
+void Sigmodr::ItemTypeUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::ItemType*>(modified())->setName(name);
+ qobject_cast<Sigmod::ItemType*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::ItemTypeUI::on_varComputer_valueChanged(const int computer)
+void Sigmodr::ItemTypeUI::on_varComputer_valueChanged(const int computer)
{
- qobject_cast<Pokemod::ItemType*>(modified())->setComputer(computer);
+ qobject_cast<Sigmod::ItemType*>(modified())->setComputer(computer);
}
-void Pokemodr::ItemTypeUI::on_varPlayer_valueChanged(const int player)
+void Sigmodr::ItemTypeUI::on_varPlayer_valueChanged(const int player)
{
- qobject_cast<Pokemod::ItemType*>(modified())->setPlayer(player);
+ qobject_cast<Sigmod::ItemType*>(modified())->setPlayer(player);
}
-void Pokemodr::ItemTypeUI::on_varCount_currentIndexChanged(const int count)
+void Sigmodr::ItemTypeUI::on_varCount_currentIndexChanged(const int count)
{
- qobject_cast<Pokemod::ItemType*>(modified())->setCount(varCount->itemData(count).value<Pokemod::ItemType::Count>());
+ qobject_cast<Sigmod::ItemType*>(modified())->setCount(varCount->itemData(count).value<Sigmod::ItemType::Count>());
}
diff --git a/sigmodr/ItemTypeUI.h b/sigmodr/ItemTypeUI.h
index 04eede5d..cf5f0448 100644
--- a/sigmodr/ItemTypeUI.h
+++ b/sigmodr/ItemTypeUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_ITEMTYPEUI__
-#define __POKEMODR_ITEMTYPEUI__
+#ifndef __SIGMODR_ITEMTYPEUI__
+#define __SIGMODR_ITEMTYPEUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_itemtype.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class ItemType;
}
-namespace Pokemodr
+namespace Sigmodr
{
class ItemTypeUI : public ObjectUI, private Ui::formItemType
{
Q_OBJECT
public:
- ItemTypeUI(Pokemod::ItemType* itemType, QWidget* parent);
+ ItemTypeUI(Sigmod::ItemType* itemType, QWidget* parent);
~ItemTypeUI();
public slots:
void apply();
diff --git a/sigmodr/ItemUI.cpp b/sigmodr/ItemUI.cpp
index 70fb20a4..41207c14 100644
--- a/sigmodr/ItemUI.cpp
+++ b/sigmodr/ItemUI.cpp
@@ -18,85 +18,85 @@
// Header include
#include "ItemUI.h"
-// Pokemod includes
-#include "../pokemod/Item.h"
-#include "../pokemod/ItemType.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Rules.h"
+// Sigmod includes
+#include "../sigmod/Item.h"
+#include "../sigmod/ItemType.h"
+#include "../sigmod/Rules.h"
+#include "../sigmod/Sigmod.h"
-Pokemodr::ItemUI::ItemUI(Pokemod::Item* item, QWidget* parent) :
+Sigmodr::ItemUI::ItemUI(Sigmod::Item* item, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(item, new Pokemod::Item(*item));
+ setObjects(item, new Sigmod::Item(*item));
}
-Pokemodr::ItemUI::~ItemUI()
+Sigmodr::ItemUI::~ItemUI()
{
}
-void Pokemodr::ItemUI::refreshGui()
+void Sigmodr::ItemUI::refreshGui()
{
varType->clear();
- for (int i = 0; i < pokemod()->itemTypeCount(); ++i)
+ for (int i = 0; i < sigmod()->itemTypeCount(); ++i)
{
- const Pokemod::ItemType* itemType = pokemod()->itemType(i);
+ const Sigmod::ItemType* itemType = sigmod()->itemType(i);
varType->addItem(itemType->name(), itemType->id());
}
- varPrice->setMaximum(pokemod()->rules()->maxMoney());
+ varPrice->setMaximum(sigmod()->rules()->maxMoney());
}
-void Pokemodr::ItemUI::setGui()
+void Sigmodr::ItemUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Item*>(modified())->name());
- boxSellable->setChecked(qobject_cast<Pokemod::Item*>(modified())->sellable() ? Qt::Checked : Qt::Unchecked);
- varType->setCurrentIndex(varType->findData(qobject_cast<Pokemod::Item*>(modified())->type()));
- varPrice->setValue(qobject_cast<Pokemod::Item*>(modified())->price());
- varDescription->setText(qobject_cast<Pokemod::Item*>(modified())->description());
- varScript->setValue(qobject_cast<Pokemod::Item*>(modified())->script());
+ varName->setText(qobject_cast<Sigmod::Item*>(modified())->name());
+ boxSellable->setChecked(qobject_cast<Sigmod::Item*>(modified())->sellable() ? Qt::Checked : Qt::Unchecked);
+ varType->setCurrentIndex(varType->findData(qobject_cast<Sigmod::Item*>(modified())->type()));
+ varPrice->setValue(qobject_cast<Sigmod::Item*>(modified())->price());
+ varDescription->setText(qobject_cast<Sigmod::Item*>(modified())->description());
+ varScript->setValue(qobject_cast<Sigmod::Item*>(modified())->script());
}
-void Pokemodr::ItemUI::apply()
+void Sigmodr::ItemUI::apply()
{
- *qobject_cast<Pokemod::Item*>(original()) = *qobject_cast<Pokemod::Item*>(modified());
+ *qobject_cast<Sigmod::Item*>(original()) = *qobject_cast<Sigmod::Item*>(modified());
emit(changed(false));
}
-void Pokemodr::ItemUI::discard()
+void Sigmodr::ItemUI::discard()
{
- *qobject_cast<Pokemod::Item*>(modified()) = *qobject_cast<Pokemod::Item*>(original());
+ *qobject_cast<Sigmod::Item*>(modified()) = *qobject_cast<Sigmod::Item*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::ItemUI::on_varName_textChanged(const QString& name)
+void Sigmodr::ItemUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Item*>(modified())->setName(name);
+ qobject_cast<Sigmod::Item*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::ItemUI::on_boxSellable_toggled(const bool sellable)
+void Sigmodr::ItemUI::on_boxSellable_toggled(const bool sellable)
{
- qobject_cast<Pokemod::Item*>(modified())->setSellable(sellable);
+ qobject_cast<Sigmod::Item*>(modified())->setSellable(sellable);
}
-void Pokemodr::ItemUI::on_varType_activated(const int type)
+void Sigmodr::ItemUI::on_varType_activated(const int type)
{
- qobject_cast<Pokemod::Item*>(modified())->setType(varType->itemData(type).toInt());
+ qobject_cast<Sigmod::Item*>(modified())->setType(varType->itemData(type).toInt());
}
-void Pokemodr::ItemUI::on_varPrice_valueChanged(const int price)
+void Sigmodr::ItemUI::on_varPrice_valueChanged(const int price)
{
- qobject_cast<Pokemod::Item*>(modified())->setPrice(price);
+ qobject_cast<Sigmod::Item*>(modified())->setPrice(price);
}
-void Pokemodr::ItemUI::on_varDescription_textChanged(const QString& description)
+void Sigmodr::ItemUI::on_varDescription_textChanged(const QString& description)
{
- qobject_cast<Pokemod::Item*>(modified())->setDescription(description);
+ qobject_cast<Sigmod::Item*>(modified())->setDescription(description);
}
-void Pokemodr::ItemUI::on_varScript_valueChanged(const Pokemod::Script& script)
+void Sigmodr::ItemUI::on_varScript_valueChanged(const Sigmod::Script& script)
{
- qobject_cast<Pokemod::Item*>(modified())->setScript(script);
+ qobject_cast<Sigmod::Item*>(modified())->setScript(script);
}
diff --git a/sigmodr/ItemUI.h b/sigmodr/ItemUI.h
index 2dc74138..2adc2568 100644
--- a/sigmodr/ItemUI.h
+++ b/sigmodr/ItemUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_ITEMUI__
-#define __POKEMODR_ITEMUI__
+#ifndef __SIGMODR_ITEMUI__
+#define __SIGMODR_ITEMUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_item.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Item;
}
-namespace Pokemodr
+namespace Sigmodr
{
class ItemUI : public ObjectUI, private Ui::formItem
{
Q_OBJECT
public:
- ItemUI(Pokemod::Item* item, QWidget* parent);
+ ItemUI(Sigmod::Item* item, QWidget* parent);
~ItemUI();
public slots:
void apply();
@@ -48,7 +48,7 @@ class ItemUI : public ObjectUI, private Ui::formItem
void on_varType_activated(const int type);
void on_varPrice_valueChanged(const int price);
void on_varDescription_textChanged(const QString& description);
- void on_varScript_valueChanged(const Pokemod::Script& script);
+ void on_varScript_valueChanged(const Sigmod::Script& script);
private slots:
void refreshGui();
void setGui();
diff --git a/sigmodr/MapEffectUI.cpp b/sigmodr/MapEffectUI.cpp
index 72b1d7f0..a2306cd2 100644
--- a/sigmodr/MapEffectUI.cpp
+++ b/sigmodr/MapEffectUI.cpp
@@ -18,79 +18,79 @@
// Header include
#include "MapEffectUI.h"
-// Pokemod includes
-#include "../pokemod/Item.h"
-#include "../pokemod/Map.h"
-#include "../pokemod/MapEffect.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Skin.h"
+// Sigmod includes
+#include "../sigmod/Item.h"
+#include "../sigmod/Map.h"
+#include "../sigmod/MapEffect.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Skin.h"
-Pokemodr::MapEffectUI::MapEffectUI(Pokemod::MapEffect* effect, QWidget* parent) :
+Sigmodr::MapEffectUI::MapEffectUI(Sigmod::MapEffect* effect, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(effect, new Pokemod::MapEffect(*effect));
+ setObjects(effect, new Sigmod::MapEffect(*effect));
}
-Pokemodr::MapEffectUI::~MapEffectUI()
+Sigmodr::MapEffectUI::~MapEffectUI()
{
}
-void Pokemodr::MapEffectUI::refreshGui()
+void Sigmodr::MapEffectUI::refreshGui()
{
- varCoordinate->setMaximum(qobject_cast<const Pokemod::Map*>(original()->parent())->size());
- for (int i = 0; i < pokemod()->skinCount(); ++i)
+ varCoordinate->setMaximum(qobject_cast<const Sigmod::Map*>(original()->parent())->size());
+ for (int i = 0; i < sigmod()->skinCount(); ++i)
{
- const Pokemod::Skin* skin = pokemod()->skin(i);
+ const Sigmod::Skin* skin = sigmod()->skin(i);
varSkin->addItem(skin->name(), skin->id());
}
}
-void Pokemodr::MapEffectUI::setGui()
+void Sigmodr::MapEffectUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::MapEffect*>(modified())->name());
- varCoordinate->setValue(qobject_cast<Pokemod::MapEffect*>(modified())->coordinate());
- varSkin->setCurrentIndex(varSkin->findData(qobject_cast<Pokemod::MapEffect*>(modified())->skin()));
- varScript->setValue(qobject_cast<Pokemod::MapEffect*>(modified())->script());
- varIsGhost->setChecked(qobject_cast<Pokemod::MapEffect*>(modified())->isGhost() ? Qt::Checked : Qt::Unchecked);
+ varName->setText(qobject_cast<Sigmod::MapEffect*>(modified())->name());
+ varCoordinate->setValue(qobject_cast<Sigmod::MapEffect*>(modified())->coordinate());
+ varSkin->setCurrentIndex(varSkin->findData(qobject_cast<Sigmod::MapEffect*>(modified())->skin()));
+ varScript->setValue(qobject_cast<Sigmod::MapEffect*>(modified())->script());
+ varIsGhost->setChecked(qobject_cast<Sigmod::MapEffect*>(modified())->isGhost() ? Qt::Checked : Qt::Unchecked);
}
-void Pokemodr::MapEffectUI::apply()
+void Sigmodr::MapEffectUI::apply()
{
- *qobject_cast<Pokemod::MapEffect*>(original()) = *qobject_cast<Pokemod::MapEffect*>(modified());
+ *qobject_cast<Sigmod::MapEffect*>(original()) = *qobject_cast<Sigmod::MapEffect*>(modified());
emit(changed(false));
}
-void Pokemodr::MapEffectUI::discard()
+void Sigmodr::MapEffectUI::discard()
{
- *qobject_cast<Pokemod::MapEffect*>(modified()) = *qobject_cast<Pokemod::MapEffect*>(original());
+ *qobject_cast<Sigmod::MapEffect*>(modified()) = *qobject_cast<Sigmod::MapEffect*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::MapEffectUI::on_varName_textChanged(const QString& name)
+void Sigmodr::MapEffectUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::MapEffect*>(modified())->setName(name);
+ qobject_cast<Sigmod::MapEffect*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::MapEffectUI::on_varCoordinate_valueChanged(const QPoint& coordinate)
+void Sigmodr::MapEffectUI::on_varCoordinate_valueChanged(const QPoint& coordinate)
{
- qobject_cast<Pokemod::MapEffect*>(modified())->setCoordinate(coordinate);
+ qobject_cast<Sigmod::MapEffect*>(modified())->setCoordinate(coordinate);
}
-void Pokemodr::MapEffectUI::on_varSkin_currentIndexChanged(const int skin)
+void Sigmodr::MapEffectUI::on_varSkin_currentIndexChanged(const int skin)
{
- qobject_cast<Pokemod::MapEffect*>(modified())->setSkin(varSkin->itemData(skin).toInt());
+ qobject_cast<Sigmod::MapEffect*>(modified())->setSkin(varSkin->itemData(skin).toInt());
}
-void Pokemodr::MapEffectUI::on_varScript_valueChanged(const Pokemod::Script& script)
+void Sigmodr::MapEffectUI::on_varScript_valueChanged(const Sigmod::Script& script)
{
- qobject_cast<Pokemod::MapEffect*>(modified())->setScript(script);
+ qobject_cast<Sigmod::MapEffect*>(modified())->setScript(script);
}
-void Pokemodr::MapEffectUI::on_varIsGhost_clicked(const bool isGhost)
+void Sigmodr::MapEffectUI::on_varIsGhost_clicked(const bool isGhost)
{
- qobject_cast<Pokemod::MapEffect*>(modified())->setIsGhost(isGhost);
+ qobject_cast<Sigmod::MapEffect*>(modified())->setIsGhost(isGhost);
}
diff --git a/sigmodr/MapEffectUI.h b/sigmodr/MapEffectUI.h
index 3c90702e..213c1315 100644
--- a/sigmodr/MapEffectUI.h
+++ b/sigmodr/MapEffectUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPEFFECTUI__
-#define __POKEMODR_MAPEFFECTUI__
+#ifndef __SIGMODR_MAPEFFECTUI__
+#define __SIGMODR_MAPEFFECTUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_mapeffect.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class MapEffect;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapEffectUI : public ObjectUI, private Ui::formMapEffect
{
Q_OBJECT
public:
- MapEffectUI(Pokemod::MapEffect* effect, QWidget* parent);
+ MapEffectUI(Sigmod::MapEffect* effect, QWidget* parent);
~MapEffectUI();
public slots:
void apply();
@@ -46,7 +46,7 @@ class MapEffectUI : public ObjectUI, private Ui::formMapEffect
void on_varName_textChanged(const QString& name);
void on_varCoordinate_valueChanged(const QPoint& coordinate);
void on_varSkin_currentIndexChanged(const int skin);
- void on_varScript_valueChanged(const Pokemod::Script& script);
+ void on_varScript_valueChanged(const Sigmod::Script& script);
void on_varIsGhost_clicked(const bool isGhost);
private slots:
void refreshGui();
diff --git a/sigmodr/MapTrainerTeamMemberUI.cpp b/sigmodr/MapTrainerTeamMemberUI.cpp
index e8519881..4d6b19e7 100644
--- a/sigmodr/MapTrainerTeamMemberUI.cpp
+++ b/sigmodr/MapTrainerTeamMemberUI.cpp
@@ -18,134 +18,134 @@
// Header include
#include "MapTrainerTeamMemberUI.h"
-// Pokemod includes
-#include "../pokemod/Ability.h"
-#include "../pokemod/Item.h"
-#include "../pokemod/MapTrainerTeamMember.h"
-#include "../pokemod/Move.h"
-#include "../pokemod/Nature.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Rules.h"
-#include "../pokemod/Species.h"
+// Sigmod includes
+#include "../sigmod/Ability.h"
+#include "../sigmod/Item.h"
+#include "../sigmod/MapTrainerTeamMember.h"
+#include "../sigmod/Move.h"
+#include "../sigmod/Nature.h"
+#include "../sigmod/Rules.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Species.h"
-Pokemodr::MapTrainerTeamMemberUI::MapTrainerTeamMemberUI(Pokemod::MapTrainerTeamMember* teamMember, QWidget* parent) :
+Sigmodr::MapTrainerTeamMemberUI::MapTrainerTeamMemberUI(Sigmod::MapTrainerTeamMember* teamMember, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(teamMember, new Pokemod::MapTrainerTeamMember(*teamMember));
+ setObjects(teamMember, new Sigmod::MapTrainerTeamMember(*teamMember));
}
-Pokemodr::MapTrainerTeamMemberUI::~MapTrainerTeamMemberUI()
+Sigmodr::MapTrainerTeamMemberUI::~MapTrainerTeamMemberUI()
{
}
-void Pokemodr::MapTrainerTeamMemberUI::refreshGui()
+void Sigmodr::MapTrainerTeamMemberUI::refreshGui()
{
varSpecies->clear();
- for (int i = 0; i < pokemod()->speciesCount(); ++i)
+ for (int i = 0; i < sigmod()->speciesCount(); ++i)
{
- const Pokemod::Species* species = pokemod()->species(i);
+ const Sigmod::Species* species = sigmod()->species(i);
varSpecies->addItem(species->name(), species->id());
}
- varLevel->setMaximum(pokemod()->rules()->maxLevel());
+ varLevel->setMaximum(sigmod()->rules()->maxLevel());
varAbilities->clear();
- for (int i = 0; i < pokemod()->abilityCount(); ++i)
+ for (int i = 0; i < sigmod()->abilityCount(); ++i)
{
- const Pokemod::Ability* ability = pokemod()->ability(i);
+ const Sigmod::Ability* ability = sigmod()->ability(i);
QListWidgetItem* widgetItem = new QListWidgetItem(ability->name(), varAbilities);
widgetItem->setData(Qt::UserRole, ability->id());
}
- boxAbilities->setEnabled(pokemod()->rules()->maxAbilities());
+ boxAbilities->setEnabled(sigmod()->rules()->maxAbilities());
varItems->clear();
- for (int i = 0; i < pokemod()->itemCount(); ++i)
+ for (int i = 0; i < sigmod()->itemCount(); ++i)
{
- const Pokemod::Item* item = pokemod()->item(i);
+ const Sigmod::Item* item = sigmod()->item(i);
QListWidgetItem* widgetItem = new QListWidgetItem(item->name(), varItems);
widgetItem->setData(Qt::UserRole, item->id());
}
- boxItems->setEnabled(pokemod()->rules()->maxHeldItems());
+ boxItems->setEnabled(sigmod()->rules()->maxHeldItems());
varMoves->clear();
- for (int i = 0; i < pokemod()->abilityCount(); ++i)
+ for (int i = 0; i < sigmod()->abilityCount(); ++i)
{
- const Pokemod::Move* move = pokemod()->move(i);
+ const Sigmod::Move* move = sigmod()->move(i);
QListWidgetItem* widgetItem = new QListWidgetItem(move->name(), varMoves);
widgetItem->setData(Qt::UserRole, move->id());
}
varNatures->clear();
- for (int i = 0; i < pokemod()->natureCount(); ++i)
+ for (int i = 0; i < sigmod()->natureCount(); ++i)
{
- const Pokemod::Nature* nature = pokemod()->nature(i);
+ const Sigmod::Nature* nature = sigmod()->nature(i);
QListWidgetItem* widgetItem = new QListWidgetItem(nature->name(), varNatures);
widgetItem->setData(Qt::UserRole, nature->id());
}
- boxNatures->setEnabled(pokemod()->rules()->maxNatures());
+ boxNatures->setEnabled(sigmod()->rules()->maxNatures());
}
-void Pokemodr::MapTrainerTeamMemberUI::setGui()
+void Sigmodr::MapTrainerTeamMemberUI::setGui()
{
- varSpecies->setCurrentIndex(varSpecies->findData(qobject_cast<Pokemod::MapTrainerTeamMember*>(modified())->species()));
- varLevel->setValue(qobject_cast<Pokemod::MapTrainerTeamMember*>(modified())->level());
+ varSpecies->setCurrentIndex(varSpecies->findData(qobject_cast<Sigmod::MapTrainerTeamMember*>(modified())->species()));
+ varLevel->setValue(qobject_cast<Sigmod::MapTrainerTeamMember*>(modified())->level());
for (int i = 0; i < varAbilities->count(); ++i)
{
QListWidgetItem* widgetItem = varAbilities->item(i);
- widgetItem->setSelected(qobject_cast<Pokemod::MapTrainerTeamMember*>(modified())->ability(widgetItem->data(Qt::UserRole).toInt()));
+ widgetItem->setSelected(qobject_cast<Sigmod::MapTrainerTeamMember*>(modified())->ability(widgetItem->data(Qt::UserRole).toInt()));
}
for (int i = 0; i < varItems->count(); ++i)
{
QListWidgetItem* widgetItem = varItems->item(i);
- widgetItem->setSelected(qobject_cast<Pokemod::MapTrainerTeamMember*>(modified())->item(widgetItem->data(Qt::UserRole).toInt()));
+ widgetItem->setSelected(qobject_cast<Sigmod::MapTrainerTeamMember*>(modified())->item(widgetItem->data(Qt::UserRole).toInt()));
}
for (int i = 0; i < varMoves->count(); ++i)
{
QListWidgetItem* widgetItem = varMoves->item(i);
- widgetItem->setSelected(qobject_cast<Pokemod::MapTrainerTeamMember*>(modified())->move(widgetItem->data(Qt::UserRole).toInt()));
+ widgetItem->setSelected(qobject_cast<Sigmod::MapTrainerTeamMember*>(modified())->move(widgetItem->data(Qt::UserRole).toInt()));
}
for (int i = 0; i < varNatures->count(); ++i)
{
QListWidgetItem* widgetItem = varNatures->item(i);
- widgetItem->setSelected(qobject_cast<Pokemod::MapTrainerTeamMember*>(modified())->nature(widgetItem->data(Qt::UserRole).toInt()));
+ widgetItem->setSelected(qobject_cast<Sigmod::MapTrainerTeamMember*>(modified())->nature(widgetItem->data(Qt::UserRole).toInt()));
}
}
-void Pokemodr::MapTrainerTeamMemberUI::apply()
+void Sigmodr::MapTrainerTeamMemberUI::apply()
{
- *qobject_cast<Pokemod::MapTrainerTeamMember*>(original()) = *qobject_cast<Pokemod::MapTrainerTeamMember*>(modified());
+ *qobject_cast<Sigmod::MapTrainerTeamMember*>(original()) = *qobject_cast<Sigmod::MapTrainerTeamMember*>(modified());
emit(changed(false));
}
-void Pokemodr::MapTrainerTeamMemberUI::discard()
+void Sigmodr::MapTrainerTeamMemberUI::discard()
{
- *qobject_cast<Pokemod::MapTrainerTeamMember*>(modified()) = *qobject_cast<Pokemod::MapTrainerTeamMember*>(original());
+ *qobject_cast<Sigmod::MapTrainerTeamMember*>(modified()) = *qobject_cast<Sigmod::MapTrainerTeamMember*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::MapTrainerTeamMemberUI::on_varSpecies_activated(const int species)
+void Sigmodr::MapTrainerTeamMemberUI::on_varSpecies_activated(const int species)
{
- qobject_cast<Pokemod::MapTrainerTeamMember*>(modified())->setSpecies(varSpecies->itemData(species).toInt());
+ qobject_cast<Sigmod::MapTrainerTeamMember*>(modified())->setSpecies(varSpecies->itemData(species).toInt());
}
-void Pokemodr::MapTrainerTeamMemberUI::on_varLevel_valueChanged(const int level)
+void Sigmodr::MapTrainerTeamMemberUI::on_varLevel_valueChanged(const int level)
{
- qobject_cast<Pokemod::MapTrainerTeamMember*>(modified())->setLevel(level);
+ qobject_cast<Sigmod::MapTrainerTeamMember*>(modified())->setLevel(level);
}
-void Pokemodr::MapTrainerTeamMemberUI::on_varAbilities_itemClicked(QListWidgetItem* item)
+void Sigmodr::MapTrainerTeamMemberUI::on_varAbilities_itemClicked(QListWidgetItem* item)
{
- qobject_cast<Pokemod::MapTrainerTeamMember*>(modified())->setAbility(item->data(Qt::UserRole).toInt(), item->isSelected());
+ qobject_cast<Sigmod::MapTrainerTeamMember*>(modified())->setAbility(item->data(Qt::UserRole).toInt(), item->isSelected());
}
-void Pokemodr::MapTrainerTeamMemberUI::on_varItems_itemClicked(QListWidgetItem* item)
+void Sigmodr::MapTrainerTeamMemberUI::on_varItems_itemClicked(QListWidgetItem* item)
{
- qobject_cast<Pokemod::MapTrainerTeamMember*>(modified())->setItem(item->data(Qt::UserRole).toInt(), item->isSelected());
+ qobject_cast<Sigmod::MapTrainerTeamMember*>(modified())->setItem(item->data(Qt::UserRole).toInt(), item->isSelected());
}
-void Pokemodr::MapTrainerTeamMemberUI::on_varMoves_itemClicked(QListWidgetItem* item)
+void Sigmodr::MapTrainerTeamMemberUI::on_varMoves_itemClicked(QListWidgetItem* item)
{
- qobject_cast<Pokemod::MapTrainerTeamMember*>(modified())->setMove(item->data(Qt::UserRole).toInt(), item->isSelected());
+ qobject_cast<Sigmod::MapTrainerTeamMember*>(modified())->setMove(item->data(Qt::UserRole).toInt(), item->isSelected());
}
-void Pokemodr::MapTrainerTeamMemberUI::on_varNatures_itemClicked(QListWidgetItem* item)
+void Sigmodr::MapTrainerTeamMemberUI::on_varNatures_itemClicked(QListWidgetItem* item)
{
- qobject_cast<Pokemod::MapTrainerTeamMember*>(modified())->setNature(item->data(Qt::UserRole).toInt(), item->isSelected());
+ qobject_cast<Sigmod::MapTrainerTeamMember*>(modified())->setNature(item->data(Qt::UserRole).toInt(), item->isSelected());
}
diff --git a/sigmodr/MapTrainerTeamMemberUI.h b/sigmodr/MapTrainerTeamMemberUI.h
index b3c1949b..98169c60 100644
--- a/sigmodr/MapTrainerTeamMemberUI.h
+++ b/sigmodr/MapTrainerTeamMemberUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPTRAINERTEAMMEMBERUI__
-#define __POKEMODR_MAPTRAINERTEAMMEMBERUI__
+#ifndef __SIGMODR_MAPTRAINERTEAMMEMBERUI__
+#define __SIGMODR_MAPTRAINERTEAMMEMBERUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_maptrainerteammember.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class MapTrainerTeamMember;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapTrainerTeamMemberUI : public ObjectUI, private Ui::formMapTrainerTeamMember
{
Q_OBJECT
public:
- MapTrainerTeamMemberUI(Pokemod::MapTrainerTeamMember* teamMember, QWidget* parent);
+ MapTrainerTeamMemberUI(Sigmod::MapTrainerTeamMember* teamMember, QWidget* parent);
~MapTrainerTeamMemberUI();
public slots:
void apply();
diff --git a/sigmodr/MapTrainerUI.cpp b/sigmodr/MapTrainerUI.cpp
index a93c5cca..a1b022c8 100644
--- a/sigmodr/MapTrainerUI.cpp
+++ b/sigmodr/MapTrainerUI.cpp
@@ -18,41 +18,41 @@
// Header include
#include "MapTrainerUI.h"
-// Pokemod includes
-#include "../pokemod/Map.h"
-#include "../pokemod/MapTrainer.h"
-#include "../pokemod/MapTrainerTeamMember.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Rules.h"
-#include "../pokemod/Species.h"
-#include "../pokemod/Trainer.h"
+// Sigmod includes
+#include "../sigmod/Map.h"
+#include "../sigmod/MapTrainer.h"
+#include "../sigmod/MapTrainerTeamMember.h"
+#include "../sigmod/Rules.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Species.h"
+#include "../sigmod/Trainer.h"
-Pokemodr::MapTrainerUI::MapTrainerUI(Pokemod::MapTrainer* trainer, QWidget* parent) :
+Sigmodr::MapTrainerUI::MapTrainerUI(Sigmod::MapTrainer* trainer, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(trainer, new Pokemod::MapTrainer(*trainer));
+ setObjects(trainer, new Sigmod::MapTrainer(*trainer));
}
-Pokemodr::MapTrainerUI::~MapTrainerUI()
+Sigmodr::MapTrainerUI::~MapTrainerUI()
{
}
-void Pokemodr::MapTrainerUI::refreshGui()
+void Sigmodr::MapTrainerUI::refreshGui()
{
varTrainerClass->clear();
- for (int i = 0; i < pokemod()->trainerCount(); ++i)
+ for (int i = 0; i < sigmod()->trainerCount(); ++i)
{
- const Pokemod::Trainer* trainer = pokemod()->trainer(i);
+ const Sigmod::Trainer* trainer = sigmod()->trainer(i);
varTrainerClass->addItem(trainer->name(), trainer->id());
}
- varCoordinate->setMaximum(qobject_cast<const Pokemod::Map*>(original()->parent())->size());
- varNumberFight->setMaximum(pokemod()->rules()->maxFight());
+ varCoordinate->setMaximum(qobject_cast<const Sigmod::Map*>(original()->parent())->size());
+ varNumberFight->setMaximum(sigmod()->rules()->maxFight());
varLeadTeamMember->clear();
- for (int i = 0; i < qobject_cast<Pokemod::MapTrainer*>(original())->teamMemberCount(); ++i)
+ for (int i = 0; i < qobject_cast<Sigmod::MapTrainer*>(original())->teamMemberCount(); ++i)
{
- const Pokemod::MapTrainerTeamMember* teamMember = qobject_cast<Pokemod::MapTrainer*>(original())->teamMember(i);
- const Pokemod::Species* species = pokemod()->species(teamMember->species());
+ const Sigmod::MapTrainerTeamMember* teamMember = qobject_cast<Sigmod::MapTrainer*>(original())->teamMember(i);
+ const Sigmod::Species* species = sigmod()->species(teamMember->species());
if (species)
varLeadTeamMember->addItem(species->name(), teamMember->id());
else
@@ -60,57 +60,57 @@ void Pokemodr::MapTrainerUI::refreshGui()
}
}
-void Pokemodr::MapTrainerUI::setGui()
+void Sigmodr::MapTrainerUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::MapTrainer*>(modified())->name());
- varTrainerClass->setCurrentIndex(varTrainerClass->findData(qobject_cast<Pokemod::MapTrainer*>(modified())->trainerClass()));
- varCoordinate->setValue(qobject_cast<Pokemod::MapTrainer*>(modified())->coordinate());
- varNumberFight->setValue(qobject_cast<Pokemod::MapTrainer*>(modified())->numberFight());
- varScript->setValue(qobject_cast<Pokemod::MapTrainer*>(modified())->script());
- varLeadTeamMember->setCurrentIndex(varLeadTeamMember->findData(qobject_cast<Pokemod::MapTrainer*>(modified())->leadTeamMember()));
+ varName->setText(qobject_cast<Sigmod::MapTrainer*>(modified())->name());
+ varTrainerClass->setCurrentIndex(varTrainerClass->findData(qobject_cast<Sigmod::MapTrainer*>(modified())->trainerClass()));
+ varCoordinate->setValue(qobject_cast<Sigmod::MapTrainer*>(modified())->coordinate());
+ varNumberFight->setValue(qobject_cast<Sigmod::MapTrainer*>(modified())->numberFight());
+ varScript->setValue(qobject_cast<Sigmod::MapTrainer*>(modified())->script());
+ varLeadTeamMember->setCurrentIndex(varLeadTeamMember->findData(qobject_cast<Sigmod::MapTrainer*>(modified())->leadTeamMember()));
}
-void Pokemodr::MapTrainerUI::apply()
+void Sigmodr::MapTrainerUI::apply()
{
- *qobject_cast<Pokemod::MapTrainer*>(original()) = *qobject_cast<Pokemod::MapTrainer*>(modified());
+ *qobject_cast<Sigmod::MapTrainer*>(original()) = *qobject_cast<Sigmod::MapTrainer*>(modified());
emit(changed(false));
}
-void Pokemodr::MapTrainerUI::discard()
+void Sigmodr::MapTrainerUI::discard()
{
- *qobject_cast<Pokemod::MapTrainer*>(modified()) = *qobject_cast<Pokemod::MapTrainer*>(original());
+ *qobject_cast<Sigmod::MapTrainer*>(modified()) = *qobject_cast<Sigmod::MapTrainer*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::MapTrainerUI::on_varName_textChanged(const QString& name)
+void Sigmodr::MapTrainerUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::MapTrainer*>(modified())->setName(name);
+ qobject_cast<Sigmod::MapTrainer*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::MapTrainerUI::on_varTrainerClass_activated(const int trainerClass)
+void Sigmodr::MapTrainerUI::on_varTrainerClass_activated(const int trainerClass)
{
- qobject_cast<Pokemod::MapTrainer*>(modified())->setTrainerClass(varTrainerClass->itemData(trainerClass).toInt());
+ qobject_cast<Sigmod::MapTrainer*>(modified())->setTrainerClass(varTrainerClass->itemData(trainerClass).toInt());
}
-void Pokemodr::MapTrainerUI::on_varCoordinate_valueChanged(const QPoint& coordinate)
+void Sigmodr::MapTrainerUI::on_varCoordinate_valueChanged(const QPoint& coordinate)
{
- qobject_cast<Pokemod::MapTrainer*>(modified())->setCoordinate(coordinate);
+ qobject_cast<Sigmod::MapTrainer*>(modified())->setCoordinate(coordinate);
}
-void Pokemodr::MapTrainerUI::on_varNumberFight_valueChanged(const int numberFight)
+void Sigmodr::MapTrainerUI::on_varNumberFight_valueChanged(const int numberFight)
{
- qobject_cast<Pokemod::MapTrainer*>(modified())->setNumberFight(numberFight);
+ qobject_cast<Sigmod::MapTrainer*>(modified())->setNumberFight(numberFight);
}
-void Pokemodr::MapTrainerUI::on_varScript_valueChanged(const Pokemod::Script& script)
+void Sigmodr::MapTrainerUI::on_varScript_valueChanged(const Sigmod::Script& script)
{
- qobject_cast<Pokemod::MapTrainer*>(modified())->setScript(script);
+ qobject_cast<Sigmod::MapTrainer*>(modified())->setScript(script);
}
-void Pokemodr::MapTrainerUI::on_varLeadTeamMember_activated(const int leadTeamMember)
+void Sigmodr::MapTrainerUI::on_varLeadTeamMember_activated(const int leadTeamMember)
{
- qobject_cast<Pokemod::MapTrainer*>(modified())->setLeadTeamMember(leadTeamMember);
+ qobject_cast<Sigmod::MapTrainer*>(modified())->setLeadTeamMember(leadTeamMember);
}
diff --git a/sigmodr/MapTrainerUI.h b/sigmodr/MapTrainerUI.h
index 40593992..f50d590c 100644
--- a/sigmodr/MapTrainerUI.h
+++ b/sigmodr/MapTrainerUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPTRAINERUI__
-#define __POKEMODR_MAPTRAINERUI__
+#ifndef __SIGMODR_MAPTRAINERUI__
+#define __SIGMODR_MAPTRAINERUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_maptrainer.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class MapTrainer;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapTrainerUI : public ObjectUI, private Ui::formMapTrainer
{
Q_OBJECT
public:
- MapTrainerUI(Pokemod::MapTrainer* trainer, QWidget* parent);
+ MapTrainerUI(Sigmod::MapTrainer* trainer, QWidget* parent);
~MapTrainerUI();
public slots:
void apply();
@@ -47,7 +47,7 @@ class MapTrainerUI : public ObjectUI, private Ui::formMapTrainer
void on_varTrainerClass_activated(const int trainerClass);
void on_varCoordinate_valueChanged(const QPoint& coordinate);
void on_varNumberFight_valueChanged(const int numberFight);
- void on_varScript_valueChanged(const Pokemod::Script& script);
+ void on_varScript_valueChanged(const Sigmod::Script& script);
void on_varLeadTeamMember_activated(const int leadTeamMember);
private slots:
void refreshGui();
diff --git a/sigmodr/MapUI.cpp b/sigmodr/MapUI.cpp
index c9296aca..a3fd065e 100644
--- a/sigmodr/MapUI.cpp
+++ b/sigmodr/MapUI.cpp
@@ -18,151 +18,151 @@
// Header include
#include "MapUI.h"
-// Pokemodr includes
+// Sigmodr includes
#include "TilemapModel.h"
-// Pokemod includes
-#include "../pokemod/Map.h"
-#include "../pokemod/MapWarp.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Sprite.h"
-#include "../pokemod/Tile.h"
+// Sigmod includes
+#include "../sigmod/Map.h"
+#include "../sigmod/MapWarp.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Sprite.h"
+#include "../sigmod/Tile.h"
// Qt includes
#include <QtGui/QHeaderView>
-Pokemodr::MapUI::MapUI(Pokemod::Map* map, QWidget* parent) :
+Sigmodr::MapUI::MapUI(Sigmod::Map* map, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(map, new Pokemod::Map(*map));
+ setObjects(map, new Sigmod::Map(*map));
}
-Pokemodr::MapUI::~MapUI()
+Sigmodr::MapUI::~MapUI()
{
}
-void Pokemodr::MapUI::initGui()
+void Sigmodr::MapUI::initGui()
{
- varType->addItem(Pokemod::Map::TypeStr[Pokemod::Map::Outdoor], QVariant::fromValue(Pokemod::Map::Outdoor));
- varType->addItem(Pokemod::Map::TypeStr[Pokemod::Map::Dungeon], QVariant::fromValue(Pokemod::Map::Dungeon));
- varType->addItem(Pokemod::Map::TypeStr[Pokemod::Map::Building], QVariant::fromValue(Pokemod::Map::Building));
+ varType->addItem(Sigmod::Map::TypeStr[Sigmod::Map::Outdoor], QVariant::fromValue(Sigmod::Map::Outdoor));
+ varType->addItem(Sigmod::Map::TypeStr[Sigmod::Map::Dungeon], QVariant::fromValue(Sigmod::Map::Dungeon));
+ varType->addItem(Sigmod::Map::TypeStr[Sigmod::Map::Building], QVariant::fromValue(Sigmod::Map::Building));
varTilemap->horizontalHeader()->setResizeMode(QHeaderView::Fixed);
varTilemap->verticalHeader()->setResizeMode(QHeaderView::Fixed);
varTilemap->horizontalHeader()->setDefaultSectionSize(64);
varTilemap->verticalHeader()->setDefaultSectionSize(64);
- varTilemap->setModel(new TilemapModel(qobject_cast<Pokemod::Map*>(modified())->map(), pokemod()));
+ varTilemap->setModel(new TilemapModel(qobject_cast<Sigmod::Map*>(modified())->map(), sigmod()));
}
-void Pokemodr::MapUI::refreshGui()
+void Sigmodr::MapUI::refreshGui()
{
varFlyWarp->clear();
- for (int i = 0; i < qobject_cast<Pokemod::Map*>(original())->warpCount(); ++i)
+ for (int i = 0; i < qobject_cast<Sigmod::Map*>(original())->warpCount(); ++i)
{
- const Pokemod::MapWarp* warp = qobject_cast<Pokemod::Map*>(original())->warp(i);
+ const Sigmod::MapWarp* warp = qobject_cast<Sigmod::Map*>(original())->warp(i);
varFlyWarp->addItem(warp->name(), warp->id());
}
varTile->clear();
- for (int i = 0; i < pokemod()->tileCount(); ++i)
+ for (int i = 0; i < sigmod()->tileCount(); ++i)
{
- const Pokemod::Tile* tile = pokemod()->tile(i);
- if (pokemod()->spriteIndex(tile->sprite()) == INT_MAX)
+ const Sigmod::Tile* tile = sigmod()->tile(i);
+ if (sigmod()->spriteIndex(tile->sprite()) == INT_MAX)
varTile->addItem(tile->name(), tile->id());
else
- varTile->addItem(QPixmap::fromImage(pokemod()->spriteById(tile->sprite())->sprite()), tile->name(), tile->id());
+ varTile->addItem(QPixmap::fromImage(sigmod()->spriteById(tile->sprite())->sprite()), tile->name(), tile->id());
}
varTile->setEnabled(false);
}
-void Pokemodr::MapUI::setGui()
+void Sigmodr::MapUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Map*>(modified())->name());
- boxFlyWarp->setChecked((qobject_cast<Pokemod::Map*>(modified())->flyWarp() == -1) ? Qt::Unchecked : Qt::Checked);
- varFlyWarp->setCurrentIndex(varFlyWarp->findData(qobject_cast<Pokemod::Map*>(modified())->flyWarp()));
- varType->setCurrentIndex(qobject_cast<Pokemod::Map*>(modified())->type());
+ varName->setText(qobject_cast<Sigmod::Map*>(modified())->name());
+ boxFlyWarp->setChecked((qobject_cast<Sigmod::Map*>(modified())->flyWarp() == -1) ? Qt::Unchecked : Qt::Checked);
+ varFlyWarp->setCurrentIndex(varFlyWarp->findData(qobject_cast<Sigmod::Map*>(modified())->flyWarp()));
+ varType->setCurrentIndex(qobject_cast<Sigmod::Map*>(modified())->type());
buttonDeleteColumn->setEnabled(0 < varTilemap->model()->columnCount());
buttonDeleteRow->setEnabled(0 < varTilemap->model()->rowCount());
}
-void Pokemodr::MapUI::apply()
+void Sigmodr::MapUI::apply()
{
- *qobject_cast<Pokemod::Map*>(original()) = *qobject_cast<Pokemod::Map*>(modified());
+ *qobject_cast<Sigmod::Map*>(original()) = *qobject_cast<Sigmod::Map*>(modified());
emit(changed(false));
}
-void Pokemodr::MapUI::discard()
+void Sigmodr::MapUI::discard()
{
- *qobject_cast<Pokemod::Map*>(modified()) = *qobject_cast<Pokemod::Map*>(original());
+ *qobject_cast<Sigmod::Map*>(modified()) = *qobject_cast<Sigmod::Map*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::MapUI::on_varName_textChanged(const QString& name)
+void Sigmodr::MapUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Map*>(modified())->setName(name);
+ qobject_cast<Sigmod::Map*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::MapUI::on_boxFlyWarp_toggled()
+void Sigmodr::MapUI::on_boxFlyWarp_toggled()
{
- qobject_cast<Pokemod::Map*>(modified())->setFlyWarp(-1);
+ qobject_cast<Sigmod::Map*>(modified())->setFlyWarp(-1);
}
-void Pokemodr::MapUI::on_varFlyWarp_activated(const int flyWarp)
+void Sigmodr::MapUI::on_varFlyWarp_activated(const int flyWarp)
{
- qobject_cast<Pokemod::Map*>(modified())->setFlyWarp(varFlyWarp->itemData(flyWarp).toInt());
+ qobject_cast<Sigmod::Map*>(modified())->setFlyWarp(varFlyWarp->itemData(flyWarp).toInt());
}
-void Pokemodr::MapUI::on_varType_activated(const int type)
+void Sigmodr::MapUI::on_varType_activated(const int type)
{
- qobject_cast<Pokemod::Map*>(modified())->setType(varType->itemData(type).value<Pokemod::Map::Type>());
+ qobject_cast<Sigmod::Map*>(modified())->setType(varType->itemData(type).value<Sigmod::Map::Type>());
}
-void Pokemodr::MapUI::on_varTilemap_clicked(const QModelIndex& index)
+void Sigmodr::MapUI::on_varTilemap_clicked(const QModelIndex& index)
{
m_index = index;
varTile->setEnabled(true);
varTile->setCurrentIndex(varTile->findData(varTilemap->model()->data(m_index, Qt::EditRole)));
}
-void Pokemodr::MapUI::on_buttonAddColumn_pressed()
+void Sigmodr::MapUI::on_buttonAddColumn_pressed()
{
varTilemap->model()->insertColumns(varTilemap->model()->columnCount(), 1);
emit(changed(true));
}
-void Pokemodr::MapUI::on_buttonAddRow_pressed()
+void Sigmodr::MapUI::on_buttonAddRow_pressed()
{
varTilemap->model()->insertRows(varTilemap->model()->rowCount(), 1);
emit(changed(true));
}
-void Pokemodr::MapUI::on_buttonDeleteColumn_pressed()
+void Sigmodr::MapUI::on_buttonDeleteColumn_pressed()
{
varTilemap->model()->removeColumns(m_index.column(), 1);
emit(changed(true));
}
-void Pokemodr::MapUI::on_buttonDeleteRow_pressed()
+void Sigmodr::MapUI::on_buttonDeleteRow_pressed()
{
varTilemap->model()->removeRows(m_index.row(), 1);
emit(changed(true));
}
-void Pokemodr::MapUI::on_buttonInsertColumn_pressed()
+void Sigmodr::MapUI::on_buttonInsertColumn_pressed()
{
varTilemap->model()->insertColumns(m_index.column(), 1);
emit(changed(true));
}
-void Pokemodr::MapUI::on_buttonInsertRow_pressed()
+void Sigmodr::MapUI::on_buttonInsertRow_pressed()
{
varTilemap->model()->insertRows(m_index.row(), 1);
emit(changed(true));
}
-void Pokemodr::MapUI::on_varTile_activated(const int tile)
+void Sigmodr::MapUI::on_varTile_activated(const int tile)
{
varTilemap->model()->setData(m_index, varTile->itemData(tile), Qt::EditRole);
emit(changed(true));
diff --git a/sigmodr/MapUI.h b/sigmodr/MapUI.h
index 2e30e301..3cd8a3e1 100644
--- a/sigmodr/MapUI.h
+++ b/sigmodr/MapUI.h
@@ -15,21 +15,21 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPUI__
-#define __POKEMODR_MAPUI__
+#ifndef __SIGMODR_MAPUI__
+#define __SIGMODR_MAPUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_map.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Map;
}
-namespace Pokemodr
+namespace Sigmodr
{
class TilemapModel;
class TileDelegate;
@@ -39,7 +39,7 @@ class MapUI : public ObjectUI, private Ui::formMap
Q_OBJECT
public:
- MapUI(Pokemod::Map* map, QWidget* parent);
+ MapUI(Sigmod::Map* map, QWidget* parent);
~MapUI();
public slots:
void apply();
diff --git a/sigmodr/MapWarpUI.cpp b/sigmodr/MapWarpUI.cpp
index 1b4c5798..54b857fb 100644
--- a/sigmodr/MapWarpUI.cpp
+++ b/sigmodr/MapWarpUI.cpp
@@ -18,108 +18,108 @@
// Header include
#include "MapWarpUI.h"
-// Pokemod includes
-#include "../pokemod/Map.h"
-#include "../pokemod/MapWarp.h"
-#include "../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../sigmod/Map.h"
+#include "../sigmod/MapWarp.h"
+#include "../sigmod/Sigmod.h"
-Pokemodr::MapWarpUI::MapWarpUI(Pokemod::MapWarp* warp, QWidget* parent) :
+Sigmodr::MapWarpUI::MapWarpUI(Sigmod::MapWarp* warp, QWidget* parent) :
ObjectUI(parent),
m_lastMap(-1)
{
setupUi(this);
- setObjects(warp, new Pokemod::MapWarp(*warp));
+ setObjects(warp, new Sigmod::MapWarp(*warp));
}
-Pokemodr::MapWarpUI::~MapWarpUI()
+Sigmodr::MapWarpUI::~MapWarpUI()
{
}
-void Pokemodr::MapWarpUI::initGui()
+void Sigmodr::MapWarpUI::initGui()
{
- varType->addItem(Pokemod::MapWarp::TypeStr[Pokemod::MapWarp::Door], QVariant::fromValue(Pokemod::MapWarp::Door));
- varType->addItem(Pokemod::MapWarp::TypeStr[Pokemod::MapWarp::Warp], QVariant::fromValue(Pokemod::MapWarp::Warp));
- varType->addItem(Pokemod::MapWarp::TypeStr[Pokemod::MapWarp::Hole], QVariant::fromValue(Pokemod::MapWarp::Hole));
- varType->addItem(Pokemod::MapWarp::TypeStr[Pokemod::MapWarp::Boundary], QVariant::fromValue(Pokemod::MapWarp::Boundary));
+ varType->addItem(Sigmod::MapWarp::TypeStr[Sigmod::MapWarp::Door], QVariant::fromValue(Sigmod::MapWarp::Door));
+ varType->addItem(Sigmod::MapWarp::TypeStr[Sigmod::MapWarp::Warp], QVariant::fromValue(Sigmod::MapWarp::Warp));
+ varType->addItem(Sigmod::MapWarp::TypeStr[Sigmod::MapWarp::Hole], QVariant::fromValue(Sigmod::MapWarp::Hole));
+ varType->addItem(Sigmod::MapWarp::TypeStr[Sigmod::MapWarp::Boundary], QVariant::fromValue(Sigmod::MapWarp::Boundary));
}
-void Pokemodr::MapWarpUI::refreshGui()
+void Sigmodr::MapWarpUI::refreshGui()
{
- varCoordinate->setMaximum(qobject_cast<const Pokemod::Map*>(original()->parent())->size());
+ varCoordinate->setMaximum(qobject_cast<const Sigmod::Map*>(original()->parent())->size());
varToMap->clear();
- for (int i = 0; i < pokemod()->mapCount(); ++i)
+ for (int i = 0; i < sigmod()->mapCount(); ++i)
{
- const Pokemod::Map* map = pokemod()->map(i);
+ const Sigmod::Map* map = sigmod()->map(i);
varToMap->addItem(map->name(), map->id());
}
}
-void Pokemodr::MapWarpUI::setGui()
+void Sigmodr::MapWarpUI::setGui()
{
- const bool resetWarps = (qobject_cast<Pokemod::MapWarp*>(modified())->toMap() != m_lastMap);
- varName->setText(qobject_cast<Pokemod::MapWarp*>(modified())->name());
- varCoordinate->setValue(qobject_cast<Pokemod::MapWarp*>(modified())->coordinate());
- varType->setCurrentIndex(qobject_cast<Pokemod::MapWarp*>(modified())->type());
- varToMap->setCurrentIndex(varToMap->findData(qobject_cast<Pokemod::MapWarp*>(modified())->toMap()));
- m_lastMap = qobject_cast<Pokemod::MapWarp*>(modified())->toMap();
+ const bool resetWarps = (qobject_cast<Sigmod::MapWarp*>(modified())->toMap() != m_lastMap);
+ varName->setText(qobject_cast<Sigmod::MapWarp*>(modified())->name());
+ varCoordinate->setValue(qobject_cast<Sigmod::MapWarp*>(modified())->coordinate());
+ varType->setCurrentIndex(qobject_cast<Sigmod::MapWarp*>(modified())->type());
+ varToMap->setCurrentIndex(varToMap->findData(qobject_cast<Sigmod::MapWarp*>(modified())->toMap()));
+ m_lastMap = qobject_cast<Sigmod::MapWarp*>(modified())->toMap();
if (resetWarps)
{
varToWarp->clear();
- const Pokemod::Map* map = pokemod()->mapById(qobject_cast<Pokemod::MapWarp*>(modified())->toMap());
+ const Sigmod::Map* map = sigmod()->mapById(qobject_cast<Sigmod::MapWarp*>(modified())->toMap());
if (map)
{
for (int i = 0; i < map->warpCount(); ++i)
{
- const Pokemod::MapWarp* warp = map->warp(i);
+ const Sigmod::MapWarp* warp = map->warp(i);
varToWarp->addItem(warp->name(), warp->id());
}
}
}
- varToWarp->setCurrentIndex(varToMap->findData(qobject_cast<Pokemod::MapWarp*>(modified())->toWarp()));
- varScript->setValue(qobject_cast<Pokemod::MapWarp*>(modified())->script());
+ varToWarp->setCurrentIndex(varToMap->findData(qobject_cast<Sigmod::MapWarp*>(modified())->toWarp()));
+ varScript->setValue(qobject_cast<Sigmod::MapWarp*>(modified())->script());
}
-void Pokemodr::MapWarpUI::apply()
+void Sigmodr::MapWarpUI::apply()
{
- *qobject_cast<Pokemod::MapWarp*>(original()) = *qobject_cast<Pokemod::MapWarp*>(modified());
+ *qobject_cast<Sigmod::MapWarp*>(original()) = *qobject_cast<Sigmod::MapWarp*>(modified());
emit(changed(false));
}
-void Pokemodr::MapWarpUI::discard()
+void Sigmodr::MapWarpUI::discard()
{
- *qobject_cast<Pokemod::MapWarp*>(modified()) = *qobject_cast<Pokemod::MapWarp*>(original());
+ *qobject_cast<Sigmod::MapWarp*>(modified()) = *qobject_cast<Sigmod::MapWarp*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::MapWarpUI::on_varName_textChanged(const QString& name)
+void Sigmodr::MapWarpUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::MapWarp*>(modified())->setName(name);
+ qobject_cast<Sigmod::MapWarp*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::MapWarpUI::on_varCoordinate_valueChanged(const QPoint& coordinate)
+void Sigmodr::MapWarpUI::on_varCoordinate_valueChanged(const QPoint& coordinate)
{
- qobject_cast<Pokemod::MapWarp*>(modified())->setCoordinate(coordinate);
+ qobject_cast<Sigmod::MapWarp*>(modified())->setCoordinate(coordinate);
}
-void Pokemodr::MapWarpUI::on_varType_activated(const int type)
+void Sigmodr::MapWarpUI::on_varType_activated(const int type)
{
- qobject_cast<Pokemod::MapWarp*>(modified())->setType(varType->itemData(type).value<Pokemod::MapWarp::Type>());
+ qobject_cast<Sigmod::MapWarp*>(modified())->setType(varType->itemData(type).value<Sigmod::MapWarp::Type>());
}
-void Pokemodr::MapWarpUI::on_varToMap_activated(const int toMap)
+void Sigmodr::MapWarpUI::on_varToMap_activated(const int toMap)
{
- qobject_cast<Pokemod::MapWarp*>(modified())->setToMap(toMap);
+ qobject_cast<Sigmod::MapWarp*>(modified())->setToMap(toMap);
}
-void Pokemodr::MapWarpUI::on_varToWarp_activated(const int toWarp)
+void Sigmodr::MapWarpUI::on_varToWarp_activated(const int toWarp)
{
- qobject_cast<Pokemod::MapWarp*>(modified())->setToWarp(toWarp);
+ qobject_cast<Sigmod::MapWarp*>(modified())->setToWarp(toWarp);
}
-void Pokemodr::MapWarpUI::on_varScript_valueChanged(const Pokemod::Script& script)
+void Sigmodr::MapWarpUI::on_varScript_valueChanged(const Sigmod::Script& script)
{
- qobject_cast<Pokemod::MapWarp*>(modified())->setScript(script);
+ qobject_cast<Sigmod::MapWarp*>(modified())->setScript(script);
}
diff --git a/sigmodr/MapWarpUI.h b/sigmodr/MapWarpUI.h
index 1d2186f1..b52b45fd 100644
--- a/sigmodr/MapWarpUI.h
+++ b/sigmodr/MapWarpUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPWARPUI__
-#define __POKEMODR_MAPWARPUI__
+#ifndef __SIGMODR_MAPWARPUI__
+#define __SIGMODR_MAPWARPUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_mapwarp.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class MapWarp;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapWarpUI : public ObjectUI, private Ui::formMapWarp
{
Q_OBJECT
public:
- MapWarpUI(Pokemod::MapWarp* warp, QWidget* parent);
+ MapWarpUI(Sigmod::MapWarp* warp, QWidget* parent);
~MapWarpUI();
public slots:
void apply();
@@ -48,7 +48,7 @@ class MapWarpUI : public ObjectUI, private Ui::formMapWarp
void on_varType_activated(const int type);
void on_varToMap_activated(const int toMap);
void on_varToWarp_activated(const int toWarp);
- void on_varScript_valueChanged(const Pokemod::Script& script);
+ void on_varScript_valueChanged(const Sigmod::Script& script);
private slots:
void initGui();
void refreshGui();
diff --git a/sigmodr/MapWildListEncounterUI.cpp b/sigmodr/MapWildListEncounterUI.cpp
index 69093b53..9979c158 100644
--- a/sigmodr/MapWildListEncounterUI.cpp
+++ b/sigmodr/MapWildListEncounterUI.cpp
@@ -18,65 +18,65 @@
// Header include
#include "MapWildListEncounterUI.h"
-// Pokemod includes
-#include "../pokemod/MapWildListEncounter.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Rules.h"
-#include "../pokemod/Species.h"
+// Sigmod includes
+#include "../sigmod/MapWildListEncounter.h"
+#include "../sigmod/Rules.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Species.h"
-Pokemodr::MapWildListEncounterUI::MapWildListEncounterUI(Pokemod::MapWildListEncounter* encounter, QWidget* parent) :
+Sigmodr::MapWildListEncounterUI::MapWildListEncounterUI(Sigmod::MapWildListEncounter* encounter, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(encounter, new Pokemod::MapWildListEncounter(*encounter));
+ setObjects(encounter, new Sigmod::MapWildListEncounter(*encounter));
}
-Pokemodr::MapWildListEncounterUI::~MapWildListEncounterUI()
+Sigmodr::MapWildListEncounterUI::~MapWildListEncounterUI()
{
}
-void Pokemodr::MapWildListEncounterUI::refreshGui()
+void Sigmodr::MapWildListEncounterUI::refreshGui()
{
varSpecies->clear();
- for (int i = 0; i < pokemod()->speciesCount(); ++i)
+ for (int i = 0; i < sigmod()->speciesCount(); ++i)
{
- const Pokemod::Species* species = pokemod()->species(i);
+ const Sigmod::Species* species = sigmod()->species(i);
varSpecies->addItem(species->name(), species->id());
}
- varLevel->setMaximum(pokemod()->rules()->maxLevel());
+ varLevel->setMaximum(sigmod()->rules()->maxLevel());
}
-void Pokemodr::MapWildListEncounterUI::setGui()
+void Sigmodr::MapWildListEncounterUI::setGui()
{
- varSpecies->setCurrentIndex(varSpecies->findData(qobject_cast<Pokemod::MapWildListEncounter*>(modified())->species()));
- varLevel->setValue(qobject_cast<Pokemod::MapWildListEncounter*>(modified())->level());
- varWeight->setValue(qobject_cast<Pokemod::MapWildListEncounter*>(modified())->weight());
+ varSpecies->setCurrentIndex(varSpecies->findData(qobject_cast<Sigmod::MapWildListEncounter*>(modified())->species()));
+ varLevel->setValue(qobject_cast<Sigmod::MapWildListEncounter*>(modified())->level());
+ varWeight->setValue(qobject_cast<Sigmod::MapWildListEncounter*>(modified())->weight());
}
-void Pokemodr::MapWildListEncounterUI::apply()
+void Sigmodr::MapWildListEncounterUI::apply()
{
- *qobject_cast<Pokemod::MapWildListEncounter*>(original()) = *qobject_cast<Pokemod::MapWildListEncounter*>(modified());
+ *qobject_cast<Sigmod::MapWildListEncounter*>(original()) = *qobject_cast<Sigmod::MapWildListEncounter*>(modified());
emit(changed(false));
}
-void Pokemodr::MapWildListEncounterUI::discard()
+void Sigmodr::MapWildListEncounterUI::discard()
{
- *qobject_cast<Pokemod::MapWildListEncounter*>(modified()) = *qobject_cast<Pokemod::MapWildListEncounter*>(original());
+ *qobject_cast<Sigmod::MapWildListEncounter*>(modified()) = *qobject_cast<Sigmod::MapWildListEncounter*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::MapWildListEncounterUI::on_varSpecies_activated(const int species)
+void Sigmodr::MapWildListEncounterUI::on_varSpecies_activated(const int species)
{
- qobject_cast<Pokemod::MapWildListEncounter*>(modified())->setSpecies(varSpecies->itemData(species).toInt());
+ qobject_cast<Sigmod::MapWildListEncounter*>(modified())->setSpecies(varSpecies->itemData(species).toInt());
}
-void Pokemodr::MapWildListEncounterUI::on_varLevel_valueChanged(const int level)
+void Sigmodr::MapWildListEncounterUI::on_varLevel_valueChanged(const int level)
{
- qobject_cast<Pokemod::MapWildListEncounter*>(modified())->setLevel(level);
+ qobject_cast<Sigmod::MapWildListEncounter*>(modified())->setLevel(level);
}
-void Pokemodr::MapWildListEncounterUI::on_varWeight_valueChanged(const int weight)
+void Sigmodr::MapWildListEncounterUI::on_varWeight_valueChanged(const int weight)
{
- qobject_cast<Pokemod::MapWildListEncounter*>(modified())->setWeight(weight);
+ qobject_cast<Sigmod::MapWildListEncounter*>(modified())->setWeight(weight);
}
diff --git a/sigmodr/MapWildListEncounterUI.h b/sigmodr/MapWildListEncounterUI.h
index 1efbba27..bd08ec4a 100644
--- a/sigmodr/MapWildListEncounterUI.h
+++ b/sigmodr/MapWildListEncounterUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPWILDLISTENCOUNTERUI__
-#define __POKEMODR_MAPWILDLISTENCOUNTERUI__
+#ifndef __SIGMODR_MAPWILDLISTENCOUNTERUI__
+#define __SIGMODR_MAPWILDLISTENCOUNTERUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_mapwildlistencounter.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class MapWildListEncounter;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapWildListEncounterUI : public ObjectUI, private Ui::formMapWildListEncounter
{
Q_OBJECT
public:
- MapWildListEncounterUI(Pokemod::MapWildListEncounter* encounter, QWidget* parent);
+ MapWildListEncounterUI(Sigmod::MapWildListEncounter* encounter, QWidget* parent);
~MapWildListEncounterUI();
public slots:
void apply();
diff --git a/sigmodr/MapWildListUI.cpp b/sigmodr/MapWildListUI.cpp
index 28f46ce5..17839ca7 100644
--- a/sigmodr/MapWildListUI.cpp
+++ b/sigmodr/MapWildListUI.cpp
@@ -18,39 +18,39 @@
// Header include
#include "MapWildListUI.h"
-// Pokemod includes
-#include "../pokemod/MapWildList.h"
+// Sigmod includes
+#include "../sigmod/MapWildList.h"
-Pokemodr::MapWildListUI::MapWildListUI(Pokemod::MapWildList* wildList, QWidget* parent) :
+Sigmodr::MapWildListUI::MapWildListUI(Sigmod::MapWildList* wildList, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(wildList, new Pokemod::MapWildList(*wildList));
+ setObjects(wildList, new Sigmod::MapWildList(*wildList));
}
-Pokemodr::MapWildListUI::~MapWildListUI()
+Sigmodr::MapWildListUI::~MapWildListUI()
{
}
-void Pokemodr::MapWildListUI::setGui()
+void Sigmodr::MapWildListUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::MapWildList*>(modified())->name());
+ varName->setText(qobject_cast<Sigmod::MapWildList*>(modified())->name());
}
-void Pokemodr::MapWildListUI::apply()
+void Sigmodr::MapWildListUI::apply()
{
- *qobject_cast<Pokemod::MapWildList*>(original()) = *qobject_cast<Pokemod::MapWildList*>(modified());
+ *qobject_cast<Sigmod::MapWildList*>(original()) = *qobject_cast<Sigmod::MapWildList*>(modified());
emit(changed(false));
}
-void Pokemodr::MapWildListUI::discard()
+void Sigmodr::MapWildListUI::discard()
{
- *qobject_cast<Pokemod::MapWildList*>(modified()) = *qobject_cast<Pokemod::MapWildList*>(original());
+ *qobject_cast<Sigmod::MapWildList*>(modified()) = *qobject_cast<Sigmod::MapWildList*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::MapWildListUI::on_varName_textChanged(const QString& name)
+void Sigmodr::MapWildListUI::on_varName_textChanged(const QString& name)
{
- qobject_cast<Pokemod::MapWildList*>(modified())->setName(name);
+ qobject_cast<Sigmod::MapWildList*>(modified())->setName(name);
}
diff --git a/sigmodr/MapWildListUI.h b/sigmodr/MapWildListUI.h
index d4b2cccc..029a995b 100644
--- a/sigmodr/MapWildListUI.h
+++ b/sigmodr/MapWildListUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPWILDLISTUI__
-#define __POKEMODR_MAPWILDLISTUI__
+#ifndef __SIGMODR_MAPWILDLISTUI__
+#define __SIGMODR_MAPWILDLISTUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_mapwildlist.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class MapWildList;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapWildListUI : public ObjectUI, private Ui::formMapWildList
{
Q_OBJECT
public:
- MapWildListUI(Pokemod::MapWildList* wildList, QWidget* parent);
+ MapWildListUI(Sigmod::MapWildList* wildList, QWidget* parent);
~MapWildListUI();
public slots:
void apply();
diff --git a/sigmodr/MoveUI.cpp b/sigmodr/MoveUI.cpp
index 59a6c6c7..9d1010c9 100644
--- a/sigmodr/MoveUI.cpp
+++ b/sigmodr/MoveUI.cpp
@@ -18,109 +18,109 @@
// Header include
#include "MoveUI.h"
-// Pokemod includes
-#include "../pokemod/Move.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Type.h"
+// Sigmod includes
+#include "../sigmod/Move.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Type.h"
-Pokemodr::MoveUI::MoveUI(Pokemod::Move* move, QWidget* parent) :
+Sigmodr::MoveUI::MoveUI(Sigmod::Move* move, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(move, new Pokemod::Move(*move));
+ setObjects(move, new Sigmod::Move(*move));
}
-Pokemodr::MoveUI::~MoveUI()
+Sigmodr::MoveUI::~MoveUI()
{
}
-void Pokemodr::MoveUI::refreshGui()
+void Sigmodr::MoveUI::refreshGui()
{
varType->clear();
- for (int i = 0; i < pokemod()->typeCount(); ++i)
+ for (int i = 0; i < sigmod()->typeCount(); ++i)
{
- const Pokemod::Type* type = pokemod()->type(i);
+ const Sigmod::Type* type = sigmod()->type(i);
varType->addItem(type->name(), type->id());
}
}
-void Pokemodr::MoveUI::setGui()
+void Sigmodr::MoveUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Move*>(modified())->name());
- varPriority->setValue(qobject_cast<Pokemod::Move*>(modified())->priority());
- varAccuracy->setValue(qobject_cast<Pokemod::Move*>(modified())->accuracy());
- varPower->setValue(qobject_cast<Pokemod::Move*>(modified())->power());
- varType->setCurrentIndex(varType->findData(qobject_cast<Pokemod::Move*>(modified())->type()));
- varPowerPoints->setValue(qobject_cast<Pokemod::Move*>(modified())->powerPoints());
- varSpecial->setChecked(qobject_cast<Pokemod::Move*>(modified())->special() ? Qt::Checked : Qt::Unchecked);
- varDescription->setText(qobject_cast<Pokemod::Move*>(modified())->description());
- varBattleScript->setValue(qobject_cast<Pokemod::Move*>(modified())->battleScript());
- varWorldScript->setValue(qobject_cast<Pokemod::Move*>(modified())->worldScript());
+ varName->setText(qobject_cast<Sigmod::Move*>(modified())->name());
+ varPriority->setValue(qobject_cast<Sigmod::Move*>(modified())->priority());
+ varAccuracy->setValue(qobject_cast<Sigmod::Move*>(modified())->accuracy());
+ varPower->setValue(qobject_cast<Sigmod::Move*>(modified())->power());
+ varType->setCurrentIndex(varType->findData(qobject_cast<Sigmod::Move*>(modified())->type()));
+ varPowerPoints->setValue(qobject_cast<Sigmod::Move*>(modified())->powerPoints());
+ varSpecial->setChecked(qobject_cast<Sigmod::Move*>(modified())->special() ? Qt::Checked : Qt::Unchecked);
+ varDescription->setText(qobject_cast<Sigmod::Move*>(modified())->description());
+ varBattleScript->setValue(qobject_cast<Sigmod::Move*>(modified())->battleScript());
+ varWorldScript->setValue(qobject_cast<Sigmod::Move*>(modified())->worldScript());
}
-void Pokemodr::MoveUI::apply()
+void Sigmodr::MoveUI::apply()
{
- *qobject_cast<Pokemod::Move*>(original()) = *qobject_cast<Pokemod::Move*>(modified());
+ *qobject_cast<Sigmod::Move*>(original()) = *qobject_cast<Sigmod::Move*>(modified());
emit(changed(false));
}
-void Pokemodr::MoveUI::discard()
+void Sigmodr::MoveUI::discard()
{
- *qobject_cast<Pokemod::Move*>(modified()) = *qobject_cast<Pokemod::Move*>(original());
+ *qobject_cast<Sigmod::Move*>(modified()) = *qobject_cast<Sigmod::Move*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::MoveUI::on_varName_textChanged(const QString& name)
+void Sigmodr::MoveUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Move*>(modified())->setName(name);
+ qobject_cast<Sigmod::Move*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::MoveUI::on_varPriority_valueChanged(const int priority)
+void Sigmodr::MoveUI::on_varPriority_valueChanged(const int priority)
{
- qobject_cast<Pokemod::Move*>(modified())->setPriority(priority);
+ qobject_cast<Sigmod::Move*>(modified())->setPriority(priority);
}
-void Pokemodr::MoveUI::on_varAccuracy_valueChanged(const Pokemod::Fraction& accuracy)
+void Sigmodr::MoveUI::on_varAccuracy_valueChanged(const Sigmod::Fraction& accuracy)
{
- qobject_cast<Pokemod::Move*>(modified())->setAccuracy(accuracy);
+ qobject_cast<Sigmod::Move*>(modified())->setAccuracy(accuracy);
}
-void Pokemodr::MoveUI::on_varPower_valueChanged(const int power)
+void Sigmodr::MoveUI::on_varPower_valueChanged(const int power)
{
- qobject_cast<Pokemod::Move*>(modified())->setPower(power);
+ qobject_cast<Sigmod::Move*>(modified())->setPower(power);
}
-void Pokemodr::MoveUI::on_varType_activated(const int type)
+void Sigmodr::MoveUI::on_varType_activated(const int type)
{
- qobject_cast<Pokemod::Move*>(modified())->setType(varType->itemData(type).toInt());
+ qobject_cast<Sigmod::Move*>(modified())->setType(varType->itemData(type).toInt());
}
-void Pokemodr::MoveUI::on_varPowerPoints_valueChanged(const int powerPoints)
+void Sigmodr::MoveUI::on_varPowerPoints_valueChanged(const int powerPoints)
{
- qobject_cast<Pokemod::Move*>(modified())->setPowerPoints(powerPoints);
+ qobject_cast<Sigmod::Move*>(modified())->setPowerPoints(powerPoints);
}
-void Pokemodr::MoveUI::on_varSpecial_toggled(const bool special)
+void Sigmodr::MoveUI::on_varSpecial_toggled(const bool special)
{
- qobject_cast<Pokemod::Move*>(modified())->setSpecial(special);
+ qobject_cast<Sigmod::Move*>(modified())->setSpecial(special);
}
-void Pokemodr::MoveUI::on_varDescription_textChanged(const QString& description)
+void Sigmodr::MoveUI::on_varDescription_textChanged(const QString& description)
{
const int cursor = varDescription->cursorPosition();
- qobject_cast<Pokemod::Move*>(modified())->setDescription(description);
+ qobject_cast<Sigmod::Move*>(modified())->setDescription(description);
varDescription->setCursorPosition(cursor);
}
-void Pokemodr::MoveUI::on_varBattleScript_valueChanged(const Pokemod::Script& battleScript)
+void Sigmodr::MoveUI::on_varBattleScript_valueChanged(const Sigmod::Script& battleScript)
{
- qobject_cast<Pokemod::Move*>(modified())->setBattleScript(battleScript);
+ qobject_cast<Sigmod::Move*>(modified())->setBattleScript(battleScript);
}
-void Pokemodr::MoveUI::on_varWorldScript_valueChanged(const Pokemod::Script& worldScript)
+void Sigmodr::MoveUI::on_varWorldScript_valueChanged(const Sigmod::Script& worldScript)
{
- qobject_cast<Pokemod::Move*>(modified())->setWorldScript(worldScript);
+ qobject_cast<Sigmod::Move*>(modified())->setWorldScript(worldScript);
}
diff --git a/sigmodr/MoveUI.h b/sigmodr/MoveUI.h
index f5fba5e8..c3671f95 100644
--- a/sigmodr/MoveUI.h
+++ b/sigmodr/MoveUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MOVEUI__
-#define __POKEMODR_MOVEUI__
+#ifndef __SIGMODR_MOVEUI__
+#define __SIGMODR_MOVEUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_move.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Move;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MoveUI : public ObjectUI, private Ui::formMove
{
Q_OBJECT
public:
- MoveUI(Pokemod::Move* move, QWidget* parent);
+ MoveUI(Sigmod::Move* move, QWidget* parent);
~MoveUI();
public slots:
void apply();
@@ -45,14 +45,14 @@ class MoveUI : public ObjectUI, private Ui::formMove
protected slots:
void on_varName_textChanged(const QString& name);
void on_varPriority_valueChanged(const int priority);
- void on_varAccuracy_valueChanged(const Pokemod::Fraction& accuracy);
+ void on_varAccuracy_valueChanged(const Sigmod::Fraction& accuracy);
void on_varPower_valueChanged(const int power);
void on_varType_activated(const int type);
void on_varPowerPoints_valueChanged(const int powerPoints);
void on_varSpecial_toggled(const bool special);
void on_varDescription_textChanged(const QString& description);
- void on_varBattleScript_valueChanged(const Pokemod::Script& battleScript);
- void on_varWorldScript_valueChanged(const Pokemod::Script& worldScript);
+ void on_varBattleScript_valueChanged(const Sigmod::Script& battleScript);
+ void on_varWorldScript_valueChanged(const Sigmod::Script& worldScript);
private slots:
void refreshGui();
void setGui();
diff --git a/sigmodr/NatureUI.cpp b/sigmodr/NatureUI.cpp
index 58aa2207..213353c3 100644
--- a/sigmodr/NatureUI.cpp
+++ b/sigmodr/NatureUI.cpp
@@ -18,77 +18,77 @@
// Header include
#include "NatureUI.h"
-// Pokemod includes
-#include "../pokemod/Nature.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Rules.h"
+// Sigmod includes
+#include "../sigmod/Nature.h"
+#include "../sigmod/Rules.h"
+#include "../sigmod/Sigmod.h"
-Pokemodr::NatureUI::NatureUI(Pokemod::Nature* nature, QWidget* parent) :
+Sigmodr::NatureUI::NatureUI(Sigmod::Nature* nature, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(nature, new Pokemod::Nature(*nature));
+ setObjects(nature, new Sigmod::Nature(*nature));
}
-Pokemodr::NatureUI::~NatureUI()
+Sigmodr::NatureUI::~NatureUI()
{
}
-void Pokemodr::NatureUI::initGui()
+void Sigmodr::NatureUI::initGui()
{
connect(varStat, SIGNAL(activated()), this, SLOT(setGui()));
}
-void Pokemodr::NatureUI::refreshGui()
+void Sigmodr::NatureUI::refreshGui()
{
varStat->clear();
- const bool isSplit = pokemod()->rules()->specialSplit();
- const QStringList& statNames = (isSplit ? Pokemod::StatGSCStr : Pokemod::StatRBYStr);
- varStat->addItem(statNames[Pokemod::ST_Attack], QVariant::fromValue(Pokemod::ST_Attack));
- varStat->addItem(statNames[Pokemod::ST_Defense], QVariant::fromValue(Pokemod::ST_Defense));
- varStat->addItem(statNames[Pokemod::ST_Speed], QVariant::fromValue(Pokemod::ST_Speed));
+ const bool isSplit = sigmod()->rules()->specialSplit();
+ const QStringList& statNames = (isSplit ? Sigmod::StatGSCStr : Sigmod::StatRBYStr);
+ varStat->addItem(statNames[Sigmod::ST_Attack], QVariant::fromValue(Sigmod::ST_Attack));
+ varStat->addItem(statNames[Sigmod::ST_Defense], QVariant::fromValue(Sigmod::ST_Defense));
+ varStat->addItem(statNames[Sigmod::ST_Speed], QVariant::fromValue(Sigmod::ST_Speed));
if (isSplit)
{
- varStat->addItem(statNames[Pokemod::ST_SpecialAttack], QVariant::fromValue(Pokemod::ST_SpecialAttack));
- varStat->addItem(statNames[Pokemod::ST_SpecialDefense], QVariant::fromValue(Pokemod::ST_SpecialDefense));
+ varStat->addItem(statNames[Sigmod::ST_SpecialAttack], QVariant::fromValue(Sigmod::ST_SpecialAttack));
+ varStat->addItem(statNames[Sigmod::ST_SpecialDefense], QVariant::fromValue(Sigmod::ST_SpecialDefense));
}
else
- varStat->addItem(statNames[Pokemod::ST_Special], QVariant::fromValue(Pokemod::ST_Special));
+ varStat->addItem(statNames[Sigmod::ST_Special], QVariant::fromValue(Sigmod::ST_Special));
}
-void Pokemodr::NatureUI::setGui()
+void Sigmodr::NatureUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Nature*>(modified())->name());
- varStatMultiplier->setValue(qobject_cast<Pokemod::Nature*>(modified())->stat(varStat->itemData(varStat->currentIndex()).value<Pokemod::Stat>()));
- varWeight->setValue(qobject_cast<Pokemod::Nature*>(modified())->weight());
+ varName->setText(qobject_cast<Sigmod::Nature*>(modified())->name());
+ varStatMultiplier->setValue(qobject_cast<Sigmod::Nature*>(modified())->stat(varStat->itemData(varStat->currentIndex()).value<Sigmod::Stat>()));
+ varWeight->setValue(qobject_cast<Sigmod::Nature*>(modified())->weight());
}
-void Pokemodr::NatureUI::apply()
+void Sigmodr::NatureUI::apply()
{
- *qobject_cast<Pokemod::Nature*>(original()) = *qobject_cast<Pokemod::Nature*>(modified());
+ *qobject_cast<Sigmod::Nature*>(original()) = *qobject_cast<Sigmod::Nature*>(modified());
emit(changed(false));
}
-void Pokemodr::NatureUI::discard()
+void Sigmodr::NatureUI::discard()
{
- *qobject_cast<Pokemod::Nature*>(modified()) = *qobject_cast<Pokemod::Nature*>(original());
+ *qobject_cast<Sigmod::Nature*>(modified()) = *qobject_cast<Sigmod::Nature*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::NatureUI::on_varName_textChanged(const QString& name)
+void Sigmodr::NatureUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Nature*>(modified())->setName(name);
+ qobject_cast<Sigmod::Nature*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::NatureUI::on_varStatMultiplier_valueChanged(const Pokemod::Fraction& statMultiplier)
+void Sigmodr::NatureUI::on_varStatMultiplier_valueChanged(const Sigmod::Fraction& statMultiplier)
{
- qobject_cast<Pokemod::Nature*>(modified())->setStat(varStat->itemData(varStat->currentIndex()).value<Pokemod::Stat>(), statMultiplier);
+ qobject_cast<Sigmod::Nature*>(modified())->setStat(varStat->itemData(varStat->currentIndex()).value<Sigmod::Stat>(), statMultiplier);
}
-void Pokemodr::NatureUI::on_varWeight_valueChanged(const int weight)
+void Sigmodr::NatureUI::on_varWeight_valueChanged(const int weight)
{
- qobject_cast<Pokemod::Nature*>(modified())->setWeight(weight);
+ qobject_cast<Sigmod::Nature*>(modified())->setWeight(weight);
}
diff --git a/sigmodr/NatureUI.h b/sigmodr/NatureUI.h
index 706843a2..a2aca25d 100644
--- a/sigmodr/NatureUI.h
+++ b/sigmodr/NatureUI.h
@@ -15,36 +15,36 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_NATUREUI__
-#define __POKEMODR_NATUREUI__
+#ifndef __SIGMODR_NATUREUI__
+#define __SIGMODR_NATUREUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_nature.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Nature;
}
-namespace Pokemodr
+namespace Sigmodr
{
class NatureUI : public ObjectUI, private Ui::formNature
{
Q_OBJECT
public:
- NatureUI(Pokemod::Nature* nature, QWidget* parent);
+ NatureUI(Sigmod::Nature* nature, QWidget* parent);
~NatureUI();
public slots:
void apply();
void discard();
protected slots:
void on_varName_textChanged(const QString& name);
- void on_varStatMultiplier_valueChanged(const Pokemod::Fraction& statMultiplier);
+ void on_varStatMultiplier_valueChanged(const Sigmod::Fraction& statMultiplier);
void on_varWeight_valueChanged(const int weight);
private slots:
void initGui();
diff --git a/sigmodr/ObjectUI.cpp b/sigmodr/ObjectUI.cpp
index 834a31f5..18472a74 100644
--- a/sigmodr/ObjectUI.cpp
+++ b/sigmodr/ObjectUI.cpp
@@ -18,12 +18,12 @@
// Header include
#include "ObjectUI.h"
-// Pokemodr includes
+// Sigmodr includes
#include "ValidationDialog.h"
-// Pokemod includes
-#include "../pokemod/Object.h"
-#include "../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../sigmod/Object.h"
+#include "../sigmod/Sigmod.h"
// KDE includes
#include <KAction>
@@ -31,7 +31,7 @@
#include <KMenu>
#include <KMessageBox>
-Pokemodr::ObjectUI::ObjectUI(QWidget* parent) :
+Sigmodr::ObjectUI::ObjectUI(QWidget* parent) :
QWidget(parent),
m_changed(false),
m_validator(NULL),
@@ -43,71 +43,71 @@ Pokemodr::ObjectUI::ObjectUI(QWidget* parent) :
connect(this, SIGNAL(customContextMenuRequested(QPoint)), SLOT(contextMenu(QPoint)));
}
-Pokemodr::ObjectUI::~ObjectUI()
+Sigmodr::ObjectUI::~ObjectUI()
{
delete m_object_mod;
}
-void Pokemodr::ObjectUI::reload()
+void Sigmodr::ObjectUI::reload()
{
refreshGui();
setGui();
}
-bool Pokemodr::ObjectUI::isChanged() const
+bool Sigmodr::ObjectUI::isChanged() const
{
return m_changed;
}
-const Pokemod::Pokemod* Pokemodr::ObjectUI::pokemod() const
+const Sigmod::Sigmod* Sigmodr::ObjectUI::sigmod() const
{
- return qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod());
+ return qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod());
}
-const Pokemod::Pokemod::Object* Pokemodr::ObjectUI::original() const
+const Sigmod::Sigmod::Object* Sigmodr::ObjectUI::original() const
{
return m_object;
}
-Pokemod::Object* Pokemodr::ObjectUI::original()
+Sigmod::Object* Sigmodr::ObjectUI::original()
{
return m_object;
}
-const Pokemod::Object* Pokemodr::ObjectUI::modified() const
+const Sigmod::Object* Sigmodr::ObjectUI::modified() const
{
return m_object_mod;
}
-Pokemod::Object* Pokemodr::ObjectUI::modified()
+Sigmod::Object* Sigmodr::ObjectUI::modified()
{
return m_object_mod;
}
-void Pokemodr::ObjectUI::setChanged(const bool changed)
+void Sigmodr::ObjectUI::setChanged(const bool changed)
{
m_changed = changed;
}
-void Pokemodr::ObjectUI::errorMessage(const QString& message)
+void Sigmodr::ObjectUI::errorMessage(const QString& message)
{
KMessageBox::error(this, message, "Error");
}
-void Pokemodr::ObjectUI::warningMessage(const QString& message)
+void Sigmodr::ObjectUI::warningMessage(const QString& message)
{
KMessageBox::warningContinueCancel(this, message, "Warning");
}
-void Pokemodr::ObjectUI::initGui()
+void Sigmodr::ObjectUI::initGui()
{
}
-void Pokemodr::ObjectUI::refreshGui()
+void Sigmodr::ObjectUI::refreshGui()
{
}
-void Pokemodr::ObjectUI::contextMenu(const QPoint& pos)
+void Sigmodr::ObjectUI::contextMenu(const QPoint& pos)
{
KMenu* menu = new KMenu;
menu->addAction("&Apply", this, SLOT(apply()));
@@ -120,13 +120,13 @@ void Pokemodr::ObjectUI::contextMenu(const QPoint& pos)
menu->popup(mapToGlobal(pos));
}
-void Pokemodr::ObjectUI::validate()
+void Sigmodr::ObjectUI::validate()
{
apply();
m_validator->show();
}
-void Pokemodr::ObjectUI::setObjects(Pokemod::Object* original, Pokemod::Object* modified)
+void Sigmodr::ObjectUI::setObjects(Sigmod::Object* original, Sigmod::Object* modified)
{
m_object = original;
m_object_mod = modified;
@@ -141,7 +141,7 @@ void Pokemodr::ObjectUI::setObjects(Pokemod::Object* original, Pokemod::Object*
init();
}
-void Pokemodr::ObjectUI::init()
+void Sigmodr::ObjectUI::init()
{
initGui();
reload();
diff --git a/sigmodr/ObjectUI.h b/sigmodr/ObjectUI.h
index 7ccd9103..3892025b 100644
--- a/sigmodr/ObjectUI.h
+++ b/sigmodr/ObjectUI.h
@@ -15,20 +15,20 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_OBJECTUI__
-#define __POKEMODR_OBJECTUI__
+#ifndef __SIGMODR_OBJECTUI__
+#define __SIGMODR_OBJECTUI__
// Qt includes
#include <QtGui/QWidget>
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Object;
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class ValidationDialog;
@@ -44,12 +44,12 @@ class ObjectUI : public QWidget
bool isChanged() const;
- const Pokemod::Pokemod* pokemod() const;
+ const Sigmod::Sigmod* sigmod() const;
- const Pokemod::Object* original() const;
- Pokemod::Object* original();
- const Pokemod::Object* modified() const;
- Pokemod::Object* modified();
+ const Sigmod::Object* original() const;
+ Sigmod::Object* original();
+ const Sigmod::Object* modified() const;
+ Sigmod::Object* modified();
signals:
void changed(bool = true);
public slots:
@@ -68,7 +68,7 @@ class ObjectUI : public QWidget
void validate();
protected:
- void setObjects(Pokemod::Object* original, Pokemod::Object* modified);
+ void setObjects(Sigmod::Object* original, Sigmod::Object* modified);
void init();
private:
@@ -76,8 +76,8 @@ class ObjectUI : public QWidget
ValidationDialog* m_validator;
- Pokemod::Object* m_object;
- Pokemod::Object* m_object_mod;
+ Sigmod::Object* m_object;
+ Sigmod::Object* m_object_mod;
};
}
diff --git a/sigmodr/PointWidget.cpp b/sigmodr/PointWidget.cpp
index 82168925..9153160d 100644
--- a/sigmodr/PointWidget.cpp
+++ b/sigmodr/PointWidget.cpp
@@ -18,19 +18,19 @@
// Header include
#include "PointWidget.h"
-Pokemodr::PointWidget::PointWidget(QWidget* parent, const QPoint& value) :
+Sigmodr::PointWidget::PointWidget(QWidget* parent, const QPoint& value) :
QWidget(parent),
m_value(value)
{
setupUi(this);
}
-QPoint Pokemodr::PointWidget::value() const
+QPoint Sigmodr::PointWidget::value() const
{
return m_value;
}
-void Pokemodr::PointWidget::setValue(const QPoint& value)
+void Sigmodr::PointWidget::setValue(const QPoint& value)
{
if (m_value == value)
return;
@@ -40,19 +40,19 @@ void Pokemodr::PointWidget::setValue(const QPoint& value)
emit(valueChanged(m_value));
}
-void Pokemodr::PointWidget::setMaximum(const QPoint& maximum)
+void Sigmodr::PointWidget::setMaximum(const QPoint& maximum)
{
varX->setMaximum(maximum.x());
varY->setMaximum(maximum.y());
}
-void Pokemodr::PointWidget::on_varX_valueChanged(const int x)
+void Sigmodr::PointWidget::on_varX_valueChanged(const int x)
{
m_value.setX(x);
emit(valueChanged(m_value));
}
-void Pokemodr::PointWidget::on_varY_valueChanged(const int y)
+void Sigmodr::PointWidget::on_varY_valueChanged(const int y)
{
m_value.setY(y);
emit(valueChanged(m_value));
diff --git a/sigmodr/PointWidget.h b/sigmodr/PointWidget.h
index de7b5a7e..e9662144 100644
--- a/sigmodr/PointWidget.h
+++ b/sigmodr/PointWidget.h
@@ -15,8 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_POINTWIDGET__
-#define __POKEMODR_POINTWIDGET__
+#ifndef __SIGMODR_POINTWIDGET__
+#define __SIGMODR_POINTWIDGET__
// Qt includes
#include <QtCore/QPoint>
@@ -25,7 +25,7 @@
// Form include
#include "ui_point.h"
-namespace Pokemodr
+namespace Sigmodr
{
class PointWidget : public QWidget, private Ui::formPoint
{
diff --git a/sigmodr/PokemodTree.cpp b/sigmodr/PokemodTree.cpp
deleted file mode 100644
index bd3dcd65..00000000
--- a/sigmodr/PokemodTree.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-// Header include
-#include "PokemodTree.h"
-
-// Model includes
-#include "models/BaseModel.h"
-
-// Pokemodr includes
-#include "ObjectUI.h"
-#include "PokemodTreeModel.h"
-
-// Pokemod includes
-#include "../pokemod/Object.h"
-#include "../pokemod/Pokemod.h"
-
-// Qt includes
-#include <QtGui/QHeaderView>
-
-Pokemodr::PokemodTree::PokemodTree(QWidget* parent) :
- QTreeView(parent)
-{
- header()->hide();
- setModel(new Pokemodr::PokemodTreeModel(this));
- setRootIndex(model()->index(-1, 0, QModelIndex()));
-}
-
-QString Pokemodr::PokemodTree::description(const QModelIndex& index)
-{
- return QString("%1: %2").arg(model()->data(index, Pokemodr::BaseModel::TypeRole).toString(), model()->data(index, Qt::DisplayRole).toString());
-}
-
-Pokemodr::ObjectUI* Pokemodr::PokemodTree::editorWidget(const QModelIndex& index)
-{
- Pokemodr::ObjectUI* widget = qobject_cast<Pokemodr::ObjectUI*>(model()->data(index, Pokemodr::BaseModel::WidgetRole).value<QWidget*>());
- return widget;
-}
-
-KMenu* Pokemodr::PokemodTree::contextMenu(const QModelIndex& index)
-{
- return model()->data(index, Pokemodr::BaseModel::ContextMenuRole).value<KMenu*>();
-}
-
-const Pokemod::Pokemod* Pokemodr::PokemodTree::currentPokemod() const
-{
- QModelIndex index = currentIndex();
- if (index.isValid())
- {
- const Pokemod::Object* object = static_cast<BaseModel*>(index.internalPointer())->object();
- if (object)
- return qobject_cast<const Pokemod::Pokemod*>(object->pokemod());
- }
- return NULL;
-}
-
-QDomDocument Pokemodr::PokemodTree::copy(const QModelIndex& index)
-{
- QDomDocument xml;
- xml.setContent(model()->data(index, Pokemodr::BaseModel::XmlRole).toString());
- return xml;
-}
-
-void Pokemodr::PokemodTree::paste(const QModelIndex& index, const QDomDocument& data)
-{
- model()->setData(index, data.toString(), Pokemodr::BaseModel::XmlRole);
-}
-
-QList<const Pokemod::Pokemod*> Pokemodr::PokemodTree::openedPokemods() const
-{
- return m_pokemods.keys();
-}
-
-void Pokemodr::PokemodTree::addPokemod(Pokemod::Pokemod* pokemod)
-{
- qobject_cast<PokemodTreeModel*>(model())->addPokemod(pokemod);
- m_pokemods[pokemod] = UrlDirty(KUrl(), false);
-}
-
-void Pokemodr::PokemodTree::addPokemod(Pokemod::Pokemod* pokemod, const KUrl& url)
-{
- qobject_cast<PokemodTreeModel*>(model())->addPokemod(pokemod);
- m_pokemods[pokemod] = UrlDirty(url, false);
-}
-
-void Pokemodr::PokemodTree::deletePokemod(const Pokemod::Pokemod* pokemod)
-{
- if (m_pokemods.contains(pokemod))
- {
- qobject_cast<PokemodTreeModel*>(model())->deletePokemod(pokemod);
- m_pokemods.remove(pokemod);
- }
-}
-
-bool Pokemodr::PokemodTree::isOpen(const KUrl& url) const
-{
- foreach (UrlDirty pair, m_pokemods.values())
- {
- if (url == pair.first)
- return true;
- }
- return false;
-}
-
-KUrl Pokemodr::PokemodTree::url(const Pokemod::Pokemod* pokemod) const
-{
- if (m_pokemods.contains(pokemod))
- return m_pokemods[pokemod].first;
- return KUrl();
-}
-
-QStringList Pokemodr::PokemodTree::urls() const
-{
- QStringList urls;
- foreach (UrlDirty pair, m_pokemods.values())
- urls << pair.first.prettyUrl();
- return urls;
-}
-
-void Pokemodr::PokemodTree::setUrl(const Pokemod::Pokemod* pokemod, const KUrl& url)
-{
- if (m_pokemods.contains(pokemod))
- m_pokemods[pokemod] = UrlDirty(url, false);
-}
-
-bool Pokemodr::PokemodTree::dirty(const Pokemod::Pokemod* pokemod) const
-{
- if (m_pokemods.contains(pokemod))
- return m_pokemods[pokemod].second;
- return false;
-}
-
-void Pokemodr::PokemodTree::setDirty(const Pokemod::Pokemod* pokemod, const bool dirty)
-{
- if (m_pokemods.contains(pokemod))
- m_pokemods[pokemod].second = dirty;
-}
-
-void Pokemodr::PokemodTree::setDirty()
-{
- setDirty(currentPokemod(), true);
-}
diff --git a/sigmodr/PokemodUI.cpp b/sigmodr/PokemodUI.cpp
deleted file mode 100644
index 1204b43a..00000000
--- a/sigmodr/PokemodUI.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-// Header include
-#include "PokemodUI.h"
-
-// Pokemodr includes
-#include "TypechartModel.h"
-
-// Pokemod includes
-#include "../pokemod/Map.h"
-#include "../pokemod/MapWarp.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Type.h"
-
-Pokemodr::PokemodUI::PokemodUI(Pokemod::Pokemod* pokemod, QWidget* parent) :
- ObjectUI(parent),
- m_changingMult(true),
- m_lastMap(-1)
-{
- setupUi(this);
- setObjects(pokemod, new Pokemod::Pokemod(*pokemod));
-}
-
-Pokemodr::PokemodUI::~PokemodUI()
-{
-}
-
-void Pokemodr::PokemodUI::initGui()
-{
- QStringList types;
- for (int i = 0; i < qobject_cast<Pokemod::Pokemod*>(original())->typeCount(); ++i)
- types << qobject_cast<Pokemod::Pokemod*>(original())->type(i)->name();
- varTypechart->setModel(new TypechartModel(*qobject_cast<Pokemod::Pokemod*>(modified())->typechart(), types));
-}
-
-void Pokemodr::PokemodUI::refreshGui()
-{
- varMap->clear();
- for (int i = 0; i < qobject_cast<Pokemod::Pokemod*>(original())->mapCount(); ++i)
- {
- const Pokemod::Map* map = qobject_cast<Pokemod::Pokemod*>(original())->map(i);
- varMap->addItem(map->name(), map->id());
- }
- varEffectiveness->setEnabled(false);
-}
-
-void Pokemodr::PokemodUI::setGui()
-{
- const bool resetWarps = (qobject_cast<Pokemod::Pokemod*>(modified())->startMap() != m_lastMap);
- varTitle->setText(qobject_cast<Pokemod::Pokemod*>(modified())->title());
- varVersion->setText(qobject_cast<Pokemod::Pokemod*>(modified())->version());
- varDescription->setText(qobject_cast<Pokemod::Pokemod*>(modified())->description());
- varMap->setCurrentIndex(varMap->findData(qobject_cast<Pokemod::Pokemod*>(modified())->startMap()));
- m_lastMap = qobject_cast<Pokemod::Pokemod*>(modified())->startMap();
- if (resetWarps)
- {
- varWarp->clear();
- const int mapIndex = qobject_cast<Pokemod::Pokemod*>(original())->mapIndex(qobject_cast<Pokemod::Pokemod*>(modified())->startMap());
- if (mapIndex != INT_MAX)
- {
- const Pokemod::Map* map = qobject_cast<Pokemod::Pokemod*>(original())->map(mapIndex);
- for (int i = 0; i < map->warpCount(); ++i)
- {
- const Pokemod::MapWarp* warp = map->warp(i);
- varWarp->addItem(warp->name(), warp->id());
- }
- }
- }
- varWarp->setCurrentIndex(varWarp->findData(qobject_cast<Pokemod::Pokemod*>(modified())->startWarp()));
-}
-
-void Pokemodr::PokemodUI::apply()
-{
- *qobject_cast<Pokemod::Pokemod*>(original()) = *qobject_cast<Pokemod::Pokemod*>(modified());
- emit(changed(false));
-}
-
-void Pokemodr::PokemodUI::discard()
-{
- *qobject_cast<Pokemod::Pokemod*>(modified()) = *qobject_cast<Pokemod::Pokemod*>(original());
- setGui();
- qobject_cast<TypechartModel*>(varTypechart->model())->discarded();
- emit(changed(false));
-}
-
-void Pokemodr::PokemodUI::on_varTitle_textChanged(const QString& title)
-{
- const int cursor = varTitle->cursorPosition();
- qobject_cast<Pokemod::Pokemod*>(modified())->setTitle(title);
- varTitle->setCursorPosition(cursor);
-}
-
-void Pokemodr::PokemodUI::on_varVersion_textChanged(const QString& version)
-{
- const int cursor = varVersion->cursorPosition();
- qobject_cast<Pokemod::Pokemod*>(modified())->setVersion(version);
- varVersion->setCursorPosition(cursor);
-}
-
-void Pokemodr::PokemodUI::on_varDescription_textChanged(const QString& description)
-{
- qobject_cast<Pokemod::Pokemod*>(modified())->setDescription(description);
-}
-
-void Pokemodr::PokemodUI::on_varMap_activated(const int map)
-{
- qobject_cast<Pokemod::Pokemod*>(modified())->setStartMap(varMap->itemData(map).toInt());
-}
-
-void Pokemodr::PokemodUI::on_varWarp_activated(const int warp)
-{
- qobject_cast<Pokemod::Pokemod*>(modified())->setStartWarp(varWarp->itemData(warp).toInt());
-}
-
-void Pokemodr::PokemodUI::on_varTypechart_clicked(const QModelIndex& index)
-{
- m_index = index;
- m_changingMult = true;
- varEffectiveness->setEnabled(true);
- boxEffectiveness->setTitle(QString("%1 vs. %2").arg(varTypechart->model()->headerData(index.row(), Qt::Vertical, Qt::DisplayRole).toString()).arg(varTypechart->model()->headerData(index.column(), Qt::Horizontal, Qt::DisplayRole).toString()));
- varEffectiveness->setValue(varTypechart->model()->data(m_index, Qt::EditRole).value<Pokemod::Fraction>());
-}
-
-void Pokemodr::PokemodUI::on_varEffectiveness_valueChanged(const Pokemod::Fraction& multiplier)
-{
- varTypechart->model()->setData(m_index, QVariant::fromValue(multiplier), Qt::EditRole);
- if (!m_changingMult)
- emit(changed());
- m_changingMult = false;
- setGui();
-}
diff --git a/sigmodr/RulesUI.cpp b/sigmodr/RulesUI.cpp
index 10a177c8..1e7db476 100644
--- a/sigmodr/RulesUI.cpp
+++ b/sigmodr/RulesUI.cpp
@@ -18,177 +18,177 @@
// Header include
#include "RulesUI.h"
-// Pokemod includes
-#include "../pokemod/Rules.h"
+// Sigmod includes
+#include "../sigmod/Rules.h"
-Pokemodr::RulesUI::RulesUI(Pokemod::Rules* rules, QWidget* parent) :
+Sigmodr::RulesUI::RulesUI(Sigmod::Rules* rules, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(rules, new Pokemod::Rules(*rules));
-}
-
-Pokemodr::RulesUI::~RulesUI()
-{
-}
-
-void Pokemodr::RulesUI::setGui()
-{
- boxGenders->setChecked(qobject_cast<Pokemod::Rules*>(modified())->genderAllowed() ? Qt::Checked : Qt::Unchecked);
- varBreeding->setCheckState(qobject_cast<Pokemod::Rules*>(modified())->breedingAllowed() ? Qt::Checked : Qt::Unchecked);
- varCriticalDomains->setChecked(qobject_cast<Pokemod::Rules*>(modified())->criticalDomains() ? Qt::Checked : Qt::Unchecked);
- varHardCash->setChecked(qobject_cast<Pokemod::Rules*>(modified())->hardCash() ? Qt::Checked : Qt::Unchecked);
- varSwitchStyle->setChecked(qobject_cast<Pokemod::Rules*>(modified())->allowSwitchStyle() ? Qt::Checked : Qt::Unchecked);
- varUseTurns->setChecked(qobject_cast<Pokemod::Rules*>(modified())->useTurns() ? Qt::Checked : Qt::Unchecked);
- boxSplitSpecial->setChecked(qobject_cast<Pokemod::Rules*>(modified())->specialSplit() ? Qt::Checked : Qt::Unchecked);
- varSplitSpecialDV->setCheckState(qobject_cast<Pokemod::Rules*>(modified())->specialDVSplit() ? Qt::Checked : Qt::Unchecked);
- boxEffortValues->setChecked(qobject_cast<Pokemod::Rules*>(modified())->effortValuesAllowed() ? Qt::Checked : Qt::Unchecked);
- varMaxEV->setValue(qobject_cast<Pokemod::Rules*>(modified())->maxTotalEV());
- varMaxEVPerStat->setEnabled(0 < qobject_cast<Pokemod::Rules*>(modified())->maxTotalEV());
- varMaxEVPerStat->setMaximum(qobject_cast<Pokemod::Rules*>(modified())->maxTotalEV());
- varMaxEVPerStat->setValue(qobject_cast<Pokemod::Rules*>(modified())->maxEVPerStat());
- varBoxes->setValue(qobject_cast<Pokemod::Rules*>(modified())->numBoxes());
- varBoxSize->setEnabled(0 < qobject_cast<Pokemod::Rules*>(modified())->numBoxes());
- varBoxSize->setValue(qobject_cast<Pokemod::Rules*>(modified())->boxSize());
- varMaxParty->setValue(qobject_cast<Pokemod::Rules*>(modified())->maxParty());
- varMaxFight->setMaximum(qobject_cast<Pokemod::Rules*>(modified())->maxParty());
- varMaxFight->setValue(qobject_cast<Pokemod::Rules*>(modified())->maxFight());
- varMaxPlayers->setValue(qobject_cast<Pokemod::Rules*>(modified())->maxPlayers());
- varMaxMoves->setValue(qobject_cast<Pokemod::Rules*>(modified())->maxMoves());
- varMaxLevel->setValue(qobject_cast<Pokemod::Rules*>(modified())->maxLevel());
- varMaxHeldItems->setValue(qobject_cast<Pokemod::Rules*>(modified())->maxHeldItems());
- varMaxNatures->setValue(qobject_cast<Pokemod::Rules*>(modified())->maxNatures());
- varMaxAbilities->setValue(qobject_cast<Pokemod::Rules*>(modified())->maxAbilities());
- varMaxStages->setValue(qobject_cast<Pokemod::Rules*>(modified())->maxStages());
- varMaxMoney->setValue(qobject_cast<Pokemod::Rules*>(modified())->maxMoney());
-}
-
-void Pokemodr::RulesUI::apply()
-{
- *qobject_cast<Pokemod::Rules*>(original()) = *qobject_cast<Pokemod::Rules*>(modified());
+ setObjects(rules, new Sigmod::Rules(*rules));
+}
+
+Sigmodr::RulesUI::~RulesUI()
+{
+}
+
+void Sigmodr::RulesUI::setGui()
+{
+ boxGenders->setChecked(qobject_cast<Sigmod::Rules*>(modified())->genderAllowed() ? Qt::Checked : Qt::Unchecked);
+ varBreeding->setCheckState(qobject_cast<Sigmod::Rules*>(modified())->breedingAllowed() ? Qt::Checked : Qt::Unchecked);
+ varCriticalDomains->setChecked(qobject_cast<Sigmod::Rules*>(modified())->criticalDomains() ? Qt::Checked : Qt::Unchecked);
+ varHardCash->setChecked(qobject_cast<Sigmod::Rules*>(modified())->hardCash() ? Qt::Checked : Qt::Unchecked);
+ varSwitchStyle->setChecked(qobject_cast<Sigmod::Rules*>(modified())->allowSwitchStyle() ? Qt::Checked : Qt::Unchecked);
+ varUseTurns->setChecked(qobject_cast<Sigmod::Rules*>(modified())->useTurns() ? Qt::Checked : Qt::Unchecked);
+ boxSplitSpecial->setChecked(qobject_cast<Sigmod::Rules*>(modified())->specialSplit() ? Qt::Checked : Qt::Unchecked);
+ varSplitSpecialDV->setCheckState(qobject_cast<Sigmod::Rules*>(modified())->specialDVSplit() ? Qt::Checked : Qt::Unchecked);
+ boxEffortValues->setChecked(qobject_cast<Sigmod::Rules*>(modified())->effortValuesAllowed() ? Qt::Checked : Qt::Unchecked);
+ varMaxEV->setValue(qobject_cast<Sigmod::Rules*>(modified())->maxTotalEV());
+ varMaxEVPerStat->setEnabled(0 < qobject_cast<Sigmod::Rules*>(modified())->maxTotalEV());
+ varMaxEVPerStat->setMaximum(qobject_cast<Sigmod::Rules*>(modified())->maxTotalEV());
+ varMaxEVPerStat->setValue(qobject_cast<Sigmod::Rules*>(modified())->maxEVPerStat());
+ varBoxes->setValue(qobject_cast<Sigmod::Rules*>(modified())->numBoxes());
+ varBoxSize->setEnabled(0 < qobject_cast<Sigmod::Rules*>(modified())->numBoxes());
+ varBoxSize->setValue(qobject_cast<Sigmod::Rules*>(modified())->boxSize());
+ varMaxParty->setValue(qobject_cast<Sigmod::Rules*>(modified())->maxParty());
+ varMaxFight->setMaximum(qobject_cast<Sigmod::Rules*>(modified())->maxParty());
+ varMaxFight->setValue(qobject_cast<Sigmod::Rules*>(modified())->maxFight());
+ varMaxPlayers->setValue(qobject_cast<Sigmod::Rules*>(modified())->maxPlayers());
+ varMaxMoves->setValue(qobject_cast<Sigmod::Rules*>(modified())->maxMoves());
+ varMaxLevel->setValue(qobject_cast<Sigmod::Rules*>(modified())->maxLevel());
+ varMaxHeldItems->setValue(qobject_cast<Sigmod::Rules*>(modified())->maxHeldItems());
+ varMaxNatures->setValue(qobject_cast<Sigmod::Rules*>(modified())->maxNatures());
+ varMaxAbilities->setValue(qobject_cast<Sigmod::Rules*>(modified())->maxAbilities());
+ varMaxStages->setValue(qobject_cast<Sigmod::Rules*>(modified())->maxStages());
+ varMaxMoney->setValue(qobject_cast<Sigmod::Rules*>(modified())->maxMoney());
+}
+
+void Sigmodr::RulesUI::apply()
+{
+ *qobject_cast<Sigmod::Rules*>(original()) = *qobject_cast<Sigmod::Rules*>(modified());
emit(changed(false));
}
-void Pokemodr::RulesUI::discard()
+void Sigmodr::RulesUI::discard()
{
- *qobject_cast<Pokemod::Rules*>(modified()) = *qobject_cast<Pokemod::Rules*>(original());
+ *qobject_cast<Sigmod::Rules*>(modified()) = *qobject_cast<Sigmod::Rules*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::RulesUI::on_boxGenders_toggled(const bool genders)
+void Sigmodr::RulesUI::on_boxGenders_toggled(const bool genders)
{
- qobject_cast<Pokemod::Rules*>(modified())->setGenderAllowed(genders);
+ qobject_cast<Sigmod::Rules*>(modified())->setGenderAllowed(genders);
}
-void Pokemodr::RulesUI::on_varBreeding_toggled(const bool breeding)
+void Sigmodr::RulesUI::on_varBreeding_toggled(const bool breeding)
{
- qobject_cast<Pokemod::Rules*>(modified())->setBreedingAllowed(breeding);
+ qobject_cast<Sigmod::Rules*>(modified())->setBreedingAllowed(breeding);
}
-void Pokemodr::RulesUI::on_varCriticalDomains_toggled(const bool criticalDomains)
+void Sigmodr::RulesUI::on_varCriticalDomains_toggled(const bool criticalDomains)
{
- qobject_cast<Pokemod::Rules*>(modified())->setCriticalDomains(criticalDomains);
+ qobject_cast<Sigmod::Rules*>(modified())->setCriticalDomains(criticalDomains);
}
-void Pokemodr::RulesUI::on_varHardCash_toggled(const bool hardCash)
+void Sigmodr::RulesUI::on_varHardCash_toggled(const bool hardCash)
{
- qobject_cast<Pokemod::Rules*>(modified())->setHardCash(hardCash);
+ qobject_cast<Sigmod::Rules*>(modified())->setHardCash(hardCash);
}
-void Pokemodr::RulesUI::on_varSwitchStyle_toggled(const bool switchStyle)
+void Sigmodr::RulesUI::on_varSwitchStyle_toggled(const bool switchStyle)
{
- qobject_cast<Pokemod::Rules*>(modified())->setAllowSwitchStyle(switchStyle);
+ qobject_cast<Sigmod::Rules*>(modified())->setAllowSwitchStyle(switchStyle);
}
-void Pokemodr::RulesUI::on_varUseTurns_toggled(const bool useTurns)
+void Sigmodr::RulesUI::on_varUseTurns_toggled(const bool useTurns)
{
- qobject_cast<Pokemod::Rules*>(modified())->setUseTurns(useTurns);
+ qobject_cast<Sigmod::Rules*>(modified())->setUseTurns(useTurns);
}
-void Pokemodr::RulesUI::on_boxSplitSpecial_toggled(const bool splitSpecial)
+void Sigmodr::RulesUI::on_boxSplitSpecial_toggled(const bool splitSpecial)
{
- qobject_cast<Pokemod::Rules*>(modified())->setSpecialSplit(splitSpecial);
+ qobject_cast<Sigmod::Rules*>(modified())->setSpecialSplit(splitSpecial);
if (!splitSpecial)
- qobject_cast<Pokemod::Rules*>(modified())->setSpecialDVSplit(false);
+ qobject_cast<Sigmod::Rules*>(modified())->setSpecialDVSplit(false);
}
-void Pokemodr::RulesUI::on_varSplitSpecialDV_toggled(const bool splitSpecialDV)
+void Sigmodr::RulesUI::on_varSplitSpecialDV_toggled(const bool splitSpecialDV)
{
- qobject_cast<Pokemod::Rules*>(modified())->setSpecialDVSplit(splitSpecialDV);
+ qobject_cast<Sigmod::Rules*>(modified())->setSpecialDVSplit(splitSpecialDV);
}
-void Pokemodr::RulesUI::on_boxEffortValues_toggled(const bool effortValues)
+void Sigmodr::RulesUI::on_boxEffortValues_toggled(const bool effortValues)
{
- qobject_cast<Pokemod::Rules*>(modified())->setEffortValuesAllowed(effortValues);
+ qobject_cast<Sigmod::Rules*>(modified())->setEffortValuesAllowed(effortValues);
}
-void Pokemodr::RulesUI::on_varMaxEV_valueChanged(const int maxEV)
+void Sigmodr::RulesUI::on_varMaxEV_valueChanged(const int maxEV)
{
- qobject_cast<Pokemod::Rules*>(modified())->setMaxTotalEV(maxEV);
+ qobject_cast<Sigmod::Rules*>(modified())->setMaxTotalEV(maxEV);
}
-void Pokemodr::RulesUI::on_varMaxEVPerStat_valueChanged(const int maxEVPerStat)
+void Sigmodr::RulesUI::on_varMaxEVPerStat_valueChanged(const int maxEVPerStat)
{
- qobject_cast<Pokemod::Rules*>(modified())->setMaxEVPerStat(maxEVPerStat);
+ qobject_cast<Sigmod::Rules*>(modified())->setMaxEVPerStat(maxEVPerStat);
}
-void Pokemodr::RulesUI::on_varBoxes_valueChanged(const int boxes)
+void Sigmodr::RulesUI::on_varBoxes_valueChanged(const int boxes)
{
- qobject_cast<Pokemod::Rules*>(modified())->setNumBoxes(boxes);
+ qobject_cast<Sigmod::Rules*>(modified())->setNumBoxes(boxes);
}
-void Pokemodr::RulesUI::on_varBoxSize_valueChanged(const int boxSize)
+void Sigmodr::RulesUI::on_varBoxSize_valueChanged(const int boxSize)
{
- qobject_cast<Pokemod::Rules*>(modified())->setBoxSize(boxSize);
+ qobject_cast<Sigmod::Rules*>(modified())->setBoxSize(boxSize);
}
-void Pokemodr::RulesUI::on_varMaxParty_valueChanged(const int maxParty)
+void Sigmodr::RulesUI::on_varMaxParty_valueChanged(const int maxParty)
{
- qobject_cast<Pokemod::Rules*>(modified())->setMaxParty(maxParty);
+ qobject_cast<Sigmod::Rules*>(modified())->setMaxParty(maxParty);
}
-void Pokemodr::RulesUI::on_varMaxFight_valueChanged(const int maxFight)
+void Sigmodr::RulesUI::on_varMaxFight_valueChanged(const int maxFight)
{
- qobject_cast<Pokemod::Rules*>(modified())->setMaxFight(maxFight);
+ qobject_cast<Sigmod::Rules*>(modified())->setMaxFight(maxFight);
}
-void Pokemodr::RulesUI::on_varMaxPlayers_valueChanged(const int maxPlayers)
+void Sigmodr::RulesUI::on_varMaxPlayers_valueChanged(const int maxPlayers)
{
- qobject_cast<Pokemod::Rules*>(modified())->setMaxPlayers(maxPlayers);
+ qobject_cast<Sigmod::Rules*>(modified())->setMaxPlayers(maxPlayers);
}
-void Pokemodr::RulesUI::on_varMaxMoves_valueChanged(const int maxMoves)
+void Sigmodr::RulesUI::on_varMaxMoves_valueChanged(const int maxMoves)
{
- qobject_cast<Pokemod::Rules*>(modified())->setMaxMoves(maxMoves);
+ qobject_cast<Sigmod::Rules*>(modified())->setMaxMoves(maxMoves);
}
-void Pokemodr::RulesUI::on_varMaxLevel_valueChanged(const int maxLevel)
+void Sigmodr::RulesUI::on_varMaxLevel_valueChanged(const int maxLevel)
{
- qobject_cast<Pokemod::Rules*>(modified())->setMaxLevel(maxLevel);
+ qobject_cast<Sigmod::Rules*>(modified())->setMaxLevel(maxLevel);
}
-void Pokemodr::RulesUI::on_varMaxHeldItems_valueChanged(const int maxHeldItems)
+void Sigmodr::RulesUI::on_varMaxHeldItems_valueChanged(const int maxHeldItems)
{
- qobject_cast<Pokemod::Rules*>(modified())->setMaxHeldItems(maxHeldItems);
+ qobject_cast<Sigmod::Rules*>(modified())->setMaxHeldItems(maxHeldItems);
}
-void Pokemodr::RulesUI::on_varMaxNatures_valueChanged(const int maxNatures)
+void Sigmodr::RulesUI::on_varMaxNatures_valueChanged(const int maxNatures)
{
- qobject_cast<Pokemod::Rules*>(modified())->setMaxNatures(maxNatures);
+ qobject_cast<Sigmod::Rules*>(modified())->setMaxNatures(maxNatures);
}
-void Pokemodr::RulesUI::on_varMaxAbilities_valueChanged(const int maxAbilities)
+void Sigmodr::RulesUI::on_varMaxAbilities_valueChanged(const int maxAbilities)
{
- qobject_cast<Pokemod::Rules*>(modified())->setMaxAbilities(maxAbilities);
+ qobject_cast<Sigmod::Rules*>(modified())->setMaxAbilities(maxAbilities);
}
-void Pokemodr::RulesUI::on_varMaxStages_valueChanged(const int maxStages)
+void Sigmodr::RulesUI::on_varMaxStages_valueChanged(const int maxStages)
{
- qobject_cast<Pokemod::Rules*>(modified())->setMaxStages(maxStages);
+ qobject_cast<Sigmod::Rules*>(modified())->setMaxStages(maxStages);
}
-void Pokemodr::RulesUI::on_varMaxMoney_valueChanged(const int maxMoney)
+void Sigmodr::RulesUI::on_varMaxMoney_valueChanged(const int maxMoney)
{
- qobject_cast<Pokemod::Rules*>(modified())->setMaxMoney(maxMoney);
+ qobject_cast<Sigmod::Rules*>(modified())->setMaxMoney(maxMoney);
}
diff --git a/sigmodr/RulesUI.h b/sigmodr/RulesUI.h
index 5b5ca6e4..68cef7da 100644
--- a/sigmodr/RulesUI.h
+++ b/sigmodr/RulesUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_RULESUI__
-#define __POKEMODR_RULESUI__
+#ifndef __SIGMODR_RULESUI__
+#define __SIGMODR_RULESUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_rules.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Rules;
}
-namespace Pokemodr
+namespace Sigmodr
{
class RulesUI : public ObjectUI, private Ui::formRules
{
Q_OBJECT
public:
- RulesUI(Pokemod::Rules* rules, QWidget* parent);
+ RulesUI(Sigmod::Rules* rules, QWidget* parent);
~RulesUI();
public slots:
void apply();
diff --git a/sigmodr/ScriptWidget.cpp b/sigmodr/ScriptWidget.cpp
index 380699b0..b27bd811 100644
--- a/sigmodr/ScriptWidget.cpp
+++ b/sigmodr/ScriptWidget.cpp
@@ -31,7 +31,7 @@
#include <KTextEditor/EditorChooser>
#include <KTextEditor/View>
-Pokemodr::ScriptWidget::ScriptWidget(QWidget* parent, const Pokemod::Script& value) :
+Sigmodr::ScriptWidget::ScriptWidget(QWidget* parent, const Sigmod::Script& value) :
QWidget(parent),
m_value(value),
m_editor(KTextEditor::EditorChooser::editor()),
@@ -81,24 +81,24 @@ Pokemodr::ScriptWidget::ScriptWidget(QWidget* parent, const Pokemod::Script& val
}
layoutScript->addWidget(m_view);
connect(m_document, SIGNAL(textChanged(KTextEditor::Document*)), this, SLOT(scriptChanged()));
- connect(this, SIGNAL(valueChanged(const Pokemod::Script&)), SLOT(setGui()));
+ connect(this, SIGNAL(valueChanged(const Sigmod::Script&)), SLOT(setGui()));
connect(m_view, SIGNAL(focusIn(KTextEditor::View*)), this, SLOT(focused(KTextEditor::View*)));
connect(m_view, SIGNAL(focusOut(KTextEditor::View*)), this, SLOT(unfocused(KTextEditor::View*)));
setGui();
}
-Pokemodr::ScriptWidget::~ScriptWidget()
+Sigmodr::ScriptWidget::~ScriptWidget()
{
m_editor->writeConfig(NULL);
// delete m_document;
}
-Pokemod::Script Pokemodr::ScriptWidget::value() const
+Sigmod::Script Sigmodr::ScriptWidget::value() const
{
return m_value;
}
-void Pokemodr::ScriptWidget::setGui()
+void Sigmodr::ScriptWidget::setGui()
{
varInterpreter->setCurrentIndex(varInterpreter->findData(m_value.interpreter()));
m_document->setHighlightingMode(varInterpreter->currentText());
@@ -107,7 +107,7 @@ void Pokemodr::ScriptWidget::setGui()
m_view->setCursorPosition(cursor);
}
-void Pokemodr::ScriptWidget::setValue(const Pokemod::Script& value)
+void Sigmodr::ScriptWidget::setValue(const Sigmod::Script& value)
{
if (m_value == value)
return;
@@ -115,14 +115,14 @@ void Pokemodr::ScriptWidget::setValue(const Pokemod::Script& value)
emit(valueChanged(m_value));
}
-void Pokemodr::ScriptWidget::on_varInterpreter_activated()
+void Sigmodr::ScriptWidget::on_varInterpreter_activated()
{
m_value.setInterpreter(varInterpreter->itemData(varInterpreter->currentIndex()).toString());
m_document->setHighlightingMode(varInterpreter->currentText());
emit(valueChanged(m_value));
}
-void Pokemodr::ScriptWidget::scriptChanged()
+void Sigmodr::ScriptWidget::scriptChanged()
{
if (m_value.script() != m_document->text())
{
@@ -131,14 +131,14 @@ void Pokemodr::ScriptWidget::scriptChanged()
}
}
-void Pokemodr::ScriptWidget::focused(KTextEditor::View* view)
+void Sigmodr::ScriptWidget::focused(KTextEditor::View* view)
{
KXmlGuiWindow* topLevel = qobject_cast<KXmlGuiWindow*>(KApplication::kApplication()->activeWindow());
if (topLevel)
topLevel->guiFactory()->addClient(view);
}
-void Pokemodr::ScriptWidget::unfocused(KTextEditor::View* view)
+void Sigmodr::ScriptWidget::unfocused(KTextEditor::View* view)
{
KXmlGuiWindow* topLevel = qobject_cast<KXmlGuiWindow*>(KApplication::kApplication()->activeWindow());
QWidget* focused = KApplication::focusWidget();
diff --git a/sigmodr/ScriptWidget.h b/sigmodr/ScriptWidget.h
index eb07bfbc..c1490eae 100644
--- a/sigmodr/ScriptWidget.h
+++ b/sigmodr/ScriptWidget.h
@@ -15,11 +15,11 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SCRIPTWIDGET__
-#define __POKEMODR_SCRIPTWIDGET__
+#ifndef __SIGMODR_SCRIPTWIDGET__
+#define __SIGMODR_SCRIPTWIDGET__
-// Pokemod includes
-#include "../pokemod/Script.h"
+// Sigmod includes
+#include "../sigmod/Script.h"
// Qt includes
#include <QtGui/QWidget>
@@ -35,21 +35,21 @@ class Document;
class View;
}
-namespace Pokemodr
+namespace Sigmodr
{
class ScriptWidget : public QWidget, private Ui::formScript
{
Q_OBJECT
public:
- explicit ScriptWidget(QWidget* parent, const Pokemod::Script& value = Pokemod::Script("", ""));
+ explicit ScriptWidget(QWidget* parent, const Sigmod::Script& value = Sigmod::Script("", ""));
~ScriptWidget();
- Pokemod::Script value() const;
+ Sigmod::Script value() const;
signals:
- void valueChanged(const Pokemod::Script&);
+ void valueChanged(const Sigmod::Script&);
public slots:
- void setValue(const Pokemod::Script& value);
+ void setValue(const Sigmod::Script& value);
protected slots:
void setGui();
@@ -59,7 +59,7 @@ class ScriptWidget : public QWidget, private Ui::formScript
void focused(KTextEditor::View* view);
void unfocused(KTextEditor::View* view);
private:
- Pokemod::Script m_value;
+ Sigmod::Script m_value;
KTextEditor::Editor* m_editor;
KTextEditor::Document* m_document;
KTextEditor::View* m_view;
diff --git a/sigmodr/SigmodTree.cpp b/sigmodr/SigmodTree.cpp
new file mode 100644
index 00000000..b0d32ca8
--- /dev/null
+++ b/sigmodr/SigmodTree.cpp
@@ -0,0 +1,156 @@
+/*
+ * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Header include
+#include "SigmodTree.h"
+
+// Model includes
+#include "models/BaseModel.h"
+
+// Sigmodr includes
+#include "ObjectUI.h"
+#include "SigmodTreeModel.h"
+
+// Sigmod includes
+#include "../sigmod/Object.h"
+#include "../sigmod/Sigmod.h"
+
+// Qt includes
+#include <QtGui/QHeaderView>
+
+Sigmodr::SigmodTree::SigmodTree(QWidget* parent) :
+ QTreeView(parent)
+{
+ header()->hide();
+ setModel(new Sigmodr::SigmodTreeModel(this));
+ setRootIndex(model()->index(-1, 0, QModelIndex()));
+}
+
+QString Sigmodr::SigmodTree::description(const QModelIndex& index)
+{
+ return QString("%1: %2").arg(model()->data(index, Sigmodr::BaseModel::TypeRole).toString(), model()->data(index, Qt::DisplayRole).toString());
+}
+
+Sigmodr::ObjectUI* Sigmodr::SigmodTree::editorWidget(const QModelIndex& index)
+{
+ Sigmodr::ObjectUI* widget = qobject_cast<Sigmodr::ObjectUI*>(model()->data(index, Sigmodr::BaseModel::WidgetRole).value<QWidget*>());
+ return widget;
+}
+
+KMenu* Sigmodr::SigmodTree::contextMenu(const QModelIndex& index)
+{
+ return model()->data(index, Sigmodr::BaseModel::ContextMenuRole).value<KMenu*>();
+}
+
+const Sigmod::Sigmod* Sigmodr::SigmodTree::currentSigmod() const
+{
+ QModelIndex index = currentIndex();
+ if (index.isValid())
+ {
+ const Sigmod::Object* object = static_cast<BaseModel*>(index.internalPointer())->object();
+ if (object)
+ return qobject_cast<const Sigmod::Sigmod*>(object->sigmod());
+ }
+ return NULL;
+}
+
+QDomDocument Sigmodr::SigmodTree::copy(const QModelIndex& index)
+{
+ QDomDocument xml;
+ xml.setContent(model()->data(index, Sigmodr::BaseModel::XmlRole).toString());
+ return xml;
+}
+
+void Sigmodr::SigmodTree::paste(const QModelIndex& index, const QDomDocument& data)
+{
+ model()->setData(index, data.toString(), Sigmodr::BaseModel::XmlRole);
+}
+
+QList<const Sigmod::Sigmod*> Sigmodr::SigmodTree::openedSigmods() const
+{
+ return m_sigmods.keys();
+}
+
+void Sigmodr::SigmodTree::addSigmod(Sigmod::Sigmod* sigmod)
+{
+ qobject_cast<SigmodTreeModel*>(model())->addSigmod(sigmod);
+ m_sigmods[sigmod] = UrlDirty(KUrl(), false);
+}
+
+void Sigmodr::SigmodTree::addSigmod(Sigmod::Sigmod* sigmod, const KUrl& url)
+{
+ qobject_cast<SigmodTreeModel*>(model())->addSigmod(sigmod);
+ m_sigmods[sigmod] = UrlDirty(url, false);
+}
+
+void Sigmodr::SigmodTree::deleteSigmod(const Sigmod::Sigmod* sigmod)
+{
+ if (m_sigmods.contains(sigmod))
+ {
+ qobject_cast<SigmodTreeModel*>(model())->deleteSigmod(sigmod);
+ m_sigmods.remove(sigmod);
+ }
+}
+
+bool Sigmodr::SigmodTree::isOpen(const KUrl& url) const
+{
+ foreach (UrlDirty pair, m_sigmods.values())
+ {
+ if (url == pair.first)
+ return true;
+ }
+ return false;
+}
+
+KUrl Sigmodr::SigmodTree::url(const Sigmod::Sigmod* sigmod) const
+{
+ if (m_sigmods.contains(sigmod))
+ return m_sigmods[sigmod].first;
+ return KUrl();
+}
+
+QStringList Sigmodr::SigmodTree::urls() const
+{
+ QStringList urls;
+ foreach (UrlDirty pair, m_sigmods.values())
+ urls << pair.first.prettyUrl();
+ return urls;
+}
+
+void Sigmodr::SigmodTree::setUrl(const Sigmod::Sigmod* sigmod, const KUrl& url)
+{
+ if (m_sigmods.contains(sigmod))
+ m_sigmods[sigmod] = UrlDirty(url, false);
+}
+
+bool Sigmodr::SigmodTree::dirty(const Sigmod::Sigmod* sigmod) const
+{
+ if (m_sigmods.contains(sigmod))
+ return m_sigmods[sigmod].second;
+ return false;
+}
+
+void Sigmodr::SigmodTree::setDirty(const Sigmod::Sigmod* sigmod, const bool dirty)
+{
+ if (m_sigmods.contains(sigmod))
+ m_sigmods[sigmod].second = dirty;
+}
+
+void Sigmodr::SigmodTree::setDirty()
+{
+ setDirty(currentSigmod(), true);
+}
diff --git a/sigmodr/PokemodTree.h b/sigmodr/SigmodTree.h
index 2de1fea9..1c2a066c 100644
--- a/sigmodr/PokemodTree.h
+++ b/sigmodr/SigmodTree.h
@@ -15,8 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_POKEMODTREE__
-#define __POKEMODR_POKEMODTREE__
+#ifndef __SIGMODR_SIGMODTREE__
+#define __SIGMODR_SIGMODTREE__
// Qt includes
#include <QtCore/QMap>
@@ -28,51 +28,51 @@
// Forward declarations
class KMenu;
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class ObjectUI;
-class PokemodTree : public QTreeView
+class SigmodTree : public QTreeView
{
Q_OBJECT
public:
- PokemodTree(QWidget* parent = 0);
+ SigmodTree(QWidget* parent = 0);
QString description(const QModelIndex& index);
- Pokemodr::ObjectUI* editorWidget(const QModelIndex& index);
+ Sigmodr::ObjectUI* editorWidget(const QModelIndex& index);
KMenu* contextMenu(const QModelIndex& index);
- const Pokemod::Pokemod* currentPokemod() const;
+ const Sigmod::Sigmod* currentSigmod() const;
QDomDocument copy(const QModelIndex& index);
void paste(const QModelIndex& index, const QDomDocument& data);
- QList<const Pokemod::Pokemod*> openedPokemods() const;
- void addPokemod(Pokemod::Pokemod* pokemod);
- void addPokemod(Pokemod::Pokemod* pokemod, const KUrl& url);
- void deletePokemod(const Pokemod::Pokemod* pokemod);
- void deleteAllPokemods();
+ QList<const Sigmod::Sigmod*> openedSigmods() const;
+ void addSigmod(Sigmod::Sigmod* sigmod);
+ void addSigmod(Sigmod::Sigmod* sigmod, const KUrl& url);
+ void deleteSigmod(const Sigmod::Sigmod* sigmod);
+ void deleteAllSigmods();
bool isOpen(const KUrl& url) const;
- KUrl url(const Pokemod::Pokemod* pokemod) const;
+ KUrl url(const Sigmod::Sigmod* sigmod) const;
QStringList urls() const;
- void setUrl(const Pokemod::Pokemod* pokemod, const KUrl& url);
+ void setUrl(const Sigmod::Sigmod* sigmod, const KUrl& url);
- bool dirty(const Pokemod::Pokemod* pokemod) const;
- void setDirty(const Pokemod::Pokemod* pokemod, const bool dirty);
+ bool dirty(const Sigmod::Sigmod* sigmod) const;
+ void setDirty(const Sigmod::Sigmod* sigmod, const bool dirty);
private slots:
void setDirty();
private:
typedef QPair<KUrl, bool> UrlDirty;
- QMap<const Pokemod::Pokemod*, UrlDirty> m_pokemods;
+ QMap<const Sigmod::Sigmod*, UrlDirty> m_sigmods;
};
}
diff --git a/sigmodr/PokemodTreeModel.cpp b/sigmodr/SigmodTreeModel.cpp
index 17d2af93..a2d8f5a0 100644
--- a/sigmodr/PokemodTreeModel.cpp
+++ b/sigmodr/SigmodTreeModel.cpp
@@ -16,7 +16,7 @@
*/
// Header include
-#include "PokemodTreeModel.h"
+#include "SigmodTreeModel.h"
// Model includes
#include "models/RootModel.h"
@@ -26,18 +26,18 @@
#include <QtCore/QStringList>
#include <QtXml/QDomDocument>
-Pokemodr::PokemodTreeModel::PokemodTreeModel(QObject* parent) :
+Sigmodr::SigmodTreeModel::SigmodTreeModel(QObject* parent) :
QAbstractItemModel(parent),
m_root(new RootModel)
{
}
-Pokemodr::PokemodTreeModel::~PokemodTreeModel()
+Sigmodr::SigmodTreeModel::~SigmodTreeModel()
{
delete m_root;
}
-QVariant Pokemodr::PokemodTreeModel::data(const QModelIndex& index, int role) const
+QVariant Sigmodr::SigmodTreeModel::data(const QModelIndex& index, int role) const
{
if (!index.isValid())
return QVariant();
@@ -45,12 +45,12 @@ QVariant Pokemodr::PokemodTreeModel::data(const QModelIndex& index, int role) co
return object->data(role);
}
-QVariant Pokemodr::PokemodTreeModel::headerData(int /*section*/, Qt::Orientation /*orientation*/, int /*role = Qt::DisplayRole*/) const
+QVariant Sigmodr::SigmodTreeModel::headerData(int /*section*/, Qt::Orientation /*orientation*/, int /*role = Qt::DisplayRole*/) const
{
return QVariant();
}
-QModelIndex Pokemodr::PokemodTreeModel::index(int row, int column, const QModelIndex& parent) const
+QModelIndex Sigmodr::SigmodTreeModel::index(int row, int column, const QModelIndex& parent) const
{
if ((row < -1) || (column < -1))
return QModelIndex();
@@ -63,7 +63,7 @@ QModelIndex Pokemodr::PokemodTreeModel::index(int row, int column, const QModelI
return createIndex(row, 0, object);
}
-QModelIndex Pokemodr::PokemodTreeModel::parent(const QModelIndex& index) const
+QModelIndex Sigmodr::SigmodTreeModel::parent(const QModelIndex& index) const
{
if (!index.isValid())
return QModelIndex();
@@ -73,18 +73,18 @@ QModelIndex Pokemodr::PokemodTreeModel::parent(const QModelIndex& index) const
return createIndex(parent->indexNumber(), 0, parent);
}
-int Pokemodr::PokemodTreeModel::rowCount(const QModelIndex& parent) const
+int Sigmodr::SigmodTreeModel::rowCount(const QModelIndex& parent) const
{
BaseModel* object = getItem(parent);
return object->rowCount();
}
-int Pokemodr::PokemodTreeModel::columnCount(const QModelIndex& /*parent*/) const
+int Sigmodr::SigmodTreeModel::columnCount(const QModelIndex& /*parent*/) const
{
return 1;
}
-Qt::ItemFlags Pokemodr::PokemodTreeModel::flags(const QModelIndex& index) const
+Qt::ItemFlags Sigmodr::SigmodTreeModel::flags(const QModelIndex& index) const
{
if (!index.isValid())
return 0;
@@ -92,7 +92,7 @@ Qt::ItemFlags Pokemodr::PokemodTreeModel::flags(const QModelIndex& index) const
return object->flags();
}
-bool Pokemodr::PokemodTreeModel::setData(const QModelIndex& index, const QVariant& value, int role)
+bool Sigmodr::SigmodTreeModel::setData(const QModelIndex& index, const QVariant& value, int role)
{
if (!index.isValid())
return false;
@@ -104,7 +104,7 @@ bool Pokemodr::PokemodTreeModel::setData(const QModelIndex& index, const QVarian
return success;
}
-Pokemodr::BaseModel* Pokemodr::PokemodTreeModel::getItem(const QModelIndex& index) const
+Sigmodr::BaseModel* Sigmodr::SigmodTreeModel::getItem(const QModelIndex& index) const
{
if (index.isValid())
{
@@ -115,45 +115,45 @@ Pokemodr::BaseModel* Pokemodr::PokemodTreeModel::getItem(const QModelIndex& inde
return m_root;
}
-QStringList Pokemodr::PokemodTreeModel::mimeTypes() const
+QStringList Sigmodr::SigmodTreeModel::mimeTypes() const
{
- return QStringList() << "application/x-pokemod+xml";
+ return QStringList() << "application/x-sigmod+xml";
}
-QMimeData* Pokemodr::PokemodTreeModel::mimeData(const QModelIndexList& indexes) const
+QMimeData* Sigmodr::SigmodTreeModel::mimeData(const QModelIndexList& indexes) const
{
QMimeData *mimeData = new QMimeData();
if ((indexes.size() == 1) && indexes[0].isValid())
{
QDomDocument xml;
- xml.setContent(data(indexes[0], Pokemodr::BaseModel::XmlRole).toString());
- mimeData->setData("application/x-pokemod+xml", xml.toByteArray());
+ xml.setContent(data(indexes[0], Sigmodr::BaseModel::XmlRole).toString());
+ mimeData->setData("application/x-sigmod+xml", xml.toByteArray());
}
return mimeData;
}
-bool Pokemodr::PokemodTreeModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int /*row*/, int /*column*/, const QModelIndex& parent)
+bool Sigmodr::SigmodTreeModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int /*row*/, int /*column*/, const QModelIndex& parent)
{
if (action == Qt::IgnoreAction)
return true;
- if (!data->hasFormat("application/x-pokemod+xml"))
+ if (!data->hasFormat("application/x-sigmod+xml"))
return false;
if (parent.isValid())
- return setData(parent, data->data("application/x-pokemod+xml"), Pokemodr::BaseModel::XmlRole);
+ return setData(parent, data->data("application/x-sigmod+xml"), Sigmodr::BaseModel::XmlRole);
emit(layoutAboutToBeChanged());
- bool success = m_root->setData(data->data("application/x-pokemod+xml"), Pokemodr::BaseModel::XmlRole);
+ bool success = m_root->setData(data->data("application/x-sigmod+xml"), Sigmodr::BaseModel::XmlRole);
emit(layoutChanged());
return success;
}
-void Pokemodr::PokemodTreeModel::addPokemod(Pokemod::Pokemod* pokemod)
+void Sigmodr::SigmodTreeModel::addSigmod(Sigmod::Sigmod* sigmod)
{
- m_root->addPokemod(pokemod);
+ m_root->addSigmod(sigmod);
emit(reset());
}
-void Pokemodr::PokemodTreeModel::deletePokemod(const Pokemod::Pokemod* pokemod)
+void Sigmodr::SigmodTreeModel::deleteSigmod(const Sigmod::Sigmod* sigmod)
{
- m_root->deletePokemod(pokemod);
+ m_root->deleteSigmod(sigmod);
emit(reset());
}
diff --git a/sigmodr/PokemodTreeModel.h b/sigmodr/SigmodTreeModel.h
index 213e945a..c6f6097f 100644
--- a/sigmodr/PokemodTreeModel.h
+++ b/sigmodr/SigmodTreeModel.h
@@ -15,8 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_POKEMODTREEMODELMODEL__
-#define __POKEMODR_POKEMODTREEMODELMODEL__
+#ifndef __SIGMODR_SIGMODTREEMODELMODEL__
+#define __SIGMODR_SIGMODTREEMODELMODEL__
// Model includes
#include "models/RootModel.h"
@@ -28,15 +28,15 @@
#include <QtCore/QStringList>
#include <QtCore/QVariant>
-namespace Pokemodr
+namespace Sigmodr
{
-class PokemodTreeModel : public QAbstractItemModel
+class SigmodTreeModel : public QAbstractItemModel
{
Q_OBJECT
public:
- PokemodTreeModel(QObject* parent = 0);
- ~PokemodTreeModel();
+ SigmodTreeModel(QObject* parent = 0);
+ ~SigmodTreeModel();
QVariant data(const QModelIndex& index, int role) const;
QVariant headerData(int /*section*/, Qt::Orientation /*orientation*/, int /*role = Qt::DisplayRole*/) const;
@@ -54,8 +54,8 @@ class PokemodTreeModel : public QAbstractItemModel
QMimeData* mimeData(const QModelIndexList& indexes) const;
bool dropMimeData(const QMimeData* data, Qt::DropAction action, int /*row*/, int /*column*/, const QModelIndex& parent);
- void addPokemod(Pokemod::Pokemod* pokemod);
- void deletePokemod(const Pokemod::Pokemod* pokemod);
+ void addSigmod(Sigmod::Sigmod* sigmod);
+ void deleteSigmod(const Sigmod::Sigmod* sigmod);
private:
BaseModel* getItem(const QModelIndex& index) const;
diff --git a/sigmodr/SigmodUI.cpp b/sigmodr/SigmodUI.cpp
new file mode 100644
index 00000000..fd6df445
--- /dev/null
+++ b/sigmodr/SigmodUI.cpp
@@ -0,0 +1,146 @@
+/*
+ * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Header include
+#include "SigmodUI.h"
+
+// Sigmodr includes
+#include "TypechartModel.h"
+
+// Sigmod includes
+#include "../sigmod/Map.h"
+#include "../sigmod/MapWarp.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Type.h"
+
+Sigmodr::SigmodUI::SigmodUI(Sigmod::Sigmod* sigmod, QWidget* parent) :
+ ObjectUI(parent),
+ m_changingMult(true),
+ m_lastMap(-1)
+{
+ setupUi(this);
+ setObjects(sigmod, new Sigmod::Sigmod(*sigmod));
+}
+
+Sigmodr::SigmodUI::~SigmodUI()
+{
+}
+
+void Sigmodr::SigmodUI::initGui()
+{
+ QStringList types;
+ for (int i = 0; i < qobject_cast<Sigmod::Sigmod*>(original())->typeCount(); ++i)
+ types << qobject_cast<Sigmod::Sigmod*>(original())->type(i)->name();
+ varTypechart->setModel(new TypechartModel(*qobject_cast<Sigmod::Sigmod*>(modified())->typechart(), types));
+}
+
+void Sigmodr::SigmodUI::refreshGui()
+{
+ varMap->clear();
+ for (int i = 0; i < qobject_cast<Sigmod::Sigmod*>(original())->mapCount(); ++i)
+ {
+ const Sigmod::Map* map = qobject_cast<Sigmod::Sigmod*>(original())->map(i);
+ varMap->addItem(map->name(), map->id());
+ }
+ varEffectiveness->setEnabled(false);
+}
+
+void Sigmodr::SigmodUI::setGui()
+{
+ const bool resetWarps = (qobject_cast<Sigmod::Sigmod*>(modified())->startMap() != m_lastMap);
+ varTitle->setText(qobject_cast<Sigmod::Sigmod*>(modified())->title());
+ varVersion->setText(qobject_cast<Sigmod::Sigmod*>(modified())->version());
+ varDescription->setText(qobject_cast<Sigmod::Sigmod*>(modified())->description());
+ varMap->setCurrentIndex(varMap->findData(qobject_cast<Sigmod::Sigmod*>(modified())->startMap()));
+ m_lastMap = qobject_cast<Sigmod::Sigmod*>(modified())->startMap();
+ if (resetWarps)
+ {
+ varWarp->clear();
+ const int mapIndex = qobject_cast<Sigmod::Sigmod*>(original())->mapIndex(qobject_cast<Sigmod::Sigmod*>(modified())->startMap());
+ if (mapIndex != INT_MAX)
+ {
+ const Sigmod::Map* map = qobject_cast<Sigmod::Sigmod*>(original())->map(mapIndex);
+ for (int i = 0; i < map->warpCount(); ++i)
+ {
+ const Sigmod::MapWarp* warp = map->warp(i);
+ varWarp->addItem(warp->name(), warp->id());
+ }
+ }
+ }
+ varWarp->setCurrentIndex(varWarp->findData(qobject_cast<Sigmod::Sigmod*>(modified())->startWarp()));
+}
+
+void Sigmodr::SigmodUI::apply()
+{
+ *qobject_cast<Sigmod::Sigmod*>(original()) = *qobject_cast<Sigmod::Sigmod*>(modified());
+ emit(changed(false));
+}
+
+void Sigmodr::SigmodUI::discard()
+{
+ *qobject_cast<Sigmod::Sigmod*>(modified()) = *qobject_cast<Sigmod::Sigmod*>(original());
+ setGui();
+ qobject_cast<TypechartModel*>(varTypechart->model())->discarded();
+ emit(changed(false));
+}
+
+void Sigmodr::SigmodUI::on_varTitle_textChanged(const QString& title)
+{
+ const int cursor = varTitle->cursorPosition();
+ qobject_cast<Sigmod::Sigmod*>(modified())->setTitle(title);
+ varTitle->setCursorPosition(cursor);
+}
+
+void Sigmodr::SigmodUI::on_varVersion_textChanged(const QString& version)
+{
+ const int cursor = varVersion->cursorPosition();
+ qobject_cast<Sigmod::Sigmod*>(modified())->setVersion(version);
+ varVersion->setCursorPosition(cursor);
+}
+
+void Sigmodr::SigmodUI::on_varDescription_textChanged(const QString& description)
+{
+ qobject_cast<Sigmod::Sigmod*>(modified())->setDescription(description);
+}
+
+void Sigmodr::SigmodUI::on_varMap_activated(const int map)
+{
+ qobject_cast<Sigmod::Sigmod*>(modified())->setStartMap(varMap->itemData(map).toInt());
+}
+
+void Sigmodr::SigmodUI::on_varWarp_activated(const int warp)
+{
+ qobject_cast<Sigmod::Sigmod*>(modified())->setStartWarp(varWarp->itemData(warp).toInt());
+}
+
+void Sigmodr::SigmodUI::on_varTypechart_clicked(const QModelIndex& index)
+{
+ m_index = index;
+ m_changingMult = true;
+ varEffectiveness->setEnabled(true);
+ boxEffectiveness->setTitle(QString("%1 vs. %2").arg(varTypechart->model()->headerData(index.row(), Qt::Vertical, Qt::DisplayRole).toString()).arg(varTypechart->model()->headerData(index.column(), Qt::Horizontal, Qt::DisplayRole).toString()));
+ varEffectiveness->setValue(varTypechart->model()->data(m_index, Qt::EditRole).value<Sigmod::Fraction>());
+}
+
+void Sigmodr::SigmodUI::on_varEffectiveness_valueChanged(const Sigmod::Fraction& multiplier)
+{
+ varTypechart->model()->setData(m_index, QVariant::fromValue(multiplier), Qt::EditRole);
+ if (!m_changingMult)
+ emit(changed());
+ m_changingMult = false;
+ setGui();
+}
diff --git a/sigmodr/PokemodUI.h b/sigmodr/SigmodUI.h
index e6a0e66d..4d97544b 100644
--- a/sigmodr/PokemodUI.h
+++ b/sigmodr/SigmodUI.h
@@ -15,30 +15,30 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_POKEMODUI__
-#define __POKEMODR_POKEMODUI__
+#ifndef __SIGMODR_SIGMODUI__
+#define __SIGMODR_SIGMODUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
-#include "ui_pokemod.h"
+#include "ui_sigmod.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
-class PokemodUI : public ObjectUI, private Ui::formPokemod
+class SigmodUI : public ObjectUI, private Ui::formSigmod
{
Q_OBJECT
public:
- PokemodUI(Pokemod::Pokemod* pokemod, QWidget* parent);
- ~PokemodUI();
+ SigmodUI(Sigmod::Sigmod* sigmod, QWidget* parent);
+ ~SigmodUI();
public slots:
void apply();
void discard();
@@ -49,7 +49,7 @@ class PokemodUI : public ObjectUI, private Ui::formPokemod
void on_varMap_activated(const int map);
void on_varWarp_activated(const int warp);
void on_varTypechart_clicked(const QModelIndex& index);
- void on_varEffectiveness_valueChanged(const Pokemod::Fraction& multiplier);
+ void on_varEffectiveness_valueChanged(const Sigmod::Fraction& multiplier);
private slots:
void initGui();
void refreshGui();
diff --git a/sigmodr/Pokemodr.cpp b/sigmodr/Sigmodr.cpp
index 6864ae83..a17a062e 100644
--- a/sigmodr/Pokemodr.cpp
+++ b/sigmodr/Sigmodr.cpp
@@ -15,8 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-// Pokemodr includes
-#include "PokemodrUI.h"
+// Sigmodr includes
+#include "SigmodrUI.h"
// KDE includes
#include <KAboutData>
@@ -46,14 +46,14 @@ int main(int argc, char* argv[])
{
qInstallMsgHandler(messageHandler);
- KAboutData about("pokemodr", "pokemodr", ki18n("Pokémodr"), "0.0.2", ki18n(""), KAboutData::License_GPL_V3, ki18n("©2007-2008 Ben Boeckel"), ki18n("This program offers an easy interface so that Pokémods can be easily created."), "http://sourceforge.net/projects/pokegen");
- about.setProgramName(ki18n("Pokémodr"));
+ KAboutData about("sigmodr", "sigmodr", ki18n("Sigmodr"), "0.0.2", ki18n(""), KAboutData::License_GPL_V3, ki18n("©2007-2008 Ben Boeckel"), ki18n("This program offers an easy interface so that Sigmods can be easily created."), "http://sourceforge.net/projects/sigen");
+ about.setProgramName(ki18n("Sigmodr"));
about.addAuthor(ki18n("Ben Boeckel"), ki18n("Lead Programmer"), "MathStuf@gmail.com", "");
about.addCredit(ki18n("Peter Fernandes"), ki18n("Ideas"), "supersonicandtails@gmail.com", "http://www.hypersonicsoft.org");
about.addCredit(ki18n("Kevin Kofler"), ki18n("Qt, KDE, debugging help"), "kevin.kofler@chello.at", "http://www.tigen.org/kevin.kofler");
about.addCredit(ki18n("Luke Greco"), ki18n("Ideas, Tester"), "sirlewk@gmail.com", "");
about.addCredit(ki18n("Mike Roberts"), ki18n("Tester"), "XavierMcF@gmail.com", "");
- about.setBugAddress("pokegen-bugs@lists.sourceforge.net");
+ about.setBugAddress("sigen-bugs@lists.sourceforge.net");
about.setCopyrightStatement(ki18n("©2007-2008, Ben Boeckel"));
about.setOrganizationDomain("");
// TODO: Need one of these...
@@ -68,8 +68,9 @@ int main(int argc, char* argv[])
KApplication* app = new KApplication;
- Pokemodr::PokemodrUI* mainWindow = new Pokemodr::PokemodrUI;
+ Sigmodr::SigmodrUI* mainWindow = new Sigmodr::SigmodrUI;
mainWindow->show();
app->exec();
+ delete mainWindow;
return 0;
}
diff --git a/sigmodr/PokemodrPreferences.cpp b/sigmodr/SigmodrPreferences.cpp
index c7b3e6e7..3820f710 100644
--- a/sigmodr/PokemodrPreferences.cpp
+++ b/sigmodr/SigmodrPreferences.cpp
@@ -16,7 +16,7 @@
*/
// Header include
-#include "PokemodrPreferences.h"
+#include "SigmodrPreferences.h"
// Qt includes
#include <QtGui/QCheckBox>
@@ -24,18 +24,18 @@
// KDE includes
#include <KConfigGroup>
-Pokemodr::PokemodrPreferences::PokemodrPreferences(QWidget* parent, KConfigGroup& config) :
+Sigmodr::SigmodrPreferences::SigmodrPreferences(QWidget* parent, KConfigGroup& config) :
KDialog(parent),
m_config(config)
{
- setCaption(QString::fromUtf8("Pokémodr Preferences"));
+ setCaption("Sigmodr Preferences");
setButtons(KDialog::Ok | KDialog::Cancel);
varReloadOnOpen = new QCheckBox("Reload files on open");
varReloadOnOpen->setChecked(m_config.readEntry("reloadOnStart", false) ? Qt::Checked : Qt::Unchecked);
setMainWidget(varReloadOnOpen);
}
-void Pokemodr::PokemodrPreferences::save()
+void Sigmodr::SigmodrPreferences::save()
{
m_config.writeEntry("reloadOnStart", varReloadOnOpen->isChecked());
}
diff --git a/sigmodr/PokemodrPreferences.h b/sigmodr/SigmodrPreferences.h
index 2be05c3f..16a0d72c 100644
--- a/sigmodr/PokemodrPreferences.h
+++ b/sigmodr/SigmodrPreferences.h
@@ -15,8 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_PREFERENCES__
-#define __POKEMODR_PREFERENCES__
+#ifndef __SIGMODR_PREFERENCES__
+#define __SIGMODR_PREFERENCES__
// KDE includes
#include <KDialog>
@@ -25,14 +25,14 @@
class KConfigGroup;
class QCheckBox;
-namespace Pokemodr
+namespace Sigmodr
{
-class PokemodrPreferences : public KDialog
+class SigmodrPreferences : public KDialog
{
Q_OBJECT
public:
- PokemodrPreferences(QWidget* parent, KConfigGroup& config);
+ SigmodrPreferences(QWidget* parent, KConfigGroup& config);
protected slots:
void save();
private:
diff --git a/sigmodr/PokemodrUI.cpp b/sigmodr/SigmodrUI.cpp
index 3f7532e8..59efb604 100644
--- a/sigmodr/PokemodrUI.cpp
+++ b/sigmodr/SigmodrUI.cpp
@@ -16,16 +16,16 @@
*/
// Header include
-#include "PokemodrUI.h"
+#include "SigmodrUI.h"
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
-#include "PokemodrPreferences.h"
-#include "PokemodTreeModel.h"
+#include "SigmodrPreferences.h"
+#include "SigmodTreeModel.h"
-// Pokemod includes
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Rules.h"
+// Sigmod includes
+#include "../sigmod/Rules.h"
+#include "../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QString>
@@ -53,9 +53,9 @@
#include <KIO/NetAccess>
#include <KNS/Engine>
-Pokemodr::PokemodrUI::PokemodrUI(QWidget* parent) :
+Sigmodr::SigmodrUI::SigmodrUI(QWidget* parent) :
KXmlGuiWindow(parent),
- m_config(KGlobal::config()->group("pokemodr"))
+ m_config(KGlobal::config()->group("sigmodr"))
{
setupUi(this);
setupActions();
@@ -67,82 +67,82 @@ Pokemodr::PokemodrUI::PokemodrUI(QWidget* parent) :
if (args && args->count())
{
for(int i = 0; i < args->count(); ++i)
- openPokemod(args->url(i));
+ openSigmod(args->url(i));
args->clear();
}
else if (m_config.readEntry("reloadOnStart", false))
{
QStringList urls = m_config.readEntry("Opened Files", QStringList());
foreach (QString url, urls)
- openPokemod(KUrl(url));
+ openSigmod(KUrl(url));
}
setAutoSaveSettings("MainWindow", true);
}
-Pokemodr::PokemodrUI::~PokemodrUI()
+Sigmodr::SigmodrUI::~SigmodrUI()
{
m_config.config()->sync();
- closeAllPokemods(true);
+ closeAllSigmods(true);
}
-void Pokemodr::PokemodrUI::update()
+void Sigmodr::SigmodrUI::update()
{
- treePokemod->update(treePokemod->currentIndex());
+ treeSigmod->update(treeSigmod->currentIndex());
}
-void Pokemodr::PokemodrUI::closeEvent(QCloseEvent* event)
+void Sigmodr::SigmodrUI::closeEvent(QCloseEvent* event)
{
KRecentFilesAction *recent = qobject_cast<KRecentFilesAction*>(actionCollection()->action(KStandardAction::name(KStandardAction::OpenRecent)));
recent->saveEntries(m_config.group("Recent Files"));
- if (closeAllPokemods())
+ if (closeAllSigmods())
event->accept();
else
event->ignore();
}
-void Pokemodr::PokemodrUI::setChangedTitle(const bool changed)
+void Sigmodr::SigmodrUI::setChangedTitle(const bool changed)
{
- setCaption(treePokemod->description(treePokemod->currentIndex()), changed);
+ setCaption(treeSigmod->description(treeSigmod->currentIndex()), changed);
}
-void Pokemodr::PokemodrUI::setDirty(const bool dirty)
+void Sigmodr::SigmodrUI::setDirty(const bool dirty)
{
- const Pokemod::Pokemod* pokemod = qobject_cast<const Pokemod::Pokemod*>(static_cast<Pokemod::Object*>(treePokemod->currentIndex().internalPointer())->pokemod());
- treePokemod->setDirty(pokemod, dirty);
+ const Sigmod::Sigmod* sigmod = qobject_cast<const Sigmod::Sigmod*>(static_cast<Sigmod::Object*>(treeSigmod->currentIndex().internalPointer())->sigmod());
+ treeSigmod->setDirty(sigmod, dirty);
actionCollection()->action("file_save")->setEnabled(dirty);
}
-void Pokemodr::PokemodrUI::newPokemod()
+void Sigmodr::SigmodrUI::newSigmod()
{
- treePokemod->addPokemod(new Pokemod::Pokemod);
+ treeSigmod->addSigmod(new Sigmod::Sigmod);
}
-void Pokemodr::PokemodrUI::openPokemod()
+void Sigmodr::SigmodrUI::openSigmod()
{
- KUrl::List urls = KFileDialog::getOpenUrls(KUrl("kfiledialog:///pokemod"), QString::fromUtf8("*.pmod|Pokémod files"), this);
+ KUrl::List urls = KFileDialog::getOpenUrls(KUrl("kfiledialog:///sigmod"), "*.smod|Sigmod files", this);
foreach (KUrl url, urls)
{
if (!url.isEmpty())
- openPokemod(url);
+ openSigmod(url);
}
}
-bool Pokemodr::PokemodrUI::openPokemod(const KUrl& url)
+bool Sigmodr::SigmodrUI::openSigmod(const KUrl& url)
{
bool opened = false;
- if (treePokemod->isOpen(url))
+ if (treeSigmod->isOpen(url))
{
- KMessageBox::error(this, "File is already opened", QString::fromUtf8("Pokémod error"));
+ KMessageBox::error(this, "File is already opened", "Sigmod error");
return false;
}
if (url.isLocalFile())
- opened = openPokemod(url.path());
+ opened = openSigmod(url.path());
else
{
QString temp;
if (KIO::NetAccess::download(url, temp, this))
{
- opened = openPokemod(temp, true);
+ opened = openSigmod(temp, true);
KIO::NetAccess::removeTempFile(temp);
}
else
@@ -153,7 +153,7 @@ bool Pokemodr::PokemodrUI::openPokemod(const KUrl& url)
return opened;
}
-bool Pokemodr::PokemodrUI::openPokemod(const QString& path, const bool isRemote)
+bool Sigmodr::SigmodrUI::openSigmod(const QString& path, const bool isRemote)
{
QFile file(path);
if (file.open(QIODevice::ReadOnly))
@@ -161,16 +161,16 @@ bool Pokemodr::PokemodrUI::openPokemod(const QString& path, const bool isRemote)
QDomDocument xml;
if (xml.setContent(&file))
{
- if (xml.doctype().name() == "Pokemod")
+ if (xml.doctype().name() == "Sigmod")
{
- treePokemod->addPokemod(new Pokemod::Pokemod(xml.documentElement()), isRemote ? KUrl() : KUrl(path));
+ treeSigmod->addSigmod(new Sigmod::Sigmod(xml.documentElement()), isRemote ? KUrl() : KUrl(path));
return true;
}
else
- KMessageBox::error(this, QString::fromUtf8("The file is not a Pokémod."), QString::fromUtf8("Invalid Pokémod"));
+ KMessageBox::error(this, "The file is not a Sigmod.", "Invalid Sigmod");
}
else
- KMessageBox::error(this, "The file is not a valid XML file.", QString::fromUtf8("Invalid Pokémod"));
+ KMessageBox::error(this, "The file is not a valid XML file.", "Invalid Sigmod");
file.close();
}
else
@@ -178,177 +178,177 @@ bool Pokemodr::PokemodrUI::openPokemod(const QString& path, const bool isRemote)
return false;
}
-void Pokemodr::PokemodrUI::savePokemod()
+void Sigmodr::SigmodrUI::saveSigmod()
{
- savePokemod(treePokemod->currentPokemod());
+ saveSigmod(treeSigmod->currentSigmod());
}
-void Pokemodr::PokemodrUI::savePokemod(const Pokemod::Pokemod* pokemod)
+void Sigmodr::SigmodrUI::saveSigmod(const Sigmod::Sigmod* sigmod)
{
- const KUrl url = treePokemod->url(pokemod);
+ const KUrl url = treeSigmod->url(sigmod);
if (url.isEmpty())
- saveAsPokemod(pokemod);
+ saveAsSigmod(sigmod);
else
- savePokemod(pokemod, url);
+ saveSigmod(sigmod, url);
}
-bool Pokemodr::PokemodrUI::savePokemod(const Pokemod::Pokemod* pokemod, const KUrl& url)
+bool Sigmodr::SigmodrUI::saveSigmod(const Sigmod::Sigmod* sigmod, const KUrl& url)
{
- if (pokemod)
+ if (sigmod)
{
if (url.isLocalFile())
{
QFile file(url.path());
if (file.open(QIODevice::WriteOnly))
{
- file.write(Pokemod::Object::xml(pokemod).toByteArray());
- treePokemod->setDirty(pokemod, false);
+ file.write(Sigmod::Object::xml(sigmod).toByteArray());
+ treeSigmod->setDirty(sigmod, false);
file.close();
return true;
}
else
- KMessageBox::error(this, QString::fromUtf8("Error saving the Pokémod!"), "Save error");
+ KMessageBox::error(this, "Error saving the Sigmod!", "Save error");
}
else
{
KTemporaryFile temp;
if (temp.open())
{
- temp.write(Pokemod::Object::xml(pokemod).toByteArray());
+ temp.write(Sigmod::Object::xml(sigmod).toByteArray());
if (KIO::NetAccess::upload(temp.fileName(), url, this))
{
- treePokemod->setDirty(pokemod, false);
+ treeSigmod->setDirty(sigmod, false);
return true;
}
else
KMessageBox::error(this, KIO::NetAccess::lastErrorString(), "KIO Error");
}
else
- KMessageBox::error(this, QString::fromUtf8("Error saving the Pokémod!"), "Save error");
+ KMessageBox::error(this, "Error saving the Sigmod!", "Save error");
}
}
return false;
}
-void Pokemodr::PokemodrUI::saveAsPokemod()
+void Sigmodr::SigmodrUI::saveAsSigmod()
{
- saveAsPokemod(treePokemod->currentPokemod());
+ saveAsSigmod(treeSigmod->currentSigmod());
}
-void Pokemodr::PokemodrUI::saveAsPokemod(const Pokemod::Pokemod* pokemod)
+void Sigmodr::SigmodrUI::saveAsSigmod(const Sigmod::Sigmod* sigmod)
{
- if (pokemod)
+ if (sigmod)
{
- KUrl url = KFileDialog::getSaveUrl(KUrl("kfiledialog:///pokemod"), QString::fromUtf8("*.pmod|Pokémod files"), this, QString::fromUtf8("Open Pokémod"));
+ KUrl url = KFileDialog::getSaveUrl(KUrl("kfiledialog:///sigmod"), "*.smod|Sigmod files", this, "Open Sigmod");
if (!url.isEmpty())
{
- if (savePokemod(pokemod, url))
- treePokemod->setUrl(pokemod, url);
+ if (saveSigmod(sigmod, url))
+ treeSigmod->setUrl(sigmod, url);
}
}
}
-void Pokemodr::PokemodrUI::downloadPokemod()
+void Sigmodr::SigmodrUI::downloadSigmod()
{
KNS::Engine engine(this);
- if (engine.init("pokemod.knsrc"))
+ if (engine.init("sigmod.knsrc"))
engine.downloadDialogModal();
}
-void Pokemodr::PokemodrUI::uploadPokemod()
+void Sigmodr::SigmodrUI::uploadSigmod()
{
- uploadPokemod(treePokemod->currentPokemod());
+ uploadSigmod(treeSigmod->currentSigmod());
}
-void Pokemodr::PokemodrUI::uploadPokemod(const Pokemod::Pokemod* pokemod)
+void Sigmodr::SigmodrUI::uploadSigmod(const Sigmod::Sigmod* sigmod)
{
- KUrl url = treePokemod->url(pokemod);
+ KUrl url = treeSigmod->url(sigmod);
if (url == KUrl())
{
- KMessageBox::error(this, QString::fromUtf8("The Pokémod has not been saved!"), "Upload error");
+ KMessageBox::error(this, "The Sigmod has not been saved!", "Upload error");
return;
}
if (!url.isLocalFile())
{
- KMessageBox::error(this, QString::fromUtf8("The Pokémod is not local!"), "Upload error");
+ KMessageBox::error(this, "The Sigmod is not local!", "Upload error");
return;
}
KNS::Engine engine(this);
- if (engine.init("pokemod.knsrc"))
+ if (engine.init("sigmod.knsrc"))
{
if (!engine.uploadDialogModal(url.path()))
- KMessageBox::error(this, QString::fromUtf8("An error occured attempting to upload!"), "Upload error");
+ KMessageBox::error(this, "An error occured attempting to upload!", "Upload error");
}
}
-void Pokemodr::PokemodrUI::closePokemod()
+void Sigmodr::SigmodrUI::closeSigmod()
{
- closePokemod(treePokemod->currentPokemod());
+ closeSigmod(treeSigmod->currentSigmod());
}
-bool Pokemodr::PokemodrUI::closePokemod(const Pokemod::Pokemod* pokemod, const bool force)
+bool Sigmodr::SigmodrUI::closeSigmod(const Sigmod::Sigmod* sigmod, const bool force)
{
- if (pokemod)
+ if (sigmod)
{
- if (treePokemod->dirty(pokemod))
+ if (treeSigmod->dirty(sigmod))
{
int result;
if (force)
- result = KMessageBox::questionYesNo(this, "You have unsaved changes, would you like to save them?", QString::fromUtf8("Unsaved Pokémod"));
+ result = KMessageBox::questionYesNo(this, "You have unsaved changes, would you like to save them?", "Unsaved Sigmod");
else
- result = KMessageBox::questionYesNoCancel(this, "You have unsaved changes, would you like to save them?", QString::fromUtf8("Unsaved Pokémod"));
+ result = KMessageBox::questionYesNoCancel(this, "You have unsaved changes, would you like to save them?", "Unsaved Sigmod");
switch (result)
{
case KMessageBox::Yes:
- savePokemod(pokemod);
+ saveSigmod(sigmod);
case KMessageBox::No:
break;
case KMessageBox::Cancel:
return false;
}
}
- treePokemod->deletePokemod(pokemod);
+ treeSigmod->deleteSigmod(sigmod);
if (formPanel->widget())
delete formPanel->takeWidget();
}
return true;
}
-bool Pokemodr::PokemodrUI::closeAllPokemods(const bool force)
+bool Sigmodr::SigmodrUI::closeAllSigmods(const bool force)
{
- QList<const Pokemod::Pokemod*> pokemods = treePokemod->openedPokemods();
- if (pokemods.size())
- m_config.writeEntry("Opened Files", treePokemod->urls());
- for (int i = 0; i < pokemods.size(); )
+ QList<const Sigmod::Sigmod*> sigmods = treeSigmod->openedSigmods();
+ if (sigmods.size())
+ m_config.writeEntry("Opened Files", treeSigmod->urls());
+ for (int i = 0; i < sigmods.size(); )
{
- if (closePokemod(pokemods[i], force))
- pokemods.removeAt(i);
+ if (closeSigmod(sigmods[i], force))
+ sigmods.removeAt(i);
else
++i;
}
- if (!pokemods.size() || force)
+ if (!sigmods.size() || force)
close();
- return !pokemods.size();
+ return !sigmods.size();
}
-void Pokemodr::PokemodrUI::copyObject()
+void Sigmodr::SigmodrUI::copyObject()
{
- m_clipboard = treePokemod->copy(treePokemod->currentIndex());
+ m_clipboard = treeSigmod->copy(treeSigmod->currentIndex());
}
-void Pokemodr::PokemodrUI::pasteObject()
+void Sigmodr::SigmodrUI::pasteObject()
{
- treePokemod->paste(treePokemod->currentIndex(), m_clipboard);
+ treeSigmod->paste(treeSigmod->currentIndex(), m_clipboard);
}
-void Pokemodr::PokemodrUI::preferences()
+void Sigmodr::SigmodrUI::preferences()
{
- PokemodrPreferences* dialog = new PokemodrPreferences(this, m_config);
+ SigmodrPreferences* dialog = new SigmodrPreferences(this, m_config);
connect(dialog, SIGNAL(okClicked()), dialog, SLOT(save()));
dialog->exec();
}
-void Pokemodr::PokemodrUI::toggleMenubar()
+void Sigmodr::SigmodrUI::toggleMenubar()
{
if (menuBar()->isVisible())
menuBar()->hide();
@@ -356,17 +356,17 @@ void Pokemodr::PokemodrUI::toggleMenubar()
menuBar()->show();
}
-void Pokemodr::PokemodrUI::on_splitter_splitterMoved()
+void Sigmodr::SigmodrUI::on_splitter_splitterMoved()
{
m_config.writeEntry("treeWidth", splitter->sizes()[0]);
m_config.writeEntry("panelWidth", splitter->sizes()[1]);
}
-void Pokemodr::PokemodrUI::on_treePokemod_clicked(const QModelIndex& index)
+void Sigmodr::SigmodrUI::on_treeSigmod_clicked(const QModelIndex& index)
{
- if (!(treePokemod->model()->flags(index) & Qt::ItemIsSelectable))
+ if (!(treeSigmod->model()->flags(index) & Qt::ItemIsSelectable))
return;
- ObjectUI* widget = treePokemod->editorWidget(index);
+ ObjectUI* widget = treeSigmod->editorWidget(index);
if (widget)
{
if (formPanel->widget() && boxButtons->isEnabled())
@@ -387,7 +387,7 @@ void Pokemodr::PokemodrUI::on_treePokemod_clicked(const QModelIndex& index)
connect(widget, SIGNAL(changed(bool)), this, SLOT(setChangedTitle(bool)));
connect(widget, SIGNAL(changed(bool)), boxButtons, SLOT(setEnabled(bool)));
connect(buttonApply, SIGNAL(clicked()), widget, SLOT(apply()));
- connect(buttonApply, SIGNAL(clicked()), treePokemod, SLOT(setDirty()));
+ connect(buttonApply, SIGNAL(clicked()), treeSigmod, SLOT(setDirty()));
connect(buttonReset, SIGNAL(clicked()), widget, SLOT(discard()));
setChangedTitle(false);
formPanel->setWidget(widget);
@@ -395,13 +395,13 @@ void Pokemodr::PokemodrUI::on_treePokemod_clicked(const QModelIndex& index)
}
}
-void Pokemodr::PokemodrUI::on_treePokemod_customContextMenuRequested(const QPoint& position)
+void Sigmodr::SigmodrUI::on_treeSigmod_customContextMenuRequested(const QPoint& position)
{
- QModelIndex index = treePokemod->indexAt(position);
- KMenu* menu = treePokemod->contextMenu(index);
+ QModelIndex index = treeSigmod->indexAt(position);
+ KMenu* menu = treeSigmod->contextMenu(index);
if (menu)
{
- QString type = treePokemod->model()->data(index, BaseModel::TypeRole).toString();
+ QString type = treeSigmod->model()->data(index, BaseModel::TypeRole).toString();
KAction* paste = new KAction("&Paste", this);
connect(paste, SIGNAL(triggered()), this, SLOT(pasteObject()));
menu->addSeparator();
@@ -411,35 +411,35 @@ void Pokemodr::PokemodrUI::on_treePokemod_customContextMenuRequested(const QPoin
paste->setEnabled(m_clipboard.doctype().name() == type);
}
menu->addAction(paste);
- connect(menu, SIGNAL(triggered(QAction*)), treePokemod, SLOT(setDirty()));
- menu->popup(treePokemod->mapToGlobal(position));
+ connect(menu, SIGNAL(triggered(QAction*)), treeSigmod, SLOT(setDirty()));
+ menu->popup(treeSigmod->mapToGlobal(position));
}
}
-void Pokemodr::PokemodrUI::setupActions()
+void Sigmodr::SigmodrUI::setupActions()
{
- KStandardAction::openNew(this, SLOT(newPokemod()), actionCollection());
- KStandardAction::open(this, SLOT(openPokemod()), actionCollection());
- KRecentFilesAction* recent = KStandardAction::openRecent(this, SLOT(openPokemod(const KUrl&)), actionCollection());
+ KStandardAction::openNew(this, SLOT(newSigmod()), actionCollection());
+ KStandardAction::open(this, SLOT(openSigmod()), actionCollection());
+ KRecentFilesAction* recent = KStandardAction::openRecent(this, SLOT(openSigmod(const KUrl&)), actionCollection());
recent->loadEntries(m_config.group("Recent Files"));
- KStandardAction::save(this, SLOT(savePokemod()), actionCollection());
- KStandardAction::saveAs(this, SLOT(saveAsPokemod()), actionCollection());
- KStandardAction::close(this, SLOT(closePokemod()), actionCollection());
- KStandardAction::quit(this, SLOT(closeAllPokemods()), actionCollection());
+ KStandardAction::save(this, SLOT(saveSigmod()), actionCollection());
+ KStandardAction::saveAs(this, SLOT(saveAsSigmod()), actionCollection());
+ KStandardAction::close(this, SLOT(closeSigmod()), actionCollection());
+ KStandardAction::quit(this, SLOT(closeAllSigmods()), actionCollection());
KStandardAction::cut(actionCollection());
KStandardAction::copy(actionCollection());
KStandardAction::paste(actionCollection());
- KAction* download = actionCollection()->addAction("download_pokemod");
+ KAction* download = actionCollection()->addAction("download_sigmod");
download->setText(i18n("Download"));
download->setIcon(KIcon("arrow-down-double"));
download->setShortcut(Qt::CTRL + Qt::Key_D);
- connect(download, SIGNAL(triggered()), this, SLOT(downloadPokemod()));
- KAction* upload = actionCollection()->addAction("upload_pokemod");
+ connect(download, SIGNAL(triggered()), this, SLOT(downloadSigmod()));
+ KAction* upload = actionCollection()->addAction("upload_sigmod");
upload->setText(i18n("Upload"));
upload->setIcon(KIcon("arrow-up-double"));
upload->setShortcut(Qt::CTRL + Qt::Key_U);
upload->setEnabled(false);
- connect(upload, SIGNAL(triggered()), this, SLOT(uploadPokemod()));
+ connect(upload, SIGNAL(triggered()), this, SLOT(uploadSigmod()));
KStandardAction::showMenubar(this, SLOT(toggleMenubar()), actionCollection());
KStandardAction::configureToolbars(this, SLOT(configureToolbars()), actionCollection());
createStandardStatusBarAction();
diff --git a/sigmodr/PokemodrUI.h b/sigmodr/SigmodrUI.h
index d5663f94..6b467560 100644
--- a/sigmodr/PokemodrUI.h
+++ b/sigmodr/SigmodrUI.h
@@ -15,8 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_POKEMODRUI__
-#define __POKEMODR_POKEMODRUI__
+#ifndef __SIGMODR_SIGMODRUI__
+#define __SIGMODR_SIGMODRUI__
// Qt includes
#include <QtXml/QDomDocument>
@@ -26,25 +26,25 @@
#include <KXmlGuiWindow>
// Form include
-#include "ui_pokemodr.h"
+#include "ui_sigmodr.h"
// Forward declarations
class KUrl;
-namespace Pokemod
+namespace Sigmod
{
class Object;
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
-class PokemodrUI : public KXmlGuiWindow, private Ui::formPokemodr
+class SigmodrUI : public KXmlGuiWindow, private Ui::formSigmodr
{
Q_OBJECT
public:
- PokemodrUI(QWidget* parent = 0);
- ~PokemodrUI();
+ SigmodrUI(QWidget* parent = 0);
+ ~SigmodrUI();
protected slots:
void update();
@@ -54,28 +54,28 @@ class PokemodrUI : public KXmlGuiWindow, private Ui::formPokemodr
void setDirty(const bool dirty = true);
- void newPokemod();
- void openPokemod();
- bool openPokemod(const KUrl& url);
- bool openPokemod(const QString& path, const bool isRemote = false);
- void savePokemod();
- void savePokemod(const Pokemod::Pokemod* pokemod);
- bool savePokemod(const Pokemod::Pokemod* pokemod, const KUrl& url);
- void saveAsPokemod();
- void saveAsPokemod(const Pokemod::Pokemod* pokemod);
- void downloadPokemod();
- void uploadPokemod();
- void uploadPokemod(const Pokemod::Pokemod* pokemod);
- void closePokemod();
- bool closePokemod(const Pokemod::Pokemod* pokemod, const bool force = false);
- bool closeAllPokemods(const bool force = false);
+ void newSigmod();
+ void openSigmod();
+ bool openSigmod(const KUrl& url);
+ bool openSigmod(const QString& path, const bool isRemote = false);
+ void saveSigmod();
+ void saveSigmod(const Sigmod::Sigmod* sigmod);
+ bool saveSigmod(const Sigmod::Sigmod* sigmod, const KUrl& url);
+ void saveAsSigmod();
+ void saveAsSigmod(const Sigmod::Sigmod* sigmod);
+ void downloadSigmod();
+ void uploadSigmod();
+ void uploadSigmod(const Sigmod::Sigmod* sigmod);
+ void closeSigmod();
+ bool closeSigmod(const Sigmod::Sigmod* sigmod, const bool force = false);
+ bool closeAllSigmods(const bool force = false);
void copyObject();
void pasteObject();
void preferences();
void toggleMenubar();
void on_splitter_splitterMoved();
- void on_treePokemod_clicked(const QModelIndex& index);
- void on_treePokemod_customContextMenuRequested(const QPoint& position);
+ void on_treeSigmod_clicked(const QModelIndex& index);
+ void on_treeSigmod_customContextMenuRequested(const QPoint& position);
private:
void setupActions();
diff --git a/sigmodr/SkinUI.cpp b/sigmodr/SkinUI.cpp
index a0df94c0..7da7cb4b 100644
--- a/sigmodr/SkinUI.cpp
+++ b/sigmodr/SkinUI.cpp
@@ -18,47 +18,47 @@
// Header include
#include "SkinUI.h"
-// Pokemod includes
-#include "../pokemod/Skin.h"
+// Sigmod includes
+#include "../sigmod/Skin.h"
-Pokemodr::SkinUI::SkinUI(Pokemod::Skin* skin, QWidget* parent) :
+Sigmodr::SkinUI::SkinUI(Sigmod::Skin* skin, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(skin, new Pokemod::Skin(*skin));
+ setObjects(skin, new Sigmod::Skin(*skin));
}
-Pokemodr::SkinUI::~SkinUI()
+Sigmodr::SkinUI::~SkinUI()
{
}
-void Pokemodr::SkinUI::setGui()
+void Sigmodr::SkinUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Skin*>(modified())->name());
- varScript->setValue(qobject_cast<Pokemod::Skin*>(modified())->script());
+ varName->setText(qobject_cast<Sigmod::Skin*>(modified())->name());
+ varScript->setValue(qobject_cast<Sigmod::Skin*>(modified())->script());
}
-void Pokemodr::SkinUI::apply()
+void Sigmodr::SkinUI::apply()
{
- *qobject_cast<Pokemod::Skin*>(original()) = *qobject_cast<Pokemod::Skin*>(modified());
+ *qobject_cast<Sigmod::Skin*>(original()) = *qobject_cast<Sigmod::Skin*>(modified());
emit(changed(false));
}
-void Pokemodr::SkinUI::discard()
+void Sigmodr::SkinUI::discard()
{
- *qobject_cast<Pokemod::Skin*>(modified()) = *qobject_cast<Pokemod::Skin*>(original());
+ *qobject_cast<Sigmod::Skin*>(modified()) = *qobject_cast<Sigmod::Skin*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::SkinUI::on_varName_textChanged(const QString& name)
+void Sigmodr::SkinUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Skin*>(modified())->setName(name);
+ qobject_cast<Sigmod::Skin*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::SkinUI::on_varScript_valueChanged(const Pokemod::Script& script)
+void Sigmodr::SkinUI::on_varScript_valueChanged(const Sigmod::Script& script)
{
- qobject_cast<Pokemod::Skin*>(modified())->setScript(script);
+ qobject_cast<Sigmod::Skin*>(modified())->setScript(script);
}
diff --git a/sigmodr/SkinUI.h b/sigmodr/SkinUI.h
index f9bb3304..6a4b52ff 100644
--- a/sigmodr/SkinUI.h
+++ b/sigmodr/SkinUI.h
@@ -15,36 +15,36 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SKINUI__
-#define __POKEMODR_SKINUI__
+#ifndef __SIGMODR_SKINUI__
+#define __SIGMODR_SKINUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_skin.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Skin;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SkinUI : public ObjectUI, private Ui::formSkin
{
Q_OBJECT
public:
- SkinUI(Pokemod::Skin* skin, QWidget* parent);
+ SkinUI(Sigmod::Skin* skin, QWidget* parent);
~SkinUI();
public slots:
void apply();
void discard();
protected slots:
void on_varName_textChanged(const QString& name);
- void on_varScript_valueChanged(const Pokemod::Script& script);
+ void on_varScript_valueChanged(const Sigmod::Script& script);
private slots:
void setGui();
};
diff --git a/sigmodr/SoundUI.cpp b/sigmodr/SoundUI.cpp
index b765f7ee..17af5b8d 100644
--- a/sigmodr/SoundUI.cpp
+++ b/sigmodr/SoundUI.cpp
@@ -18,9 +18,9 @@
// Header include
#include "SoundUI.h"
-// Pokemod includes
-#include "../pokemod/Sound.h"
-#include "../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Sound.h"
// Qt includes
#include <QtCore/QBuffer>
@@ -34,23 +34,23 @@
#include <Phonon/AudioOutput>
#include <Phonon/MediaObject>
-Pokemodr::SoundUI::SoundUI(Pokemod::Sound* sound, QWidget* parent) :
+Sigmodr::SoundUI::SoundUI(Sigmod::Sound* sound, QWidget* parent) :
ObjectUI(parent),
m_output(new Phonon::AudioOutput(Phonon::MusicCategory, this)),
m_media(new Phonon::MediaObject(this)),
m_buffer(new QBuffer)
{
setupUi(this);
- setObjects(sound, new Pokemod::Sound(*sound));
+ setObjects(sound, new Sigmod::Sound(*sound));
}
-Pokemodr::SoundUI::~SoundUI()
+Sigmodr::SoundUI::~SoundUI()
{
delete m_media;
delete m_buffer;
}
-void Pokemodr::SoundUI::initGui()
+void Sigmodr::SoundUI::initGui()
{
Phonon::createPath(m_media, m_output);
m_media->setTickInterval(100);
@@ -67,48 +67,48 @@ void Pokemodr::SoundUI::initGui()
buttonBrowse->setIcon(KIcon("document-open"));
}
-void Pokemodr::SoundUI::refreshGui()
+void Sigmodr::SoundUI::refreshGui()
{
resetAudioData();
}
-void Pokemodr::SoundUI::setGui()
+void Sigmodr::SoundUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Sound*>(modified())->name());
+ varName->setText(qobject_cast<Sigmod::Sound*>(modified())->name());
}
-void Pokemodr::SoundUI::apply()
+void Sigmodr::SoundUI::apply()
{
- *qobject_cast<Pokemod::Sound*>(original()) = *qobject_cast<Pokemod::Sound*>(modified());
+ *qobject_cast<Sigmod::Sound*>(original()) = *qobject_cast<Sigmod::Sound*>(modified());
emit(changed(false));
}
-void Pokemodr::SoundUI::discard()
+void Sigmodr::SoundUI::discard()
{
- *qobject_cast<Pokemod::Sound*>(modified()) = *qobject_cast<Pokemod::Sound*>(original());
+ *qobject_cast<Sigmod::Sound*>(modified()) = *qobject_cast<Sigmod::Sound*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::SoundUI::on_varName_textChanged(const QString& name)
+void Sigmodr::SoundUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Sound*>(modified())->setName(name);
+ qobject_cast<Sigmod::Sound*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::SoundUI::on_buttonBrowse_clicked()
+void Sigmodr::SoundUI::on_buttonBrowse_clicked()
{
QFile file(KFileDialog::getOpenFileName(KUrl("kfiledialog:///audio"), "audio/*|Audio files", this));
if (file.open(QIODevice::ReadOnly))
{
- qobject_cast<Pokemod::Sound*>(modified())->setData(file.readAll());
+ qobject_cast<Sigmod::Sound*>(modified())->setData(file.readAll());
file.close();
resetAudioData();
}
}
-void Pokemodr::SoundUI::stateChanged(Phonon::State newState, Phonon::State /*oldState*/)
+void Sigmodr::SoundUI::stateChanged(Phonon::State newState, Phonon::State /*oldState*/)
{
switch (newState)
{
@@ -139,15 +139,15 @@ void Pokemodr::SoundUI::stateChanged(Phonon::State newState, Phonon::State /*old
}
}
-void Pokemodr::SoundUI::resetAudioData()
+void Sigmodr::SoundUI::resetAudioData()
{
m_media->stop();
- m_buffer->setData(qobject_cast<Pokemod::Sound*>(modified())->data());
+ m_buffer->setData(qobject_cast<Sigmod::Sound*>(modified())->data());
m_media->setCurrentSource(m_buffer);
tick(0);
}
-void Pokemodr::SoundUI::tick(qint64 time)
+void Sigmodr::SoundUI::tick(qint64 time)
{
QTime currentTime(0, (time / 60000) % 60, (time / 1000) % 60, time % 1000);
qint64 total = m_media->totalTime();
diff --git a/sigmodr/SoundUI.h b/sigmodr/SoundUI.h
index 04e57df1..aa552526 100644
--- a/sigmodr/SoundUI.h
+++ b/sigmodr/SoundUI.h
@@ -15,10 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SOUNDUI__
-#define __POKEMODR_SOUNFUI__
+#ifndef __SIGMODR_SOUNDUI__
+#define __SIGMODR_SOUNFUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
@@ -26,7 +26,7 @@
// Forward declarations
class QBuffer;
-namespace Pokemod
+namespace Sigmod
{
class Sound;
}
@@ -36,14 +36,14 @@ class AudioOutput;
class MediaObject;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SoundUI : public ObjectUI, private Ui::formSound
{
Q_OBJECT
public:
- SoundUI(Pokemod::Sound* sound, QWidget* parent);
+ SoundUI(Sigmod::Sound* sound, QWidget* parent);
~SoundUI();
public slots:
void apply();
diff --git a/sigmodr/SpeciesAbilityUI.cpp b/sigmodr/SpeciesAbilityUI.cpp
index 2a8c9aa1..5aedf8dc 100644
--- a/sigmodr/SpeciesAbilityUI.cpp
+++ b/sigmodr/SpeciesAbilityUI.cpp
@@ -18,57 +18,57 @@
// Header include
#include "SpeciesAbilityUI.h"
-// Pokemod includes
-#include "../pokemod/Ability.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/SpeciesAbility.h"
+// Sigmod includes
+#include "../sigmod/Ability.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/SpeciesAbility.h"
-Pokemodr::SpeciesAbilityUI::SpeciesAbilityUI(Pokemod::SpeciesAbility* ability, QWidget* parent) :
+Sigmodr::SpeciesAbilityUI::SpeciesAbilityUI(Sigmod::SpeciesAbility* ability, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(ability, new Pokemod::SpeciesAbility(*ability));
+ setObjects(ability, new Sigmod::SpeciesAbility(*ability));
}
-Pokemodr::SpeciesAbilityUI::~SpeciesAbilityUI()
+Sigmodr::SpeciesAbilityUI::~SpeciesAbilityUI()
{
}
-void Pokemodr::SpeciesAbilityUI::refreshGui()
+void Sigmodr::SpeciesAbilityUI::refreshGui()
{
varAbility->clear();
- for (int i = 0; i < pokemod()->abilityCount(); ++i)
+ for (int i = 0; i < sigmod()->abilityCount(); ++i)
{
- const Pokemod::Ability* ability = pokemod()->ability(i);
+ const Sigmod::Ability* ability = sigmod()->ability(i);
varAbility->addItem(ability->name(), ability->id());
}
}
-void Pokemodr::SpeciesAbilityUI::setGui()
+void Sigmodr::SpeciesAbilityUI::setGui()
{
- varAbility->setCurrentIndex(varAbility->findData(qobject_cast<Pokemod::SpeciesAbility*>(modified())->ability()));
- varWeight->setValue(qobject_cast<Pokemod::SpeciesAbility*>(modified())->weight());
+ varAbility->setCurrentIndex(varAbility->findData(qobject_cast<Sigmod::SpeciesAbility*>(modified())->ability()));
+ varWeight->setValue(qobject_cast<Sigmod::SpeciesAbility*>(modified())->weight());
}
-void Pokemodr::SpeciesAbilityUI::apply()
+void Sigmodr::SpeciesAbilityUI::apply()
{
- *qobject_cast<Pokemod::SpeciesAbility*>(original()) = *qobject_cast<Pokemod::SpeciesAbility*>(modified());
+ *qobject_cast<Sigmod::SpeciesAbility*>(original()) = *qobject_cast<Sigmod::SpeciesAbility*>(modified());
emit(changed(false));
}
-void Pokemodr::SpeciesAbilityUI::discard()
+void Sigmodr::SpeciesAbilityUI::discard()
{
- *qobject_cast<Pokemod::SpeciesAbility*>(modified()) = *qobject_cast<Pokemod::SpeciesAbility*>(original());
+ *qobject_cast<Sigmod::SpeciesAbility*>(modified()) = *qobject_cast<Sigmod::SpeciesAbility*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::SpeciesAbilityUI::on_varAbility_activated(const int ability)
+void Sigmodr::SpeciesAbilityUI::on_varAbility_activated(const int ability)
{
- qobject_cast<Pokemod::SpeciesAbility*>(modified())->setAbility(varAbility->itemData(ability).toInt());
+ qobject_cast<Sigmod::SpeciesAbility*>(modified())->setAbility(varAbility->itemData(ability).toInt());
}
-void Pokemodr::SpeciesAbilityUI::on_varWeight_valueChanged(const int weight)
+void Sigmodr::SpeciesAbilityUI::on_varWeight_valueChanged(const int weight)
{
- qobject_cast<Pokemod::SpeciesAbility*>(modified())->setWeight(weight);
+ qobject_cast<Sigmod::SpeciesAbility*>(modified())->setWeight(weight);
}
diff --git a/sigmodr/SpeciesAbilityUI.h b/sigmodr/SpeciesAbilityUI.h
index 3d81759e..7fa96e30 100644
--- a/sigmodr/SpeciesAbilityUI.h
+++ b/sigmodr/SpeciesAbilityUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPECIESABILITYUI__
-#define __POKEMODR_SPECIESABILITYUI__
+#ifndef __SIGMODR_SPECIESABILITYUI__
+#define __SIGMODR_SPECIESABILITYUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_speciesability.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class SpeciesAbility;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpeciesAbilityUI : public ObjectUI, private Ui::formSpeciesAbility
{
Q_OBJECT
public:
- SpeciesAbilityUI(Pokemod::SpeciesAbility* ability, QWidget* parent);
+ SpeciesAbilityUI(Sigmod::SpeciesAbility* ability, QWidget* parent);
~SpeciesAbilityUI();
public slots:
void apply();
diff --git a/sigmodr/SpeciesItemUI.cpp b/sigmodr/SpeciesItemUI.cpp
index 2dd17e84..6eb46bf0 100644
--- a/sigmodr/SpeciesItemUI.cpp
+++ b/sigmodr/SpeciesItemUI.cpp
@@ -18,57 +18,57 @@
// Header include
#include "SpeciesItemUI.h"
-// Pokemod includes
-#include "../pokemod/Item.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/SpeciesItem.h"
+// Sigmod includes
+#include "../sigmod/Item.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/SpeciesItem.h"
-Pokemodr::SpeciesItemUI::SpeciesItemUI(Pokemod::SpeciesItem* item, QWidget* parent) :
+Sigmodr::SpeciesItemUI::SpeciesItemUI(Sigmod::SpeciesItem* item, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(item, new Pokemod::SpeciesItem(*item));
+ setObjects(item, new Sigmod::SpeciesItem(*item));
}
-Pokemodr::SpeciesItemUI::~SpeciesItemUI()
+Sigmodr::SpeciesItemUI::~SpeciesItemUI()
{
}
-void Pokemodr::SpeciesItemUI::refreshGui()
+void Sigmodr::SpeciesItemUI::refreshGui()
{
varItem->clear();
- for (int i = 0; i < pokemod()->itemCount(); ++i)
+ for (int i = 0; i < sigmod()->itemCount(); ++i)
{
- const Pokemod::Item* item = pokemod()->item(i);
+ const Sigmod::Item* item = sigmod()->item(i);
varItem->addItem(item->name(), item->id());
}
}
-void Pokemodr::SpeciesItemUI::setGui()
+void Sigmodr::SpeciesItemUI::setGui()
{
- varItem->setCurrentIndex(varItem->findData(qobject_cast<Pokemod::SpeciesItem*>(modified())->item()));
- varWeight->setValue(qobject_cast<Pokemod::SpeciesItem*>(modified())->weight());
+ varItem->setCurrentIndex(varItem->findData(qobject_cast<Sigmod::SpeciesItem*>(modified())->item()));
+ varWeight->setValue(qobject_cast<Sigmod::SpeciesItem*>(modified())->weight());
}
-void Pokemodr::SpeciesItemUI::apply()
+void Sigmodr::SpeciesItemUI::apply()
{
- *qobject_cast<Pokemod::SpeciesItem*>(original()) = *qobject_cast<Pokemod::SpeciesItem*>(modified());
+ *qobject_cast<Sigmod::SpeciesItem*>(original()) = *qobject_cast<Sigmod::SpeciesItem*>(modified());
emit(changed(false));
}
-void Pokemodr::SpeciesItemUI::discard()
+void Sigmodr::SpeciesItemUI::discard()
{
- *qobject_cast<Pokemod::SpeciesItem*>(modified()) = *qobject_cast<Pokemod::SpeciesItem*>(original());
+ *qobject_cast<Sigmod::SpeciesItem*>(modified()) = *qobject_cast<Sigmod::SpeciesItem*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::SpeciesItemUI::on_varItem_activated(const int item)
+void Sigmodr::SpeciesItemUI::on_varItem_activated(const int item)
{
- qobject_cast<Pokemod::SpeciesItem*>(modified())->setItem(varItem->itemData(item).toInt());
+ qobject_cast<Sigmod::SpeciesItem*>(modified())->setItem(varItem->itemData(item).toInt());
}
-void Pokemodr::SpeciesItemUI::on_varWeight_valueChanged(const int weight)
+void Sigmodr::SpeciesItemUI::on_varWeight_valueChanged(const int weight)
{
- qobject_cast<Pokemod::SpeciesItem*>(modified())->setWeight(weight);
+ qobject_cast<Sigmod::SpeciesItem*>(modified())->setWeight(weight);
}
diff --git a/sigmodr/SpeciesItemUI.h b/sigmodr/SpeciesItemUI.h
index 101dffef..9a53e68d 100644
--- a/sigmodr/SpeciesItemUI.h
+++ b/sigmodr/SpeciesItemUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPECIESITEMUI__
-#define __POKEMODR_SPECIESITEMUI__
+#ifndef __SIGMODR_SPECIESITEMUI__
+#define __SIGMODR_SPECIESITEMUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_speciesitem.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class SpeciesItem;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpeciesItemUI : public ObjectUI, private Ui::formSpeciesItem
{
Q_OBJECT
public:
- SpeciesItemUI(Pokemod::SpeciesItem* item, QWidget* parent);
+ SpeciesItemUI(Sigmod::SpeciesItem* item, QWidget* parent);
~SpeciesItemUI();
public slots:
void apply();
diff --git a/sigmodr/SpeciesMoveUI.cpp b/sigmodr/SpeciesMoveUI.cpp
index 27221572..ab03c85f 100644
--- a/sigmodr/SpeciesMoveUI.cpp
+++ b/sigmodr/SpeciesMoveUI.cpp
@@ -18,66 +18,66 @@
// Header include
#include "SpeciesMoveUI.h"
-// Pokemod includes
-#include "../pokemod/Move.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Rules.h"
-#include "../pokemod/SpeciesMove.h"
+// Sigmod includes
+#include "../sigmod/Move.h"
+#include "../sigmod/Rules.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/SpeciesMove.h"
-Pokemodr::SpeciesMoveUI::SpeciesMoveUI(Pokemod::SpeciesMove* move, QWidget* parent) :
+Sigmodr::SpeciesMoveUI::SpeciesMoveUI(Sigmod::SpeciesMove* move, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(move, new Pokemod::SpeciesMove(*move));
+ setObjects(move, new Sigmod::SpeciesMove(*move));
}
-Pokemodr::SpeciesMoveUI::~SpeciesMoveUI()
+Sigmodr::SpeciesMoveUI::~SpeciesMoveUI()
{
}
-void Pokemodr::SpeciesMoveUI::refreshGui()
+void Sigmodr::SpeciesMoveUI::refreshGui()
{
varMove->clear();
- for (int i = 0; i < pokemod()->moveCount(); ++i)
+ for (int i = 0; i < sigmod()->moveCount(); ++i)
{
- const Pokemod::Move* move = pokemod()->move(i);
+ const Sigmod::Move* move = sigmod()->move(i);
varMove->addItem(move->name(), move->id());
}
- varLevel->setMaximum(pokemod()->rules()->maxLevel());
- varWildLevel->setMaximum(pokemod()->rules()->maxLevel());
+ varLevel->setMaximum(sigmod()->rules()->maxLevel());
+ varWildLevel->setMaximum(sigmod()->rules()->maxLevel());
}
-void Pokemodr::SpeciesMoveUI::setGui()
+void Sigmodr::SpeciesMoveUI::setGui()
{
- varMove->setCurrentIndex(varMove->findData(qobject_cast<Pokemod::SpeciesMove*>(modified())->move()));
- varLevel->setValue(qobject_cast<Pokemod::SpeciesMove*>(modified())->level());
- varWildLevel->setValue(qobject_cast<Pokemod::SpeciesMove*>(modified())->wild());
+ varMove->setCurrentIndex(varMove->findData(qobject_cast<Sigmod::SpeciesMove*>(modified())->move()));
+ varLevel->setValue(qobject_cast<Sigmod::SpeciesMove*>(modified())->level());
+ varWildLevel->setValue(qobject_cast<Sigmod::SpeciesMove*>(modified())->wild());
}
-void Pokemodr::SpeciesMoveUI::apply()
+void Sigmodr::SpeciesMoveUI::apply()
{
- *qobject_cast<Pokemod::SpeciesMove*>(original()) = *qobject_cast<Pokemod::SpeciesMove*>(modified());
+ *qobject_cast<Sigmod::SpeciesMove*>(original()) = *qobject_cast<Sigmod::SpeciesMove*>(modified());
emit(changed(false));
}
-void Pokemodr::SpeciesMoveUI::discard()
+void Sigmodr::SpeciesMoveUI::discard()
{
- *qobject_cast<Pokemod::SpeciesMove*>(modified()) = *qobject_cast<Pokemod::SpeciesMove*>(original());
+ *qobject_cast<Sigmod::SpeciesMove*>(modified()) = *qobject_cast<Sigmod::SpeciesMove*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::SpeciesMoveUI::on_varMove_activated(const int move)
+void Sigmodr::SpeciesMoveUI::on_varMove_activated(const int move)
{
- qobject_cast<Pokemod::SpeciesMove*>(modified())->setMove(varMove->itemData(move).toInt());
+ qobject_cast<Sigmod::SpeciesMove*>(modified())->setMove(varMove->itemData(move).toInt());
}
-void Pokemodr::SpeciesMoveUI::on_varLevel_valueChanged(const int level)
+void Sigmodr::SpeciesMoveUI::on_varLevel_valueChanged(const int level)
{
- qobject_cast<Pokemod::SpeciesMove*>(modified())->setLevel(level);
+ qobject_cast<Sigmod::SpeciesMove*>(modified())->setLevel(level);
}
-void Pokemodr::SpeciesMoveUI::on_varWildLevel_valueChanged(const int wildLevel)
+void Sigmodr::SpeciesMoveUI::on_varWildLevel_valueChanged(const int wildLevel)
{
- qobject_cast<Pokemod::SpeciesMove*>(modified())->setWild(wildLevel);
+ qobject_cast<Sigmod::SpeciesMove*>(modified())->setWild(wildLevel);
}
diff --git a/sigmodr/SpeciesMoveUI.h b/sigmodr/SpeciesMoveUI.h
index ca68873c..3bd45c0a 100644
--- a/sigmodr/SpeciesMoveUI.h
+++ b/sigmodr/SpeciesMoveUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPECIESMOVEUI__
-#define __POKEMODR_SPECIESMOVEUI__
+#ifndef __SIGMODR_SPECIESMOVEUI__
+#define __SIGMODR_SPECIESMOVEUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_speciesmove.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class SpeciesMove;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpeciesMoveUI : public ObjectUI, private Ui::formSpeciesMove
{
Q_OBJECT
public:
- SpeciesMoveUI(Pokemod::SpeciesMove* move, QWidget* parent);
+ SpeciesMoveUI(Sigmod::SpeciesMove* move, QWidget* parent);
~SpeciesMoveUI();
public slots:
void apply();
diff --git a/sigmodr/SpeciesUI.cpp b/sigmodr/SpeciesUI.cpp
index 03373500..1892aade 100644
--- a/sigmodr/SpeciesUI.cpp
+++ b/sigmodr/SpeciesUI.cpp
@@ -18,100 +18,100 @@
// Header include
#include "SpeciesUI.h"
-// Pokemod includes
-#include "../pokemod/EggGroup.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Rules.h"
-#include "../pokemod/Skin.h"
-#include "../pokemod/Species.h"
-#include "../pokemod/Sprite.h"
-#include "../pokemod/Type.h"
-
-Pokemodr::SpeciesUI::SpeciesUI(Pokemod::Species* species, QWidget* parent) :
+// Sigmod includes
+#include "../sigmod/EggGroup.h"
+#include "../sigmod/Rules.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Skin.h"
+#include "../sigmod/Species.h"
+#include "../sigmod/Sprite.h"
+#include "../sigmod/Type.h"
+
+Sigmodr::SpeciesUI::SpeciesUI(Sigmod::Species* species, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(species, new Pokemod::Species(*species));
+ setObjects(species, new Sigmod::Species(*species));
}
-Pokemodr::SpeciesUI::~SpeciesUI()
+Sigmodr::SpeciesUI::~SpeciesUI()
{
}
-void Pokemodr::SpeciesUI::initGui()
+void Sigmodr::SpeciesUI::initGui()
{
connect(varBaseStat, SIGNAL(activated(const int)), this, SLOT(setGui()));
connect(varEVStat, SIGNAL(activated(const int)), this, SLOT(setGui()));
- varGrowth->addItem(Pokemod::Species::StyleStr[Pokemod::Species::Fluctuating], QVariant::fromValue(Pokemod::Species::Fluctuating));
- varGrowth->addItem(Pokemod::Species::StyleStr[Pokemod::Species::Fading], QVariant::fromValue(Pokemod::Species::Fading));
- varGrowth->addItem(Pokemod::Species::StyleStr[Pokemod::Species::Slow], QVariant::fromValue(Pokemod::Species::Slow));
- varGrowth->addItem(Pokemod::Species::StyleStr[Pokemod::Species::Normal], QVariant::fromValue(Pokemod::Species::Normal));
- varGrowth->addItem(Pokemod::Species::StyleStr[Pokemod::Species::Fast], QVariant::fromValue(Pokemod::Species::Fast));
- varGrowth->addItem(Pokemod::Species::StyleStr[Pokemod::Species::Erratic], QVariant::fromValue(Pokemod::Species::Erratic));
+ varGrowth->addItem(Sigmod::Species::StyleStr[Sigmod::Species::Fluctuating], QVariant::fromValue(Sigmod::Species::Fluctuating));
+ varGrowth->addItem(Sigmod::Species::StyleStr[Sigmod::Species::Fading], QVariant::fromValue(Sigmod::Species::Fading));
+ varGrowth->addItem(Sigmod::Species::StyleStr[Sigmod::Species::Slow], QVariant::fromValue(Sigmod::Species::Slow));
+ varGrowth->addItem(Sigmod::Species::StyleStr[Sigmod::Species::Normal], QVariant::fromValue(Sigmod::Species::Normal));
+ varGrowth->addItem(Sigmod::Species::StyleStr[Sigmod::Species::Fast], QVariant::fromValue(Sigmod::Species::Fast));
+ varGrowth->addItem(Sigmod::Species::StyleStr[Sigmod::Species::Erratic], QVariant::fromValue(Sigmod::Species::Erratic));
}
-void Pokemodr::SpeciesUI::refreshGui()
+void Sigmodr::SpeciesUI::refreshGui()
{
varBaseStat->clear();
varEVStat->clear();
- const bool isSplit = pokemod()->rules()->specialSplit();
- const QStringList& statNames = (isSplit ? Pokemod::StatGSCStr : Pokemod::StatRBYStr);
- varBaseStat->addItem(statNames[Pokemod::ST_HP], QVariant::fromValue(Pokemod::ST_HP));
- varBaseStat->addItem(statNames[Pokemod::ST_Attack], QVariant::fromValue(Pokemod::ST_Attack));
- varBaseStat->addItem(statNames[Pokemod::ST_Defense], QVariant::fromValue(Pokemod::ST_Defense));
- varBaseStat->addItem(statNames[Pokemod::ST_Speed], QVariant::fromValue(Pokemod::ST_Speed));
+ const bool isSplit = sigmod()->rules()->specialSplit();
+ const QStringList& statNames = (isSplit ? Sigmod::StatGSCStr : Sigmod::StatRBYStr);
+ varBaseStat->addItem(statNames[Sigmod::ST_HP], QVariant::fromValue(Sigmod::ST_HP));
+ varBaseStat->addItem(statNames[Sigmod::ST_Attack], QVariant::fromValue(Sigmod::ST_Attack));
+ varBaseStat->addItem(statNames[Sigmod::ST_Defense], QVariant::fromValue(Sigmod::ST_Defense));
+ varBaseStat->addItem(statNames[Sigmod::ST_Speed], QVariant::fromValue(Sigmod::ST_Speed));
if (isSplit)
{
- varBaseStat->addItem(statNames[Pokemod::ST_SpecialAttack], QVariant::fromValue(Pokemod::ST_SpecialAttack));
- varBaseStat->addItem(statNames[Pokemod::ST_SpecialDefense], QVariant::fromValue(Pokemod::ST_SpecialDefense));
+ varBaseStat->addItem(statNames[Sigmod::ST_SpecialAttack], QVariant::fromValue(Sigmod::ST_SpecialAttack));
+ varBaseStat->addItem(statNames[Sigmod::ST_SpecialDefense], QVariant::fromValue(Sigmod::ST_SpecialDefense));
}
else
- varBaseStat->addItem(statNames[Pokemod::ST_Special], QVariant::fromValue(Pokemod::ST_Special));
- if (pokemod()->rules()->effortValuesAllowed())
+ varBaseStat->addItem(statNames[Sigmod::ST_Special], QVariant::fromValue(Sigmod::ST_Special));
+ if (sigmod()->rules()->effortValuesAllowed())
{
- varEVStat->addItem(statNames[Pokemod::ST_HP], QVariant::fromValue(Pokemod::ST_HP));
- varEVStat->addItem(statNames[Pokemod::ST_Attack], QVariant::fromValue(Pokemod::ST_Attack));
- varEVStat->addItem(statNames[Pokemod::ST_Defense], QVariant::fromValue(Pokemod::ST_Defense));
- varEVStat->addItem(statNames[Pokemod::ST_Speed], QVariant::fromValue(Pokemod::ST_Speed));
+ varEVStat->addItem(statNames[Sigmod::ST_HP], QVariant::fromValue(Sigmod::ST_HP));
+ varEVStat->addItem(statNames[Sigmod::ST_Attack], QVariant::fromValue(Sigmod::ST_Attack));
+ varEVStat->addItem(statNames[Sigmod::ST_Defense], QVariant::fromValue(Sigmod::ST_Defense));
+ varEVStat->addItem(statNames[Sigmod::ST_Speed], QVariant::fromValue(Sigmod::ST_Speed));
if (isSplit)
{
- varEVStat->addItem(statNames[Pokemod::ST_SpecialAttack], QVariant::fromValue(Pokemod::ST_SpecialAttack));
- varEVStat->addItem(statNames[Pokemod::ST_SpecialDefense], QVariant::fromValue(Pokemod::ST_SpecialDefense));
+ varEVStat->addItem(statNames[Sigmod::ST_SpecialAttack], QVariant::fromValue(Sigmod::ST_SpecialAttack));
+ varEVStat->addItem(statNames[Sigmod::ST_SpecialDefense], QVariant::fromValue(Sigmod::ST_SpecialDefense));
}
else
- varEVStat->addItem(statNames[Pokemod::ST_Special], QVariant::fromValue(Pokemod::ST_Special));
+ varEVStat->addItem(statNames[Sigmod::ST_Special], QVariant::fromValue(Sigmod::ST_Special));
}
else
boxEffortValues->setEnabled(false);
- if (!pokemod()->rules()->maxHeldItems())
+ if (!sigmod()->rules()->maxHeldItems())
boxItemChance->setEnabled(false);
- for (int i = 0; i < pokemod()->spriteCount(); ++i)
+ for (int i = 0; i < sigmod()->spriteCount(); ++i)
{
- const Pokemod::Sprite* sprite = pokemod()->sprite(i);
+ const Sigmod::Sprite* sprite = sigmod()->sprite(i);
varMaleFront->addItem(QPixmap::fromImage(sprite->sprite()), sprite->name(), sprite->id());
varMaleBack->addItem(QPixmap::fromImage(sprite->sprite()), sprite->name(), sprite->id());
varFemaleFront->addItem(QPixmap::fromImage(sprite->sprite()), sprite->name(), sprite->id());
varFemaleBack->addItem(QPixmap::fromImage(sprite->sprite()), sprite->name(), sprite->id());
}
- for (int i = 0; i < pokemod()->skinCount(); ++i)
+ for (int i = 0; i < sigmod()->skinCount(); ++i)
{
- const Pokemod::Skin* skin = pokemod()->skin(i);
+ const Sigmod::Skin* skin = sigmod()->skin(i);
varSkin->addItem(skin->name(), skin->id());
}
- if (pokemod()->rules()->genderAllowed())
+ if (sigmod()->rules()->genderAllowed())
{
varEggSpecies->clear();
varEggGroups->clear();
- if (pokemod()->rules()->breedingAllowed())
+ if (sigmod()->rules()->breedingAllowed())
{
- for (int i = 0; i < pokemod()->speciesCount(); ++i)
+ for (int i = 0; i < sigmod()->speciesCount(); ++i)
{
- const Pokemod::Species* species = pokemod()->species(i);
+ const Sigmod::Species* species = sigmod()->species(i);
varEggSpecies->addItem(species->name(), species->id());
}
- for (int i = 0; i < pokemod()->eggGroupCount(); ++i)
+ for (int i = 0; i < sigmod()->eggGroupCount(); ++i)
{
- const Pokemod::EggGroup* eggGroup = pokemod()->eggGroup(i);
+ const Sigmod::EggGroup* eggGroup = sigmod()->eggGroup(i);
QListWidgetItem* widgetItem = new QListWidgetItem(eggGroup->name(), varEggGroups);
widgetItem->setData(Qt::UserRole, eggGroup->id());
}
@@ -129,184 +129,184 @@ void Pokemodr::SpeciesUI::refreshGui()
boxFemaleSprites->setEnabled(false);
}
varTypes->clear();
- for (int i = 0; i < pokemod()->typeCount(); ++i)
+ for (int i = 0; i < sigmod()->typeCount(); ++i)
{
- const Pokemod::Type* type = pokemod()->type(i);
+ const Sigmod::Type* type = sigmod()->type(i);
QListWidgetItem* widgetItem = new QListWidgetItem(type->name(), varTypes);
widgetItem->setData(Qt::UserRole, type->id());
}
}
-void Pokemodr::SpeciesUI::setGui()
+void Sigmodr::SpeciesUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Species*>(modified())->name());
- varBaseStatValue->setValue(qobject_cast<Pokemod::Species*>(modified())->baseStat(varBaseStat->itemData(varBaseStat->currentIndex()).value<Pokemod::Stat>()));
- varEffortValue->setValue(qobject_cast<Pokemod::Species*>(modified())->effortValue(varEVStat->itemData(varEVStat->currentIndex()).value<Pokemod::Stat>()));
- varGrowth->setCurrentIndex(qobject_cast<Pokemod::Species*>(modified())->growth());
- varExperienceValue->setValue(qobject_cast<Pokemod::Species*>(modified())->experienceValue());
- varCatchValue->setValue(qobject_cast<Pokemod::Species*>(modified())->catchValue());
- varRunChance->setValue(qobject_cast<Pokemod::Species*>(modified())->runChance());
- varItemChance->setValue(qobject_cast<Pokemod::Species*>(modified())->itemChance());
- varPokedexNumber->setValue(qobject_cast<Pokemod::Species*>(modified())->pokedexNumber());
- varWeight->setValue(qobject_cast<Pokemod::Species*>(modified())->weight());
- varHeight->setValue(qobject_cast<Pokemod::Species*>(modified())->height());
- varPokedexEntry->setText(qobject_cast<Pokemod::Species*>(modified())->pokedexEntry());
- varMaleFront->setCurrentIndex(varMaleFront->findData(qobject_cast<Pokemod::Species*>(modified())->frontMaleSprite()));
- varMaleBack->setCurrentIndex(varMaleBack->findData(qobject_cast<Pokemod::Species*>(modified())->backMaleSprite()));
- if (pokemod()->rules()->genderAllowed())
+ varName->setText(qobject_cast<Sigmod::Species*>(modified())->name());
+ varBaseStatValue->setValue(qobject_cast<Sigmod::Species*>(modified())->baseStat(varBaseStat->itemData(varBaseStat->currentIndex()).value<Sigmod::Stat>()));
+ varEffortValue->setValue(qobject_cast<Sigmod::Species*>(modified())->effortValue(varEVStat->itemData(varEVStat->currentIndex()).value<Sigmod::Stat>()));
+ varGrowth->setCurrentIndex(qobject_cast<Sigmod::Species*>(modified())->growth());
+ varExperienceValue->setValue(qobject_cast<Sigmod::Species*>(modified())->experienceValue());
+ varCatchValue->setValue(qobject_cast<Sigmod::Species*>(modified())->catchValue());
+ varRunChance->setValue(qobject_cast<Sigmod::Species*>(modified())->runChance());
+ varItemChance->setValue(qobject_cast<Sigmod::Species*>(modified())->itemChance());
+ varEncyclopediaNumber->setValue(qobject_cast<Sigmod::Species*>(modified())->encyclopediaNumber());
+ varWeight->setValue(qobject_cast<Sigmod::Species*>(modified())->weight());
+ varHeight->setValue(qobject_cast<Sigmod::Species*>(modified())->height());
+ 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()));
+ if (sigmod()->rules()->genderAllowed())
{
- varFemaleFront->setCurrentIndex(varFemaleFront->findData(qobject_cast<Pokemod::Species*>(modified())->frontFemaleSprite()));
- varFemaleBack->setCurrentIndex(varFemaleBack->findData(qobject_cast<Pokemod::Species*>(modified())->backFemaleSprite()));
+ varFemaleFront->setCurrentIndex(varFemaleFront->findData(qobject_cast<Sigmod::Species*>(modified())->frontFemaleSprite()));
+ varFemaleBack->setCurrentIndex(varFemaleBack->findData(qobject_cast<Sigmod::Species*>(modified())->backFemaleSprite()));
}
- varSkin->setCurrentIndex(varSkin->findData(qobject_cast<Pokemod::Species*>(modified())->skin()));
- boxGenderChance->setChecked((qobject_cast<Pokemod::Species*>(modified())->genderFactor().denominator() < qobject_cast<Pokemod::Species*>(modified())->genderFactor().numerator()) ? Qt::Checked : Qt::Unchecked);
- varGenderChance->setValue(qobject_cast<Pokemod::Species*>(modified())->genderFactor());
- varEggSpecies->setCurrentIndex(varEggSpecies->findData(qobject_cast<Pokemod::Species*>(modified())->eggSpecies()));
- varEggSteps->setValue(qobject_cast<Pokemod::Species*>(modified())->eggSteps());
- varEvolution->setValue(qobject_cast<Pokemod::Species*>(modified())->evolution());
+ varSkin->setCurrentIndex(varSkin->findData(qobject_cast<Sigmod::Species*>(modified())->skin()));
+ boxGenderChance->setChecked((qobject_cast<Sigmod::Species*>(modified())->genderFactor().denominator() < qobject_cast<Sigmod::Species*>(modified())->genderFactor().numerator()) ? 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());
+ varEvolution->setValue(qobject_cast<Sigmod::Species*>(modified())->evolution());
for (int i = 0; i < varTypes->count(); ++i)
{
QListWidgetItem* widgetItem = varTypes->item(i);
- widgetItem->setSelected(qobject_cast<Pokemod::Species*>(modified())->type(widgetItem->data(Qt::UserRole).toInt()));
+ widgetItem->setSelected(qobject_cast<Sigmod::Species*>(modified())->type(widgetItem->data(Qt::UserRole).toInt()));
}
for (int i = 0; i < varEggGroups->count(); ++i)
{
QListWidgetItem* widgetItem = varEggGroups->item(i);
- widgetItem->setSelected(qobject_cast<Pokemod::Species*>(modified())->eggGroup(widgetItem->data(Qt::UserRole).toInt()));
+ widgetItem->setSelected(qobject_cast<Sigmod::Species*>(modified())->eggGroup(widgetItem->data(Qt::UserRole).toInt()));
}
}
-void Pokemodr::SpeciesUI::apply()
+void Sigmodr::SpeciesUI::apply()
{
- *qobject_cast<Pokemod::Species*>(original()) = *qobject_cast<Pokemod::Species*>(modified());
+ *qobject_cast<Sigmod::Species*>(original()) = *qobject_cast<Sigmod::Species*>(modified());
emit(changed(false));
}
-void Pokemodr::SpeciesUI::discard()
+void Sigmodr::SpeciesUI::discard()
{
- *qobject_cast<Pokemod::Species*>(modified()) = *qobject_cast<Pokemod::Species*>(original());
+ *qobject_cast<Sigmod::Species*>(modified()) = *qobject_cast<Sigmod::Species*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::SpeciesUI::on_varName_textChanged(const QString& name)
+void Sigmodr::SpeciesUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Species*>(modified())->setName(name);
+ qobject_cast<Sigmod::Species*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::SpeciesUI::on_varBaseStatValue_valueChanged(const int baseStat)
+void Sigmodr::SpeciesUI::on_varBaseStatValue_valueChanged(const int baseStat)
{
- qobject_cast<Pokemod::Species*>(modified())->setBaseStat(varBaseStat->itemData(varBaseStat->currentIndex()).value<Pokemod::Stat>(), baseStat);
+ qobject_cast<Sigmod::Species*>(modified())->setBaseStat(varBaseStat->itemData(varBaseStat->currentIndex()).value<Sigmod::Stat>(), baseStat);
}
-void Pokemodr::SpeciesUI::on_varEffortValue_valueChanged(const int effortValue)
+void Sigmodr::SpeciesUI::on_varEffortValue_valueChanged(const int effortValue)
{
- qobject_cast<Pokemod::Species*>(modified())->setEffortValue(varEVStat->itemData(varEVStat->currentIndex()).value<Pokemod::Stat>(), effortValue);
+ qobject_cast<Sigmod::Species*>(modified())->setEffortValue(varEVStat->itemData(varEVStat->currentIndex()).value<Sigmod::Stat>(), effortValue);
}
-void Pokemodr::SpeciesUI::on_varGrowth_activated(const int growth)
+void Sigmodr::SpeciesUI::on_varGrowth_activated(const int growth)
{
- qobject_cast<Pokemod::Species*>(modified())->setGrowth(QVariant(growth).value<Pokemod::Species::Style>());
+ qobject_cast<Sigmod::Species*>(modified())->setGrowth(QVariant(growth).value<Sigmod::Species::Style>());
}
-void Pokemodr::SpeciesUI::on_varExperienceValue_valueChanged(const int experienceValue)
+void Sigmodr::SpeciesUI::on_varExperienceValue_valueChanged(const int experienceValue)
{
- qobject_cast<Pokemod::Species*>(modified())->setExperienceValue(experienceValue);
+ qobject_cast<Sigmod::Species*>(modified())->setExperienceValue(experienceValue);
}
-void Pokemodr::SpeciesUI::on_varCatchValue_valueChanged(const int catchValue)
+void Sigmodr::SpeciesUI::on_varCatchValue_valueChanged(const int catchValue)
{
- qobject_cast<Pokemod::Species*>(modified())->setCatchValue(catchValue);
+ qobject_cast<Sigmod::Species*>(modified())->setCatchValue(catchValue);
}
-void Pokemodr::SpeciesUI::on_varRunChance_valueChanged(const Pokemod::Fraction& runChance)
+void Sigmodr::SpeciesUI::on_varRunChance_valueChanged(const Sigmod::Fraction& runChance)
{
- qobject_cast<Pokemod::Species*>(modified())->setRunChance(runChance);
+ qobject_cast<Sigmod::Species*>(modified())->setRunChance(runChance);
}
-void Pokemodr::SpeciesUI::on_varItemChance_valueChanged(const Pokemod::Fraction& itemChance)
+void Sigmodr::SpeciesUI::on_varItemChance_valueChanged(const Sigmod::Fraction& itemChance)
{
- qobject_cast<Pokemod::Species*>(modified())->setItemChance(itemChance);
+ qobject_cast<Sigmod::Species*>(modified())->setItemChance(itemChance);
}
-void Pokemodr::SpeciesUI::on_varPokedexNumber_valueChanged(const int pokedexNumber)
+void Sigmodr::SpeciesUI::on_varEncyclopediaNumber_valueChanged(const int encyclopediaNumber)
{
- qobject_cast<Pokemod::Species*>(modified())->setPokedexNumber(pokedexNumber);
+ qobject_cast<Sigmod::Species*>(modified())->setEncyclopediaNumber(encyclopediaNumber);
}
-void Pokemodr::SpeciesUI::on_varWeight_valueChanged(const int weight)
+void Sigmodr::SpeciesUI::on_varWeight_valueChanged(const int weight)
{
- qobject_cast<Pokemod::Species*>(modified())->setWeight(weight);
+ qobject_cast<Sigmod::Species*>(modified())->setWeight(weight);
}
-void Pokemodr::SpeciesUI::on_varHeight_valueChanged(const int height)
+void Sigmodr::SpeciesUI::on_varHeight_valueChanged(const int height)
{
- qobject_cast<Pokemod::Species*>(modified())->setHeight(height);
+ qobject_cast<Sigmod::Species*>(modified())->setHeight(height);
}
-void Pokemodr::SpeciesUI::on_varPokedexEntry_textChanged(const QString& pokedexEntry)
+void Sigmodr::SpeciesUI::on_varEncyclopediaEntry_textChanged(const QString& encyclopediaEntry)
{
- qobject_cast<Pokemod::Species*>(modified())->setPokedexEntry(pokedexEntry);
+ qobject_cast<Sigmod::Species*>(modified())->setEncyclopediaEntry(encyclopediaEntry);
}
-void Pokemodr::SpeciesUI::on_varMaleFront_currentIndexChanged(const int maleFront)
+void Sigmodr::SpeciesUI::on_varMaleFront_currentIndexChanged(const int maleFront)
{
- qobject_cast<Pokemod::Species*>(modified())->setFrontMaleSprite(varMaleFront->itemData(maleFront).toInt());
+ qobject_cast<Sigmod::Species*>(modified())->setFrontMaleSprite(varMaleFront->itemData(maleFront).toInt());
}
-void Pokemodr::SpeciesUI::on_varMaleBack_currentIndexChanged(const int maleBack)
+void Sigmodr::SpeciesUI::on_varMaleBack_currentIndexChanged(const int maleBack)
{
- qobject_cast<Pokemod::Species*>(modified())->setBackMaleSprite(varMaleBack->itemData(maleBack).toInt());
+ qobject_cast<Sigmod::Species*>(modified())->setBackMaleSprite(varMaleBack->itemData(maleBack).toInt());
}
-void Pokemodr::SpeciesUI::on_varFemaleFront_currentIndexChanged(const int femaleFront)
+void Sigmodr::SpeciesUI::on_varFemaleFront_currentIndexChanged(const int femaleFront)
{
- qobject_cast<Pokemod::Species*>(modified())->setFrontFemaleSprite(varFemaleFront->itemData(femaleFront).toInt());
+ qobject_cast<Sigmod::Species*>(modified())->setFrontFemaleSprite(varFemaleFront->itemData(femaleFront).toInt());
}
-void Pokemodr::SpeciesUI::on_varFemaleBack_currentIndexChanged(const int femaleBack)
+void Sigmodr::SpeciesUI::on_varFemaleBack_currentIndexChanged(const int femaleBack)
{
- qobject_cast<Pokemod::Species*>(modified())->setBackFemaleSprite(varFemaleBack->itemData(femaleBack).toInt());
+ qobject_cast<Sigmod::Species*>(modified())->setBackFemaleSprite(varFemaleBack->itemData(femaleBack).toInt());
}
-void Pokemodr::SpeciesUI::on_varSkin_currentIndexChanged(const int skin)
+void Sigmodr::SpeciesUI::on_varSkin_currentIndexChanged(const int skin)
{
- qobject_cast<Pokemod::Species*>(modified())->setSkin(varSkin->itemData(skin).toInt());
+ qobject_cast<Sigmod::Species*>(modified())->setSkin(varSkin->itemData(skin).toInt());
}
-void Pokemodr::SpeciesUI::on_boxGenderChance_clicked(const bool genderChance)
+void Sigmodr::SpeciesUI::on_boxGenderChance_clicked(const bool genderChance)
{
- qobject_cast<Pokemod::Species*>(modified())->setGenderFactor(Pokemod::Fraction((genderChance ? 1 : 2), 1));
+ qobject_cast<Sigmod::Species*>(modified())->setGenderFactor(Sigmod::Fraction((genderChance ? 1 : 2), 1));
}
-void Pokemodr::SpeciesUI::on_varGenderChance_valueChanged(const Pokemod::Fraction& genderChance)
+void Sigmodr::SpeciesUI::on_varGenderChance_valueChanged(const Sigmod::Fraction& genderChance)
{
- qobject_cast<Pokemod::Species*>(modified())->setGenderFactor(genderChance);
+ qobject_cast<Sigmod::Species*>(modified())->setGenderFactor(genderChance);
}
-void Pokemodr::SpeciesUI::on_varEggSpecies_activated(const int eggSpecies)
+void Sigmodr::SpeciesUI::on_varEggSpecies_activated(const int eggSpecies)
{
- qobject_cast<Pokemod::Species*>(modified())->setEggSpecies(varEggSpecies->itemData(eggSpecies).toInt());
+ qobject_cast<Sigmod::Species*>(modified())->setEggSpecies(varEggSpecies->itemData(eggSpecies).toInt());
}
-void Pokemodr::SpeciesUI::on_varEggSteps_valueChanged(const int eggSteps)
+void Sigmodr::SpeciesUI::on_varEggSteps_valueChanged(const int eggSteps)
{
- qobject_cast<Pokemod::Species*>(modified())->setEggSteps(eggSteps);
+ qobject_cast<Sigmod::Species*>(modified())->setEggSteps(eggSteps);
}
-void Pokemodr::SpeciesUI::on_varEvolution_valueChanged(const Pokemod::Script& evolution)
+void Sigmodr::SpeciesUI::on_varEvolution_valueChanged(const Sigmod::Script& evolution)
{
- qobject_cast<Pokemod::Species*>(modified())->setEvolution(evolution);
+ qobject_cast<Sigmod::Species*>(modified())->setEvolution(evolution);
}
-void Pokemodr::SpeciesUI::on_varTypes_itemClicked(QListWidgetItem* item)
+void Sigmodr::SpeciesUI::on_varTypes_itemClicked(QListWidgetItem* item)
{
- qobject_cast<Pokemod::Species*>(modified())->setType(item->data(Qt::UserRole).toInt(), item->isSelected());
+ qobject_cast<Sigmod::Species*>(modified())->setType(item->data(Qt::UserRole).toInt(), item->isSelected());
}
-void Pokemodr::SpeciesUI::on_varEggGroups_itemClicked(QListWidgetItem* item)
+void Sigmodr::SpeciesUI::on_varEggGroups_itemClicked(QListWidgetItem* item)
{
- qobject_cast<Pokemod::Species*>(modified())->setEggGroup(item->data(Qt::UserRole).toInt(), !item->isSelected());
+ qobject_cast<Sigmod::Species*>(modified())->setEggGroup(item->data(Qt::UserRole).toInt(), !item->isSelected());
}
diff --git a/sigmodr/SpeciesUI.h b/sigmodr/SpeciesUI.h
index 815e93f3..3283b80e 100644
--- a/sigmodr/SpeciesUI.h
+++ b/sigmodr/SpeciesUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPECIESUI__
-#define __POKEMODR_SPECIESUI__
+#ifndef __SIGMODR_SPECIESUI__
+#define __SIGMODR_SPECIESUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_species.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Species;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpeciesUI : public ObjectUI, private Ui::formSpecies
{
Q_OBJECT
public:
- SpeciesUI(Pokemod::Species* species, QWidget* parent);
+ SpeciesUI(Sigmod::Species* species, QWidget* parent);
~SpeciesUI();
public slots:
void apply();
@@ -49,22 +49,22 @@ class SpeciesUI : public ObjectUI, private Ui::formSpecies
void on_varGrowth_activated(const int growth);
void on_varExperienceValue_valueChanged(const int experienceValue);
void on_varCatchValue_valueChanged(const int catchValue);
- void on_varRunChance_valueChanged(const Pokemod::Fraction& runChance);
- void on_varItemChance_valueChanged(const Pokemod::Fraction& itemChance);
- void on_varPokedexNumber_valueChanged(const int pokedexNumber);
+ void on_varRunChance_valueChanged(const Sigmod::Fraction& runChance);
+ void on_varItemChance_valueChanged(const Sigmod::Fraction& itemChance);
+ void on_varEncyclopediaNumber_valueChanged(const int encyclopediaNumber);
void on_varWeight_valueChanged(const int weight);
void on_varHeight_valueChanged(const int height);
- void on_varPokedexEntry_textChanged(const QString& pokedexEntry);
+ void on_varEncyclopediaEntry_textChanged(const QString& encyclopediaEntry);
void on_varMaleFront_currentIndexChanged(const int maleFront);
void on_varMaleBack_currentIndexChanged(const int maleBack);
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_varGenderChance_valueChanged(const Pokemod::Fraction& genderChance);
+ void on_varGenderChance_valueChanged(const Sigmod::Fraction& genderChance);
void on_varEggSpecies_activated(const int eggSpecies);
void on_varEggSteps_valueChanged(const int eggSteps);
- void on_varEvolution_valueChanged(const Pokemod::Script& evolution);
+ void on_varEvolution_valueChanged(const Sigmod::Script& evolution);
void on_varTypes_itemClicked(QListWidgetItem* item);
void on_varEggGroups_itemClicked(QListWidgetItem* item);
private slots:
diff --git a/sigmodr/SpriteUI.cpp b/sigmodr/SpriteUI.cpp
index 6fd80b1e..19562b4c 100644
--- a/sigmodr/SpriteUI.cpp
+++ b/sigmodr/SpriteUI.cpp
@@ -18,54 +18,54 @@
// Header include
#include "SpriteUI.h"
-// Pokemod includes
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Sprite.h"
+// Sigmod includes
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Sprite.h"
// KDE includes
#include <KFileDialog>
#include <KImageFilePreview>
-Pokemodr::SpriteUI::SpriteUI(Pokemod::Sprite* sprite, QWidget* parent) :
+Sigmodr::SpriteUI::SpriteUI(Sigmod::Sprite* sprite, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(sprite, new Pokemod::Sprite(*sprite));
+ setObjects(sprite, new Sigmod::Sprite(*sprite));
}
-Pokemodr::SpriteUI::~SpriteUI()
+Sigmodr::SpriteUI::~SpriteUI()
{
}
-void Pokemodr::SpriteUI::setGui()
+void Sigmodr::SpriteUI::setGui()
{
- const QImage sprite = qobject_cast<Pokemod::Sprite*>(modified())->sprite();
- varName->setText(qobject_cast<Pokemod::Sprite*>(modified())->name());
+ const QImage sprite = qobject_cast<Sigmod::Sprite*>(modified())->sprite();
+ varName->setText(qobject_cast<Sigmod::Sprite*>(modified())->name());
varSprite->setIcon(QPixmap::fromImage(sprite));
varSprite->setMinimumSize(sprite.size());
}
-void Pokemodr::SpriteUI::apply()
+void Sigmodr::SpriteUI::apply()
{
- *qobject_cast<Pokemod::Sprite*>(original()) = *qobject_cast<Pokemod::Sprite*>(modified());
+ *qobject_cast<Sigmod::Sprite*>(original()) = *qobject_cast<Sigmod::Sprite*>(modified());
emit(changed(false));
}
-void Pokemodr::SpriteUI::discard()
+void Sigmodr::SpriteUI::discard()
{
- *qobject_cast<Pokemod::Sprite*>(modified()) = *qobject_cast<Pokemod::Sprite*>(original());
+ *qobject_cast<Sigmod::Sprite*>(modified()) = *qobject_cast<Sigmod::Sprite*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::SpriteUI::on_varName_textChanged(const QString& name)
+void Sigmodr::SpriteUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Sprite*>(modified())->setName(name);
+ qobject_cast<Sigmod::Sprite*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::SpriteUI::on_varSprite_pressed()
+void Sigmodr::SpriteUI::on_varSprite_pressed()
{
KFileDialog* dialog = new KFileDialog(KUrl("kfiledialog:///image"), "image/*|Image files", NULL);
dialog->setCaption("Use Image File");
@@ -73,7 +73,7 @@ void Pokemodr::SpriteUI::on_varSprite_pressed()
dialog->setPreviewWidget(new KImageFilePreview);
if (dialog->exec() == QDialog::Accepted)
{
- qobject_cast<Pokemod::Sprite*>(modified())->setSprite(QImage(dialog->selectedFile()));
+ qobject_cast<Sigmod::Sprite*>(modified())->setSprite(QImage(dialog->selectedFile()));
setGui();
}
delete dialog;
diff --git a/sigmodr/SpriteUI.h b/sigmodr/SpriteUI.h
index d7498de1..51ccdb8c 100644
--- a/sigmodr/SpriteUI.h
+++ b/sigmodr/SpriteUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPRITEUI__
-#define __POKEMODR_SPRITEUI__
+#ifndef __SIGMODR_SPRITEUI__
+#define __SIGMODR_SPRITEUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_sprite.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Sprite;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpriteUI : public ObjectUI, private Ui::formSprite
{
Q_OBJECT
public:
- SpriteUI(Pokemod::Sprite* sprite, QWidget* parent);
+ SpriteUI(Sigmod::Sprite* sprite, QWidget* parent);
~SpriteUI();
public slots:
void apply();
diff --git a/sigmodr/StatusUI.cpp b/sigmodr/StatusUI.cpp
index 2f97daf4..0af1d04f 100644
--- a/sigmodr/StatusUI.cpp
+++ b/sigmodr/StatusUI.cpp
@@ -18,53 +18,53 @@
// Header include
#include "StatusUI.h"
-// Pokemod includes
-#include "../pokemod/Status.h"
+// Sigmod includes
+#include "../sigmod/Status.h"
-Pokemodr::StatusUI::StatusUI(Pokemod::Status* status, QWidget* parent) :
+Sigmodr::StatusUI::StatusUI(Sigmod::Status* status, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(status, new Pokemod::Status(*status));
+ setObjects(status, new Sigmod::Status(*status));
}
-Pokemodr::StatusUI::~StatusUI()
+Sigmodr::StatusUI::~StatusUI()
{
}
-void Pokemodr::StatusUI::setGui()
+void Sigmodr::StatusUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Status*>(modified())->name());
- varBattleScript->setValue(qobject_cast<Pokemod::Status*>(modified())->battleScript());
- varWorldScript->setValue(qobject_cast<Pokemod::Status*>(modified())->worldScript());
+ varName->setText(qobject_cast<Sigmod::Status*>(modified())->name());
+ varBattleScript->setValue(qobject_cast<Sigmod::Status*>(modified())->battleScript());
+ varWorldScript->setValue(qobject_cast<Sigmod::Status*>(modified())->worldScript());
}
-void Pokemodr::StatusUI::apply()
+void Sigmodr::StatusUI::apply()
{
- *qobject_cast<Pokemod::Status*>(original()) = *qobject_cast<Pokemod::Status*>(modified());
+ *qobject_cast<Sigmod::Status*>(original()) = *qobject_cast<Sigmod::Status*>(modified());
emit(changed(false));
}
-void Pokemodr::StatusUI::discard()
+void Sigmodr::StatusUI::discard()
{
- *qobject_cast<Pokemod::Status*>(modified()) = *qobject_cast<Pokemod::Status*>(original());
+ *qobject_cast<Sigmod::Status*>(modified()) = *qobject_cast<Sigmod::Status*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::StatusUI::on_varName_textChanged(const QString& name)
+void Sigmodr::StatusUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Status*>(modified())->setName(name);
+ qobject_cast<Sigmod::Status*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::StatusUI::on_varBattleScript_valueChanged(const Pokemod::Script& battleScript)
+void Sigmodr::StatusUI::on_varBattleScript_valueChanged(const Sigmod::Script& battleScript)
{
- qobject_cast<Pokemod::Status*>(modified())->setBattleScript(battleScript);
+ qobject_cast<Sigmod::Status*>(modified())->setBattleScript(battleScript);
}
-void Pokemodr::StatusUI::on_varWorldScript_valueChanged(const Pokemod::Script& worldScript)
+void Sigmodr::StatusUI::on_varWorldScript_valueChanged(const Sigmod::Script& worldScript)
{
- qobject_cast<Pokemod::Status*>(modified())->setWorldScript(worldScript);
+ qobject_cast<Sigmod::Status*>(modified())->setWorldScript(worldScript);
}
diff --git a/sigmodr/StatusUI.h b/sigmodr/StatusUI.h
index 08c1c8a8..9f1d03e7 100644
--- a/sigmodr/StatusUI.h
+++ b/sigmodr/StatusUI.h
@@ -15,37 +15,37 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_STATUSUI__
-#define __POKEMODR_STATUSUI__
+#ifndef __SIGMODR_STATUSUI__
+#define __SIGMODR_STATUSUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_status.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Status;
}
-namespace Pokemodr
+namespace Sigmodr
{
class StatusUI : public ObjectUI, private Ui::formStatus
{
Q_OBJECT
public:
- StatusUI(Pokemod::Status* status, QWidget* parent);
+ StatusUI(Sigmod::Status* status, QWidget* parent);
~StatusUI();
public slots:
void apply();
void discard();
protected slots:
void on_varName_textChanged(const QString& name);
- void on_varBattleScript_valueChanged(const Pokemod::Script& battleScript);
- void on_varWorldScript_valueChanged(const Pokemod::Script& worldScript);
+ void on_varBattleScript_valueChanged(const Sigmod::Script& battleScript);
+ void on_varWorldScript_valueChanged(const Sigmod::Script& worldScript);
private slots:
void setGui();
};
diff --git a/sigmodr/StoreUI.cpp b/sigmodr/StoreUI.cpp
index 38eb9883..28132186 100644
--- a/sigmodr/StoreUI.cpp
+++ b/sigmodr/StoreUI.cpp
@@ -18,64 +18,64 @@
// Header include
#include "StoreUI.h"
-// Pokemod includes
-#include "../pokemod/Item.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Store.h"
+// Sigmod includes
+#include "../sigmod/Item.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Store.h"
-Pokemodr::StoreUI::StoreUI(Pokemod::Store* store, QWidget* parent) :
+Sigmodr::StoreUI::StoreUI(Sigmod::Store* store, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(store, new Pokemod::Store(*store));
+ setObjects(store, new Sigmod::Store(*store));
}
-Pokemodr::StoreUI::~StoreUI()
+Sigmodr::StoreUI::~StoreUI()
{
}
-void Pokemodr::StoreUI::refreshGui()
+void Sigmodr::StoreUI::refreshGui()
{
varItems->clear();
- for (int i = 0; i < pokemod()->itemCount(); ++i)
+ for (int i = 0; i < sigmod()->itemCount(); ++i)
{
- const Pokemod::Item* item = pokemod()->item(i);
+ const Sigmod::Item* item = sigmod()->item(i);
QListWidgetItem* widgetItem = new QListWidgetItem(item->name(), varItems);
widgetItem->setData(Qt::UserRole, item->id());
}
}
-void Pokemodr::StoreUI::setGui()
+void Sigmodr::StoreUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Store*>(modified())->name());
+ varName->setText(qobject_cast<Sigmod::Store*>(modified())->name());
for (int i = 0; i < varItems->count(); ++i)
{
QListWidgetItem* widgetItem = varItems->item(i);
- widgetItem->setSelected(qobject_cast<Pokemod::Store*>(modified())->item(widgetItem->data(Qt::UserRole).toInt()));
+ widgetItem->setSelected(qobject_cast<Sigmod::Store*>(modified())->item(widgetItem->data(Qt::UserRole).toInt()));
}
}
-void Pokemodr::StoreUI::apply()
+void Sigmodr::StoreUI::apply()
{
- *qobject_cast<Pokemod::Store*>(original()) = *qobject_cast<Pokemod::Store*>(modified());
+ *qobject_cast<Sigmod::Store*>(original()) = *qobject_cast<Sigmod::Store*>(modified());
emit(changed(false));
}
-void Pokemodr::StoreUI::discard()
+void Sigmodr::StoreUI::discard()
{
- *qobject_cast<Pokemod::Store*>(modified()) = *qobject_cast<Pokemod::Store*>(original());
+ *qobject_cast<Sigmod::Store*>(modified()) = *qobject_cast<Sigmod::Store*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::StoreUI::on_varName_textChanged(const QString& name)
+void Sigmodr::StoreUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Store*>(modified())->setName(name);
+ qobject_cast<Sigmod::Store*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::StoreUI::on_varItems_itemClicked(QListWidgetItem* item)
+void Sigmodr::StoreUI::on_varItems_itemClicked(QListWidgetItem* item)
{
- qobject_cast<Pokemod::Store*>(modified())->setItem(item->data(Qt::UserRole).toInt(), item->isSelected());
+ qobject_cast<Sigmod::Store*>(modified())->setItem(item->data(Qt::UserRole).toInt(), item->isSelected());
}
diff --git a/sigmodr/StoreUI.h b/sigmodr/StoreUI.h
index 9e75dbb7..16eb33b3 100644
--- a/sigmodr/StoreUI.h
+++ b/sigmodr/StoreUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_STOREUI__
-#define __POKEMODR_STOREUI__
+#ifndef __SIGMODR_STOREUI__
+#define __SIGMODR_STOREUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_store.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Store;
}
-namespace Pokemodr
+namespace Sigmodr
{
class StoreUI : public ObjectUI, private Ui::formStore
{
Q_OBJECT
public:
- StoreUI(Pokemod::Store* store, QWidget* parent);
+ StoreUI(Sigmod::Store* store, QWidget* parent);
~StoreUI();
public slots:
void apply();
diff --git a/sigmodr/TileUI.cpp b/sigmodr/TileUI.cpp
index c7fb9ba1..f0932e24 100644
--- a/sigmodr/TileUI.cpp
+++ b/sigmodr/TileUI.cpp
@@ -18,85 +18,85 @@
// Header include
#include "TileUI.h"
-// Pokemod includes
-#include "../pokemod/Tile.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Sprite.h"
+// Sigmod includes
+#include "../sigmod/Tile.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Sprite.h"
-Pokemodr::TileUI::TileUI(Pokemod::Tile* tile, QWidget* parent) :
+Sigmodr::TileUI::TileUI(Sigmod::Tile* tile, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(tile, new Pokemod::Tile(*tile));
+ setObjects(tile, new Sigmod::Tile(*tile));
}
-Pokemodr::TileUI::~TileUI()
+Sigmodr::TileUI::~TileUI()
{
}
-void Pokemodr::TileUI::initGui()
+void Sigmodr::TileUI::initGui()
{
QListWidgetItem* item;
- item = new QListWidgetItem(Pokemod::DirectionStr[Pokemod::D_Up], varAccessibility);
- item->setData(Qt::UserRole, QVariant::fromValue(Pokemod::D_Up));
- item = new QListWidgetItem(Pokemod::DirectionStr[Pokemod::D_Down], varAccessibility);
- item->setData(Qt::UserRole, QVariant::fromValue(Pokemod::D_Down));
- item = new QListWidgetItem(Pokemod::DirectionStr[Pokemod::D_Left], varAccessibility);
- item->setData(Qt::UserRole, QVariant::fromValue(Pokemod::D_Left));
- item = new QListWidgetItem(Pokemod::DirectionStr[Pokemod::D_Right], varAccessibility);
- item->setData(Qt::UserRole, QVariant::fromValue(Pokemod::D_Right));
+ item = new QListWidgetItem(Sigmod::DirectionStr[Sigmod::D_Up], varAccessibility);
+ item->setData(Qt::UserRole, QVariant::fromValue(Sigmod::D_Up));
+ item = new QListWidgetItem(Sigmod::DirectionStr[Sigmod::D_Down], varAccessibility);
+ item->setData(Qt::UserRole, QVariant::fromValue(Sigmod::D_Down));
+ item = new QListWidgetItem(Sigmod::DirectionStr[Sigmod::D_Left], varAccessibility);
+ item->setData(Qt::UserRole, QVariant::fromValue(Sigmod::D_Left));
+ item = new QListWidgetItem(Sigmod::DirectionStr[Sigmod::D_Right], varAccessibility);
+ item->setData(Qt::UserRole, QVariant::fromValue(Sigmod::D_Right));
}
-void Pokemodr::TileUI::refreshGui()
+void Sigmodr::TileUI::refreshGui()
{
- for (int i = 0; i < pokemod()->spriteCount(); ++i)
+ for (int i = 0; i < sigmod()->spriteCount(); ++i)
{
- const Pokemod::Sprite* sprite = pokemod()->sprite(i);
+ const Sigmod::Sprite* sprite = sigmod()->sprite(i);
if (sprite->sprite().size() == QSize(64, 64))
varSprite->addItem(QPixmap::fromImage(sprite->sprite()), sprite->name(), sprite->id());
}
}
-void Pokemodr::TileUI::setGui()
+void Sigmodr::TileUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Tile*>(modified())->name());
- varSprite->setCurrentIndex(varSprite->findData(qobject_cast<Pokemod::Tile*>(modified())->sprite()));
+ varName->setText(qobject_cast<Sigmod::Tile*>(modified())->name());
+ varSprite->setCurrentIndex(varSprite->findData(qobject_cast<Sigmod::Tile*>(modified())->sprite()));
for (int i = 0; i < varAccessibility->count(); ++i)
- varAccessibility->item(i)->setSelected(qobject_cast<Pokemod::Tile*>(modified())->from(QVariant(i).value<Pokemod::Direction>()));
- varScript->setValue(qobject_cast<Pokemod::Tile*>(modified())->script());
+ varAccessibility->item(i)->setSelected(qobject_cast<Sigmod::Tile*>(modified())->from(QVariant(i).value<Sigmod::Direction>()));
+ varScript->setValue(qobject_cast<Sigmod::Tile*>(modified())->script());
}
-void Pokemodr::TileUI::apply()
+void Sigmodr::TileUI::apply()
{
- *qobject_cast<Pokemod::Tile*>(original()) = *qobject_cast<Pokemod::Tile*>(modified());
+ *qobject_cast<Sigmod::Tile*>(original()) = *qobject_cast<Sigmod::Tile*>(modified());
emit(changed(false));
}
-void Pokemodr::TileUI::discard()
+void Sigmodr::TileUI::discard()
{
- *qobject_cast<Pokemod::Tile*>(modified()) = *qobject_cast<Pokemod::Tile*>(original());
+ *qobject_cast<Sigmod::Tile*>(modified()) = *qobject_cast<Sigmod::Tile*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::TileUI::on_varName_textChanged(const QString& name)
+void Sigmodr::TileUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Tile*>(modified())->setName(name);
+ qobject_cast<Sigmod::Tile*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::TileUI::on_varSprite_currentIndexChanged(const int sprite)
+void Sigmodr::TileUI::on_varSprite_currentIndexChanged(const int sprite)
{
- qobject_cast<Pokemod::Tile*>(modified())->setSprite(varSprite->itemData(sprite).toInt());
+ qobject_cast<Sigmod::Tile*>(modified())->setSprite(varSprite->itemData(sprite).toInt());
}
-void Pokemodr::TileUI::on_varAccessibility_itemClicked(QListWidgetItem* item)
+void Sigmodr::TileUI::on_varAccessibility_itemClicked(QListWidgetItem* item)
{
- qobject_cast<Pokemod::Tile*>(modified())->setFrom(item->data(Qt::UserRole).value<Pokemod::Direction>(), item->isSelected());
+ qobject_cast<Sigmod::Tile*>(modified())->setFrom(item->data(Qt::UserRole).value<Sigmod::Direction>(), item->isSelected());
}
-void Pokemodr::TileUI::on_varScript_valueChanged(const Pokemod::Script& script)
+void Sigmodr::TileUI::on_varScript_valueChanged(const Sigmod::Script& script)
{
- qobject_cast<Pokemod::Tile*>(modified())->setScript(script);
+ qobject_cast<Sigmod::Tile*>(modified())->setScript(script);
}
diff --git a/sigmodr/TileUI.h b/sigmodr/TileUI.h
index 42aa1109..29ffcefb 100644
--- a/sigmodr/TileUI.h
+++ b/sigmodr/TileUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TILEUI__
-#define __POKEMODR_TILEUI__
+#ifndef __SIGMODR_TILEUI__
+#define __SIGMODR_TILEUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_tile.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Tile;
}
-namespace Pokemodr
+namespace Sigmodr
{
class TileUI : public ObjectUI, private Ui::formTile
{
Q_OBJECT
public:
- TileUI(Pokemod::Tile* tile, QWidget* parent);
+ TileUI(Sigmod::Tile* tile, QWidget* parent);
~TileUI();
public slots:
void apply();
@@ -46,7 +46,7 @@ class TileUI : public ObjectUI, private Ui::formTile
void on_varName_textChanged(const QString& name);
void on_varSprite_currentIndexChanged(const int sprite);
void on_varAccessibility_itemClicked(QListWidgetItem* item);
- void on_varScript_valueChanged(const Pokemod::Script& script);
+ void on_varScript_valueChanged(const Sigmod::Script& script);
private slots:
void initGui();
void refreshGui();
diff --git a/sigmodr/TilemapModel.h b/sigmodr/TilemapModel.h
index 64313ae5..ec2dd6e5 100644
--- a/sigmodr/TilemapModel.h
+++ b/sigmodr/TilemapModel.h
@@ -15,28 +15,28 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TILEMAPMODEL__
-#define __POKEMODR_TILEMAPMODEL__
+#ifndef __SIGMODR_TILEMAPMODEL__
+#define __SIGMODR_TILEMAPMODEL__
-// Pokemod includes
-#include "../pokemod/Matrix.h"
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Sprite.h"
-#include "../pokemod/Tile.h"
+// Sigmod includes
+#include "../sigmod/Matrix.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Sprite.h"
+#include "../sigmod/Tile.h"
// Qt includes
#include <QtCore/QAbstractTableModel>
#include <QtCore/QVariant>
#include <QtGui/QPixmap>
-namespace Pokemodr
+namespace Sigmodr
{
class TilemapModel : public QAbstractTableModel
{
Q_OBJECT
public:
- TilemapModel(Pokemod::Matrix<int>* tilemap, const Pokemod::Pokemod* pokemod);
+ TilemapModel(Sigmod::Matrix<int>* tilemap, const Sigmod::Sigmod* sigmod);
QVariant data(const QModelIndex& index, int role) const;
@@ -54,14 +54,14 @@ class TilemapModel : public QAbstractTableModel
bool setData(const QModelIndex& index, const QVariant& value, int role);
private:
- Pokemod::Matrix<int>& m_tilemap;
- const Pokemod::Pokemod* m_pokemod;
+ Sigmod::Matrix<int>& m_tilemap;
+ const Sigmod::Sigmod* m_sigmod;
};
-inline TilemapModel::TilemapModel(Pokemod::Matrix<int>* tilemap, const Pokemod::Pokemod* pokemod) :
+inline TilemapModel::TilemapModel(Sigmod::Matrix<int>* tilemap, const Sigmod::Sigmod* sigmod) :
QAbstractTableModel(),
m_tilemap(*tilemap),
- m_pokemod(pokemod)
+ m_sigmod(sigmod)
{
}
@@ -71,14 +71,14 @@ inline QVariant TilemapModel::data(const QModelIndex& index, int role) const
return QVariant();
if (role == Qt::DisplayRole)
{
- const int tileIndex = m_pokemod->tileIndex(m_tilemap(index.row(), index.column()));
+ const int tileIndex = m_sigmod->tileIndex(m_tilemap(index.row(), index.column()));
if (tileIndex != INT_MAX)
{
- const Pokemod::Tile* tile = m_pokemod->tile(tileIndex);
- if (m_pokemod->spriteIndex(tile->sprite()) == INT_MAX)
+ const Sigmod::Tile* tile = m_sigmod->tile(tileIndex);
+ if (m_sigmod->spriteIndex(tile->sprite()) == INT_MAX)
return QPixmap(64, 64);
else
- return QPixmap::fromImage(m_pokemod->spriteById(tile->sprite())->sprite());
+ return QPixmap::fromImage(m_sigmod->spriteById(tile->sprite())->sprite());
}
}
else if (role == Qt::EditRole)
diff --git a/sigmodr/TimeUI.cpp b/sigmodr/TimeUI.cpp
index 20eaba37..a7a4d9b7 100644
--- a/sigmodr/TimeUI.cpp
+++ b/sigmodr/TimeUI.cpp
@@ -18,48 +18,48 @@
// Header include
#include "TimeUI.h"
-// Pokemod includes
-#include "../pokemod/Time.h"
+// Sigmod includes
+#include "../sigmod/Time.h"
-Pokemodr::TimeUI::TimeUI(Pokemod::Time* time, QWidget* parent) :
+Sigmodr::TimeUI::TimeUI(Sigmod::Time* time, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(time, new Pokemod::Time(*time));
+ setObjects(time, new Sigmod::Time(*time));
}
-Pokemodr::TimeUI::~TimeUI()
+Sigmodr::TimeUI::~TimeUI()
{
}
-void Pokemodr::TimeUI::setGui()
+void Sigmodr::TimeUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Time*>(modified())->name());
- varTime->setTime(QTime(qobject_cast<Pokemod::Time*>(modified())->hour(), qobject_cast<Pokemod::Time*>(modified())->minute()));
+ varName->setText(qobject_cast<Sigmod::Time*>(modified())->name());
+ varTime->setTime(QTime(qobject_cast<Sigmod::Time*>(modified())->hour(), qobject_cast<Sigmod::Time*>(modified())->minute()));
}
-void Pokemodr::TimeUI::apply()
+void Sigmodr::TimeUI::apply()
{
- *qobject_cast<Pokemod::Time*>(original()) = *qobject_cast<Pokemod::Time*>(modified());
+ *qobject_cast<Sigmod::Time*>(original()) = *qobject_cast<Sigmod::Time*>(modified());
emit(changed(false));
}
-void Pokemodr::TimeUI::discard()
+void Sigmodr::TimeUI::discard()
{
- *qobject_cast<Pokemod::Time*>(modified()) = *qobject_cast<Pokemod::Time*>(original());
+ *qobject_cast<Sigmod::Time*>(modified()) = *qobject_cast<Sigmod::Time*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::TimeUI::on_varName_textChanged(const QString& name)
+void Sigmodr::TimeUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Time*>(modified())->setName(name);
+ qobject_cast<Sigmod::Time*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::TimeUI::on_varTime_timeChanged(const QTime& time)
+void Sigmodr::TimeUI::on_varTime_timeChanged(const QTime& time)
{
- qobject_cast<Pokemod::Time*>(modified())->setHour(time.hour());
- qobject_cast<Pokemod::Time*>(modified())->setMinute(time.minute());
+ qobject_cast<Sigmod::Time*>(modified())->setHour(time.hour());
+ qobject_cast<Sigmod::Time*>(modified())->setMinute(time.minute());
}
diff --git a/sigmodr/TimeUI.h b/sigmodr/TimeUI.h
index acd90ac3..4d49c79f 100644
--- a/sigmodr/TimeUI.h
+++ b/sigmodr/TimeUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TIMEUI__
-#define __POKEMODR_TIMEUI__
+#ifndef __SIGMODR_TIMEUI__
+#define __SIGMODR_TIMEUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_time.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Time;
}
-namespace Pokemodr
+namespace Sigmodr
{
class TimeUI : public ObjectUI, private Ui::formTime
{
Q_OBJECT
public:
- TimeUI(Pokemod::Time* time, QWidget* parent);
+ TimeUI(Sigmod::Time* time, QWidget* parent);
~TimeUI();
public slots:
void apply();
diff --git a/sigmodr/TrainerUI.cpp b/sigmodr/TrainerUI.cpp
index b579a6dd..728429b3 100644
--- a/sigmodr/TrainerUI.cpp
+++ b/sigmodr/TrainerUI.cpp
@@ -18,124 +18,124 @@
// Header include
#include "TrainerUI.h"
-// Pokemod includes
-#include "../pokemod/Pokemod.h"
-#include "../pokemod/Rules.h"
-#include "../pokemod/Skin.h"
-#include "../pokemod/Trainer.h"
+// Sigmod includes
+#include "../sigmod/Rules.h"
+#include "../sigmod/Sigmod.h"
+#include "../sigmod/Skin.h"
+#include "../sigmod/Trainer.h"
-Pokemodr::TrainerUI::TrainerUI(Pokemod::Trainer* trainer, QWidget* parent) :
+Sigmodr::TrainerUI::TrainerUI(Sigmod::Trainer* trainer, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(trainer, new Pokemod::Trainer(*trainer));
+ setObjects(trainer, new Sigmod::Trainer(*trainer));
}
-Pokemodr::TrainerUI::~TrainerUI()
+Sigmodr::TrainerUI::~TrainerUI()
{
}
-void Pokemodr::TrainerUI::initGui()
+void Sigmodr::TrainerUI::initGui()
{
- varTeamIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Ignorant], QVariant::fromValue(Pokemod::Trainer::Ignorant));
- varTeamIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Determine], QVariant::fromValue(Pokemod::Trainer::Determine));
- varTeamIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Remember], QVariant::fromValue(Pokemod::Trainer::Remember));
- varTeamIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Cheating], QVariant::fromValue(Pokemod::Trainer::Cheating));
- varMoveIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Ignorant], QVariant::fromValue(Pokemod::Trainer::Ignorant));
- varMoveIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Determine], QVariant::fromValue(Pokemod::Trainer::Determine));
- varMoveIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Remember], QVariant::fromValue(Pokemod::Trainer::Remember));
- varMoveIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Cheating], QVariant::fromValue(Pokemod::Trainer::Cheating));
- varItemIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Ignorant], QVariant::fromValue(Pokemod::Trainer::Ignorant));
- varItemIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Determine], QVariant::fromValue(Pokemod::Trainer::Determine));
- varItemIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Remember], QVariant::fromValue(Pokemod::Trainer::Remember));
- varItemIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Cheating], QVariant::fromValue(Pokemod::Trainer::Cheating));
- varAbilityIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Ignorant], QVariant::fromValue(Pokemod::Trainer::Ignorant));
- varAbilityIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Determine], QVariant::fromValue(Pokemod::Trainer::Determine));
- varAbilityIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Remember], QVariant::fromValue(Pokemod::Trainer::Remember));
- varAbilityIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Cheating], QVariant::fromValue(Pokemod::Trainer::Cheating));
- varStatIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Ignorant], QVariant::fromValue(Pokemod::Trainer::Ignorant));
- varStatIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Determine], QVariant::fromValue(Pokemod::Trainer::Determine));
- varStatIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Remember], QVariant::fromValue(Pokemod::Trainer::Remember));
- varStatIntel->addItem(Pokemod::Trainer::IntelligenceStr[Pokemod::Trainer::Cheating], QVariant::fromValue(Pokemod::Trainer::Cheating));
+ varTeamIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Ignorant], QVariant::fromValue(Sigmod::Trainer::Ignorant));
+ varTeamIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Determine], QVariant::fromValue(Sigmod::Trainer::Determine));
+ varTeamIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Remember], QVariant::fromValue(Sigmod::Trainer::Remember));
+ varTeamIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Cheating], QVariant::fromValue(Sigmod::Trainer::Cheating));
+ varMoveIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Ignorant], QVariant::fromValue(Sigmod::Trainer::Ignorant));
+ varMoveIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Determine], QVariant::fromValue(Sigmod::Trainer::Determine));
+ varMoveIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Remember], QVariant::fromValue(Sigmod::Trainer::Remember));
+ varMoveIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Cheating], QVariant::fromValue(Sigmod::Trainer::Cheating));
+ varItemIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Ignorant], QVariant::fromValue(Sigmod::Trainer::Ignorant));
+ varItemIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Determine], QVariant::fromValue(Sigmod::Trainer::Determine));
+ varItemIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Remember], QVariant::fromValue(Sigmod::Trainer::Remember));
+ varItemIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Cheating], QVariant::fromValue(Sigmod::Trainer::Cheating));
+ varAbilityIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Ignorant], QVariant::fromValue(Sigmod::Trainer::Ignorant));
+ varAbilityIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Determine], QVariant::fromValue(Sigmod::Trainer::Determine));
+ varAbilityIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Remember], QVariant::fromValue(Sigmod::Trainer::Remember));
+ varAbilityIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Cheating], QVariant::fromValue(Sigmod::Trainer::Cheating));
+ varStatIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Ignorant], QVariant::fromValue(Sigmod::Trainer::Ignorant));
+ varStatIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Determine], QVariant::fromValue(Sigmod::Trainer::Determine));
+ varStatIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Remember], QVariant::fromValue(Sigmod::Trainer::Remember));
+ varStatIntel->addItem(Sigmod::Trainer::IntelligenceStr[Sigmod::Trainer::Cheating], QVariant::fromValue(Sigmod::Trainer::Cheating));
}
-void Pokemodr::TrainerUI::refreshGui()
+void Sigmodr::TrainerUI::refreshGui()
{
- for (int i = 0; i < pokemod()->skinCount(); ++i)
+ for (int i = 0; i < sigmod()->skinCount(); ++i)
{
- const Pokemod::Skin* skin = pokemod()->skin(i);
+ const Sigmod::Skin* skin = sigmod()->skin(i);
varSkin->addItem(skin->name(), skin->id());
}
- varItemIntel->setEnabled(pokemod()->rules()->maxHeldItems());
- varAbilityIntel->setEnabled(pokemod()->rules()->maxAbilities());
+ varItemIntel->setEnabled(sigmod()->rules()->maxHeldItems());
+ varAbilityIntel->setEnabled(sigmod()->rules()->maxAbilities());
}
-void Pokemodr::TrainerUI::setGui()
+void Sigmodr::TrainerUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Trainer*>(modified())->name());
- varMoneyFactor->setValue(qobject_cast<Pokemod::Trainer*>(modified())->moneyFactor());
- varSkin->setCurrentIndex(varSkin->findData(qobject_cast<Pokemod::Trainer*>(modified())->skin()));
- varDepth->setValue(qobject_cast<Pokemod::Trainer*>(modified())->depth());
- varTeamIntel->setCurrentIndex(qobject_cast<Pokemod::Trainer*>(modified())->teamIntel());
- varMoveIntel->setCurrentIndex(qobject_cast<Pokemod::Trainer*>(modified())->moveIntel());
- varItemIntel->setCurrentIndex(qobject_cast<Pokemod::Trainer*>(modified())->itemIntel());
- varAbilityIntel->setCurrentIndex(qobject_cast<Pokemod::Trainer*>(modified())->abilityIntel());
- varStatIntel->setCurrentIndex(qobject_cast<Pokemod::Trainer*>(modified())->statIntel());
+ varName->setText(qobject_cast<Sigmod::Trainer*>(modified())->name());
+ varMoneyFactor->setValue(qobject_cast<Sigmod::Trainer*>(modified())->moneyFactor());
+ varSkin->setCurrentIndex(varSkin->findData(qobject_cast<Sigmod::Trainer*>(modified())->skin()));
+ varDepth->setValue(qobject_cast<Sigmod::Trainer*>(modified())->depth());
+ varTeamIntel->setCurrentIndex(qobject_cast<Sigmod::Trainer*>(modified())->teamIntel());
+ varMoveIntel->setCurrentIndex(qobject_cast<Sigmod::Trainer*>(modified())->moveIntel());
+ varItemIntel->setCurrentIndex(qobject_cast<Sigmod::Trainer*>(modified())->itemIntel());
+ varAbilityIntel->setCurrentIndex(qobject_cast<Sigmod::Trainer*>(modified())->abilityIntel());
+ varStatIntel->setCurrentIndex(qobject_cast<Sigmod::Trainer*>(modified())->statIntel());
}
-void Pokemodr::TrainerUI::apply()
+void Sigmodr::TrainerUI::apply()
{
- *qobject_cast<Pokemod::Trainer*>(original()) = *qobject_cast<Pokemod::Trainer*>(modified());
+ *qobject_cast<Sigmod::Trainer*>(original()) = *qobject_cast<Sigmod::Trainer*>(modified());
emit(changed(false));
}
-void Pokemodr::TrainerUI::discard()
+void Sigmodr::TrainerUI::discard()
{
- *qobject_cast<Pokemod::Trainer*>(modified()) = *qobject_cast<Pokemod::Trainer*>(original());
+ *qobject_cast<Sigmod::Trainer*>(modified()) = *qobject_cast<Sigmod::Trainer*>(original());
emit(changed(false));
}
-void Pokemodr::TrainerUI::on_varName_textChanged(const QString& name)
+void Sigmodr::TrainerUI::on_varName_textChanged(const QString& name)
{
- qobject_cast<Pokemod::Trainer*>(modified())->setName(name);
+ qobject_cast<Sigmod::Trainer*>(modified())->setName(name);
}
-void Pokemodr::TrainerUI::on_varMoneyFactor_valueChanged(const int moneyFactor)
+void Sigmodr::TrainerUI::on_varMoneyFactor_valueChanged(const int moneyFactor)
{
- qobject_cast<Pokemod::Trainer*>(modified())->setMoneyFactor(moneyFactor);
+ qobject_cast<Sigmod::Trainer*>(modified())->setMoneyFactor(moneyFactor);
}
-void Pokemodr::TrainerUI::on_varSkin_currentIndexChanged(const int skin)
+void Sigmodr::TrainerUI::on_varSkin_currentIndexChanged(const int skin)
{
- qobject_cast<Pokemod::Trainer*>(modified())->setSkin(varSkin->itemData(skin).toInt());
+ qobject_cast<Sigmod::Trainer*>(modified())->setSkin(varSkin->itemData(skin).toInt());
}
-void Pokemodr::TrainerUI::on_varDepth_valueChanged(const int depth)
+void Sigmodr::TrainerUI::on_varDepth_valueChanged(const int depth)
{
- qobject_cast<Pokemod::Trainer*>(modified())->setDepth(depth);
+ qobject_cast<Sigmod::Trainer*>(modified())->setDepth(depth);
}
-void Pokemodr::TrainerUI::on_varTeamIntel_activated(const int teamIntel)
+void Sigmodr::TrainerUI::on_varTeamIntel_activated(const int teamIntel)
{
- qobject_cast<Pokemod::Trainer*>(modified())->setTeamIntel(varTeamIntel->itemData(teamIntel).value<Pokemod::Trainer::Intelligence>());
+ qobject_cast<Sigmod::Trainer*>(modified())->setTeamIntel(varTeamIntel->itemData(teamIntel).value<Sigmod::Trainer::Intelligence>());
}
-void Pokemodr::TrainerUI::on_varMoveIntel_activated(const int moveIntel)
+void Sigmodr::TrainerUI::on_varMoveIntel_activated(const int moveIntel)
{
- qobject_cast<Pokemod::Trainer*>(modified())->setMoveIntel(varMoveIntel->itemData(moveIntel).value<Pokemod::Trainer::Intelligence>());
+ qobject_cast<Sigmod::Trainer*>(modified())->setMoveIntel(varMoveIntel->itemData(moveIntel).value<Sigmod::Trainer::Intelligence>());
}
-void Pokemodr::TrainerUI::on_varItemIntel_activated(const int itemIntel)
+void Sigmodr::TrainerUI::on_varItemIntel_activated(const int itemIntel)
{
- qobject_cast<Pokemod::Trainer*>(modified())->setItemIntel(varItemIntel->itemData(itemIntel).value<Pokemod::Trainer::Intelligence>());
+ qobject_cast<Sigmod::Trainer*>(modified())->setItemIntel(varItemIntel->itemData(itemIntel).value<Sigmod::Trainer::Intelligence>());
}
-void Pokemodr::TrainerUI::on_varAbilityIntel_activated(const int abilityIntel)
+void Sigmodr::TrainerUI::on_varAbilityIntel_activated(const int abilityIntel)
{
- qobject_cast<Pokemod::Trainer*>(modified())->setAbilityIntel(varAbilityIntel->itemData(abilityIntel).value<Pokemod::Trainer::Intelligence>());
+ qobject_cast<Sigmod::Trainer*>(modified())->setAbilityIntel(varAbilityIntel->itemData(abilityIntel).value<Sigmod::Trainer::Intelligence>());
}
-void Pokemodr::TrainerUI::on_varStatIntel_activated(const int statIntel)
+void Sigmodr::TrainerUI::on_varStatIntel_activated(const int statIntel)
{
- qobject_cast<Pokemod::Trainer*>(modified())->setStatIntel(varStatIntel->itemData(statIntel).value<Pokemod::Trainer::Intelligence>());
+ qobject_cast<Sigmod::Trainer*>(modified())->setStatIntel(varStatIntel->itemData(statIntel).value<Sigmod::Trainer::Intelligence>());
}
diff --git a/sigmodr/TrainerUI.h b/sigmodr/TrainerUI.h
index 0fb461bf..431de2a9 100644
--- a/sigmodr/TrainerUI.h
+++ b/sigmodr/TrainerUI.h
@@ -15,29 +15,29 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TRAINERUI__
-#define __POKEMODR_TRAINERUI__
+#ifndef __SIGMODR_TRAINERUI__
+#define __SIGMODR_TRAINERUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_trainer.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Trainer;
}
-namespace Pokemodr
+namespace Sigmodr
{
class TrainerUI : public ObjectUI, private Ui::formTrainer
{
Q_OBJECT
public:
- TrainerUI(Pokemod::Trainer* trainer, QWidget* parent);
+ TrainerUI(Sigmod::Trainer* trainer, QWidget* parent);
~TrainerUI();
public slots:
void apply();
diff --git a/sigmodr/TypeUI.cpp b/sigmodr/TypeUI.cpp
index 21b53177..202f1aa8 100644
--- a/sigmodr/TypeUI.cpp
+++ b/sigmodr/TypeUI.cpp
@@ -18,47 +18,47 @@
// Header include
#include "TypeUI.h"
-// Pokemod includes
-#include "../pokemod/Type.h"
+// Sigmod includes
+#include "../sigmod/Type.h"
-Pokemodr::TypeUI::TypeUI(Pokemod::Type* type, QWidget* parent) :
+Sigmodr::TypeUI::TypeUI(Sigmod::Type* type, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(type, new Pokemod::Type(*type));
+ setObjects(type, new Sigmod::Type(*type));
}
-Pokemodr::TypeUI::~TypeUI()
+Sigmodr::TypeUI::~TypeUI()
{
}
-void Pokemodr::TypeUI::setGui()
+void Sigmodr::TypeUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Type*>(modified())->name());
- varSTAB->setValue(qobject_cast<Pokemod::Type*>(modified())->stab());
+ varName->setText(qobject_cast<Sigmod::Type*>(modified())->name());
+ varSTAB->setValue(qobject_cast<Sigmod::Type*>(modified())->stab());
}
-void Pokemodr::TypeUI::apply()
+void Sigmodr::TypeUI::apply()
{
- *qobject_cast<Pokemod::Type*>(original()) = *qobject_cast<Pokemod::Type*>(modified());
+ *qobject_cast<Sigmod::Type*>(original()) = *qobject_cast<Sigmod::Type*>(modified());
emit(changed(false));
}
-void Pokemodr::TypeUI::discard()
+void Sigmodr::TypeUI::discard()
{
- *qobject_cast<Pokemod::Type*>(modified()) = *qobject_cast<Pokemod::Type*>(original());
+ *qobject_cast<Sigmod::Type*>(modified()) = *qobject_cast<Sigmod::Type*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::TypeUI::on_varName_textChanged(const QString& name)
+void Sigmodr::TypeUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Type*>(modified())->setName(name);
+ qobject_cast<Sigmod::Type*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::TypeUI::on_varSTAB_valueChanged(const Pokemod::Fraction& stab)
+void Sigmodr::TypeUI::on_varSTAB_valueChanged(const Sigmod::Fraction& stab)
{
- qobject_cast<Pokemod::Type*>(modified())->setStab(stab);
+ qobject_cast<Sigmod::Type*>(modified())->setStab(stab);
}
diff --git a/sigmodr/TypeUI.h b/sigmodr/TypeUI.h
index 1c8eff63..98f8c1a4 100644
--- a/sigmodr/TypeUI.h
+++ b/sigmodr/TypeUI.h
@@ -15,36 +15,36 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TYPEUI__
-#define __POKEMODR_TYPEUI__
+#ifndef __SIGMODR_TYPEUI__
+#define __SIGMODR_TYPEUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_type.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Type;
}
-namespace Pokemodr
+namespace Sigmodr
{
class TypeUI : public ObjectUI, private Ui::formType
{
Q_OBJECT
public:
- TypeUI(Pokemod::Type* type, QWidget* parent);
+ TypeUI(Sigmod::Type* type, QWidget* parent);
~TypeUI();
public slots:
void apply();
void discard();
protected slots:
void on_varName_textChanged(const QString& name);
- void on_varSTAB_valueChanged(const Pokemod::Fraction& stab);
+ void on_varSTAB_valueChanged(const Sigmod::Fraction& stab);
private slots:
void setGui();
};
diff --git a/sigmodr/TypechartModel.h b/sigmodr/TypechartModel.h
index 08ddf461..62b75519 100644
--- a/sigmodr/TypechartModel.h
+++ b/sigmodr/TypechartModel.h
@@ -15,12 +15,12 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TYPECHARTMODEL__
-#define __POKEMODR_TYPECHARTMODEL__
+#ifndef __SIGMODR_TYPECHARTMODEL__
+#define __SIGMODR_TYPECHARTMODEL__
-// Pokemod includes
-#include "../pokemod/Fraction.h"
-#include "../pokemod/Matrix.h"
+// Sigmod includes
+#include "../sigmod/Fraction.h"
+#include "../sigmod/Matrix.h"
// Qt includes
#include <QtCore/QAbstractTableModel>
@@ -30,14 +30,14 @@
// KDE includes
#include <KColorScheme>
-namespace Pokemodr
+namespace Sigmodr
{
class TypechartModel : public QAbstractTableModel
{
Q_OBJECT
public:
- TypechartModel(Pokemod::Matrix<Pokemod::Fraction>& typechart, const QStringList& types);
+ TypechartModel(Sigmod::Matrix<Sigmod::Fraction>& typechart, const QStringList& types);
QVariant data(const QModelIndex& index, int role) const;
@@ -53,11 +53,11 @@ class TypechartModel : public QAbstractTableModel
void discarded();
private:
- Pokemod::Matrix<Pokemod::Fraction>& m_typechart;
+ Sigmod::Matrix<Sigmod::Fraction>& m_typechart;
const QStringList m_types;
};
-inline TypechartModel::TypechartModel(Pokemod::Matrix<Pokemod::Fraction>& typechart, const QStringList& types) :
+inline TypechartModel::TypechartModel(Sigmod::Matrix<Sigmod::Fraction>& typechart, const QStringList& types) :
QAbstractTableModel(),
m_typechart(typechart),
m_types(types)
@@ -115,9 +115,9 @@ inline bool TypechartModel::setData(const QModelIndex& index, const QVariant& va
return false;
if (role == Qt::EditRole)
{
- if (value.canConvert<Pokemod::Fraction>())
+ if (value.canConvert<Sigmod::Fraction>())
{
- m_typechart(index.row(), index.column()) = value.value<Pokemod::Fraction>();
+ m_typechart(index.row(), index.column()) = value.value<Sigmod::Fraction>();
emit(dataChanged(index, index));
return true;
}
diff --git a/sigmodr/ValidationDialog.cpp b/sigmodr/ValidationDialog.cpp
index f2b765ec..643303af 100644
--- a/sigmodr/ValidationDialog.cpp
+++ b/sigmodr/ValidationDialog.cpp
@@ -18,8 +18,8 @@
// Header include
#include "ValidationDialog.h"
-// Pokemod includes
-#include "../pokemod/Object.h"
+// Sigmod includes
+#include "../sigmod/Object.h"
// Qt includes
#include <QtGui/QLabel>
@@ -31,7 +31,7 @@
#include <KMessageBox>
#include <KProgressDialog>
-Pokemodr::ValidationDialog::ValidationDialog(Pokemod::Object* object, QWidget* parent) :
+Sigmodr::ValidationDialog::ValidationDialog(Sigmod::Object* object, QWidget* parent) :
QWidget(parent),
m_processed(false),
m_object(object),
@@ -41,17 +41,17 @@ Pokemodr::ValidationDialog::ValidationDialog(Pokemod::Object* object, QWidget* p
connect(m_object, SIGNAL(changed()), this, SLOT(objectChanged()));
}
-int Pokemodr::ValidationDialog::errors() const
+int Sigmodr::ValidationDialog::errors() const
{
return m_errors;
}
-int Pokemodr::ValidationDialog::warnings() const
+int Sigmodr::ValidationDialog::warnings() const
{
return m_warnings;
}
-void Pokemodr::ValidationDialog::process()
+void Sigmodr::ValidationDialog::process()
{
if (!m_processed)
{
@@ -78,7 +78,7 @@ void Pokemodr::ValidationDialog::process()
m_processed = true;
}
-void Pokemodr::ValidationDialog::show()
+void Sigmodr::ValidationDialog::show()
{
if (!m_processed)
process();
@@ -99,14 +99,14 @@ void Pokemodr::ValidationDialog::show()
KMessageBox::information(this, "No messages", "Validation");
}
-void Pokemodr::ValidationDialog::insertMessage(const QString& msg, const QBrush& brush)
+void Sigmodr::ValidationDialog::insertMessage(const QString& msg, const QBrush& brush)
{
++m_parents.top().second;
QTreeWidgetItem* item = new QTreeWidgetItem(m_parents.top().first, QStringList(msg));
item->setBackground(0, brush);
}
-void Pokemodr::ValidationDialog::addMessage(const QString& msg)
+void Sigmodr::ValidationDialog::addMessage(const QString& msg)
{
if (msg.startsWith("++"))
m_parents.push(ObjectErrorCount(new QTreeWidgetItem(QStringList(msg.mid(2))), 0));
@@ -123,19 +123,19 @@ void Pokemodr::ValidationDialog::addMessage(const QString& msg)
insertMessage(msg, KStatefulBrush(KColorScheme::View, KColorScheme::PositiveBackground).brush(QPalette::Normal));
}
-void Pokemodr::ValidationDialog::addError(const QString& msg)
+void Sigmodr::ValidationDialog::addError(const QString& msg)
{
insertMessage(msg, KStatefulBrush(KColorScheme::View, KColorScheme::NegativeBackground).brush(QPalette::Normal));
++m_errors;
}
-void Pokemodr::ValidationDialog::addWarning(const QString& msg)
+void Sigmodr::ValidationDialog::addWarning(const QString& msg)
{
insertMessage(msg, KStatefulBrush(KColorScheme::View, KColorScheme::NeutralBackground).brush(QPalette::Normal));
++m_warnings;
}
-void Pokemodr::ValidationDialog::objectChanged()
+void Sigmodr::ValidationDialog::objectChanged()
{
m_processed = false;
}
diff --git a/sigmodr/ValidationDialog.h b/sigmodr/ValidationDialog.h
index 10a821ca..bf00eb1f 100644
--- a/sigmodr/ValidationDialog.h
+++ b/sigmodr/ValidationDialog.h
@@ -15,8 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_VALIDATIONDIALOG__
-#define __POKEMODR_VALIDATIONDIALOG__
+#ifndef __SIGMODR_VALIDATIONDIALOG__
+#define __SIGMODR_VALIDATIONDIALOG__
// Qt includes
#include <QtCore/QPair>
@@ -27,12 +27,12 @@
class QBrush;
class QTreeWidget;
class QTreeWidgetItem;
-namespace Pokemod
+namespace Sigmod
{
class Object;
}
-namespace Pokemodr
+namespace Sigmodr
{
class ValidationDialog : public QWidget
{
@@ -41,7 +41,7 @@ class ValidationDialog : public QWidget
public:
typedef QPair<QTreeWidgetItem*, int> ObjectErrorCount;
- ValidationDialog(Pokemod::Object* object, QWidget* parent);
+ ValidationDialog(Sigmod::Object* object, QWidget* parent);
int errors() const;
int warnings() const;
@@ -58,7 +58,7 @@ class ValidationDialog : public QWidget
void objectChanged();
private:
bool m_processed;
- Pokemod::Object* m_object;
+ Sigmod::Object* m_object;
QStack<ObjectErrorCount> m_parents;
QTreeWidget* m_valTree;
int m_errors;
diff --git a/sigmodr/WeatherUI.cpp b/sigmodr/WeatherUI.cpp
index e07e31e7..84132e10 100644
--- a/sigmodr/WeatherUI.cpp
+++ b/sigmodr/WeatherUI.cpp
@@ -18,47 +18,47 @@
// Header include
#include "WeatherUI.h"
-// Pokemod includes
-#include "../pokemod/Weather.h"
+// Sigmod includes
+#include "../sigmod/Weather.h"
-Pokemodr::WeatherUI::WeatherUI(Pokemod::Weather* weather, QWidget* parent) :
+Sigmodr::WeatherUI::WeatherUI(Sigmod::Weather* weather, QWidget* parent) :
ObjectUI(parent)
{
setupUi(this);
- setObjects(weather, new Pokemod::Weather(*weather));
+ setObjects(weather, new Sigmod::Weather(*weather));
}
-Pokemodr::WeatherUI::~WeatherUI()
+Sigmodr::WeatherUI::~WeatherUI()
{
}
-void Pokemodr::WeatherUI::setGui()
+void Sigmodr::WeatherUI::setGui()
{
- varName->setText(qobject_cast<Pokemod::Weather*>(modified())->name());
- varScript->setValue(qobject_cast<Pokemod::Weather*>(modified())->script());
+ varName->setText(qobject_cast<Sigmod::Weather*>(modified())->name());
+ varScript->setValue(qobject_cast<Sigmod::Weather*>(modified())->script());
}
-void Pokemodr::WeatherUI::apply()
+void Sigmodr::WeatherUI::apply()
{
- *qobject_cast<Pokemod::Weather*>(original()) = *qobject_cast<Pokemod::Weather*>(modified());
+ *qobject_cast<Sigmod::Weather*>(original()) = *qobject_cast<Sigmod::Weather*>(modified());
emit(changed(false));
}
-void Pokemodr::WeatherUI::discard()
+void Sigmodr::WeatherUI::discard()
{
- *qobject_cast<Pokemod::Weather*>(modified()) = *qobject_cast<Pokemod::Weather*>(original());
+ *qobject_cast<Sigmod::Weather*>(modified()) = *qobject_cast<Sigmod::Weather*>(original());
setGui();
emit(changed(false));
}
-void Pokemodr::WeatherUI::on_varName_textChanged(const QString& name)
+void Sigmodr::WeatherUI::on_varName_textChanged(const QString& name)
{
const int cursor = varName->cursorPosition();
- qobject_cast<Pokemod::Weather*>(modified())->setName(name);
+ qobject_cast<Sigmod::Weather*>(modified())->setName(name);
varName->setCursorPosition(cursor);
}
-void Pokemodr::WeatherUI::on_varScript_valueChanged(const Pokemod::Script& script)
+void Sigmodr::WeatherUI::on_varScript_valueChanged(const Sigmod::Script& script)
{
- qobject_cast<Pokemod::Weather*>(modified())->setScript(script);
+ qobject_cast<Sigmod::Weather*>(modified())->setScript(script);
}
diff --git a/sigmodr/WeatherUI.h b/sigmodr/WeatherUI.h
index f76d19de..ac899ceb 100644
--- a/sigmodr/WeatherUI.h
+++ b/sigmodr/WeatherUI.h
@@ -15,36 +15,36 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_WEATHERUI__
-#define __POKEMODR_WEATHERUI__
+#ifndef __SIGMODR_WEATHERUI__
+#define __SIGMODR_WEATHERUI__
-// Pokemodr includes
+// Sigmodr includes
#include "ObjectUI.h"
// Form include
#include "ui_weather.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Weather;
}
-namespace Pokemodr
+namespace Sigmodr
{
class WeatherUI : public ObjectUI, private Ui::formWeather
{
Q_OBJECT
public:
- WeatherUI(Pokemod::Weather* weather, QWidget* parent);
+ WeatherUI(Sigmod::Weather* weather, QWidget* parent);
~WeatherUI();
public slots:
void apply();
void discard();
protected slots:
void on_varName_textChanged(const QString& name);
- void on_varScript_valueChanged(const Pokemod::Script& script);
+ void on_varScript_valueChanged(const Sigmod::Script& script);
private slots:
void setGui();
};
diff --git a/sigmodr/gui/ability.ui b/sigmodr/gui/ability.ui
index d33e5025..538e3e4f 100644
--- a/sigmodr/gui/ability.ui
+++ b/sigmodr/gui/ability.ui
@@ -85,7 +85,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varBattleScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varBattleScript" />
</item>
</layout>
</widget>
@@ -106,7 +106,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varWorldScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varWorldScript" />
</item>
</layout>
</widget>
@@ -125,7 +125,7 @@
<header location="global" >KIntNumInput</header>
</customwidget>
<customwidget>
- <class>Pokemodr::ScriptWidget</class>
+ <class>Sigmodr::ScriptWidget</class>
<extends>QWidget</extends>
<header>ScriptWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/author.ui b/sigmodr/gui/author.ui
index 43b5ece9..64f81bcb 100644
--- a/sigmodr/gui/author.ui
+++ b/sigmodr/gui/author.ui
@@ -8,13 +8,13 @@
<string>Name</string>
</property>
<property name="toolTip" >
- <string>Name of an author of the Pokémod</string>
+ <string>Name of an author of the Sigmod</string>
</property>
<property name="statusTip" >
- <string>Name of an author of the Pokémod</string>
+ <string>Name of an author of the Sigmod</string>
</property>
<property name="whatsThis" >
- <string>Name of an author of the Pokémod</string>
+ <string>Name of an author of the Sigmod</string>
</property>
<layout class="QHBoxLayout" >
<item>
diff --git a/sigmodr/gui/badge.ui b/sigmodr/gui/badge.ui
index 58145a12..7d4a74a3 100644
--- a/sigmodr/gui/badge.ui
+++ b/sigmodr/gui/badge.ui
@@ -140,9 +140,9 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::FractionWidget" name="varStatMultiplier" >
+ <widget class="Sigmodr::FractionWidget" name="varStatMultiplier" >
<property name="behavior" >
- <enum>Pokemodr::FractionWidget::Improper</enum>
+ <enum>Sigmodr::FractionWidget::Improper</enum>
</property>
</widget>
</item>
@@ -189,7 +189,7 @@
<header location="global" >KComboBox</header>
</customwidget>
<customwidget>
- <class>Pokemodr::FractionWidget</class>
+ <class>Sigmodr::FractionWidget</class>
<extends>QWidget</extends>
<header>FractionWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/coinlist.ui b/sigmodr/gui/coinlist.ui
index 682ee4e4..522a668c 100644
--- a/sigmodr/gui/coinlist.ui
+++ b/sigmodr/gui/coinlist.ui
@@ -43,7 +43,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varScript" />
</item>
</layout>
</widget>
@@ -57,7 +57,7 @@
<header location="global" >KLineEdit</header>
</customwidget>
<customwidget>
- <class>Pokemodr::ScriptWidget</class>
+ <class>Sigmodr::ScriptWidget</class>
<extends>QWidget</extends>
<header>ScriptWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/globalscript.ui b/sigmodr/gui/globalscript.ui
index 786ac97c..f0660f6b 100644
--- a/sigmodr/gui/globalscript.ui
+++ b/sigmodr/gui/globalscript.ui
@@ -43,7 +43,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varScript" />
</item>
</layout>
</widget>
@@ -57,7 +57,7 @@
<header location="global" >KLineEdit</header>
</customwidget>
<customwidget>
- <class>Pokemodr::ScriptWidget</class>
+ <class>Sigmodr::ScriptWidget</class>
<extends>QWidget</extends>
<header>ScriptWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/item.ui b/sigmodr/gui/item.ui
index fecea1a2..7f679dd5 100644
--- a/sigmodr/gui/item.ui
+++ b/sigmodr/gui/item.ui
@@ -133,7 +133,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varScript" />
</item>
</layout>
</widget>
@@ -157,7 +157,7 @@
<header location="global" >KLineEdit</header>
</customwidget>
<customwidget>
- <class>Pokemodr::ScriptWidget</class>
+ <class>Sigmodr::ScriptWidget</class>
<extends>QWidget</extends>
<header>ScriptWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/mapeffect.ui b/sigmodr/gui/mapeffect.ui
index 4ddc34e8..96efbab9 100644
--- a/sigmodr/gui/mapeffect.ui
+++ b/sigmodr/gui/mapeffect.ui
@@ -43,7 +43,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::PointWidget" name="varCoordinate" />
+ <widget class="Sigmodr::PointWidget" name="varCoordinate" />
</item>
</layout>
</widget>
@@ -108,7 +108,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varScript" />
</item>
</layout>
</widget>
@@ -127,12 +127,12 @@
<header location="global" >KComboBox</header>
</customwidget>
<customwidget>
- <class>Pokemodr::ScriptWidget</class>
+ <class>Sigmodr::ScriptWidget</class>
<extends>QWidget</extends>
<header>ScriptWidget.h</header>
</customwidget>
<customwidget>
- <class>Pokemodr::PointWidget</class>
+ <class>Sigmodr::PointWidget</class>
<extends>QWidget</extends>
<header>PointWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/maptrainer.ui b/sigmodr/gui/maptrainer.ui
index e29d461f..f2eb5d3b 100644
--- a/sigmodr/gui/maptrainer.ui
+++ b/sigmodr/gui/maptrainer.ui
@@ -64,7 +64,7 @@
</property>
<layout class="QVBoxLayout" >
<item>
- <widget class="Pokemodr::PointWidget" name="varCoordinate" />
+ <widget class="Sigmodr::PointWidget" name="varCoordinate" />
</item>
</layout>
</widget>
@@ -110,7 +110,7 @@
</property>
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varScript" />
</item>
</layout>
</widget>
@@ -155,12 +155,12 @@
<header location="global" >KLineEdit</header>
</customwidget>
<customwidget>
- <class>Pokemodr::ScriptWidget</class>
+ <class>Sigmodr::ScriptWidget</class>
<extends>QWidget</extends>
<header>ScriptWidget.h</header>
</customwidget>
<customwidget>
- <class>Pokemodr::PointWidget</class>
+ <class>Sigmodr::PointWidget</class>
<extends>QWidget</extends>
<header>PointWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/mapwarp.ui b/sigmodr/gui/mapwarp.ui
index ced51a92..4fb9ad26 100644
--- a/sigmodr/gui/mapwarp.ui
+++ b/sigmodr/gui/mapwarp.ui
@@ -43,7 +43,7 @@
</property>
<layout class="QVBoxLayout" >
<item>
- <widget class="Pokemodr::PointWidget" name="varCoordinate" />
+ <widget class="Sigmodr::PointWidget" name="varCoordinate" />
</item>
</layout>
</widget>
@@ -138,7 +138,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varScript" />
</item>
</layout>
</widget>
@@ -157,12 +157,12 @@
<header location="global" >KLineEdit</header>
</customwidget>
<customwidget>
- <class>Pokemodr::ScriptWidget</class>
+ <class>Sigmodr::ScriptWidget</class>
<extends>QWidget</extends>
<header>ScriptWidget.h</header>
</customwidget>
<customwidget>
- <class>Pokemodr::PointWidget</class>
+ <class>Sigmodr::PointWidget</class>
<extends>QWidget</extends>
<header>PointWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/move.ui b/sigmodr/gui/move.ui
index fa83035b..2570f315 100644
--- a/sigmodr/gui/move.ui
+++ b/sigmodr/gui/move.ui
@@ -64,9 +64,9 @@
</property>
<layout class="QVBoxLayout" >
<item>
- <widget class="Pokemodr::FractionWidget" name="varAccuracy" >
+ <widget class="Sigmodr::FractionWidget" name="varAccuracy" >
<property name="behavior" >
- <enum>Pokemodr::FractionWidget::NonZero</enum>
+ <enum>Sigmodr::FractionWidget::NonZero</enum>
</property>
</widget>
</item>
@@ -207,7 +207,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varBattleScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varBattleScript" />
</item>
</layout>
</widget>
@@ -228,7 +228,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varWorldScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varWorldScript" />
</item>
</layout>
</widget>
@@ -252,12 +252,12 @@
<header location="global" >KLineEdit</header>
</customwidget>
<customwidget>
- <class>Pokemodr::FractionWidget</class>
+ <class>Sigmodr::FractionWidget</class>
<extends>QWidget</extends>
<header>FractionWidget.h</header>
</customwidget>
<customwidget>
- <class>Pokemodr::ScriptWidget</class>
+ <class>Sigmodr::ScriptWidget</class>
<extends>QWidget</extends>
<header>ScriptWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/nature.ui b/sigmodr/gui/nature.ui
index d9f0681e..c565e83c 100644
--- a/sigmodr/gui/nature.ui
+++ b/sigmodr/gui/nature.ui
@@ -71,9 +71,9 @@
</property>
<layout class="QVBoxLayout" >
<item>
- <widget class="Pokemodr::FractionWidget" name="varStatMultiplier" >
+ <widget class="Sigmodr::FractionWidget" name="varStatMultiplier" >
<property name="behavior" >
- <enum>Pokemodr::FractionWidget::Improper</enum>
+ <enum>Sigmodr::FractionWidget::Improper</enum>
</property>
</widget>
</item>
@@ -140,7 +140,7 @@
<header location="global" >KLineEdit</header>
</customwidget>
<customwidget>
- <class>Pokemodr::FractionWidget</class>
+ <class>Sigmodr::FractionWidget</class>
<extends>QWidget</extends>
<header>FractionWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/pokemod.ui b/sigmodr/gui/sigmod.ui
index f066110d..296b0d21 100644
--- a/sigmodr/gui/pokemod.ui
+++ b/sigmodr/gui/sigmod.ui
@@ -1,9 +1,9 @@
<ui version="4.0" >
- <class>formPokemod</class>
- <widget class="QWidget" name="formPokemod" >
+ <class>formSigmod</class>
+ <widget class="QWidget" name="formSigmod" >
<layout class="QVBoxLayout" >
<item>
- <widget class="KTabWidget" name="notebookPokemod" >
+ <widget class="KTabWidget" name="notebookSigmod" >
<widget class="QWidget" name="tabGeneral" >
<attribute name="title" >
<string>General</string>
@@ -15,13 +15,13 @@
<string>Title</string>
</property>
<property name="toolTip" >
- <string>The title of the Pokémod</string>
+ <string>The title of the Sigmod</string>
</property>
<property name="statusTip" >
- <string>The title of the Pokémod</string>
+ <string>The title of the Sigmod</string>
</property>
<property name="whatsThis" >
- <string>The title of the Pokémod</string>
+ <string>The title of the Sigmod</string>
</property>
<layout class="QHBoxLayout" >
<item>
@@ -40,13 +40,13 @@
<string>Version</string>
</property>
<property name="toolTip" >
- <string>Pokémod version</string>
+ <string>Sigmod version</string>
</property>
<property name="statusTip" >
- <string>Pokémod version</string>
+ <string>Sigmod version</string>
</property>
<property name="whatsThis" >
- <string>Pokémod version</string>
+ <string>Sigmod version</string>
</property>
<layout class="QHBoxLayout" >
<item>
@@ -65,13 +65,13 @@
<string>Description</string>
</property>
<property name="toolTip" >
- <string>Description of the Pokémod</string>
+ <string>Description of the Sigmod</string>
</property>
<property name="statusTip" >
- <string>Description of the Pokémod</string>
+ <string>Description of the Sigmod</string>
</property>
<property name="whatsThis" >
- <string>Description of the Pokémod</string>
+ <string>Description of the Sigmod</string>
</property>
<layout class="QHBoxLayout" >
<item>
@@ -183,7 +183,7 @@
<widget class="QGroupBox" name="boxEffectiveness" >
<layout class="QVBoxLayout" >
<item>
- <widget class="Pokemodr::FractionWidget" name="varEffectiveness" >
+ <widget class="Sigmodr::FractionWidget" name="varEffectiveness" >
<property name="toolTip" >
<string>Multiplier for attacks of the attacking type against the defending type</string>
</property>
@@ -194,7 +194,7 @@
<string>Multiplier for attacks of the attacking type against the defending type</string>
</property>
<property name="behavior" >
- <enum>Pokemodr::FractionWidget::Any</enum>
+ <enum>Sigmodr::FractionWidget::Any</enum>
</property>
</widget>
</item>
@@ -230,7 +230,7 @@
<container>1</container>
</customwidget>
<customwidget>
- <class>Pokemodr::FractionWidget</class>
+ <class>Sigmodr::FractionWidget</class>
<extends>QWidget</extends>
<header>FractionWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/pokemodr.ui b/sigmodr/gui/sigmodr.ui
index 3768eb90..c0e547ce 100644
--- a/sigmodr/gui/pokemodr.ui
+++ b/sigmodr/gui/sigmodr.ui
@@ -1,6 +1,6 @@
<ui version="4.0" >
- <class>formPokemodr</class>
- <widget class="KMainWindow" name="formPokemodr" >
+ <class>formSigmodr</class>
+ <widget class="KMainWindow" name="formSigmodr" >
<widget class="QWidget" name="frameMain" >
<layout class="QVBoxLayout" >
<item>
@@ -11,7 +11,7 @@
<property name="childrenCollapsible" >
<bool>false</bool>
</property>
- <widget class="Pokemodr::PokemodTree" name="treePokemod" >
+ <widget class="Sigmodr::SigmodTree" name="treeSigmod" >
<property name="contextMenuPolicy" >
<enum>Qt::CustomContextMenu</enum>
</property>
@@ -105,9 +105,9 @@
<container>1</container>
</customwidget>
<customwidget>
- <class>Pokemodr::PokemodTree</class>
+ <class>Sigmodr::SigmodTree</class>
<extends>QTreeView</extends>
- <header>PokemodTree.h</header>
+ <header>SigmodTree.h</header>
</customwidget>
</customwidgets>
<resources/>
diff --git a/sigmodr/gui/skin.ui b/sigmodr/gui/skin.ui
index 9d18bdbd..1de30f59 100644
--- a/sigmodr/gui/skin.ui
+++ b/sigmodr/gui/skin.ui
@@ -43,7 +43,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varScript" />
</item>
</layout>
</widget>
@@ -57,7 +57,7 @@
<header location="global" >KLineEdit</header>
</customwidget>
<customwidget>
- <class>Pokemodr::ScriptWidget</class>
+ <class>Sigmodr::ScriptWidget</class>
<extends>QWidget</extends>
<header>ScriptWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/species.ui b/sigmodr/gui/species.ui
index a39e62cf..918f2730 100644
--- a/sigmodr/gui/species.ui
+++ b/sigmodr/gui/species.ui
@@ -75,9 +75,9 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::FractionWidget" name="varRunChance" >
+ <widget class="Sigmodr::FractionWidget" name="varRunChance" >
<property name="behavior" >
- <enum>Pokemodr::FractionWidget::Proper</enum>
+ <enum>Sigmodr::FractionWidget::Proper</enum>
</property>
</widget>
</item>
@@ -100,9 +100,9 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::FractionWidget" name="varFleeChance" >
+ <widget class="Sigmodr::FractionWidget" name="varFleeChance" >
<property name="behavior" >
- <enum>Pokemodr::FractionWidget::Proper</enum>
+ <enum>Sigmodr::FractionWidget::Proper</enum>
</property>
</widget>
</item>
@@ -125,9 +125,9 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::FractionWidget" name="varItemChance" >
+ <widget class="Sigmodr::FractionWidget" name="varItemChance" >
<property name="behavior" >
- <enum>Pokemodr::FractionWidget::Proper</enum>
+ <enum>Sigmodr::FractionWidget::Proper</enum>
</property>
</widget>
</item>
@@ -334,30 +334,30 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="tabPokedex" >
+ <widget class="QWidget" name="tabEncyclopedia" >
<attribute name="title" >
- <string>Pokédex</string>
+ <string>Encyclopedia</string>
</attribute>
<layout class="QVBoxLayout" >
<item>
- <widget class="QGroupBox" name="boxPokedexNumber" >
+ <widget class="QGroupBox" name="boxEncyclopediaNumber" >
<property name="title" >
<string>Number</string>
</property>
<property name="toolTip" >
- <string>The Pokédex number of the species</string>
+ <string>The Encyclopedia number of the species</string>
</property>
<property name="statusTip" >
- <string>The Pokédex number of the species</string>
+ <string>The Encyclopedia number of the species</string>
</property>
<property name="whatsThis" >
- <string>The Pokédex number of the species</string>
+ <string>The Encyclopedia number of the species</string>
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="KIntNumInput" name="varPokedexNumber" >
+ <widget class="KIntNumInput" name="varEncyclopediaNumber" >
<property name="toolTip" >
- <string>The Pokédex number of the species</string>
+ <string>The Encyclopedia number of the species</string>
</property>
<property name="minimum" >
<number>0</number>
@@ -418,22 +418,22 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="boxPokedexEntry" >
+ <widget class="QGroupBox" name="boxEncyclopediaEntry" >
<property name="title" >
<string>Entry</string>
</property>
<property name="toolTip" >
- <string>Information provided in the Pokédex about the species</string>
+ <string>Information provided in the Encyclopedia about the species</string>
</property>
<property name="statusTip" >
- <string>Information provided in the Pokédex about the species</string>
+ <string>Information provided in the Encyclopedia about the species</string>
</property>
<property name="whatsThis" >
- <string>Information provided in the Pokédex about the species</string>
+ <string>Information provided in the Encyclopedia about the species</string>
</property>
<layout class="QVBoxLayout" >
<item>
- <widget class="KLineEdit" name="varPokedexEntry" >
+ <widget class="KLineEdit" name="varEncyclopediaEntry" >
<property name="showClearButton" stdset="0" >
<bool>true</bool>
</property>
@@ -481,7 +481,7 @@
</property>
<layout class="QVBoxLayout" >
<item>
- <widget class="Pokemodr::FractionWidget" name="varGenderChance" />
+ <widget class="Sigmodr::FractionWidget" name="varGenderChance" />
</item>
</layout>
</widget>
@@ -573,7 +573,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varEvolution" />
+ <widget class="Sigmodr::ScriptWidget" name="varEvolution" />
</item>
</layout>
</widget>
@@ -741,12 +741,12 @@
<container>1</container>
</customwidget>
<customwidget>
- <class>Pokemodr::FractionWidget</class>
+ <class>Sigmodr::FractionWidget</class>
<extends>QWidget</extends>
<header>FractionWidget.h</header>
</customwidget>
<customwidget>
- <class>Pokemodr::ScriptWidget</class>
+ <class>Sigmodr::ScriptWidget</class>
<extends>QWidget</extends>
<header>ScriptWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/status.ui b/sigmodr/gui/status.ui
index e93f712b..0f75b9b5 100644
--- a/sigmodr/gui/status.ui
+++ b/sigmodr/gui/status.ui
@@ -43,7 +43,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varBattleScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varBattleScript" />
</item>
</layout>
</widget>
@@ -64,7 +64,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varWorldScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varWorldScript" />
</item>
</layout>
</widget>
@@ -78,7 +78,7 @@
<header location="global" >KLineEdit</header>
</customwidget>
<customwidget>
- <class>Pokemodr::ScriptWidget</class>
+ <class>Sigmodr::ScriptWidget</class>
<extends>QWidget</extends>
<header>ScriptWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/tile.ui b/sigmodr/gui/tile.ui
index 45701b10..5419ef1e 100644
--- a/sigmodr/gui/tile.ui
+++ b/sigmodr/gui/tile.ui
@@ -89,7 +89,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varScript" />
</item>
</layout>
</widget>
@@ -113,7 +113,7 @@
<header location="global" >KComboBox</header>
</customwidget>
<customwidget>
- <class>Pokemodr::ScriptWidget</class>
+ <class>Sigmodr::ScriptWidget</class>
<extends>QWidget</extends>
<header>ScriptWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/type.ui b/sigmodr/gui/type.ui
index c5c5c0e4..2f311148 100644
--- a/sigmodr/gui/type.ui
+++ b/sigmodr/gui/type.ui
@@ -43,9 +43,9 @@
</property>
<layout class="QVBoxLayout" >
<item>
- <widget class="Pokemodr::FractionWidget" name="varSTAB" >
+ <widget class="Sigmodr::FractionWidget" name="varSTAB" >
<property name="behavior" >
- <enum>Pokemodr::FractionWidget::Improper</enum>
+ <enum>Sigmodr::FractionWidget::Improper</enum>
</property>
</widget>
</item>
@@ -74,7 +74,7 @@
<header location="global" >KLineEdit</header>
</customwidget>
<customwidget>
- <class>Pokemodr::FractionWidget</class>
+ <class>Sigmodr::FractionWidget</class>
<extends>QWidget</extends>
<header>FractionWidget.h</header>
</customwidget>
diff --git a/sigmodr/gui/weather.ui b/sigmodr/gui/weather.ui
index 9afa1938..6f27fb5e 100644
--- a/sigmodr/gui/weather.ui
+++ b/sigmodr/gui/weather.ui
@@ -43,7 +43,7 @@
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="Pokemodr::ScriptWidget" name="varScript" />
+ <widget class="Sigmodr::ScriptWidget" name="varScript" />
</item>
</layout>
</widget>
@@ -57,7 +57,7 @@
<header location="global" >KLineEdit</header>
</customwidget>
<customwidget>
- <class>Pokemodr::ScriptWidget</class>
+ <class>Sigmodr::ScriptWidget</class>
<extends>QWidget</extends>
<header>ScriptWidget.h</header>
</customwidget>
diff --git a/sigmodr/models/AbilityGroupModel.cpp b/sigmodr/models/AbilityGroupModel.cpp
index 24ec4201..eb155428 100644
--- a/sigmodr/models/AbilityGroupModel.cpp
+++ b/sigmodr/models/AbilityGroupModel.cpp
@@ -24,38 +24,38 @@
// Qt includes
#include <QtCore/QFile>
-// Pokemod includes
-#include "../../pokemod/Ability.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Ability.h"
+#include "../../sigmod/Sigmod.h"
// KDE includes
#include <KMenu>
-Pokemodr::AbilityGroupModel::AbilityGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Abilities")
+Sigmodr::AbilityGroupModel::AbilityGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Abilities")
{
- for (int i = 0; i < pokemod->abilityCount(); ++i)
- addObject(pokemod->ability(i));
+ for (int i = 0; i < sigmod->abilityCount(); ++i)
+ addObject(sigmod->ability(i));
}
-Pokemodr::AbilityGroupModel::~AbilityGroupModel()
+Sigmodr::AbilityGroupModel::~AbilityGroupModel()
{
}
-QVariant Pokemodr::AbilityGroupModel::data(const int role) const
+QVariant Sigmodr::AbilityGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Ability", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::AbilityGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::AbilityGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::AbilityGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Ability")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newAbility(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newAbility(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::AbilityGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::AbilityGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::AbilityGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newAbility();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newAbility();
if (object->className() == "Ability")
- m_objects.append(new AbilityModel(this, qobject_cast<Pokemod::Ability*>(object)));
+ m_objects.append(new AbilityModel(this, qobject_cast<Sigmod::Ability*>(object)));
}
-void Pokemodr::AbilityGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::AbilityGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteAbility(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteAbility(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/AbilityGroupModel.h b/sigmodr/models/AbilityGroupModel.h
index 63ec916e..3afd2601 100644
--- a/sigmodr/models/AbilityGroupModel.h
+++ b/sigmodr/models/AbilityGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_ABILITYGROUPMODEL__
-#define __POKEMODR_ABILITYGROUPMODEL__
+#ifndef __SIGMODR_ABILITYGROUPMODEL__
+#define __SIGMODR_ABILITYGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class AbilityGroupModel : public GroupModel
{
Q_OBJECT
public:
- AbilityGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ AbilityGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~AbilityGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/AbilityModel.cpp b/sigmodr/models/AbilityModel.cpp
index 293be3b6..143ee904 100644
--- a/sigmodr/models/AbilityModel.cpp
+++ b/sigmodr/models/AbilityModel.cpp
@@ -21,11 +21,11 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../AbilityUI.h"
-// Pokemod includes
-#include "../../pokemod/Ability.h"
+// Sigmod includes
+#include "../../sigmod/Ability.h"
// Qt includes
#include <QtCore/QFile>
@@ -33,42 +33,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::AbilityModel::AbilityModel(BaseModel* parent, Pokemod::Ability* ability) :
+Sigmodr::AbilityModel::AbilityModel(BaseModel* parent, Sigmod::Ability* ability) :
ObjectModel(parent, ability)
{
}
-Pokemodr::AbilityModel::~AbilityModel()
+Sigmodr::AbilityModel::~AbilityModel()
{
}
-QVariant Pokemodr::AbilityModel::data(int role) const
+QVariant Sigmodr::AbilityModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Ability*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Ability*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new AbilityUI(qobject_cast<Pokemod::Ability*>(m_object), NULL);
+ QWidget* widget = new AbilityUI(qobject_cast<Sigmod::Ability*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("*&Delete Ability", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::AbilityModel::setData(const QVariant& value, int role)
+bool Sigmodr::AbilityModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -88,7 +88,7 @@ bool Pokemodr::AbilityModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::AbilityModel::deleteSelf()
+void Sigmodr::AbilityModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/AbilityModel.h b/sigmodr/models/AbilityModel.h
index ad25655a..5fb3a6f0 100644
--- a/sigmodr/models/AbilityModel.h
+++ b/sigmodr/models/AbilityModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_ABILITYMODEL__
-#define __POKEMODR_ABILITYMODEL__
+#ifndef __SIGMODR_ABILITYMODEL__
+#define __SIGMODR_ABILITYMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Ability;
}
-namespace Pokemodr
+namespace Sigmodr
{
class AbilityModel : public ObjectModel
{
Q_OBJECT
public:
- AbilityModel(BaseModel* parent, Pokemod::Ability* ability);
+ AbilityModel(BaseModel* parent, Sigmod::Ability* ability);
~AbilityModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/AuthorGroupModel.cpp b/sigmodr/models/AuthorGroupModel.cpp
index 41627d73..8683c83b 100644
--- a/sigmodr/models/AuthorGroupModel.cpp
+++ b/sigmodr/models/AuthorGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "AuthorModel.h"
-// Pokemod includes
-#include "../../pokemod/Author.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Author.h"
+#include "../../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::AuthorGroupModel::AuthorGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Authors")
+Sigmodr::AuthorGroupModel::AuthorGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Authors")
{
- for (int i = 0; i < pokemod->authorCount(); ++i)
- addObject(pokemod->author(i));
+ for (int i = 0; i < sigmod->authorCount(); ++i)
+ addObject(sigmod->author(i));
}
-Pokemodr::AuthorGroupModel::~AuthorGroupModel()
+Sigmodr::AuthorGroupModel::~AuthorGroupModel()
{
}
-QVariant Pokemodr::AuthorGroupModel::data(const int role) const
+QVariant Sigmodr::AuthorGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Author", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::AuthorGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::AuthorGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::AuthorGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Author")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newAuthor(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newAuthor(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::AuthorGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::AuthorGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::AuthorGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newAuthor();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newAuthor();
if (object->className() == "Author")
- m_objects.append(new AuthorModel(this, qobject_cast<Pokemod::Author*>(object)));
+ m_objects.append(new AuthorModel(this, qobject_cast<Sigmod::Author*>(object)));
}
-void Pokemodr::AuthorGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::AuthorGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteAuthor(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteAuthor(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/AuthorGroupModel.h b/sigmodr/models/AuthorGroupModel.h
index 76e26a6d..42497728 100644
--- a/sigmodr/models/AuthorGroupModel.h
+++ b/sigmodr/models/AuthorGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_AUTHORGROUPMODEL__
-#define __POKEMODR_AUTHORGROUPMODEL__
+#ifndef __SIGMODR_AUTHORGROUPMODEL__
+#define __SIGMODR_AUTHORGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class AuthorGroupModel : public GroupModel
{
Q_OBJECT
public:
- AuthorGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ AuthorGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~AuthorGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/AuthorModel.cpp b/sigmodr/models/AuthorModel.cpp
index 38f996e1..fbcef0e1 100644
--- a/sigmodr/models/AuthorModel.cpp
+++ b/sigmodr/models/AuthorModel.cpp
@@ -21,11 +21,11 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../AuthorUI.h"
-// Pokemod includes
-#include "../../pokemod/Author.h"
+// Sigmod includes
+#include "../../sigmod/Author.h"
// Qt includes
#include <QtCore/QFile>
@@ -33,42 +33,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::AuthorModel::AuthorModel(BaseModel* parent, Pokemod::Author* author) :
+Sigmodr::AuthorModel::AuthorModel(BaseModel* parent, Sigmod::Author* author) :
ObjectModel(parent, author)
{
}
-Pokemodr::AuthorModel::~AuthorModel()
+Sigmodr::AuthorModel::~AuthorModel()
{
}
-QVariant Pokemodr::AuthorModel::data(int role) const
+QVariant Sigmodr::AuthorModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Author*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Author*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new AuthorUI(qobject_cast<Pokemod::Author*>(m_object), NULL);
+ QWidget* widget = new AuthorUI(qobject_cast<Sigmod::Author*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Author", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::AuthorModel::setData(const QVariant& value, int role)
+bool Sigmodr::AuthorModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -88,7 +88,7 @@ bool Pokemodr::AuthorModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::AuthorModel::deleteSelf()
+void Sigmodr::AuthorModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/AuthorModel.h b/sigmodr/models/AuthorModel.h
index 2795d7c5..00d318ed 100644
--- a/sigmodr/models/AuthorModel.h
+++ b/sigmodr/models/AuthorModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_AUTHORMODEL__
-#define __POKEMODR_AUTHORMODEL__
+#ifndef __SIGMODR_AUTHORMODEL__
+#define __SIGMODR_AUTHORMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Author;
}
-namespace Pokemodr
+namespace Sigmodr
{
class AuthorModel : public ObjectModel
{
Q_OBJECT
public:
- AuthorModel(BaseModel* parent, Pokemod::Author* author);
+ AuthorModel(BaseModel* parent, Sigmod::Author* author);
~AuthorModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/BadgeGroupModel.cpp b/sigmodr/models/BadgeGroupModel.cpp
index 21ebb200..ac947e6a 100644
--- a/sigmodr/models/BadgeGroupModel.cpp
+++ b/sigmodr/models/BadgeGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "BadgeModel.h"
-// Pokemod includes
-#include "../../pokemod/Badge.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Badge.h"
+#include "../../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::BadgeGroupModel::BadgeGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Badges")
+Sigmodr::BadgeGroupModel::BadgeGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Badges")
{
- for (int i = 0; i < pokemod->badgeCount(); ++i)
- addObject(pokemod->badge(i));
+ for (int i = 0; i < sigmod->badgeCount(); ++i)
+ addObject(sigmod->badge(i));
}
-Pokemodr::BadgeGroupModel::~BadgeGroupModel()
+Sigmodr::BadgeGroupModel::~BadgeGroupModel()
{
}
-QVariant Pokemodr::BadgeGroupModel::data(const int role) const
+QVariant Sigmodr::BadgeGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Badge", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::BadgeGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::BadgeGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::BadgeGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Badge")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newBadge(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newBadge(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::BadgeGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::BadgeGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::BadgeGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newBadge();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newBadge();
if (object->className() == "Badge")
- m_objects.append(new BadgeModel(this, qobject_cast<Pokemod::Badge*>(object)));
+ m_objects.append(new BadgeModel(this, qobject_cast<Sigmod::Badge*>(object)));
}
-void Pokemodr::BadgeGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::BadgeGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteBadge(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteBadge(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/BadgeGroupModel.h b/sigmodr/models/BadgeGroupModel.h
index b9a11b42..0a2929d4 100644
--- a/sigmodr/models/BadgeGroupModel.h
+++ b/sigmodr/models/BadgeGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_BADGEGROUPMODEL__
-#define __POKEMODR_BADGEGROUPMODEL__
+#ifndef __SIGMODR_BADGEGROUPMODEL__
+#define __SIGMODR_BADGEGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class BadgeGroupModel : public GroupModel
{
Q_OBJECT
public:
- BadgeGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ BadgeGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~BadgeGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/BadgeModel.cpp b/sigmodr/models/BadgeModel.cpp
index db345aac..e1dd6643 100644
--- a/sigmodr/models/BadgeModel.cpp
+++ b/sigmodr/models/BadgeModel.cpp
@@ -21,11 +21,11 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../BadgeUI.h"
-// Pokemod includes
-#include "../../pokemod/Badge.h"
+// Sigmod includes
+#include "../../sigmod/Badge.h"
// Qt includes
#include <QtCore/QFile>
@@ -33,42 +33,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::BadgeModel::BadgeModel(BaseModel* parent, Pokemod::Badge* badge) :
+Sigmodr::BadgeModel::BadgeModel(BaseModel* parent, Sigmod::Badge* badge) :
ObjectModel(parent, badge)
{
}
-Pokemodr::BadgeModel::~BadgeModel()
+Sigmodr::BadgeModel::~BadgeModel()
{
}
-QVariant Pokemodr::BadgeModel::data(int role) const
+QVariant Sigmodr::BadgeModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Badge*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Badge*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new BadgeUI(qobject_cast<Pokemod::Badge*>(m_object), NULL);
+ QWidget* widget = new BadgeUI(qobject_cast<Sigmod::Badge*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Badge", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::BadgeModel::setData(const QVariant& value, int role)
+bool Sigmodr::BadgeModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -88,7 +88,7 @@ bool Pokemodr::BadgeModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::BadgeModel::deleteSelf()
+void Sigmodr::BadgeModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/BadgeModel.h b/sigmodr/models/BadgeModel.h
index 41108e61..54454110 100644
--- a/sigmodr/models/BadgeModel.h
+++ b/sigmodr/models/BadgeModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_BADGEMODEL__
-#define __POKEMODR_BADGEMODEL__
+#ifndef __SIGMODR_BADGEMODEL__
+#define __SIGMODR_BADGEMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Badge;
}
-namespace Pokemodr
+namespace Sigmodr
{
class BadgeModel : public ObjectModel
{
Q_OBJECT
public:
- BadgeModel(BaseModel* parent, Pokemod::Badge* badge);
+ BadgeModel(BaseModel* parent, Sigmod::Badge* badge);
~BadgeModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/BaseModel.cpp b/sigmodr/models/BaseModel.cpp
index 616b475e..5ef98e74 100644
--- a/sigmodr/models/BaseModel.cpp
+++ b/sigmodr/models/BaseModel.cpp
@@ -18,50 +18,50 @@
// Header include
#include "BaseModel.h"
-// Pokemod includes
-#include "../../pokemod/Object.h"
+// Sigmod includes
+#include "../../sigmod/Object.h"
-Pokemodr::BaseModel::BaseModel(BaseModel* parent, Pokemod::Object* object, const QString& name) :
+Sigmodr::BaseModel::BaseModel(BaseModel* parent, Sigmod::Object* object, const QString& name) :
m_parent(parent),
m_object(object),
m_name(name)
{
}
-Pokemodr::BaseModel::~BaseModel()
+Sigmodr::BaseModel::~BaseModel()
{
}
-QVariant Pokemodr::BaseModel::data(int role) const
+QVariant Sigmodr::BaseModel::data(int role) const
{
- if (role == Pokemodr::BaseModel::TypeRole)
+ if (role == Sigmodr::BaseModel::TypeRole)
return type();
return QVariant();
}
-Pokemodr::BaseModel* Pokemodr::BaseModel::parent()
+Sigmodr::BaseModel* Sigmodr::BaseModel::parent()
{
return m_parent;
}
-int Pokemodr::BaseModel::indexNumber() const
+int Sigmodr::BaseModel::indexNumber() const
{
if (m_parent)
return m_parent->findChild(this);
return -1;
}
-QString Pokemodr::BaseModel::type() const
+QString Sigmodr::BaseModel::type() const
{
return "";
}
-const Pokemod::Object* Pokemodr::BaseModel::object() const
+const Sigmod::Object* Sigmodr::BaseModel::object() const
{
return m_object;
}
-int Pokemodr::BaseModel::findChild(const BaseModel* /*model*/) const
+int Sigmodr::BaseModel::findChild(const BaseModel* /*model*/) const
{
return -1;
}
diff --git a/sigmodr/models/BaseModel.h b/sigmodr/models/BaseModel.h
index 80ffbf60..8a3363bd 100644
--- a/sigmodr/models/BaseModel.h
+++ b/sigmodr/models/BaseModel.h
@@ -15,8 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_BASEMODEL__
-#define __POKEMODR_BASEMODEL__
+#ifndef __SIGMODR_BASEMODEL__
+#define __SIGMODR_BASEMODEL__
// Qt includes
#include <QtCore/QString>
@@ -24,19 +24,19 @@
// Forward declarations
class KMenu;
-namespace Pokemod
+namespace Sigmod
{
class Object;
}
-namespace Pokemodr
+namespace Sigmodr
{
class BaseModel : public QObject
{
Q_OBJECT
public:
- BaseModel(BaseModel* parent, Pokemod::Object* object, const QString& name = "");
+ BaseModel(BaseModel* parent, Sigmod::Object* object, const QString& name = "");
virtual ~BaseModel();
BaseModel* parent();
@@ -55,7 +55,7 @@ class BaseModel : public QObject
virtual QString type() const;
- const Pokemod::Object* object() const;
+ const Sigmod::Object* object() const;
static const int TypeRole = Qt::UserRole;
static const int XmlRole = Qt::UserRole + 1;
@@ -65,7 +65,7 @@ class BaseModel : public QObject
virtual int findChild(const BaseModel* /*model*/) const;
BaseModel* m_parent;
- Pokemod::Object* m_object;
+ Sigmod::Object* m_object;
QString m_name;
};
}
diff --git a/sigmodr/models/BaseObjectModel.cpp b/sigmodr/models/BaseObjectModel.cpp
index 4cb2c985..3294e629 100644
--- a/sigmodr/models/BaseObjectModel.cpp
+++ b/sigmodr/models/BaseObjectModel.cpp
@@ -18,44 +18,44 @@
// Header include
#include "BaseObjectModel.h"
-// Pokemod includes
-#include "../../pokemod/Object.h"
+// Sigmod includes
+#include "../../sigmod/Object.h"
-Pokemodr::BaseObjectModel::BaseObjectModel(BaseModel* parent, Pokemod::Object* object) :
+Sigmodr::BaseObjectModel::BaseObjectModel(BaseModel* parent, Sigmod::Object* object) :
BaseModel(parent, object, "")
{
}
-Pokemodr::BaseObjectModel::~BaseObjectModel()
+Sigmodr::BaseObjectModel::~BaseObjectModel()
{
}
-QVariant Pokemodr::BaseObjectModel::data(int role) const
+QVariant Sigmodr::BaseObjectModel::data(int role) const
{
- return Pokemodr::BaseModel::data(role);
+ return Sigmodr::BaseModel::data(role);
}
-Qt::ItemFlags Pokemodr::BaseObjectModel::flags() const
+Qt::ItemFlags Sigmodr::BaseObjectModel::flags() const
{
return Qt::ItemIsDragEnabled | Qt::ItemIsSelectable | Qt::ItemIsDropEnabled | Qt::ItemIsEnabled;
}
-Qt::DropActions Pokemodr::BaseObjectModel::supportedDragActions() const
+Qt::DropActions Sigmodr::BaseObjectModel::supportedDragActions() const
{
return Qt::CopyAction | Qt::MoveAction;
}
-Qt::DropActions Pokemodr::BaseObjectModel::supportedDropActions() const
+Qt::DropActions Sigmodr::BaseObjectModel::supportedDropActions() const
{
return Qt::CopyAction | Qt::MoveAction;
}
-QString Pokemodr::BaseObjectModel::type() const
+QString Sigmodr::BaseObjectModel::type() const
{
return m_object->className();
}
-int Pokemodr::BaseObjectModel::findChild(const BaseModel* /*model*/) const
+int Sigmodr::BaseObjectModel::findChild(const BaseModel* /*model*/) const
{
return -1;
}
diff --git a/sigmodr/models/BaseObjectModel.h b/sigmodr/models/BaseObjectModel.h
index 9d7b727c..204df771 100644
--- a/sigmodr/models/BaseObjectModel.h
+++ b/sigmodr/models/BaseObjectModel.h
@@ -15,20 +15,20 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_BASEOBJECTMODEL__
-#define __POKEMODR_BASEOBJECTMODEL__
+#ifndef __SIGMODR_BASEOBJECTMODEL__
+#define __SIGMODR_BASEOBJECTMODEL__
// Model includes
#include "BaseModel.h"
-namespace Pokemodr
+namespace Sigmodr
{
class BaseObjectModel : public BaseModel
{
Q_OBJECT
public:
- BaseObjectModel(BaseModel* parent, Pokemod::Object* object);
+ BaseObjectModel(BaseModel* parent, Sigmod::Object* object);
virtual ~BaseObjectModel();
virtual QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/CoinListGroupModel.cpp b/sigmodr/models/CoinListGroupModel.cpp
index f884a4ad..9fa5a714 100644
--- a/sigmodr/models/CoinListGroupModel.cpp
+++ b/sigmodr/models/CoinListGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "CoinListModel.h"
-// Pokemod includes
-#include "../../pokemod/CoinList.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/CoinList.h"
+#include "../../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::CoinListGroupModel::CoinListGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Coin Lists")
+Sigmodr::CoinListGroupModel::CoinListGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Coin Lists")
{
- for (int i = 0; i < pokemod->coinListCount(); ++i)
- addObject(pokemod->coinList(i));
+ for (int i = 0; i < sigmod->coinListCount(); ++i)
+ addObject(sigmod->coinList(i));
}
-Pokemodr::CoinListGroupModel::~CoinListGroupModel()
+Sigmodr::CoinListGroupModel::~CoinListGroupModel()
{
}
-QVariant Pokemodr::CoinListGroupModel::data(const int role) const
+QVariant Sigmodr::CoinListGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Coin List", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::CoinListGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::CoinListGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::CoinListGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "CoinList")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newCoinList(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newCoinList(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::CoinListGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::CoinListGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::CoinListGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newCoinList();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newCoinList();
if (object->className() == "CoinList")
- m_objects.append(new CoinListModel(this, qobject_cast<Pokemod::CoinList*>(object)));
+ m_objects.append(new CoinListModel(this, qobject_cast<Sigmod::CoinList*>(object)));
}
-void Pokemodr::CoinListGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::CoinListGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteCoinList(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteCoinList(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/CoinListGroupModel.h b/sigmodr/models/CoinListGroupModel.h
index fb281a4f..963982dd 100644
--- a/sigmodr/models/CoinListGroupModel.h
+++ b/sigmodr/models/CoinListGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_COINLISTGROUPMODEL__
-#define __POKEMODR_COINLISTGROUPMODEL__
+#ifndef __SIGMODR_COINLISTGROUPMODEL__
+#define __SIGMODR_COINLISTGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class CoinListGroupModel : public GroupModel
{
Q_OBJECT
public:
- CoinListGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ CoinListGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~CoinListGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/CoinListModel.cpp b/sigmodr/models/CoinListModel.cpp
index a586defa..8729e652 100644
--- a/sigmodr/models/CoinListModel.cpp
+++ b/sigmodr/models/CoinListModel.cpp
@@ -21,12 +21,12 @@
// Model includes
#include "CoinListObjectModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../CoinListUI.h"
-// Pokemod includes
-#include "../../pokemod/CoinList.h"
-#include "../../pokemod/CoinListObject.h"
+// Sigmod includes
+#include "../../sigmod/CoinList.h"
+#include "../../sigmod/CoinListObject.h"
// Qt includes
#include <QtCore/QFile>
@@ -34,33 +34,33 @@
// KDE includes
#include <KMenu>
-Pokemodr::CoinListModel::CoinListModel(BaseModel* parent, Pokemod::CoinList* coinList) :
+Sigmodr::CoinListModel::CoinListModel(BaseModel* parent, Sigmod::CoinList* coinList) :
GroupObjectModel(parent, coinList)
{
setupData();
}
-Pokemodr::CoinListModel::~CoinListModel()
+Sigmodr::CoinListModel::~CoinListModel()
{
clearData();
}
-QVariant Pokemodr::CoinListModel::data(int role) const
+QVariant Sigmodr::CoinListModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::CoinList*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::CoinList*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new CoinListUI(qobject_cast<Pokemod::CoinList*>(m_object), NULL);
+ QWidget* widget = new CoinListUI(qobject_cast<Sigmod::CoinList*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Object", this, SLOT(addObject()));
@@ -68,12 +68,12 @@ QVariant Pokemodr::CoinListModel::data(int role) const
menu->addAction("&Delete Coin List", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupObjectModel::data(role);
+ return Sigmodr::GroupObjectModel::data(role);
}
-bool Pokemodr::CoinListModel::setData(const QVariant& value, int role)
+bool Sigmodr::CoinListModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -90,7 +90,7 @@ bool Pokemodr::CoinListModel::setData(const QVariant& value, int role)
}
else if (xml.doctype().name() == "CoinListObject")
{
- addObject(qobject_cast<Pokemod::CoinList*>(m_object)->newObject(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::CoinList*>(m_object)->newObject(xml.documentElement()));
return true;
}
file.close();
@@ -100,33 +100,33 @@ bool Pokemodr::CoinListModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::CoinListModel::addObject(Pokemod::Object* object)
+void Sigmodr::CoinListModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::CoinList*>(m_object)->newObject();
+ object = qobject_cast<Sigmod::CoinList*>(m_object)->newObject();
if (object->className() == "CoinListObject")
- m_objects.append(new CoinListObjectModel(this, qobject_cast<Pokemod::CoinListObject*>(object)));
+ m_objects.append(new CoinListObjectModel(this, qobject_cast<Sigmod::CoinListObject*>(object)));
}
-void Pokemodr::CoinListModel::deleteObject(BaseModel* model)
+void Sigmodr::CoinListModel::deleteObject(BaseModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::CoinList*>(m_object)->deleteObject(index);
+ qobject_cast<Sigmod::CoinList*>(m_object)->deleteObject(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
}
-void Pokemodr::CoinListModel::deleteSelf()
+void Sigmodr::CoinListModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
-void Pokemodr::CoinListModel::setupData()
+void Sigmodr::CoinListModel::setupData()
{
- Pokemod::CoinList* coinList = qobject_cast<Pokemod::CoinList*>(m_object);
+ Sigmod::CoinList* coinList = qobject_cast<Sigmod::CoinList*>(m_object);
for (int i = 0; i < coinList->objectCount(); ++i)
m_objects.append(new CoinListObjectModel(this, coinList->object(i)));
}
diff --git a/sigmodr/models/CoinListModel.h b/sigmodr/models/CoinListModel.h
index 26dc0a8d..72167934 100644
--- a/sigmodr/models/CoinListModel.h
+++ b/sigmodr/models/CoinListModel.h
@@ -15,33 +15,33 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_COINLISTMODEL__
-#define __POKEMODR_COINLISTMODEL__
+#ifndef __SIGMODR_COINLISTMODEL__
+#define __SIGMODR_COINLISTMODEL__
// Model includes
#include "GroupObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class CoinList;
}
-namespace Pokemodr
+namespace Sigmodr
{
class CoinListModel : public GroupObjectModel
{
Q_OBJECT
public:
- CoinListModel(BaseModel* parent, Pokemod::CoinList* coinList);
+ CoinListModel(BaseModel* parent, Sigmod::CoinList* coinList);
~CoinListModel();
QVariant data(int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseModel* model);
void deleteSelf();
diff --git a/sigmodr/models/CoinListObjectModel.cpp b/sigmodr/models/CoinListObjectModel.cpp
index 0ccf1fa6..745be065 100644
--- a/sigmodr/models/CoinListObjectModel.cpp
+++ b/sigmodr/models/CoinListObjectModel.cpp
@@ -21,15 +21,15 @@
// Model includes
#include "GroupObjectModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../CoinListObjectUI.h"
-// Pokemod includes
-#include "../../pokemod/CoinList.h"
-#include "../../pokemod/CoinListObject.h"
-#include "../../pokemod/Item.h"
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Species.h"
+// Sigmod includes
+#include "../../sigmod/CoinList.h"
+#include "../../sigmod/CoinListObject.h"
+#include "../../sigmod/Item.h"
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Species.h"
// Qt includes
#include <QtCore/QFile>
@@ -37,57 +37,57 @@
// KDE includes
#include <KMenu>
-Pokemodr::CoinListObjectModel::CoinListObjectModel(BaseModel* parent, Pokemod::CoinListObject* object) :
+Sigmodr::CoinListObjectModel::CoinListObjectModel(BaseModel* parent, Sigmod::CoinListObject* object) :
ObjectModel(parent, object)
{
}
-Pokemodr::CoinListObjectModel::~CoinListObjectModel()
+Sigmodr::CoinListObjectModel::~CoinListObjectModel()
{
}
-QVariant Pokemodr::CoinListObjectModel::data(int role) const
+QVariant Sigmodr::CoinListObjectModel::data(int role) const
{
if (role == Qt::DisplayRole)
{
- Pokemod::CoinListObject* object = qobject_cast<Pokemod::CoinListObject*>(m_object);
- if (object->type() == Pokemod::CoinListObject::Item)
+ Sigmod::CoinListObject* object = qobject_cast<Sigmod::CoinListObject*>(m_object);
+ if (object->type() == Sigmod::CoinListObject::Item)
{
- const int index = qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->itemIndex(object->object());
+ const int index = qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->itemIndex(object->object());
if (index != INT_MAX)
- return qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->item(index)->name();
+ return qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->item(index)->name();
}
- else if (object->type() == Pokemod::CoinListObject::Species)
+ else if (object->type() == Sigmod::CoinListObject::Species)
{
- const int index = qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->speciesIndex(object->object());
+ const int index = qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->speciesIndex(object->object());
if (index != INT_MAX)
- return qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->species(index)->name();
+ return qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->species(index)->name();
}
return "";
}
- else if (role == Pokemodr::BaseModel::XmlRole)
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new CoinListObjectUI(qobject_cast<Pokemod::CoinListObject*>(m_object), NULL);
+ QWidget* widget = new CoinListObjectUI(qobject_cast<Sigmod::CoinListObject*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Object", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::CoinListObjectModel::setData(const QVariant& value, int role)
+bool Sigmodr::CoinListObjectModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -107,7 +107,7 @@ bool Pokemodr::CoinListObjectModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::CoinListObjectModel::deleteSelf()
+void Sigmodr::CoinListObjectModel::deleteSelf()
{
// qobject_cast<GroupObjectModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/CoinListObjectModel.h b/sigmodr/models/CoinListObjectModel.h
index 63f38369..c6a502e9 100644
--- a/sigmodr/models/CoinListObjectModel.h
+++ b/sigmodr/models/CoinListObjectModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_COINLISTOBJECTMODEL__
-#define __POKEMODR_COINLISTOBJECTMODEL__
+#ifndef __SIGMODR_COINLISTOBJECTMODEL__
+#define __SIGMODR_COINLISTOBJECTMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class CoinListObject;
}
-namespace Pokemodr
+namespace Sigmodr
{
class CoinListObjectModel : public ObjectModel
{
Q_OBJECT
public:
- CoinListObjectModel(BaseModel* parent, Pokemod::CoinListObject* object);
+ CoinListObjectModel(BaseModel* parent, Sigmod::CoinListObject* object);
~CoinListObjectModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/EggGroupGroupModel.cpp b/sigmodr/models/EggGroupGroupModel.cpp
index 498bb5b9..4226d71e 100644
--- a/sigmodr/models/EggGroupGroupModel.cpp
+++ b/sigmodr/models/EggGroupGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "EggGroupModel.h"
-// Pokemod includes
-#include "../../pokemod/EggGroup.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/EggGroup.h"
+#include "../../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::EggGroupGroupModel::EggGroupGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Egg Groups")
+Sigmodr::EggGroupGroupModel::EggGroupGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Egg Groups")
{
- for (int i = 0; i < pokemod->eggGroupCount(); ++i)
- addObject(pokemod->eggGroup(i));
+ for (int i = 0; i < sigmod->eggGroupCount(); ++i)
+ addObject(sigmod->eggGroup(i));
}
-Pokemodr::EggGroupGroupModel::~EggGroupGroupModel()
+Sigmodr::EggGroupGroupModel::~EggGroupGroupModel()
{
}
-QVariant Pokemodr::EggGroupGroupModel::data(const int role) const
+QVariant Sigmodr::EggGroupGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add EggGroup", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::EggGroupGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::EggGroupGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::EggGroupGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "EggGroup")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newEggGroup(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newEggGroup(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::EggGroupGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::EggGroupGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::EggGroupGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newEggGroup();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newEggGroup();
if (object->className() == "EggGroup")
- m_objects.append(new EggGroupModel(this, qobject_cast<Pokemod::EggGroup*>(object)));
+ m_objects.append(new EggGroupModel(this, qobject_cast<Sigmod::EggGroup*>(object)));
}
-void Pokemodr::EggGroupGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::EggGroupGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteEggGroup(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteEggGroup(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/EggGroupGroupModel.h b/sigmodr/models/EggGroupGroupModel.h
index 65b0f3b0..373e3804 100644
--- a/sigmodr/models/EggGroupGroupModel.h
+++ b/sigmodr/models/EggGroupGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_EGGGROUPGROUPMODEL__
-#define __POKEMODR_EGGGROUPGROUPMODEL__
+#ifndef __SIGMODR_EGGGROUPGROUPMODEL__
+#define __SIGMODR_EGGGROUPGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class EggGroupGroupModel : public GroupModel
{
Q_OBJECT
public:
- EggGroupGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ EggGroupGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~EggGroupGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/EggGroupModel.cpp b/sigmodr/models/EggGroupModel.cpp
index 440d4de4..9bfa61ed 100644
--- a/sigmodr/models/EggGroupModel.cpp
+++ b/sigmodr/models/EggGroupModel.cpp
@@ -21,11 +21,11 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../EggGroupUI.h"
-// Pokemod includes
-#include "../../pokemod/EggGroup.h"
+// Sigmod includes
+#include "../../sigmod/EggGroup.h"
// Qt includes
#include <QtCore/QFile>
@@ -33,42 +33,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::EggGroupModel::EggGroupModel(BaseModel* parent, Pokemod::EggGroup* eggGroup) :
+Sigmodr::EggGroupModel::EggGroupModel(BaseModel* parent, Sigmod::EggGroup* eggGroup) :
ObjectModel(parent, eggGroup)
{
}
-Pokemodr::EggGroupModel::~EggGroupModel()
+Sigmodr::EggGroupModel::~EggGroupModel()
{
}
-QVariant Pokemodr::EggGroupModel::data(int role) const
+QVariant Sigmodr::EggGroupModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::EggGroup*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::EggGroup*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new EggGroupUI(qobject_cast<Pokemod::EggGroup*>(m_object), NULL);
+ QWidget* widget = new EggGroupUI(qobject_cast<Sigmod::EggGroup*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Egg Group", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::EggGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::EggGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -88,7 +88,7 @@ bool Pokemodr::EggGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::EggGroupModel::deleteSelf()
+void Sigmodr::EggGroupModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/EggGroupModel.h b/sigmodr/models/EggGroupModel.h
index 8686a977..08eba758 100644
--- a/sigmodr/models/EggGroupModel.h
+++ b/sigmodr/models/EggGroupModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_EGGGROUPMODEL__
-#define __POKEMODR_EGGGROUPMODEL__
+#ifndef __SIGMODR_EGGGROUPMODEL__
+#define __SIGMODR_EGGGROUPMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class EggGroup;
}
-namespace Pokemodr
+namespace Sigmodr
{
class EggGroupModel : public ObjectModel
{
Q_OBJECT
public:
- EggGroupModel(BaseModel* parent, Pokemod::EggGroup* eggGroup);
+ EggGroupModel(BaseModel* parent, Sigmod::EggGroup* eggGroup);
~EggGroupModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/GlobalScriptGroupModel.cpp b/sigmodr/models/GlobalScriptGroupModel.cpp
index e7cab9e5..811aa677 100644
--- a/sigmodr/models/GlobalScriptGroupModel.cpp
+++ b/sigmodr/models/GlobalScriptGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "GlobalScriptModel.h"
-// Pokemod includes
-#include "../../pokemod/GlobalScript.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/GlobalScript.h"
+#include "../../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::GlobalScriptGroupModel::GlobalScriptGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Global Scripts")
+Sigmodr::GlobalScriptGroupModel::GlobalScriptGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Global Scripts")
{
- for (int i = 0; i < pokemod->globalScriptCount(); ++i)
- addObject(pokemod->globalScript(i));
+ for (int i = 0; i < sigmod->globalScriptCount(); ++i)
+ addObject(sigmod->globalScript(i));
}
-Pokemodr::GlobalScriptGroupModel::~GlobalScriptGroupModel()
+Sigmodr::GlobalScriptGroupModel::~GlobalScriptGroupModel()
{
}
-QVariant Pokemodr::GlobalScriptGroupModel::data(const int role) const
+QVariant Sigmodr::GlobalScriptGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Global Script", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::GlobalScriptGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::GlobalScriptGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::GlobalScriptGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "GlobalScript")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newGlobalScript(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newGlobalScript(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::GlobalScriptGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::GlobalScriptGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::GlobalScriptGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newGlobalScript();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newGlobalScript();
if (object->className() == "GlobalScript")
- m_objects.append(new GlobalScriptModel(this, qobject_cast<Pokemod::GlobalScript*>(object)));
+ m_objects.append(new GlobalScriptModel(this, qobject_cast<Sigmod::GlobalScript*>(object)));
}
-void Pokemodr::GlobalScriptGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::GlobalScriptGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteGlobalScript(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteGlobalScript(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/GlobalScriptGroupModel.h b/sigmodr/models/GlobalScriptGroupModel.h
index 442135b0..22a0277d 100644
--- a/sigmodr/models/GlobalScriptGroupModel.h
+++ b/sigmodr/models/GlobalScriptGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_GLOBALSCRIPTGROUPMODEL__
-#define __POKEMODR_GLOBALSCRIPTGROUPMODEL__
+#ifndef __SIGMODR_GLOBALSCRIPTGROUPMODEL__
+#define __SIGMODR_GLOBALSCRIPTGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class GlobalScriptGroupModel : public GroupModel
{
Q_OBJECT
public:
- GlobalScriptGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ GlobalScriptGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~GlobalScriptGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/GlobalScriptModel.cpp b/sigmodr/models/GlobalScriptModel.cpp
index 4d7fbcbf..1a17ce7e 100644
--- a/sigmodr/models/GlobalScriptModel.cpp
+++ b/sigmodr/models/GlobalScriptModel.cpp
@@ -21,11 +21,11 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../GlobalScriptUI.h"
-// Pokemod includes
-#include "../../pokemod/GlobalScript.h"
+// Sigmod includes
+#include "../../sigmod/GlobalScript.h"
// Qt includes
#include <QtCore/QFile>
@@ -33,42 +33,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::GlobalScriptModel::GlobalScriptModel(BaseModel* parent, Pokemod::GlobalScript* globalScript) :
+Sigmodr::GlobalScriptModel::GlobalScriptModel(BaseModel* parent, Sigmod::GlobalScript* globalScript) :
ObjectModel(parent, globalScript)
{
}
-Pokemodr::GlobalScriptModel::~GlobalScriptModel()
+Sigmodr::GlobalScriptModel::~GlobalScriptModel()
{
}
-QVariant Pokemodr::GlobalScriptModel::data(int role) const
+QVariant Sigmodr::GlobalScriptModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::GlobalScript*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::GlobalScript*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new GlobalScriptUI(qobject_cast<Pokemod::GlobalScript*>(m_object), NULL);
+ QWidget* widget = new GlobalScriptUI(qobject_cast<Sigmod::GlobalScript*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Global Script", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::GlobalScriptModel::setData(const QVariant& value, int role)
+bool Sigmodr::GlobalScriptModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -88,7 +88,7 @@ bool Pokemodr::GlobalScriptModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::GlobalScriptModel::deleteSelf()
+void Sigmodr::GlobalScriptModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/GlobalScriptModel.h b/sigmodr/models/GlobalScriptModel.h
index cf2bb3ec..edc713d9 100644
--- a/sigmodr/models/GlobalScriptModel.h
+++ b/sigmodr/models/GlobalScriptModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_GLOBALSCRIPTMODEL__
-#define __POKEMODR_GLOBALSCRIPTMODEL__
+#ifndef __SIGMODR_GLOBALSCRIPTMODEL__
+#define __SIGMODR_GLOBALSCRIPTMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class GlobalScript;
}
-namespace Pokemodr
+namespace Sigmodr
{
class GlobalScriptModel : public ObjectModel
{
Q_OBJECT
public:
- GlobalScriptModel(BaseModel* parent, Pokemod::GlobalScript* globalScript);
+ GlobalScriptModel(BaseModel* parent, Sigmod::GlobalScript* globalScript);
~GlobalScriptModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/GroupModel.cpp b/sigmodr/models/GroupModel.cpp
index cd362717..dc3ca9b4 100644
--- a/sigmodr/models/GroupModel.cpp
+++ b/sigmodr/models/GroupModel.cpp
@@ -21,56 +21,56 @@
// Model includes
#include "BaseObjectModel.h"
-Pokemodr::GroupModel::GroupModel(BaseModel* parent, Pokemod::Object* object, const QString& name) :
+Sigmodr::GroupModel::GroupModel(BaseModel* parent, Sigmod::Object* object, const QString& name) :
BaseModel(parent, object, name)
{
}
-Pokemodr::GroupModel::~GroupModel()
+Sigmodr::GroupModel::~GroupModel()
{
clearData();
}
-QVariant Pokemodr::GroupModel::data(int role) const
+QVariant Sigmodr::GroupModel::data(int role) const
{
if (role == Qt::DisplayRole)
return m_name;
- return Pokemodr::BaseModel::data(role);
+ return Sigmodr::BaseModel::data(role);
}
-int Pokemodr::GroupModel::rowCount() const
+int Sigmodr::GroupModel::rowCount() const
{
return m_objects.size();
}
-Qt::ItemFlags Pokemodr::GroupModel::flags() const
+Qt::ItemFlags Sigmodr::GroupModel::flags() const
{
return Qt::ItemIsDropEnabled | Qt::ItemIsEnabled;
}
-Pokemodr::BaseModel* Pokemodr::GroupModel::childItem(const int row)
+Sigmodr::BaseModel* Sigmodr::GroupModel::childItem(const int row)
{
if (row < m_objects.size())
return m_objects[row];
return NULL;
}
-Qt::DropActions Pokemodr::GroupModel::supportedDragActions() const
+Qt::DropActions Sigmodr::GroupModel::supportedDragActions() const
{
return 0;
}
-Qt::DropActions Pokemodr::GroupModel::supportedDropActions() const
+Qt::DropActions Sigmodr::GroupModel::supportedDropActions() const
{
return Qt::CopyAction | Qt::MoveAction;
}
-int Pokemodr::GroupModel::findChild(const BaseModel* model) const
+int Sigmodr::GroupModel::findChild(const BaseModel* model) const
{
return m_objects.indexOf(const_cast<BaseObjectModel*>(qobject_cast<const BaseObjectModel*>(model)));
}
-void Pokemodr::GroupModel::clearData()
+void Sigmodr::GroupModel::clearData()
{
foreach (BaseObjectModel* model, m_objects)
delete model;
diff --git a/sigmodr/models/GroupModel.h b/sigmodr/models/GroupModel.h
index b53e5daa..0a9de52b 100644
--- a/sigmodr/models/GroupModel.h
+++ b/sigmodr/models/GroupModel.h
@@ -15,8 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_GROUPMODEL__
-#define __POKEMODR_GROUPMODEL__
+#ifndef __SIGMODR_GROUPMODEL__
+#define __SIGMODR_GROUPMODEL__
// Model includes
#include "BaseModel.h"
@@ -25,11 +25,11 @@
#include <QtCore/QList>
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Object;
}
-namespace Pokemodr
+namespace Sigmodr
{
class BaseObjectModel;
@@ -38,7 +38,7 @@ class GroupModel : public BaseModel
Q_OBJECT
public:
- GroupModel(BaseModel* parent, Pokemod::Object* object, const QString& name = "");
+ GroupModel(BaseModel* parent, Sigmod::Object* object, const QString& name = "");
virtual ~GroupModel();
QVariant data(int role = Qt::DisplayRole) const;
@@ -52,7 +52,7 @@ class GroupModel : public BaseModel
Qt::DropActions supportedDragActions() const;
Qt::DropActions supportedDropActions() const;
public slots:
- virtual void addObject(Pokemod::Object* object = NULL) = 0;
+ virtual void addObject(Sigmod::Object* object = NULL) = 0;
virtual void deleteObject(BaseObjectModel* model) = 0;
protected:
int findChild(const BaseModel* model) const;
diff --git a/sigmodr/models/GroupObjectModel.cpp b/sigmodr/models/GroupObjectModel.cpp
index cf677dc2..f39c95a1 100644
--- a/sigmodr/models/GroupObjectModel.cpp
+++ b/sigmodr/models/GroupObjectModel.cpp
@@ -18,38 +18,38 @@
// Header include
#include "GroupObjectModel.h"
-Pokemodr::GroupObjectModel::GroupObjectModel(BaseModel* parent, Pokemod::Object* object) :
+Sigmodr::GroupObjectModel::GroupObjectModel(BaseModel* parent, Sigmod::Object* object) :
BaseObjectModel(parent, object)
{
}
-Pokemodr::GroupObjectModel::~GroupObjectModel()
+Sigmodr::GroupObjectModel::~GroupObjectModel()
{
}
-QVariant Pokemodr::GroupObjectModel::data(int role) const
+QVariant Sigmodr::GroupObjectModel::data(int role) const
{
- return Pokemodr::BaseObjectModel::data(role);
+ return Sigmodr::BaseObjectModel::data(role);
}
-int Pokemodr::GroupObjectModel::rowCount() const
+int Sigmodr::GroupObjectModel::rowCount() const
{
return m_objects.size();
}
-Pokemodr::BaseModel* Pokemodr::GroupObjectModel::childItem(const int row)
+Sigmodr::BaseModel* Sigmodr::GroupObjectModel::childItem(const int row)
{
if (row < m_objects.size())
return m_objects[row];
return NULL;
}
-int Pokemodr::GroupObjectModel::findChild(const BaseModel* model) const
+int Sigmodr::GroupObjectModel::findChild(const BaseModel* model) const
{
return m_objects.indexOf(const_cast<BaseModel*>(model));
}
-void Pokemodr::GroupObjectModel::clearData()
+void Sigmodr::GroupObjectModel::clearData()
{
foreach (BaseModel* model, m_objects)
delete model;
diff --git a/sigmodr/models/GroupObjectModel.h b/sigmodr/models/GroupObjectModel.h
index 110c7b9f..ab006477 100644
--- a/sigmodr/models/GroupObjectModel.h
+++ b/sigmodr/models/GroupObjectModel.h
@@ -15,21 +15,21 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_GROUPOBJECTMODEL__
-#define __POKEMODR_GROUPOBJECTMODEL__
+#ifndef __SIGMODR_GROUPOBJECTMODEL__
+#define __SIGMODR_GROUPOBJECTMODEL__
// Model includes
#include "BaseObjectModel.h"
#include "GroupModel.h"
-namespace Pokemodr
+namespace Sigmodr
{
class GroupObjectModel : public BaseObjectModel
{
Q_OBJECT
public:
- GroupObjectModel(BaseModel* parent, Pokemod::Object* object);
+ GroupObjectModel(BaseModel* parent, Sigmod::Object* object);
virtual ~GroupObjectModel();
virtual QVariant data(int role = Qt::DisplayRole) const;
@@ -39,7 +39,7 @@ class GroupObjectModel : public BaseObjectModel
BaseModel* childItem(const int row);
public slots:
- virtual void addObject(Pokemod::Object* object = NULL) = 0;
+ virtual void addObject(Sigmod::Object* object = NULL) = 0;
virtual void deleteObject(BaseModel* model) = 0;
virtual void deleteSelf() = 0;
diff --git a/sigmodr/models/ItemGroupModel.cpp b/sigmodr/models/ItemGroupModel.cpp
index b962f2d5..64e95f7c 100644
--- a/sigmodr/models/ItemGroupModel.cpp
+++ b/sigmodr/models/ItemGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "ItemModel.h"
-// Pokemod includes
-#include "../../pokemod/Item.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Item.h"
+#include "../../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::ItemGroupModel::ItemGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Items")
+Sigmodr::ItemGroupModel::ItemGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Items")
{
- for (int i = 0; i < pokemod->itemCount(); ++i)
- addObject(pokemod->item(i));
+ for (int i = 0; i < sigmod->itemCount(); ++i)
+ addObject(sigmod->item(i));
}
-Pokemodr::ItemGroupModel::~ItemGroupModel()
+Sigmodr::ItemGroupModel::~ItemGroupModel()
{
}
-QVariant Pokemodr::ItemGroupModel::data(const int role) const
+QVariant Sigmodr::ItemGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Item", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::ItemGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::ItemGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::ItemGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Item")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newItem(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newItem(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::ItemGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::ItemGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::ItemGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newItem();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newItem();
if (object->className() == "Item")
- m_objects.append(new ItemModel(this, qobject_cast<Pokemod::Item*>(object)));
+ m_objects.append(new ItemModel(this, qobject_cast<Sigmod::Item*>(object)));
}
-void Pokemodr::ItemGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::ItemGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteItem(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteItem(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/ItemGroupModel.h b/sigmodr/models/ItemGroupModel.h
index 6812fc5b..547c60bc 100644
--- a/sigmodr/models/ItemGroupModel.h
+++ b/sigmodr/models/ItemGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_ITEMGROUPMODEL__
-#define __POKEMODR_ITEMGROUPMODEL__
+#ifndef __SIGMODR_ITEMGROUPMODEL__
+#define __SIGMODR_ITEMGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class ItemGroupModel : public GroupModel
{
Q_OBJECT
public:
- ItemGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ ItemGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~ItemGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/ItemModel.cpp b/sigmodr/models/ItemModel.cpp
index 0beaa29f..7b7feeba 100644
--- a/sigmodr/models/ItemModel.cpp
+++ b/sigmodr/models/ItemModel.cpp
@@ -21,11 +21,11 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../ItemUI.h"
-// Pokemod includes
-#include "../../pokemod/Item.h"
+// Sigmod includes
+#include "../../sigmod/Item.h"
// Qt includes
#include <QtCore/QFile>
@@ -33,42 +33,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::ItemModel::ItemModel(BaseModel* parent, Pokemod::Item* item) :
+Sigmodr::ItemModel::ItemModel(BaseModel* parent, Sigmod::Item* item) :
ObjectModel(parent, item)
{
}
-Pokemodr::ItemModel::~ItemModel()
+Sigmodr::ItemModel::~ItemModel()
{
}
-QVariant Pokemodr::ItemModel::data(int role) const
+QVariant Sigmodr::ItemModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Item*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Item*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new ItemUI(qobject_cast<Pokemod::Item*>(m_object), NULL);
+ QWidget* widget = new ItemUI(qobject_cast<Sigmod::Item*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Item", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::ItemModel::setData(const QVariant& value, int role)
+bool Sigmodr::ItemModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -88,7 +88,7 @@ bool Pokemodr::ItemModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::ItemModel::deleteSelf()
+void Sigmodr::ItemModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/ItemModel.h b/sigmodr/models/ItemModel.h
index 960129cc..96113ae2 100644
--- a/sigmodr/models/ItemModel.h
+++ b/sigmodr/models/ItemModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_ITEMMODEL__
-#define __POKEMODR_ITEMMODEL__
+#ifndef __SIGMODR_ITEMMODEL__
+#define __SIGMODR_ITEMMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Item;
}
-namespace Pokemodr
+namespace Sigmodr
{
class ItemModel : public ObjectModel
{
Q_OBJECT
public:
- ItemModel(BaseModel* parent, Pokemod::Item* item);
+ ItemModel(BaseModel* parent, Sigmod::Item* item);
~ItemModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/ItemTypeGroupModel.cpp b/sigmodr/models/ItemTypeGroupModel.cpp
index 8f3fc105..42ca6c1b 100644
--- a/sigmodr/models/ItemTypeGroupModel.cpp
+++ b/sigmodr/models/ItemTypeGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "ItemTypeModel.h"
-// Pokemod includes
-#include "../../pokemod/ItemType.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/ItemType.h"
+#include "../../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::ItemTypeGroupModel::ItemTypeGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Item Types")
+Sigmodr::ItemTypeGroupModel::ItemTypeGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Item Types")
{
- for (int i = 0; i < pokemod->itemTypeCount(); ++i)
- addObject(pokemod->itemType(i));
+ for (int i = 0; i < sigmod->itemTypeCount(); ++i)
+ addObject(sigmod->itemType(i));
}
-Pokemodr::ItemTypeGroupModel::~ItemTypeGroupModel()
+Sigmodr::ItemTypeGroupModel::~ItemTypeGroupModel()
{
}
-QVariant Pokemodr::ItemTypeGroupModel::data(const int role) const
+QVariant Sigmodr::ItemTypeGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Item Type", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::ItemTypeGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::ItemTypeGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::ItemTypeGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "ItemType")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newItemType(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newItemType(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::ItemTypeGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::ItemTypeGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::ItemTypeGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newItemType();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newItemType();
if (object->className() == "ItemType")
- m_objects.append(new ItemTypeModel(this, qobject_cast<Pokemod::ItemType*>(object)));
+ m_objects.append(new ItemTypeModel(this, qobject_cast<Sigmod::ItemType*>(object)));
}
-void Pokemodr::ItemTypeGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::ItemTypeGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteItemType(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteItemType(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/ItemTypeGroupModel.h b/sigmodr/models/ItemTypeGroupModel.h
index 9b23486c..d00f6a8e 100644
--- a/sigmodr/models/ItemTypeGroupModel.h
+++ b/sigmodr/models/ItemTypeGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_ITEMTYPEGROUPMODEL__
-#define __POKEMODR_ITEMTYPEGROUPMODEL__
+#ifndef __SIGMODR_ITEMTYPEGROUPMODEL__
+#define __SIGMODR_ITEMTYPEGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class ItemTypeGroupModel : public GroupModel
{
Q_OBJECT
public:
- ItemTypeGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ ItemTypeGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~ItemTypeGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/ItemTypeModel.cpp b/sigmodr/models/ItemTypeModel.cpp
index 8da0bafc..e2bc3134 100644
--- a/sigmodr/models/ItemTypeModel.cpp
+++ b/sigmodr/models/ItemTypeModel.cpp
@@ -21,11 +21,11 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../ItemTypeUI.h"
-// Pokemod includes
-#include "../../pokemod/ItemType.h"
+// Sigmod includes
+#include "../../sigmod/ItemType.h"
// Qt includes
#include <QtCore/QFile>
@@ -33,42 +33,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::ItemTypeModel::ItemTypeModel(BaseModel* parent, Pokemod::ItemType* itemType) :
+Sigmodr::ItemTypeModel::ItemTypeModel(BaseModel* parent, Sigmod::ItemType* itemType) :
ObjectModel(parent, itemType)
{
}
-Pokemodr::ItemTypeModel::~ItemTypeModel()
+Sigmodr::ItemTypeModel::~ItemTypeModel()
{
}
-QVariant Pokemodr::ItemTypeModel::data(int role) const
+QVariant Sigmodr::ItemTypeModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::ItemType*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::ItemType*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new ItemTypeUI(qobject_cast<Pokemod::ItemType*>(m_object), NULL);
+ QWidget* widget = new ItemTypeUI(qobject_cast<Sigmod::ItemType*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Item Type", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::ItemTypeModel::setData(const QVariant& value, int role)
+bool Sigmodr::ItemTypeModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -88,7 +88,7 @@ bool Pokemodr::ItemTypeModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::ItemTypeModel::deleteSelf()
+void Sigmodr::ItemTypeModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/ItemTypeModel.h b/sigmodr/models/ItemTypeModel.h
index 254e04d6..bea645f4 100644
--- a/sigmodr/models/ItemTypeModel.h
+++ b/sigmodr/models/ItemTypeModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_ITEMTYPEMODEL__
-#define __POKEMODR_ITEMTYPEMODEL__
+#ifndef __SIGMODR_ITEMTYPEMODEL__
+#define __SIGMODR_ITEMTYPEMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class ItemType;
}
-namespace Pokemodr
+namespace Sigmodr
{
class ItemTypeModel : public ObjectModel
{
Q_OBJECT
public:
- ItemTypeModel(BaseModel* parent, Pokemod::ItemType* itemType);
+ ItemTypeModel(BaseModel* parent, Sigmod::ItemType* itemType);
~ItemTypeModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/MapEffectGroupModel.cpp b/sigmodr/models/MapEffectGroupModel.cpp
index dc423157..d7da7116 100644
--- a/sigmodr/models/MapEffectGroupModel.cpp
+++ b/sigmodr/models/MapEffectGroupModel.cpp
@@ -22,8 +22,8 @@
#include "MapEffectModel.h"
// Map includes
-#include "../../pokemod/Map.h"
-#include "../../pokemod/MapEffect.h"
+#include "../../sigmod/Map.h"
+#include "../../sigmod/MapEffect.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::MapEffectGroupModel::MapEffectGroupModel(BaseModel* parent, Pokemod::Map* map) :
+Sigmodr::MapEffectGroupModel::MapEffectGroupModel(BaseModel* parent, Sigmod::Map* map) :
GroupModel(parent, map, "Effects")
{
for (int i = 0; i < map->effectCount(); ++i)
addObject(map->effect(i));
}
-Pokemodr::MapEffectGroupModel::~MapEffectGroupModel()
+Sigmodr::MapEffectGroupModel::~MapEffectGroupModel()
{
}
-QVariant Pokemodr::MapEffectGroupModel::data(const int role) const
+QVariant Sigmodr::MapEffectGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Effect", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::MapEffectGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::MapEffectGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::MapEffectGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "MapEffect")
{
- addObject(qobject_cast<Pokemod::Map*>(m_object)->newEffect(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Map*>(m_object)->newEffect(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::MapEffectGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::MapEffectGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::MapEffectGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Map*>(m_object)->newEffect();
+ object = qobject_cast<Sigmod::Map*>(m_object)->newEffect();
if (object->className() == "MapEffect")
- m_objects.append(new MapEffectModel(this, qobject_cast<Pokemod::MapEffect*>(object)));
+ m_objects.append(new MapEffectModel(this, qobject_cast<Sigmod::MapEffect*>(object)));
}
-void Pokemodr::MapEffectGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::MapEffectGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Map*>(m_object)->deleteEffect(index);
+ qobject_cast<Sigmod::Map*>(m_object)->deleteEffect(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/MapEffectGroupModel.h b/sigmodr/models/MapEffectGroupModel.h
index 6291c6e5..53a083e1 100644
--- a/sigmodr/models/MapEffectGroupModel.h
+++ b/sigmodr/models/MapEffectGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPEFFECTGROUPMODEL__
-#define __POKEMODR_MAPEFFECTGROUPMODEL__
+#ifndef __SIGMODR_MAPEFFECTGROUPMODEL__
+#define __SIGMODR_MAPEFFECTGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Map;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapEffectGroupModel : public GroupModel
{
Q_OBJECT
public:
- MapEffectGroupModel(BaseModel* parent, Pokemod::Map* map);
+ MapEffectGroupModel(BaseModel* parent, Sigmod::Map* map);
~MapEffectGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/MapEffectModel.cpp b/sigmodr/models/MapEffectModel.cpp
index 9603bf3a..e1398777 100644
--- a/sigmodr/models/MapEffectModel.cpp
+++ b/sigmodr/models/MapEffectModel.cpp
@@ -21,12 +21,12 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../MapEffectUI.h"
-// Pokemod includes
-#include "../../pokemod/Map.h"
-#include "../../pokemod/MapEffect.h"
+// Sigmod includes
+#include "../../sigmod/Map.h"
+#include "../../sigmod/MapEffect.h"
// Qt includes
#include <QtCore/QFile>
@@ -34,42 +34,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::MapEffectModel::MapEffectModel(BaseModel* parent, Pokemod::MapEffect* effect) :
+Sigmodr::MapEffectModel::MapEffectModel(BaseModel* parent, Sigmod::MapEffect* effect) :
ObjectModel(parent, effect)
{
}
-Pokemodr::MapEffectModel::~MapEffectModel()
+Sigmodr::MapEffectModel::~MapEffectModel()
{
}
-QVariant Pokemodr::MapEffectModel::data(int role) const
+QVariant Sigmodr::MapEffectModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::MapEffect*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::MapEffect*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new MapEffectUI(qobject_cast<Pokemod::MapEffect*>(m_object), NULL);
+ QWidget* widget = new MapEffectUI(qobject_cast<Sigmod::MapEffect*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Effect", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::MapEffectModel::setData(const QVariant& value, int role)
+bool Sigmodr::MapEffectModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -89,7 +89,7 @@ bool Pokemodr::MapEffectModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::MapEffectModel::deleteSelf()
+void Sigmodr::MapEffectModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/MapEffectModel.h b/sigmodr/models/MapEffectModel.h
index 925399a4..1c33672c 100644
--- a/sigmodr/models/MapEffectModel.h
+++ b/sigmodr/models/MapEffectModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPEFFECTMODEL__
-#define __POKEMODR_MAPEFFECTMODEL__
+#ifndef __SIGMODR_MAPEFFECTMODEL__
+#define __SIGMODR_MAPEFFECTMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class MapEffect;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapEffectModel : public ObjectModel
{
Q_OBJECT
public:
- MapEffectModel(BaseModel* parent, Pokemod::MapEffect* effect);
+ MapEffectModel(BaseModel* parent, Sigmod::MapEffect* effect);
~MapEffectModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/MapGroupModel.cpp b/sigmodr/models/MapGroupModel.cpp
index 39482455..d2cd59c4 100644
--- a/sigmodr/models/MapGroupModel.cpp
+++ b/sigmodr/models/MapGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "MapModel.h"
-// Pokemod includes
-#include "../../pokemod/Map.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Map.h"
+#include "../../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::MapGroupModel::MapGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Maps")
+Sigmodr::MapGroupModel::MapGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Maps")
{
- for (int i = 0; i < pokemod->mapCount(); ++i)
- addObject(pokemod->map(i));
+ for (int i = 0; i < sigmod->mapCount(); ++i)
+ addObject(sigmod->map(i));
}
-Pokemodr::MapGroupModel::~MapGroupModel()
+Sigmodr::MapGroupModel::~MapGroupModel()
{
}
-QVariant Pokemodr::MapGroupModel::data(const int role) const
+QVariant Sigmodr::MapGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Map", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::MapGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::MapGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::MapGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Map")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newMap(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newMap(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::MapGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::MapGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::MapGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newMap();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newMap();
if (object->className() == "Map")
- m_objects.append(new MapModel(this, qobject_cast<Pokemod::Map*>(object)));
+ m_objects.append(new MapModel(this, qobject_cast<Sigmod::Map*>(object)));
}
-void Pokemodr::MapGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::MapGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteMap(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteMap(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/MapGroupModel.h b/sigmodr/models/MapGroupModel.h
index 01c3cc12..fcbe54d5 100644
--- a/sigmodr/models/MapGroupModel.h
+++ b/sigmodr/models/MapGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPGROUPMODEL__
-#define __POKEMODR_MAPGROUPMODEL__
+#ifndef __SIGMODR_MAPGROUPMODEL__
+#define __SIGMODR_MAPGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapGroupModel : public GroupModel
{
Q_OBJECT
public:
- MapGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ MapGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~MapGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/MapModel.cpp b/sigmodr/models/MapModel.cpp
index e2a8d2cd..9511b9c4 100644
--- a/sigmodr/models/MapModel.cpp
+++ b/sigmodr/models/MapModel.cpp
@@ -24,11 +24,11 @@
#include "MapWarpGroupModel.h"
#include "MapWildListGroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../MapUI.h"
-// Pokemod includes
-#include "../../pokemod/Map.h"
+// Sigmod includes
+#include "../../sigmod/Map.h"
// Qt includes
#include <QtCore/QFile>
@@ -36,44 +36,44 @@
// KDE includes
#include <KMenu>
-Pokemodr::MapModel::MapModel(BaseModel* parent, Pokemod::Map* map) :
+Sigmodr::MapModel::MapModel(BaseModel* parent, Sigmod::Map* map) :
GroupObjectModel(parent, map)
{
setupData();
}
-Pokemodr::MapModel::~MapModel()
+Sigmodr::MapModel::~MapModel()
{
clearData();
}
-QVariant Pokemodr::MapModel::data(int role) const
+QVariant Sigmodr::MapModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Map*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Map*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new MapUI(qobject_cast<Pokemod::Map*>(m_object), NULL);
+ QWidget* widget = new MapUI(qobject_cast<Sigmod::Map*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Map", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupObjectModel::data(role);
+ return Sigmodr::GroupObjectModel::data(role);
}
-bool Pokemodr::MapModel::setData(const QVariant& value, int role)
+bool Sigmodr::MapModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -95,22 +95,22 @@ bool Pokemodr::MapModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::MapModel::addObject(Pokemod::Object* /*object*/)
+void Sigmodr::MapModel::addObject(Sigmod::Object* /*object*/)
{
}
-void Pokemodr::MapModel::deleteObject(BaseModel* /*model*/)
+void Sigmodr::MapModel::deleteObject(BaseModel* /*model*/)
{
}
-void Pokemodr::MapModel::deleteSelf()
+void Sigmodr::MapModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
-void Pokemodr::MapModel::setupData()
+void Sigmodr::MapModel::setupData()
{
- Pokemod::Map* map = qobject_cast<Pokemod::Map*>(m_object);
+ Sigmod::Map* map = qobject_cast<Sigmod::Map*>(m_object);
m_objects.append(new MapEffectGroupModel(this, map));
m_objects.append(new MapTrainerGroupModel(this, map));
m_objects.append(new MapWarpGroupModel(this, map));
diff --git a/sigmodr/models/MapModel.h b/sigmodr/models/MapModel.h
index d054c9c3..27586a25 100644
--- a/sigmodr/models/MapModel.h
+++ b/sigmodr/models/MapModel.h
@@ -15,33 +15,33 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPMODEL__
-#define __POKEMODR_MAPMODEL__
+#ifndef __SIGMODR_MAPMODEL__
+#define __SIGMODR_MAPMODEL__
// Model includes
#include "GroupObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Map;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapModel : public GroupObjectModel
{
Q_OBJECT
public:
- MapModel(BaseModel* parent, Pokemod::Map* map);
+ MapModel(BaseModel* parent, Sigmod::Map* map);
~MapModel();
QVariant data(int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* /*object = NULL*/);
+ void addObject(Sigmod::Object* /*object = NULL*/);
void deleteObject(BaseModel* /*model*/);
void deleteSelf();
diff --git a/sigmodr/models/MapTrainerGroupModel.cpp b/sigmodr/models/MapTrainerGroupModel.cpp
index b98921e8..8740c111 100644
--- a/sigmodr/models/MapTrainerGroupModel.cpp
+++ b/sigmodr/models/MapTrainerGroupModel.cpp
@@ -22,8 +22,8 @@
#include "MapTrainerModel.h"
// Map includes
-#include "../../pokemod/Map.h"
-#include "../../pokemod/MapTrainer.h"
+#include "../../sigmod/Map.h"
+#include "../../sigmod/MapTrainer.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::MapTrainerGroupModel::MapTrainerGroupModel(BaseModel* parent, Pokemod::Map* map) :
+Sigmodr::MapTrainerGroupModel::MapTrainerGroupModel(BaseModel* parent, Sigmod::Map* map) :
GroupModel(parent, map, "Trainers")
{
for (int i = 0; i < map->trainerCount(); ++i)
addObject(map->trainer(i));
}
-Pokemodr::MapTrainerGroupModel::~MapTrainerGroupModel()
+Sigmodr::MapTrainerGroupModel::~MapTrainerGroupModel()
{
}
-QVariant Pokemodr::MapTrainerGroupModel::data(const int role) const
+QVariant Sigmodr::MapTrainerGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Trainer", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::MapTrainerGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::MapTrainerGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::MapTrainerGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "MapTrainer")
{
- addObject(qobject_cast<Pokemod::Map*>(m_object)->newTrainer(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Map*>(m_object)->newTrainer(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::MapTrainerGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::MapTrainerGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::MapTrainerGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Map*>(m_object)->newTrainer();
+ object = qobject_cast<Sigmod::Map*>(m_object)->newTrainer();
if (object->className() == "MapTrainer")
- m_objects.append(new MapTrainerModel(this, qobject_cast<Pokemod::MapTrainer*>(object)));
+ m_objects.append(new MapTrainerModel(this, qobject_cast<Sigmod::MapTrainer*>(object)));
}
-void Pokemodr::MapTrainerGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::MapTrainerGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Map*>(m_object)->deleteTrainer(index);
+ qobject_cast<Sigmod::Map*>(m_object)->deleteTrainer(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/MapTrainerGroupModel.h b/sigmodr/models/MapTrainerGroupModel.h
index 72f660ec..65f0d38a 100644
--- a/sigmodr/models/MapTrainerGroupModel.h
+++ b/sigmodr/models/MapTrainerGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPTRAINERGROUPMODEL__
-#define __POKEMODR_MAPTRAINERGROUPMODEL__
+#ifndef __SIGMODR_MAPTRAINERGROUPMODEL__
+#define __SIGMODR_MAPTRAINERGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Map;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapTrainerGroupModel : public GroupModel
{
Q_OBJECT
public:
- MapTrainerGroupModel(BaseModel* parent, Pokemod::Map* map);
+ MapTrainerGroupModel(BaseModel* parent, Sigmod::Map* map);
~MapTrainerGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/MapTrainerModel.cpp b/sigmodr/models/MapTrainerModel.cpp
index 750a621d..e72c9ae1 100644
--- a/sigmodr/models/MapTrainerModel.cpp
+++ b/sigmodr/models/MapTrainerModel.cpp
@@ -21,13 +21,13 @@
// Model includes
#include "MapTrainerTeamMemberModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../MapTrainerUI.h"
-// Pokemod includes
-#include "../../pokemod/Map.h"
-#include "../../pokemod/MapTrainer.h"
-#include "../../pokemod/MapTrainerTeamMember.h"
+// Sigmod includes
+#include "../../sigmod/Map.h"
+#include "../../sigmod/MapTrainer.h"
+#include "../../sigmod/MapTrainerTeamMember.h"
// Qt includes
#include <QtCore/QFile>
@@ -35,33 +35,33 @@
// KDE includes
#include <KMenu>
-Pokemodr::MapTrainerModel::MapTrainerModel(BaseModel* parent, Pokemod::MapTrainer* trainer) :
+Sigmodr::MapTrainerModel::MapTrainerModel(BaseModel* parent, Sigmod::MapTrainer* trainer) :
GroupObjectModel(parent, trainer)
{
setupData();
}
-Pokemodr::MapTrainerModel::~MapTrainerModel()
+Sigmodr::MapTrainerModel::~MapTrainerModel()
{
clearData();
}
-QVariant Pokemodr::MapTrainerModel::data(int role) const
+QVariant Sigmodr::MapTrainerModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::MapTrainer*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::MapTrainer*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new MapTrainerUI(qobject_cast<Pokemod::MapTrainer*>(m_object), NULL);
+ QWidget* widget = new MapTrainerUI(qobject_cast<Sigmod::MapTrainer*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Team Member", this, SLOT(addObject()));
@@ -69,36 +69,36 @@ QVariant Pokemodr::MapTrainerModel::data(int role) const
menu->addAction("&Delete Trainer", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupObjectModel::data(role);
+ return Sigmodr::GroupObjectModel::data(role);
}
-void Pokemodr::MapTrainerModel::addObject(Pokemod::Object* object)
+void Sigmodr::MapTrainerModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::MapTrainer*>(m_object)->newTeamMember();
+ object = qobject_cast<Sigmod::MapTrainer*>(m_object)->newTeamMember();
if (object->className() == "MapTrainerTeamMember")
- m_objects.append(new MapTrainerTeamMemberModel(this, qobject_cast<Pokemod::MapTrainerTeamMember*>(object)));
+ m_objects.append(new MapTrainerTeamMemberModel(this, qobject_cast<Sigmod::MapTrainerTeamMember*>(object)));
}
-void Pokemodr::MapTrainerModel::deleteObject(BaseModel* model)
+void Sigmodr::MapTrainerModel::deleteObject(BaseModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::MapTrainer*>(m_object)->deleteTeamMember(index);
+ qobject_cast<Sigmod::MapTrainer*>(m_object)->deleteTeamMember(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
}
-void Pokemodr::MapTrainerModel::deleteSelf()
+void Sigmodr::MapTrainerModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
-bool Pokemodr::MapTrainerModel::setData(const QVariant& value, int role)
+bool Sigmodr::MapTrainerModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -115,7 +115,7 @@ bool Pokemodr::MapTrainerModel::setData(const QVariant& value, int role)
}
else if (xml.doctype().name() == "MapTrainerTeamMember")
{
- addObject(qobject_cast<Pokemod::MapTrainer*>(m_object)->newTeamMember(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::MapTrainer*>(m_object)->newTeamMember(xml.documentElement()));
return true;
}
file.close();
@@ -125,9 +125,9 @@ bool Pokemodr::MapTrainerModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::MapTrainerModel::setupData()
+void Sigmodr::MapTrainerModel::setupData()
{
- Pokemod::MapTrainer* trainer = qobject_cast<Pokemod::MapTrainer*>(m_object);
+ Sigmod::MapTrainer* trainer = qobject_cast<Sigmod::MapTrainer*>(m_object);
for (int i = 0; i < trainer->teamMemberCount(); ++i)
m_objects.append(new MapTrainerTeamMemberModel(this, trainer->teamMember(i)));
}
diff --git a/sigmodr/models/MapTrainerModel.h b/sigmodr/models/MapTrainerModel.h
index 7b52d01e..db3e130e 100644
--- a/sigmodr/models/MapTrainerModel.h
+++ b/sigmodr/models/MapTrainerModel.h
@@ -15,33 +15,33 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPTRAINERMODEL__
-#define __POKEMODR_MAPTRAINERMODEL__
+#ifndef __SIGMODR_MAPTRAINERMODEL__
+#define __SIGMODR_MAPTRAINERMODEL__
// Model includes
#include "GroupObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class MapTrainer;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapTrainerModel : public GroupObjectModel
{
Q_OBJECT
public:
- MapTrainerModel(BaseModel* parent, Pokemod::MapTrainer* trainer);
+ MapTrainerModel(BaseModel* parent, Sigmod::MapTrainer* trainer);
~MapTrainerModel();
QVariant data(int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseModel* model);
void deleteSelf();
diff --git a/sigmodr/models/MapTrainerTeamMemberModel.cpp b/sigmodr/models/MapTrainerTeamMemberModel.cpp
index e356f444..7e589f2a 100644
--- a/sigmodr/models/MapTrainerTeamMemberModel.cpp
+++ b/sigmodr/models/MapTrainerTeamMemberModel.cpp
@@ -21,14 +21,14 @@
// Model includes
#include "GroupObjectModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../MapTrainerTeamMemberUI.h"
-// Pokemod includes
-#include "../../pokemod/MapTrainer.h"
-#include "../../pokemod/MapTrainerTeamMember.h"
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Species.h"
+// Sigmod includes
+#include "../../sigmod/MapTrainer.h"
+#include "../../sigmod/MapTrainerTeamMember.h"
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Species.h"
// Qt includes
#include <QtCore/QFile>
@@ -36,47 +36,47 @@
// KDE includes
#include <KMenu>
-Pokemodr::MapTrainerTeamMemberModel::MapTrainerTeamMemberModel(BaseModel* parent, Pokemod::MapTrainerTeamMember* teamMember) :
+Sigmodr::MapTrainerTeamMemberModel::MapTrainerTeamMemberModel(BaseModel* parent, Sigmod::MapTrainerTeamMember* teamMember) :
ObjectModel(parent, teamMember)
{
}
-Pokemodr::MapTrainerTeamMemberModel::~MapTrainerTeamMemberModel()
+Sigmodr::MapTrainerTeamMemberModel::~MapTrainerTeamMemberModel()
{
}
-QVariant Pokemodr::MapTrainerTeamMemberModel::data(int role) const
+QVariant Sigmodr::MapTrainerTeamMemberModel::data(int role) const
{
if (role == Qt::DisplayRole)
{
- const Pokemod::Species* species = qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->speciesById(qobject_cast<Pokemod::MapTrainerTeamMember*>(m_object)->species());
+ const Sigmod::Species* species = qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->speciesById(qobject_cast<Sigmod::MapTrainerTeamMember*>(m_object)->species());
if (species)
return species->name();
return "";
}
- else if (role == Pokemodr::BaseModel::XmlRole)
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new MapTrainerTeamMemberUI(qobject_cast<Pokemod::MapTrainerTeamMember*>(m_object), NULL);
+ QWidget* widget = new MapTrainerTeamMemberUI(qobject_cast<Sigmod::MapTrainerTeamMember*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Team Member", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::MapTrainerTeamMemberModel::setData(const QVariant& value, int role)
+bool Sigmodr::MapTrainerTeamMemberModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -96,7 +96,7 @@ bool Pokemodr::MapTrainerTeamMemberModel::setData(const QVariant& value, int rol
return false;
}
-void Pokemodr::MapTrainerTeamMemberModel::deleteSelf()
+void Sigmodr::MapTrainerTeamMemberModel::deleteSelf()
{
// qobject_cast<GroupObjectModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/MapTrainerTeamMemberModel.h b/sigmodr/models/MapTrainerTeamMemberModel.h
index db8a874e..5f628d67 100644
--- a/sigmodr/models/MapTrainerTeamMemberModel.h
+++ b/sigmodr/models/MapTrainerTeamMemberModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPTRAINERTEAMMEMBERMODEL__
-#define __POKEMODR_MAPTRAINERTEAMMEMBERMODEL__
+#ifndef __SIGMODR_MAPTRAINERTEAMMEMBERMODEL__
+#define __SIGMODR_MAPTRAINERTEAMMEMBERMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class MapTrainerTeamMember;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapTrainerTeamMemberModel : public ObjectModel
{
Q_OBJECT
public:
- MapTrainerTeamMemberModel(BaseModel* parent, Pokemod::MapTrainerTeamMember* teamMember);
+ MapTrainerTeamMemberModel(BaseModel* parent, Sigmod::MapTrainerTeamMember* teamMember);
~MapTrainerTeamMemberModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/MapWarpGroupModel.cpp b/sigmodr/models/MapWarpGroupModel.cpp
index f8b26a3b..d76cf0f7 100644
--- a/sigmodr/models/MapWarpGroupModel.cpp
+++ b/sigmodr/models/MapWarpGroupModel.cpp
@@ -22,8 +22,8 @@
#include "MapWarpModel.h"
// Map includes
-#include "../../pokemod/Map.h"
-#include "../../pokemod/MapWarp.h"
+#include "../../sigmod/Map.h"
+#include "../../sigmod/MapWarp.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::MapWarpGroupModel::MapWarpGroupModel(BaseModel* parent, Pokemod::Map* map) :
+Sigmodr::MapWarpGroupModel::MapWarpGroupModel(BaseModel* parent, Sigmod::Map* map) :
GroupModel(parent, map, "Warps")
{
for (int i = 0; i < map->warpCount(); ++i)
addObject(map->warp(i));
}
-Pokemodr::MapWarpGroupModel::~MapWarpGroupModel()
+Sigmodr::MapWarpGroupModel::~MapWarpGroupModel()
{
}
-QVariant Pokemodr::MapWarpGroupModel::data(const int role) const
+QVariant Sigmodr::MapWarpGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Warp", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::MapWarpGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::MapWarpGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::MapWarpGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "MapWarp")
{
- addObject(qobject_cast<Pokemod::Map*>(m_object)->newWarp(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Map*>(m_object)->newWarp(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::MapWarpGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::MapWarpGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::MapWarpGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Map*>(m_object)->newWarp();
+ object = qobject_cast<Sigmod::Map*>(m_object)->newWarp();
if (object->className() == "MapWarp")
- m_objects.append(new MapWarpModel(this, qobject_cast<Pokemod::MapWarp*>(object)));
+ m_objects.append(new MapWarpModel(this, qobject_cast<Sigmod::MapWarp*>(object)));
}
-void Pokemodr::MapWarpGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::MapWarpGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Map*>(m_object)->deleteWarp(index);
+ qobject_cast<Sigmod::Map*>(m_object)->deleteWarp(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/MapWarpGroupModel.h b/sigmodr/models/MapWarpGroupModel.h
index dfcff263..4e358c16 100644
--- a/sigmodr/models/MapWarpGroupModel.h
+++ b/sigmodr/models/MapWarpGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPWARPGROUPMODEL__
-#define __POKEMODR_MAPWARPGROUPMODEL__
+#ifndef __SIGMODR_MAPWARPGROUPMODEL__
+#define __SIGMODR_MAPWARPGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Map;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapWarpGroupModel : public GroupModel
{
Q_OBJECT
public:
- MapWarpGroupModel(BaseModel* parent, Pokemod::Map* map);
+ MapWarpGroupModel(BaseModel* parent, Sigmod::Map* map);
~MapWarpGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/MapWarpModel.cpp b/sigmodr/models/MapWarpModel.cpp
index e689e2ac..6dfcea8c 100644
--- a/sigmodr/models/MapWarpModel.cpp
+++ b/sigmodr/models/MapWarpModel.cpp
@@ -21,12 +21,12 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../MapWarpUI.h"
-// Pokemod includes
-#include "../../pokemod/Map.h"
-#include "../../pokemod/MapWarp.h"
+// Sigmod includes
+#include "../../sigmod/Map.h"
+#include "../../sigmod/MapWarp.h"
// Qt includes
#include <QtCore/QFile>
@@ -34,42 +34,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::MapWarpModel::MapWarpModel(BaseModel* parent, Pokemod::MapWarp* warp) :
+Sigmodr::MapWarpModel::MapWarpModel(BaseModel* parent, Sigmod::MapWarp* warp) :
ObjectModel(parent, warp)
{
}
-Pokemodr::MapWarpModel::~MapWarpModel()
+Sigmodr::MapWarpModel::~MapWarpModel()
{
}
-QVariant Pokemodr::MapWarpModel::data(int role) const
+QVariant Sigmodr::MapWarpModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::MapWarp*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::MapWarp*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new MapWarpUI(qobject_cast<Pokemod::MapWarp*>(m_object), NULL);
+ QWidget* widget = new MapWarpUI(qobject_cast<Sigmod::MapWarp*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Warp", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::MapWarpModel::setData(const QVariant& value, int role)
+bool Sigmodr::MapWarpModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -89,7 +89,7 @@ bool Pokemodr::MapWarpModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::MapWarpModel::deleteSelf()
+void Sigmodr::MapWarpModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/MapWarpModel.h b/sigmodr/models/MapWarpModel.h
index 552dbfb6..5442ab84 100644
--- a/sigmodr/models/MapWarpModel.h
+++ b/sigmodr/models/MapWarpModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPWARPMODEL__
-#define __POKEMODR_MAPWARPMODEL__
+#ifndef __SIGMODR_MAPWARPMODEL__
+#define __SIGMODR_MAPWARPMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class MapWarp;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapWarpModel : public ObjectModel
{
Q_OBJECT
public:
- MapWarpModel(BaseModel* parent, Pokemod::MapWarp* warp);
+ MapWarpModel(BaseModel* parent, Sigmod::MapWarp* warp);
~MapWarpModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/MapWildListEncounterModel.cpp b/sigmodr/models/MapWildListEncounterModel.cpp
index 53f12bb3..40ecbf93 100644
--- a/sigmodr/models/MapWildListEncounterModel.cpp
+++ b/sigmodr/models/MapWildListEncounterModel.cpp
@@ -21,14 +21,14 @@
// Model includes
#include "GroupObjectModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../MapWildListEncounterUI.h"
-// Pokemod includes
-#include "../../pokemod/MapWildList.h"
-#include "../../pokemod/MapWildListEncounter.h"
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Species.h"
+// Sigmod includes
+#include "../../sigmod/MapWildList.h"
+#include "../../sigmod/MapWildListEncounter.h"
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Species.h"
// Qt includes
#include <QtCore/QFile>
@@ -36,47 +36,47 @@
// KDE includes
#include <KMenu>
-Pokemodr::MapWildListEncounterModel::MapWildListEncounterModel(BaseModel* parent, Pokemod::MapWildListEncounter* encounter) :
+Sigmodr::MapWildListEncounterModel::MapWildListEncounterModel(BaseModel* parent, Sigmod::MapWildListEncounter* encounter) :
ObjectModel(parent, encounter)
{
}
-Pokemodr::MapWildListEncounterModel::~MapWildListEncounterModel()
+Sigmodr::MapWildListEncounterModel::~MapWildListEncounterModel()
{
}
-QVariant Pokemodr::MapWildListEncounterModel::data(int role) const
+QVariant Sigmodr::MapWildListEncounterModel::data(int role) const
{
if (role == Qt::DisplayRole)
{
- const Pokemod::Species* species = qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->speciesById(qobject_cast<Pokemod::MapWildListEncounter*>(m_object)->species());
+ const Sigmod::Species* species = qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->speciesById(qobject_cast<Sigmod::MapWildListEncounter*>(m_object)->species());
if (species)
return species->name();
return "";
}
- else if (role == Pokemodr::BaseModel::XmlRole)
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new MapWildListEncounterUI(qobject_cast<Pokemod::MapWildListEncounter*>(m_object), NULL);
+ QWidget* widget = new MapWildListEncounterUI(qobject_cast<Sigmod::MapWildListEncounter*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Encounter", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::MapWildListEncounterModel::setData(const QVariant& value, int role)
+bool Sigmodr::MapWildListEncounterModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -96,7 +96,7 @@ bool Pokemodr::MapWildListEncounterModel::setData(const QVariant& value, int rol
return false;
}
-void Pokemodr::MapWildListEncounterModel::deleteSelf()
+void Sigmodr::MapWildListEncounterModel::deleteSelf()
{
// qobject_cast<GroupObjectModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/MapWildListEncounterModel.h b/sigmodr/models/MapWildListEncounterModel.h
index 216c34ca..a87c5436 100644
--- a/sigmodr/models/MapWildListEncounterModel.h
+++ b/sigmodr/models/MapWildListEncounterModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPWILDLISTENCOUNTERMODEL__
-#define __POKEMODR_MAPWILDLISTENCOUNTERMODEL__
+#ifndef __SIGMODR_MAPWILDLISTENCOUNTERMODEL__
+#define __SIGMODR_MAPWILDLISTENCOUNTERMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class MapWildListEncounter;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapWildListEncounterModel : public ObjectModel
{
Q_OBJECT
public:
- MapWildListEncounterModel(BaseModel* parent, Pokemod::MapWildListEncounter* encounter);
+ MapWildListEncounterModel(BaseModel* parent, Sigmod::MapWildListEncounter* encounter);
~MapWildListEncounterModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/MapWildListGroupModel.cpp b/sigmodr/models/MapWildListGroupModel.cpp
index fbb1e012..e7320e03 100644
--- a/sigmodr/models/MapWildListGroupModel.cpp
+++ b/sigmodr/models/MapWildListGroupModel.cpp
@@ -22,8 +22,8 @@
#include "MapWildListModel.h"
// Map includes
-#include "../../pokemod/Map.h"
-#include "../../pokemod/MapWildList.h"
+#include "../../sigmod/Map.h"
+#include "../../sigmod/MapWildList.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::MapWildListGroupModel::MapWildListGroupModel(BaseModel* parent, Pokemod::Map* map) :
+Sigmodr::MapWildListGroupModel::MapWildListGroupModel(BaseModel* parent, Sigmod::Map* map) :
GroupModel(parent, map, "Wild Lists")
{
for (int i = 0; i < map->wildListCount(); ++i)
addObject(map->wildList(i));
}
-Pokemodr::MapWildListGroupModel::~MapWildListGroupModel()
+Sigmodr::MapWildListGroupModel::~MapWildListGroupModel()
{
}
-QVariant Pokemodr::MapWildListGroupModel::data(const int role) const
+QVariant Sigmodr::MapWildListGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Wild List", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::MapWildListGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::MapWildListGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::MapWildListGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "MapWildList")
{
- addObject(qobject_cast<Pokemod::Map*>(m_object)->newWildList(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Map*>(m_object)->newWildList(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::MapWildListGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::MapWildListGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::MapWildListGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Map*>(m_object)->newWildList();
+ object = qobject_cast<Sigmod::Map*>(m_object)->newWildList();
if (object->className() == "MapWildList")
- m_objects.append(new MapWildListModel(this, qobject_cast<Pokemod::MapWildList*>(object)));
+ m_objects.append(new MapWildListModel(this, qobject_cast<Sigmod::MapWildList*>(object)));
}
-void Pokemodr::MapWildListGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::MapWildListGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Map*>(m_object)->deleteWildList(index);
+ qobject_cast<Sigmod::Map*>(m_object)->deleteWildList(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/MapWildListGroupModel.h b/sigmodr/models/MapWildListGroupModel.h
index f318ef1f..eb1c0931 100644
--- a/sigmodr/models/MapWildListGroupModel.h
+++ b/sigmodr/models/MapWildListGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPWILDLISTGROUPMODEL__
-#define __POKEMODR_MAPWILDLISTGROUPMODEL__
+#ifndef __SIGMODR_MAPWILDLISTGROUPMODEL__
+#define __SIGMODR_MAPWILDLISTGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Map;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapWildListGroupModel : public GroupModel
{
Q_OBJECT
public:
- MapWildListGroupModel(BaseModel* parent, Pokemod::Map* map);
+ MapWildListGroupModel(BaseModel* parent, Sigmod::Map* map);
~MapWildListGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/MapWildListModel.cpp b/sigmodr/models/MapWildListModel.cpp
index 23083643..37c4cc33 100644
--- a/sigmodr/models/MapWildListModel.cpp
+++ b/sigmodr/models/MapWildListModel.cpp
@@ -21,13 +21,13 @@
// Model includes
#include "MapWildListEncounterModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../MapWildListUI.h"
-// Pokemod includes
-#include "../../pokemod/Map.h"
-#include "../../pokemod/MapWildList.h"
-#include "../../pokemod/MapWildListEncounter.h"
+// Sigmod includes
+#include "../../sigmod/Map.h"
+#include "../../sigmod/MapWildList.h"
+#include "../../sigmod/MapWildListEncounter.h"
// Qt includes
#include <QtCore/QFile>
@@ -35,35 +35,35 @@
// KDE includes
#include <KMenu>
-Pokemodr::MapWildListModel::MapWildListModel(BaseModel* parent, Pokemod::MapWildList* wildList) :
+Sigmodr::MapWildListModel::MapWildListModel(BaseModel* parent, Sigmod::MapWildList* wildList) :
GroupObjectModel(parent, wildList)
{
setupData();
}
-Pokemodr::MapWildListModel::~MapWildListModel()
+Sigmodr::MapWildListModel::~MapWildListModel()
{
clearData();
}
-QVariant Pokemodr::MapWildListModel::data(int role) const
+QVariant Sigmodr::MapWildListModel::data(int role) const
{
if (role == Qt::DisplayRole)
{
- return qobject_cast<Pokemod::MapWildList*>(m_object)->name();
+ return qobject_cast<Sigmod::MapWildList*>(m_object)->name();
}
- else if (role == Pokemodr::BaseModel::XmlRole)
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new MapWildListUI(qobject_cast<Pokemod::MapWildList*>(m_object), NULL);
+ QWidget* widget = new MapWildListUI(qobject_cast<Sigmod::MapWildList*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Encounter", this, SLOT(addObject()));
@@ -71,36 +71,36 @@ QVariant Pokemodr::MapWildListModel::data(int role) const
menu->addAction("&Delete Wild List", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupObjectModel::data(role);
+ return Sigmodr::GroupObjectModel::data(role);
}
-void Pokemodr::MapWildListModel::addObject(Pokemod::Object* object)
+void Sigmodr::MapWildListModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::MapWildList*>(m_object)->newEncounter();
+ object = qobject_cast<Sigmod::MapWildList*>(m_object)->newEncounter();
if (object->className() == "MapWildListEncounter")
- m_objects.append(new MapWildListEncounterModel(this, qobject_cast<Pokemod::MapWildListEncounter*>(object)));
+ m_objects.append(new MapWildListEncounterModel(this, qobject_cast<Sigmod::MapWildListEncounter*>(object)));
}
-void Pokemodr::MapWildListModel::deleteObject(BaseModel* model)
+void Sigmodr::MapWildListModel::deleteObject(BaseModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::MapWildList*>(m_object)->deleteEncounter(index);
+ qobject_cast<Sigmod::MapWildList*>(m_object)->deleteEncounter(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
}
-void Pokemodr::MapWildListModel::deleteSelf()
+void Sigmodr::MapWildListModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
-bool Pokemodr::MapWildListModel::setData(const QVariant& value, int role)
+bool Sigmodr::MapWildListModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -117,7 +117,7 @@ bool Pokemodr::MapWildListModel::setData(const QVariant& value, int role)
}
else if (xml.doctype().name() == "MapWildListEncounter")
{
- addObject(qobject_cast<Pokemod::MapWildList*>(m_object)->newEncounter(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::MapWildList*>(m_object)->newEncounter(xml.documentElement()));
return true;
}
file.close();
@@ -127,9 +127,9 @@ bool Pokemodr::MapWildListModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::MapWildListModel::setupData()
+void Sigmodr::MapWildListModel::setupData()
{
- Pokemod::MapWildList* wildList = qobject_cast<Pokemod::MapWildList*>(m_object);
+ Sigmod::MapWildList* wildList = qobject_cast<Sigmod::MapWildList*>(m_object);
for (int i = 0; i < wildList->encounterCount(); ++i)
m_objects.append(new MapWildListEncounterModel(this, wildList->encounter(i)));
}
diff --git a/sigmodr/models/MapWildListModel.h b/sigmodr/models/MapWildListModel.h
index dbb924df..18f6d832 100644
--- a/sigmodr/models/MapWildListModel.h
+++ b/sigmodr/models/MapWildListModel.h
@@ -15,33 +15,33 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MAPWILDLISTMODEL__
-#define __POKEMODR_MAPWILDLISTMODEL__
+#ifndef __SIGMODR_MAPWILDLISTMODEL__
+#define __SIGMODR_MAPWILDLISTMODEL__
// Model includes
#include "GroupObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class MapWildList;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MapWildListModel : public GroupObjectModel
{
Q_OBJECT
public:
- MapWildListModel(BaseModel* parent, Pokemod::MapWildList* wildList);
+ MapWildListModel(BaseModel* parent, Sigmod::MapWildList* wildList);
~MapWildListModel();
QVariant data(int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseModel* model);
void deleteSelf();
diff --git a/sigmodr/models/MoveGroupModel.cpp b/sigmodr/models/MoveGroupModel.cpp
index 8071851a..5c037071 100644
--- a/sigmodr/models/MoveGroupModel.cpp
+++ b/sigmodr/models/MoveGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "MoveModel.h"
-// Pokemod includes
-#include "../../pokemod/Move.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Move.h"
+#include "../../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::MoveGroupModel::MoveGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Moves")
+Sigmodr::MoveGroupModel::MoveGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Moves")
{
- for (int i = 0; i < pokemod->moveCount(); ++i)
- addObject(pokemod->move(i));
+ for (int i = 0; i < sigmod->moveCount(); ++i)
+ addObject(sigmod->move(i));
}
-Pokemodr::MoveGroupModel::~MoveGroupModel()
+Sigmodr::MoveGroupModel::~MoveGroupModel()
{
}
-QVariant Pokemodr::MoveGroupModel::data(const int role) const
+QVariant Sigmodr::MoveGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Move", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::MoveGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::MoveGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::MoveGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Move")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newMove(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newMove(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::MoveGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::MoveGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::MoveGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newMove();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newMove();
if (object->className() == "Move")
- m_objects.append(new MoveModel(this, qobject_cast<Pokemod::Move*>(object)));
+ m_objects.append(new MoveModel(this, qobject_cast<Sigmod::Move*>(object)));
}
-void Pokemodr::MoveGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::MoveGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteMove(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteMove(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/MoveGroupModel.h b/sigmodr/models/MoveGroupModel.h
index 86ab98d2..f7510e79 100644
--- a/sigmodr/models/MoveGroupModel.h
+++ b/sigmodr/models/MoveGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MOVEGROUPMODEL__
-#define __POKEMODR_MOVEGROUPMODEL__
+#ifndef __SIGMODR_MOVEGROUPMODEL__
+#define __SIGMODR_MOVEGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MoveGroupModel : public GroupModel
{
Q_OBJECT
public:
- MoveGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ MoveGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~MoveGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/MoveModel.cpp b/sigmodr/models/MoveModel.cpp
index f333e0f6..3a9c3692 100644
--- a/sigmodr/models/MoveModel.cpp
+++ b/sigmodr/models/MoveModel.cpp
@@ -21,11 +21,11 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../MoveUI.h"
-// Pokemod includes
-#include "../../pokemod/Move.h"
+// Sigmod includes
+#include "../../sigmod/Move.h"
// Qt includes
#include <QtCore/QFile>
@@ -33,42 +33,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::MoveModel::MoveModel(BaseModel* parent, Pokemod::Move* move) :
+Sigmodr::MoveModel::MoveModel(BaseModel* parent, Sigmod::Move* move) :
ObjectModel(parent, move)
{
}
-Pokemodr::MoveModel::~MoveModel()
+Sigmodr::MoveModel::~MoveModel()
{
}
-QVariant Pokemodr::MoveModel::data(int role) const
+QVariant Sigmodr::MoveModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Move*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Move*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new MoveUI(qobject_cast<Pokemod::Move*>(m_object), NULL);
+ QWidget* widget = new MoveUI(qobject_cast<Sigmod::Move*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Move", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::MoveModel::setData(const QVariant& value, int role)
+bool Sigmodr::MoveModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -88,7 +88,7 @@ bool Pokemodr::MoveModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::MoveModel::deleteSelf()
+void Sigmodr::MoveModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/MoveModel.h b/sigmodr/models/MoveModel.h
index 19a00f79..df207a9d 100644
--- a/sigmodr/models/MoveModel.h
+++ b/sigmodr/models/MoveModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_MOVEMODEL__
-#define __POKEMODR_MOVEMODEL__
+#ifndef __SIGMODR_MOVEMODEL__
+#define __SIGMODR_MOVEMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Move;
}
-namespace Pokemodr
+namespace Sigmodr
{
class MoveModel : public ObjectModel
{
Q_OBJECT
public:
- MoveModel(BaseModel* parent, Pokemod::Move* move);
+ MoveModel(BaseModel* parent, Sigmod::Move* move);
~MoveModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/NatureGroupModel.cpp b/sigmodr/models/NatureGroupModel.cpp
index ebeb50e0..f9dac0b8 100644
--- a/sigmodr/models/NatureGroupModel.cpp
+++ b/sigmodr/models/NatureGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "NatureModel.h"
-// Pokemod includes
-#include "../../pokemod/Nature.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Nature.h"
+#include "../../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::NatureGroupModel::NatureGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Natures")
+Sigmodr::NatureGroupModel::NatureGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Natures")
{
- for (int i = 0; i < pokemod->natureCount(); ++i)
- addObject(pokemod->nature(i));
+ for (int i = 0; i < sigmod->natureCount(); ++i)
+ addObject(sigmod->nature(i));
}
-Pokemodr::NatureGroupModel::~NatureGroupModel()
+Sigmodr::NatureGroupModel::~NatureGroupModel()
{
}
-QVariant Pokemodr::NatureGroupModel::data(const int role) const
+QVariant Sigmodr::NatureGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Nature", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::NatureGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::NatureGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::NatureGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Nature")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newNature(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newNature(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::NatureGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::NatureGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::NatureGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newNature();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newNature();
if (object->className() == "Nature")
- m_objects.append(new NatureModel(this, qobject_cast<Pokemod::Nature*>(object)));
+ m_objects.append(new NatureModel(this, qobject_cast<Sigmod::Nature*>(object)));
}
-void Pokemodr::NatureGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::NatureGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteNature(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteNature(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/NatureGroupModel.h b/sigmodr/models/NatureGroupModel.h
index ba9411ff..1a7856e1 100644
--- a/sigmodr/models/NatureGroupModel.h
+++ b/sigmodr/models/NatureGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_NATUREGROUPMODEL__
-#define __POKEMODR_NATUREGROUPMODEL__
+#ifndef __SIGMODR_NATUREGROUPMODEL__
+#define __SIGMODR_NATUREGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class NatureGroupModel : public GroupModel
{
Q_OBJECT
public:
- NatureGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ NatureGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~NatureGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/NatureModel.cpp b/sigmodr/models/NatureModel.cpp
index e366bf58..23ba6f2a 100644
--- a/sigmodr/models/NatureModel.cpp
+++ b/sigmodr/models/NatureModel.cpp
@@ -21,12 +21,12 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../NatureUI.h"
-// Pokemod includes
-#include "../../pokemod/Nature.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Nature.h"
+#include "../../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QFile>
@@ -34,42 +34,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::NatureModel::NatureModel(BaseModel* parent, Pokemod::Nature* nature) :
+Sigmodr::NatureModel::NatureModel(BaseModel* parent, Sigmod::Nature* nature) :
ObjectModel(parent, nature)
{
}
-Pokemodr::NatureModel::~NatureModel()
+Sigmodr::NatureModel::~NatureModel()
{
}
-QVariant Pokemodr::NatureModel::data(int role) const
+QVariant Sigmodr::NatureModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Nature*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Nature*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new NatureUI(qobject_cast<Pokemod::Nature*>(m_object), NULL);
+ QWidget* widget = new NatureUI(qobject_cast<Sigmod::Nature*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Nature", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::NatureModel::setData(const QVariant& value, int role)
+bool Sigmodr::NatureModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -89,7 +89,7 @@ bool Pokemodr::NatureModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::NatureModel::deleteSelf()
+void Sigmodr::NatureModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/NatureModel.h b/sigmodr/models/NatureModel.h
index 8ec8425e..5b018943 100644
--- a/sigmodr/models/NatureModel.h
+++ b/sigmodr/models/NatureModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_NATUREMODEL__
-#define __POKEMODR_NATUREMODEL__
+#ifndef __SIGMODR_NATUREMODEL__
+#define __SIGMODR_NATUREMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Nature;
}
-namespace Pokemodr
+namespace Sigmodr
{
class NatureModel : public ObjectModel
{
Q_OBJECT
public:
- NatureModel(BaseModel* parent, Pokemod::Nature* nature);
+ NatureModel(BaseModel* parent, Sigmod::Nature* nature);
~NatureModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/ObjectModel.cpp b/sigmodr/models/ObjectModel.cpp
index 2bd29a06..585adf7f 100644
--- a/sigmodr/models/ObjectModel.cpp
+++ b/sigmodr/models/ObjectModel.cpp
@@ -18,26 +18,26 @@
// Header include
#include "ObjectModel.h"
-Pokemodr::ObjectModel::ObjectModel(BaseModel* parent, Pokemod::Object* object) :
+Sigmodr::ObjectModel::ObjectModel(BaseModel* parent, Sigmod::Object* object) :
BaseObjectModel(parent, object)
{
}
-Pokemodr::ObjectModel::~ObjectModel()
+Sigmodr::ObjectModel::~ObjectModel()
{
}
-int Pokemodr::ObjectModel::rowCount() const
+int Sigmodr::ObjectModel::rowCount() const
{
return 0;
}
-QVariant Pokemodr::ObjectModel::data(int role) const
+QVariant Sigmodr::ObjectModel::data(int role) const
{
- return Pokemodr::BaseObjectModel::data(role);
+ return Sigmodr::BaseObjectModel::data(role);
}
-Pokemodr::BaseModel* Pokemodr::ObjectModel::childItem(const int /*row*/)
+Sigmodr::BaseModel* Sigmodr::ObjectModel::childItem(const int /*row*/)
{
return NULL;
}
diff --git a/sigmodr/models/ObjectModel.h b/sigmodr/models/ObjectModel.h
index 9288d036..67473235 100644
--- a/sigmodr/models/ObjectModel.h
+++ b/sigmodr/models/ObjectModel.h
@@ -15,20 +15,20 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_OBJECTMODEL__
-#define __POKEMODR_OBJECTMODEL__
+#ifndef __SIGMODR_OBJECTMODEL__
+#define __SIGMODR_OBJECTMODEL__
// Model includes
#include "BaseObjectModel.h"
-namespace Pokemodr
+namespace Sigmodr
{
class ObjectModel : public BaseObjectModel
{
Q_OBJECT
public:
- ObjectModel(BaseModel* parent, Pokemod::Object* object);
+ ObjectModel(BaseModel* parent, Sigmod::Object* object);
virtual ~ObjectModel();
virtual QVariant data(int role = Qt::DisplayRole) const = 0;
diff --git a/sigmodr/models/RootModel.cpp b/sigmodr/models/RootModel.cpp
index 78c9c113..13031a9d 100644
--- a/sigmodr/models/RootModel.cpp
+++ b/sigmodr/models/RootModel.cpp
@@ -19,38 +19,38 @@
#include "RootModel.h"
// Model includes
-#include "PokemodModel.h"
+#include "SigmodModel.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
// Test code includes
#include <QtCore/QFile>
-Pokemodr::RootModel::RootModel() :
+Sigmodr::RootModel::RootModel() :
GroupModel(NULL, NULL)
{
}
-Pokemodr::RootModel::~RootModel()
+Sigmodr::RootModel::~RootModel()
{
}
-bool Pokemodr::RootModel::setData(const QVariant& /*value*/, int /*role = Qt::EditRole*/)
+bool Sigmodr::RootModel::setData(const QVariant& /*value*/, int /*role = Qt::EditRole*/)
{
return false;
}
-void Pokemodr::RootModel::addPokemod(Pokemod::Pokemod* pokemod)
+void Sigmodr::RootModel::addSigmod(Sigmod::Sigmod* sigmod)
{
- m_objects.append(new PokemodModel(this, pokemod));
+ m_objects.append(new SigmodModel(this, sigmod));
}
-void Pokemodr::RootModel::deletePokemod(const Pokemod::Pokemod* pokemod)
+void Sigmodr::RootModel::deleteSigmod(const Sigmod::Sigmod* sigmod)
{
for (int i = 0; i < m_objects.size(); ++i)
{
- if (m_objects[i]->object() == pokemod)
+ if (m_objects[i]->object() == sigmod)
{
delete m_objects[i];
m_objects.removeAt(i);
@@ -59,10 +59,10 @@ void Pokemodr::RootModel::deletePokemod(const Pokemod::Pokemod* pokemod)
}
}
-void Pokemodr::RootModel::addObject(Pokemod::Object* /*object*/)
+void Sigmodr::RootModel::addObject(Sigmod::Object* /*object*/)
{
}
-void Pokemodr::RootModel::deleteObject(BaseObjectModel* /*model*/)
+void Sigmodr::RootModel::deleteObject(BaseObjectModel* /*model*/)
{
}
diff --git a/sigmodr/models/RootModel.h b/sigmodr/models/RootModel.h
index b53f20da..06ffaf9d 100644
--- a/sigmodr/models/RootModel.h
+++ b/sigmodr/models/RootModel.h
@@ -15,17 +15,17 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_ROOTMODEL__
-#define __POKEMODR_ROOTMODEL__
+#ifndef __SIGMODR_ROOTMODEL__
+#define __SIGMODR_ROOTMODEL__
// Model includes
#include "GroupModel.h"
-#include "PokemodModel.h"
+#include "SigmodModel.h"
-namespace Pokemodr
+namespace Sigmodr
{
// Forward declarations
-class PokemodModel;
+class SigmodModel;
class RootModel : public GroupModel
{
@@ -37,10 +37,10 @@ class RootModel : public GroupModel
bool setData(const QVariant& /*value*/, int /*role = Qt::EditRole*/);
- void addPokemod(Pokemod::Pokemod* pokemod);
- void deletePokemod(const Pokemod::Pokemod* pokemod);
+ void addSigmod(Sigmod::Sigmod* sigmod);
+ void deleteSigmod(const Sigmod::Sigmod* sigmod);
public slots:
- void addObject(Pokemod::Object* /*object = NULL*/);
+ void addObject(Sigmod::Object* /*object = NULL*/);
void deleteObject(BaseObjectModel* /*model*/);
};
}
diff --git a/sigmodr/models/RulesModel.cpp b/sigmodr/models/RulesModel.cpp
index 48c6385a..00393775 100644
--- a/sigmodr/models/RulesModel.cpp
+++ b/sigmodr/models/RulesModel.cpp
@@ -18,11 +18,11 @@
// Header include
#include "RulesModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../RulesUI.h"
-// Pokemod includes
-#include "../../pokemod/Rules.h"
+// Sigmod includes
+#include "../../sigmod/Rules.h"
// Qt includes
#include <QtCore/QFile>
@@ -30,41 +30,41 @@
// KDE includes
#include <KMenu>
-Pokemodr::RulesModel::RulesModel(BaseModel* parent, Pokemod::Rules* rules) :
+Sigmodr::RulesModel::RulesModel(BaseModel* parent, Sigmod::Rules* rules) :
ObjectModel(parent, rules)
{
}
-Pokemodr::RulesModel::~RulesModel()
+Sigmodr::RulesModel::~RulesModel()
{
}
-QVariant Pokemodr::RulesModel::data(int role) const
+QVariant Sigmodr::RulesModel::data(int role) const
{
if (role == Qt::DisplayRole)
return m_object->className();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new RulesUI(qobject_cast<Pokemod::Rules*>(m_object), NULL);
+ QWidget* widget = new RulesUI(qobject_cast<Sigmod::Rules*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::RulesModel::setData(const QVariant& value, int role)
+bool Sigmodr::RulesModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -84,6 +84,6 @@ bool Pokemodr::RulesModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::RulesModel::deleteSelf()
+void Sigmodr::RulesModel::deleteSelf()
{
}
diff --git a/sigmodr/models/RulesModel.h b/sigmodr/models/RulesModel.h
index 47a9291b..53f7bfb9 100644
--- a/sigmodr/models/RulesModel.h
+++ b/sigmodr/models/RulesModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_RULESMODEL__
-#define __POKEMODR_RULESMODEL__
+#ifndef __SIGMODR_RULESMODEL__
+#define __SIGMODR_RULESMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Rules;
}
-namespace Pokemodr
+namespace Sigmodr
{
class RulesModel : public ObjectModel
{
Q_OBJECT
public:
- RulesModel(BaseModel* parent, Pokemod::Rules* rules);
+ RulesModel(BaseModel* parent, Sigmod::Rules* rules);
~RulesModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/PokemodModel.cpp b/sigmodr/models/SigmodModel.cpp
index f2c833ce..a1f43718 100644
--- a/sigmodr/models/PokemodModel.cpp
+++ b/sigmodr/models/SigmodModel.cpp
@@ -16,7 +16,7 @@
*/
// Header include
-#include "PokemodModel.h"
+#include "SigmodModel.h"
// Model includes
#include "AbilityGroupModel.h"
@@ -43,11 +43,11 @@
#include "TypeGroupModel.h"
#include "WeatherGroupModel.h"
-// Pokemodr includes
-#include "../PokemodUI.h"
+// Sigmodr includes
+#include "../SigmodUI.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QFile>
@@ -55,43 +55,43 @@
// KDE includes
#include <KMenu>
-Pokemodr::PokemodModel::PokemodModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupObjectModel(parent, pokemod)
+Sigmodr::SigmodModel::SigmodModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupObjectModel(parent, sigmod)
{
setupData();
}
-Pokemodr::PokemodModel::~PokemodModel()
+Sigmodr::SigmodModel::~SigmodModel()
{
clearData();
}
-QVariant Pokemodr::PokemodModel::data(int role) const
+QVariant Sigmodr::SigmodModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Pokemod*>(m_object)->title();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Sigmod*>(m_object)->title();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new PokemodUI(qobject_cast<Pokemod::Pokemod*>(m_object), NULL);
+ QWidget* widget = new SigmodUI(qobject_cast<Sigmod::Sigmod*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupObjectModel::data(role);
+ return Sigmodr::GroupObjectModel::data(role);
}
-bool Pokemodr::PokemodModel::setData(const QVariant& value, int role)
+bool Sigmodr::SigmodModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -108,7 +108,7 @@ bool Pokemodr::PokemodModel::setData(const QVariant& value, int role)
}
else if (xml.doctype().name() == "Rules")
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->setRules(xml.documentElement());
+ qobject_cast<Sigmod::Sigmod*>(m_object)->setRules(xml.documentElement());
return true;
}
file.close();
@@ -118,42 +118,42 @@ bool Pokemodr::PokemodModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::PokemodModel::addObject(Pokemod::Object* /*object*/)
+void Sigmodr::SigmodModel::addObject(Sigmod::Object* /*object*/)
{
}
-void Pokemodr::PokemodModel::deleteObject(BaseModel* /*model*/)
+void Sigmodr::SigmodModel::deleteObject(BaseModel* /*model*/)
{
}
-void Pokemodr::PokemodModel::deleteSelf()
+void Sigmodr::SigmodModel::deleteSelf()
{
}
-void Pokemodr::PokemodModel::setupData()
+void Sigmodr::SigmodModel::setupData()
{
- Pokemod::Pokemod* pokemod = qobject_cast<Pokemod::Pokemod*>(m_object);
- m_objects.append(new RulesModel(this, pokemod->rules()));
- m_objects.append(new AbilityGroupModel(this, pokemod));
- m_objects.append(new AuthorGroupModel(this, pokemod));
- m_objects.append(new BadgeGroupModel(this, pokemod));
- m_objects.append(new CoinListGroupModel(this, pokemod));
- m_objects.append(new EggGroupGroupModel(this, pokemod));
- m_objects.append(new GlobalScriptGroupModel(this, pokemod));
- m_objects.append(new ItemGroupModel(this, pokemod));
- m_objects.append(new ItemTypeGroupModel(this, pokemod));
- m_objects.append(new MapGroupModel(this, pokemod));
- m_objects.append(new MoveGroupModel(this, pokemod));
- m_objects.append(new NatureGroupModel(this, pokemod));
- m_objects.append(new SkinGroupModel(this, pokemod));
- m_objects.append(new SoundGroupModel(this, pokemod));
- m_objects.append(new SpeciesGroupModel(this, pokemod));
- m_objects.append(new SpriteGroupModel(this, pokemod));
- m_objects.append(new StatusGroupModel(this, pokemod));
- m_objects.append(new StoreGroupModel(this, pokemod));
- m_objects.append(new TileGroupModel(this, pokemod));
- m_objects.append(new TimeGroupModel(this, pokemod));
- m_objects.append(new TrainerGroupModel(this, pokemod));
- m_objects.append(new TypeGroupModel(this, pokemod));
- m_objects.append(new WeatherGroupModel(this, pokemod));
+ Sigmod::Sigmod* sigmod = qobject_cast<Sigmod::Sigmod*>(m_object);
+ m_objects.append(new RulesModel(this, sigmod->rules()));
+ m_objects.append(new AbilityGroupModel(this, sigmod));
+ m_objects.append(new AuthorGroupModel(this, sigmod));
+ m_objects.append(new BadgeGroupModel(this, sigmod));
+ m_objects.append(new CoinListGroupModel(this, sigmod));
+ m_objects.append(new EggGroupGroupModel(this, sigmod));
+ m_objects.append(new GlobalScriptGroupModel(this, sigmod));
+ m_objects.append(new ItemGroupModel(this, sigmod));
+ m_objects.append(new ItemTypeGroupModel(this, sigmod));
+ m_objects.append(new MapGroupModel(this, sigmod));
+ m_objects.append(new MoveGroupModel(this, sigmod));
+ m_objects.append(new NatureGroupModel(this, sigmod));
+ m_objects.append(new SkinGroupModel(this, sigmod));
+ m_objects.append(new SoundGroupModel(this, sigmod));
+ m_objects.append(new SpeciesGroupModel(this, sigmod));
+ m_objects.append(new SpriteGroupModel(this, sigmod));
+ m_objects.append(new StatusGroupModel(this, sigmod));
+ m_objects.append(new StoreGroupModel(this, sigmod));
+ m_objects.append(new TileGroupModel(this, sigmod));
+ m_objects.append(new TimeGroupModel(this, sigmod));
+ m_objects.append(new TrainerGroupModel(this, sigmod));
+ m_objects.append(new TypeGroupModel(this, sigmod));
+ m_objects.append(new WeatherGroupModel(this, sigmod));
}
diff --git a/sigmodr/models/PokemodModel.h b/sigmodr/models/SigmodModel.h
index a7f461da..01cbc60c 100644
--- a/sigmodr/models/PokemodModel.h
+++ b/sigmodr/models/SigmodModel.h
@@ -15,33 +15,33 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_POKEMODMODEL__
-#define __POKEMODR_POKEMODMODEL__
+#ifndef __SIGMODR_SIGMODMODEL__
+#define __SIGMODR_SIGMODMODEL__
// Model includes
#include "GroupObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
-class PokemodModel : public GroupObjectModel
+class SigmodModel : public GroupObjectModel
{
Q_OBJECT
public:
- PokemodModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
- ~PokemodModel();
+ SigmodModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
+ ~SigmodModel();
QVariant data(int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* /*object = NULL*/);
+ void addObject(Sigmod::Object* /*object = NULL*/);
void deleteObject(BaseModel* /*model*/);
void deleteSelf();
diff --git a/sigmodr/models/SkinGroupModel.cpp b/sigmodr/models/SkinGroupModel.cpp
index cbff59e5..d2556575 100644
--- a/sigmodr/models/SkinGroupModel.cpp
+++ b/sigmodr/models/SkinGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "SkinModel.h"
-// Pokemod includes
-#include "../../pokemod/Skin.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Skin.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::SkinGroupModel::SkinGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Skins")
+Sigmodr::SkinGroupModel::SkinGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Skins")
{
- for (int i = 0; i < pokemod->skinCount(); ++i)
- addObject(pokemod->skin(i));
+ for (int i = 0; i < sigmod->skinCount(); ++i)
+ addObject(sigmod->skin(i));
}
-Pokemodr::SkinGroupModel::~SkinGroupModel()
+Sigmodr::SkinGroupModel::~SkinGroupModel()
{
}
-QVariant Pokemodr::SkinGroupModel::data(const int role) const
+QVariant Sigmodr::SkinGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Skin", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::SkinGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::SkinGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::SkinGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Skin")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newSkin(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newSkin(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::SkinGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::SkinGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::SkinGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newSkin();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newSkin();
if (object->className() == "Skin")
- m_objects.append(new SkinModel(this, qobject_cast<Pokemod::Skin*>(object)));
+ m_objects.append(new SkinModel(this, qobject_cast<Sigmod::Skin*>(object)));
}
-void Pokemodr::SkinGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::SkinGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteSkin(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteSkin(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/SkinGroupModel.h b/sigmodr/models/SkinGroupModel.h
index 8655f4ed..d15bcb50 100644
--- a/sigmodr/models/SkinGroupModel.h
+++ b/sigmodr/models/SkinGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SKINGROUPMODEL__
-#define __POKEMODR_SKINGROUPMODEL__
+#ifndef __SIGMODR_SKINGROUPMODEL__
+#define __SIGMODR_SKINGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SkinGroupModel : public GroupModel
{
Q_OBJECT
public:
- SkinGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ SkinGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~SkinGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/SkinModel.cpp b/sigmodr/models/SkinModel.cpp
index c97289e4..cd216931 100644
--- a/sigmodr/models/SkinModel.cpp
+++ b/sigmodr/models/SkinModel.cpp
@@ -21,11 +21,11 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../SkinUI.h"
-// Pokemod includes
-#include "../../pokemod/Skin.h"
+// Sigmod includes
+#include "../../sigmod/Skin.h"
// Qt includes
#include <QtCore/QFile>
@@ -33,42 +33,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::SkinModel::SkinModel(BaseModel* parent, Pokemod::Skin* skin) :
+Sigmodr::SkinModel::SkinModel(BaseModel* parent, Sigmod::Skin* skin) :
ObjectModel(parent, skin)
{
}
-Pokemodr::SkinModel::~SkinModel()
+Sigmodr::SkinModel::~SkinModel()
{
}
-QVariant Pokemodr::SkinModel::data(int role) const
+QVariant Sigmodr::SkinModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Skin*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Skin*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new SkinUI(qobject_cast<Pokemod::Skin*>(m_object), NULL);
+ QWidget* widget = new SkinUI(qobject_cast<Sigmod::Skin*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Skin", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::SkinModel::setData(const QVariant& value, int role)
+bool Sigmodr::SkinModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -88,7 +88,7 @@ bool Pokemodr::SkinModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::SkinModel::deleteSelf()
+void Sigmodr::SkinModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/SkinModel.h b/sigmodr/models/SkinModel.h
index 4132b708..47d96ee9 100644
--- a/sigmodr/models/SkinModel.h
+++ b/sigmodr/models/SkinModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SKINMODEL__
-#define __POKEMODR_SKINMODEL__
+#ifndef __SIGMODR_SKINMODEL__
+#define __SIGMODR_SKINMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Skin;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SkinModel : public ObjectModel
{
Q_OBJECT
public:
- SkinModel(BaseModel* parent, Pokemod::Skin* skin);
+ SkinModel(BaseModel* parent, Sigmod::Skin* skin);
~SkinModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/SoundGroupModel.cpp b/sigmodr/models/SoundGroupModel.cpp
index 252ed4da..1f755029 100644
--- a/sigmodr/models/SoundGroupModel.cpp
+++ b/sigmodr/models/SoundGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "SoundModel.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Sound.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Sound.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::SoundGroupModel::SoundGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Sounds")
+Sigmodr::SoundGroupModel::SoundGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Sounds")
{
- for (int i = 0; i < pokemod->soundCount(); ++i)
- addObject(pokemod->sound(i));
+ for (int i = 0; i < sigmod->soundCount(); ++i)
+ addObject(sigmod->sound(i));
}
-Pokemodr::SoundGroupModel::~SoundGroupModel()
+Sigmodr::SoundGroupModel::~SoundGroupModel()
{
}
-QVariant Pokemodr::SoundGroupModel::data(const int role) const
+QVariant Sigmodr::SoundGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Sound", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::SoundGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::SoundGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::SoundGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Sound")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newSound(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newSound(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::SoundGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::SoundGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::SoundGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newSound();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newSound();
if (object->className() == "Sound")
- m_objects.append(new SoundModel(this, qobject_cast<Pokemod::Sound*>(object)));
+ m_objects.append(new SoundModel(this, qobject_cast<Sigmod::Sound*>(object)));
}
-void Pokemodr::SoundGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::SoundGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteSound(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteSound(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/SoundGroupModel.h b/sigmodr/models/SoundGroupModel.h
index f52d4bc7..f7969c50 100644
--- a/sigmodr/models/SoundGroupModel.h
+++ b/sigmodr/models/SoundGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SOUNDGROUPMODEL__
-#define __POKEMODR_SOUNDGROUPMODEL__
+#ifndef __SIGMODR_SOUNDGROUPMODEL__
+#define __SIGMODR_SOUNDGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SoundGroupModel : public GroupModel
{
Q_OBJECT
public:
- SoundGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ SoundGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~SoundGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/SoundModel.cpp b/sigmodr/models/SoundModel.cpp
index 3c2a6fc4..ef447018 100644
--- a/sigmodr/models/SoundModel.cpp
+++ b/sigmodr/models/SoundModel.cpp
@@ -21,12 +21,12 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../SoundUI.h"
-// Pokemod includes
-#include "../../pokemod/Sound.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Sound.h"
+#include "../../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QFile>
@@ -34,42 +34,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::SoundModel::SoundModel(BaseModel* parent, Pokemod::Sound* sound) :
+Sigmodr::SoundModel::SoundModel(BaseModel* parent, Sigmod::Sound* sound) :
ObjectModel(parent, sound)
{
}
-Pokemodr::SoundModel::~SoundModel()
+Sigmodr::SoundModel::~SoundModel()
{
}
-QVariant Pokemodr::SoundModel::data(int role) const
+QVariant Sigmodr::SoundModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Sound*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Sound*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new SoundUI(qobject_cast<Pokemod::Sound*>(m_object), NULL);
+ QWidget* widget = new SoundUI(qobject_cast<Sigmod::Sound*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Sound", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::SoundModel::setData(const QVariant& value, int role)
+bool Sigmodr::SoundModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -89,7 +89,7 @@ bool Pokemodr::SoundModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::SoundModel::deleteSelf()
+void Sigmodr::SoundModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/SoundModel.h b/sigmodr/models/SoundModel.h
index 01720b3a..81ecfd02 100644
--- a/sigmodr/models/SoundModel.h
+++ b/sigmodr/models/SoundModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SOUNDMODEL__
-#define __POKEMODR_SOUNDMODEL__
+#ifndef __SIGMODR_SOUNDMODEL__
+#define __SIGMODR_SOUNDMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Sound;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SoundModel : public ObjectModel
{
Q_OBJECT
public:
- SoundModel(BaseModel* parent, Pokemod::Sound* nature);
+ SoundModel(BaseModel* parent, Sigmod::Sound* nature);
~SoundModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/SpeciesAbilityGroupModel.cpp b/sigmodr/models/SpeciesAbilityGroupModel.cpp
index 1368beaa..575c0248 100644
--- a/sigmodr/models/SpeciesAbilityGroupModel.cpp
+++ b/sigmodr/models/SpeciesAbilityGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "SpeciesAbilityModel.h"
-// Pokemod includes
-#include "../../pokemod/Species.h"
-#include "../../pokemod/SpeciesAbility.h"
+// Sigmod includes
+#include "../../sigmod/Species.h"
+#include "../../sigmod/SpeciesAbility.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::SpeciesAbilityGroupModel::SpeciesAbilityGroupModel(BaseModel* parent, Pokemod::Species* species) :
+Sigmodr::SpeciesAbilityGroupModel::SpeciesAbilityGroupModel(BaseModel* parent, Sigmod::Species* species) :
GroupModel(parent, species, "Abilities")
{
for (int i = 0; i < species->abilityCount(); ++i)
addObject(species->ability(i));
}
-Pokemodr::SpeciesAbilityGroupModel::~SpeciesAbilityGroupModel()
+Sigmodr::SpeciesAbilityGroupModel::~SpeciesAbilityGroupModel()
{
}
-QVariant Pokemodr::SpeciesAbilityGroupModel::data(const int role) const
+QVariant Sigmodr::SpeciesAbilityGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Ability", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::SpeciesAbilityGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::SpeciesAbilityGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::SpeciesAbilityGroupModel::setData(const QVariant& value, int role
{
if (xml.doctype().name() == "SpeciesAbility")
{
- addObject(qobject_cast<Pokemod::Species*>(m_object)->newAbility(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Species*>(m_object)->newAbility(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::SpeciesAbilityGroupModel::setData(const QVariant& value, int role
return false;
}
-void Pokemodr::SpeciesAbilityGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::SpeciesAbilityGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Species*>(m_object)->newAbility();
+ object = qobject_cast<Sigmod::Species*>(m_object)->newAbility();
if (object->className() == "SpeciesAbility")
- m_objects.append(new SpeciesAbilityModel(this, qobject_cast<Pokemod::SpeciesAbility*>(object)));
+ m_objects.append(new SpeciesAbilityModel(this, qobject_cast<Sigmod::SpeciesAbility*>(object)));
}
-void Pokemodr::SpeciesAbilityGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::SpeciesAbilityGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Species*>(m_object)->deleteAbility(index);
+ qobject_cast<Sigmod::Species*>(m_object)->deleteAbility(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/SpeciesAbilityGroupModel.h b/sigmodr/models/SpeciesAbilityGroupModel.h
index 99936a44..890042fa 100644
--- a/sigmodr/models/SpeciesAbilityGroupModel.h
+++ b/sigmodr/models/SpeciesAbilityGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPECIESABILITYGROUPMODEL__
-#define __POKEMODR_SPECIESABILITYGROUPMODEL__
+#ifndef __SIGMODR_SPECIESABILITYGROUPMODEL__
+#define __SIGMODR_SPECIESABILITYGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Species;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpeciesAbilityGroupModel : public GroupModel
{
Q_OBJECT
public:
- SpeciesAbilityGroupModel(BaseModel* parent, Pokemod::Species* species);
+ SpeciesAbilityGroupModel(BaseModel* parent, Sigmod::Species* species);
~SpeciesAbilityGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/SpeciesAbilityModel.cpp b/sigmodr/models/SpeciesAbilityModel.cpp
index 5065df5f..5846c7e9 100644
--- a/sigmodr/models/SpeciesAbilityModel.cpp
+++ b/sigmodr/models/SpeciesAbilityModel.cpp
@@ -21,14 +21,14 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../SpeciesAbilityUI.h"
-// Pokemod includes
-#include "../../pokemod/Ability.h"
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Species.h"
-#include "../../pokemod/SpeciesAbility.h"
+// Sigmod includes
+#include "../../sigmod/Ability.h"
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Species.h"
+#include "../../sigmod/SpeciesAbility.h"
// Qt includes
#include <QtCore/QFile>
@@ -36,47 +36,47 @@
// KDE includes
#include <KMenu>
-Pokemodr::SpeciesAbilityModel::SpeciesAbilityModel(BaseModel* parent, Pokemod::SpeciesAbility* ability) :
+Sigmodr::SpeciesAbilityModel::SpeciesAbilityModel(BaseModel* parent, Sigmod::SpeciesAbility* ability) :
ObjectModel(parent, ability)
{
}
-Pokemodr::SpeciesAbilityModel::~SpeciesAbilityModel()
+Sigmodr::SpeciesAbilityModel::~SpeciesAbilityModel()
{
}
-QVariant Pokemodr::SpeciesAbilityModel::data(int role) const
+QVariant Sigmodr::SpeciesAbilityModel::data(int role) const
{
if (role == Qt::DisplayRole)
{
- const int index = qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->abilityIndex(qobject_cast<Pokemod::SpeciesAbility*>(m_object)->ability());
+ const int index = qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->abilityIndex(qobject_cast<Sigmod::SpeciesAbility*>(m_object)->ability());
if (index != INT_MAX)
- return qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->ability(index)->name();
+ return qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->ability(index)->name();
return "";
}
- else if (role == Pokemodr::BaseModel::XmlRole)
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new SpeciesAbilityUI(qobject_cast<Pokemod::SpeciesAbility*>(m_object), NULL);
+ QWidget* widget = new SpeciesAbilityUI(qobject_cast<Sigmod::SpeciesAbility*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Ability", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::SpeciesAbilityModel::setData(const QVariant& value, int role)
+bool Sigmodr::SpeciesAbilityModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -96,7 +96,7 @@ bool Pokemodr::SpeciesAbilityModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::SpeciesAbilityModel::deleteSelf()
+void Sigmodr::SpeciesAbilityModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/SpeciesAbilityModel.h b/sigmodr/models/SpeciesAbilityModel.h
index cdf04eae..b55c81bb 100644
--- a/sigmodr/models/SpeciesAbilityModel.h
+++ b/sigmodr/models/SpeciesAbilityModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPECIESABILITYMODEL__
-#define __POKEMODR_SPECIESABILITYMODEL__
+#ifndef __SIGMODR_SPECIESABILITYMODEL__
+#define __SIGMODR_SPECIESABILITYMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class SpeciesAbility;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpeciesAbilityModel : public ObjectModel
{
Q_OBJECT
public:
- SpeciesAbilityModel(BaseModel* parent, Pokemod::SpeciesAbility* ability);
+ SpeciesAbilityModel(BaseModel* parent, Sigmod::SpeciesAbility* ability);
~SpeciesAbilityModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/SpeciesGroupModel.cpp b/sigmodr/models/SpeciesGroupModel.cpp
index d91ee57a..0e928c81 100644
--- a/sigmodr/models/SpeciesGroupModel.cpp
+++ b/sigmodr/models/SpeciesGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "SpeciesModel.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Species.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Species.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::SpeciesGroupModel::SpeciesGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Species")
+Sigmodr::SpeciesGroupModel::SpeciesGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Species")
{
- for (int i = 0; i < pokemod->speciesCount(); ++i)
- addObject(pokemod->species(i));
+ for (int i = 0; i < sigmod->speciesCount(); ++i)
+ addObject(sigmod->species(i));
}
-Pokemodr::SpeciesGroupModel::~SpeciesGroupModel()
+Sigmodr::SpeciesGroupModel::~SpeciesGroupModel()
{
}
-QVariant Pokemodr::SpeciesGroupModel::data(const int role) const
+QVariant Sigmodr::SpeciesGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Species", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::SpeciesGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::SpeciesGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::SpeciesGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Species")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newSpecies(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newSpecies(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::SpeciesGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::SpeciesGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::SpeciesGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newSpecies();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newSpecies();
if (object->className() == "Species")
- m_objects.append(new SpeciesModel(this, qobject_cast<Pokemod::Species*>(object)));
+ m_objects.append(new SpeciesModel(this, qobject_cast<Sigmod::Species*>(object)));
}
-void Pokemodr::SpeciesGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::SpeciesGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteSpecies(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteSpecies(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/SpeciesGroupModel.h b/sigmodr/models/SpeciesGroupModel.h
index 98ec4c6f..0b003a18 100644
--- a/sigmodr/models/SpeciesGroupModel.h
+++ b/sigmodr/models/SpeciesGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPECIESGROUPMODEL__
-#define __POKEMODR_SPECIESGROUPMODEL__
+#ifndef __SIGMODR_SPECIESGROUPMODEL__
+#define __SIGMODR_SPECIESGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpeciesGroupModel : public GroupModel
{
Q_OBJECT
public:
- SpeciesGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ SpeciesGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~SpeciesGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/SpeciesItemGroupModel.cpp b/sigmodr/models/SpeciesItemGroupModel.cpp
index 78696e66..c81972c6 100644
--- a/sigmodr/models/SpeciesItemGroupModel.cpp
+++ b/sigmodr/models/SpeciesItemGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "SpeciesItemModel.h"
-// Pokemod includes
-#include "../../pokemod/Species.h"
-#include "../../pokemod/SpeciesItem.h"
+// Sigmod includes
+#include "../../sigmod/Species.h"
+#include "../../sigmod/SpeciesItem.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::SpeciesItemGroupModel::SpeciesItemGroupModel(BaseModel* parent, Pokemod::Species* species) :
+Sigmodr::SpeciesItemGroupModel::SpeciesItemGroupModel(BaseModel* parent, Sigmod::Species* species) :
GroupModel(parent, species, "Items")
{
for (int i = 0; i < species->itemCount(); ++i)
addObject(species->item(i));
}
-Pokemodr::SpeciesItemGroupModel::~SpeciesItemGroupModel()
+Sigmodr::SpeciesItemGroupModel::~SpeciesItemGroupModel()
{
}
-QVariant Pokemodr::SpeciesItemGroupModel::data(const int role) const
+QVariant Sigmodr::SpeciesItemGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Item", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::SpeciesItemGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::SpeciesItemGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::SpeciesItemGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "SpeciesItem")
{
- addObject(qobject_cast<Pokemod::Species*>(m_object)->newItem(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Species*>(m_object)->newItem(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::SpeciesItemGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::SpeciesItemGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::SpeciesItemGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Species*>(m_object)->newItem();
+ object = qobject_cast<Sigmod::Species*>(m_object)->newItem();
if (object->className() == "SpeciesItem")
- m_objects.append(new SpeciesItemModel(this, qobject_cast<Pokemod::SpeciesItem*>(object)));
+ m_objects.append(new SpeciesItemModel(this, qobject_cast<Sigmod::SpeciesItem*>(object)));
}
-void Pokemodr::SpeciesItemGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::SpeciesItemGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Species*>(m_object)->deleteItem(index);
+ qobject_cast<Sigmod::Species*>(m_object)->deleteItem(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/SpeciesItemGroupModel.h b/sigmodr/models/SpeciesItemGroupModel.h
index fb754ce7..340882c9 100644
--- a/sigmodr/models/SpeciesItemGroupModel.h
+++ b/sigmodr/models/SpeciesItemGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPECIESITEMGROUPMODEL__
-#define __POKEMODR_SPECIESITEMGROUPMODEL__
+#ifndef __SIGMODR_SPECIESITEMGROUPMODEL__
+#define __SIGMODR_SPECIESITEMGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Species;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpeciesItemGroupModel : public GroupModel
{
Q_OBJECT
public:
- SpeciesItemGroupModel(BaseModel* parent, Pokemod::Species* species);
+ SpeciesItemGroupModel(BaseModel* parent, Sigmod::Species* species);
~SpeciesItemGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/SpeciesItemModel.cpp b/sigmodr/models/SpeciesItemModel.cpp
index c10fbb22..e9f076eb 100644
--- a/sigmodr/models/SpeciesItemModel.cpp
+++ b/sigmodr/models/SpeciesItemModel.cpp
@@ -21,14 +21,14 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../SpeciesItemUI.h"
-// Pokemod includes
-#include "../../pokemod/Item.h"
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Species.h"
-#include "../../pokemod/SpeciesItem.h"
+// Sigmod includes
+#include "../../sigmod/Item.h"
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Species.h"
+#include "../../sigmod/SpeciesItem.h"
// Qt includes
#include <QtCore/QFile>
@@ -36,47 +36,47 @@
// KDE includes
#include <KMenu>
-Pokemodr::SpeciesItemModel::SpeciesItemModel(BaseModel* parent, Pokemod::SpeciesItem* item) :
+Sigmodr::SpeciesItemModel::SpeciesItemModel(BaseModel* parent, Sigmod::SpeciesItem* item) :
ObjectModel(parent, item)
{
}
-Pokemodr::SpeciesItemModel::~SpeciesItemModel()
+Sigmodr::SpeciesItemModel::~SpeciesItemModel()
{
}
-QVariant Pokemodr::SpeciesItemModel::data(int role) const
+QVariant Sigmodr::SpeciesItemModel::data(int role) const
{
if (role == Qt::DisplayRole)
{
- const int index = qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->itemIndex(qobject_cast<Pokemod::SpeciesItem*>(m_object)->item());
+ const int index = qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->itemIndex(qobject_cast<Sigmod::SpeciesItem*>(m_object)->item());
if (index != INT_MAX)
- return qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->item(index)->name();
+ return qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->item(index)->name();
return "";
}
- else if (role == Pokemodr::BaseModel::XmlRole)
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new SpeciesItemUI(qobject_cast<Pokemod::SpeciesItem*>(m_object), NULL);
+ QWidget* widget = new SpeciesItemUI(qobject_cast<Sigmod::SpeciesItem*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Item", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::SpeciesItemModel::setData(const QVariant& value, int role)
+bool Sigmodr::SpeciesItemModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -96,7 +96,7 @@ bool Pokemodr::SpeciesItemModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::SpeciesItemModel::deleteSelf()
+void Sigmodr::SpeciesItemModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/SpeciesItemModel.h b/sigmodr/models/SpeciesItemModel.h
index bf8b5a4e..c0c815a7 100644
--- a/sigmodr/models/SpeciesItemModel.h
+++ b/sigmodr/models/SpeciesItemModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPECIESITEMMODEL__
-#define __POKEMODR_SPECIESITEMMODEL__
+#ifndef __SIGMODR_SPECIESITEMMODEL__
+#define __SIGMODR_SPECIESITEMMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class SpeciesItem;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpeciesItemModel : public ObjectModel
{
Q_OBJECT
public:
- SpeciesItemModel(BaseModel* parent, Pokemod::SpeciesItem* item);
+ SpeciesItemModel(BaseModel* parent, Sigmod::SpeciesItem* item);
~SpeciesItemModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/SpeciesModel.cpp b/sigmodr/models/SpeciesModel.cpp
index 61d33508..d74a22c3 100644
--- a/sigmodr/models/SpeciesModel.cpp
+++ b/sigmodr/models/SpeciesModel.cpp
@@ -23,12 +23,12 @@
#include "SpeciesItemGroupModel.h"
#include "SpeciesMoveGroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../SpeciesUI.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Species.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Species.h"
// Qt includes
#include <QtCore/QFile>
@@ -36,44 +36,44 @@
// KDE includes
#include <KMenu>
-Pokemodr::SpeciesModel::SpeciesModel(BaseModel* parent, Pokemod::Species* species) :
+Sigmodr::SpeciesModel::SpeciesModel(BaseModel* parent, Sigmod::Species* species) :
GroupObjectModel(parent, species)
{
setupData();
}
-Pokemodr::SpeciesModel::~SpeciesModel()
+Sigmodr::SpeciesModel::~SpeciesModel()
{
clearData();
}
-QVariant Pokemodr::SpeciesModel::data(int role) const
+QVariant Sigmodr::SpeciesModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Species*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Species*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new SpeciesUI(qobject_cast<Pokemod::Species*>(m_object), NULL);
+ QWidget* widget = new SpeciesUI(qobject_cast<Sigmod::Species*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Species", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupObjectModel::data(role);
+ return Sigmodr::GroupObjectModel::data(role);
}
-bool Pokemodr::SpeciesModel::setData(const QVariant& value, int role)
+bool Sigmodr::SpeciesModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -95,22 +95,22 @@ bool Pokemodr::SpeciesModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::SpeciesModel::addObject(Pokemod::Object* /*object*/)
+void Sigmodr::SpeciesModel::addObject(Sigmod::Object* /*object*/)
{
}
-void Pokemodr::SpeciesModel::deleteObject(BaseModel* /*model*/)
+void Sigmodr::SpeciesModel::deleteObject(BaseModel* /*model*/)
{
}
-void Pokemodr::SpeciesModel::deleteSelf()
+void Sigmodr::SpeciesModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
-void Pokemodr::SpeciesModel::setupData()
+void Sigmodr::SpeciesModel::setupData()
{
- Pokemod::Species* species = qobject_cast<Pokemod::Species*>(m_object);
+ Sigmod::Species* species = qobject_cast<Sigmod::Species*>(m_object);
m_objects.append(new SpeciesAbilityGroupModel(this, species));
m_objects.append(new SpeciesItemGroupModel(this, species));
m_objects.append(new SpeciesMoveGroupModel(this, species));
diff --git a/sigmodr/models/SpeciesModel.h b/sigmodr/models/SpeciesModel.h
index 26094398..42ca6890 100644
--- a/sigmodr/models/SpeciesModel.h
+++ b/sigmodr/models/SpeciesModel.h
@@ -15,33 +15,33 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPECIESMODEL__
-#define __POKEMODR_SPECIESMODEL__
+#ifndef __SIGMODR_SPECIESMODEL__
+#define __SIGMODR_SPECIESMODEL__
// Model includes
#include "GroupObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Species;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpeciesModel : public GroupObjectModel
{
Q_OBJECT
public:
- SpeciesModel(BaseModel* parent, Pokemod::Species* species);
+ SpeciesModel(BaseModel* parent, Sigmod::Species* species);
~SpeciesModel();
QVariant data(int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* /*object = NULL*/);
+ void addObject(Sigmod::Object* /*object = NULL*/);
void deleteObject(BaseModel* /*model*/);
void deleteSelf();
diff --git a/sigmodr/models/SpeciesMoveGroupModel.cpp b/sigmodr/models/SpeciesMoveGroupModel.cpp
index bdf9beef..69b079d5 100644
--- a/sigmodr/models/SpeciesMoveGroupModel.cpp
+++ b/sigmodr/models/SpeciesMoveGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "SpeciesMoveModel.h"
-// Pokemod includes
-#include "../../pokemod/Species.h"
-#include "../../pokemod/SpeciesMove.h"
+// Sigmod includes
+#include "../../sigmod/Species.h"
+#include "../../sigmod/SpeciesMove.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::SpeciesMoveGroupModel::SpeciesMoveGroupModel(BaseModel* parent, Pokemod::Species* species) :
+Sigmodr::SpeciesMoveGroupModel::SpeciesMoveGroupModel(BaseModel* parent, Sigmod::Species* species) :
GroupModel(parent, species, "Moves")
{
for (int i = 0; i < species->moveCount(); ++i)
addObject(species->move(i));
}
-Pokemodr::SpeciesMoveGroupModel::~SpeciesMoveGroupModel()
+Sigmodr::SpeciesMoveGroupModel::~SpeciesMoveGroupModel()
{
}
-QVariant Pokemodr::SpeciesMoveGroupModel::data(const int role) const
+QVariant Sigmodr::SpeciesMoveGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Move", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::SpeciesMoveGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::SpeciesMoveGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::SpeciesMoveGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "SpeciesMove")
{
- addObject(qobject_cast<Pokemod::Species*>(m_object)->newMove(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Species*>(m_object)->newMove(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::SpeciesMoveGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::SpeciesMoveGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::SpeciesMoveGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Species*>(m_object)->newMove();
+ object = qobject_cast<Sigmod::Species*>(m_object)->newMove();
if (object->className() == "SpeciesMove")
- m_objects.append(new SpeciesMoveModel(this, qobject_cast<Pokemod::SpeciesMove*>(object)));
+ m_objects.append(new SpeciesMoveModel(this, qobject_cast<Sigmod::SpeciesMove*>(object)));
}
-void Pokemodr::SpeciesMoveGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::SpeciesMoveGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Species*>(m_object)->deleteMove(index);
+ qobject_cast<Sigmod::Species*>(m_object)->deleteMove(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/SpeciesMoveGroupModel.h b/sigmodr/models/SpeciesMoveGroupModel.h
index 21113a04..8c5324d5 100644
--- a/sigmodr/models/SpeciesMoveGroupModel.h
+++ b/sigmodr/models/SpeciesMoveGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPECIESMOVEGROUPMODEL__
-#define __POKEMODR_SPECIESMOVEGROUPMODEL__
+#ifndef __SIGMODR_SPECIESMOVEGROUPMODEL__
+#define __SIGMODR_SPECIESMOVEGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Species;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpeciesMoveGroupModel : public GroupModel
{
Q_OBJECT
public:
- SpeciesMoveGroupModel(BaseModel* parent, Pokemod::Species* species);
+ SpeciesMoveGroupModel(BaseModel* parent, Sigmod::Species* species);
~SpeciesMoveGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/SpeciesMoveModel.cpp b/sigmodr/models/SpeciesMoveModel.cpp
index 7b437436..5ac492a6 100644
--- a/sigmodr/models/SpeciesMoveModel.cpp
+++ b/sigmodr/models/SpeciesMoveModel.cpp
@@ -21,14 +21,14 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../SpeciesMoveUI.h"
-// Pokemod includes
-#include "../../pokemod/Move.h"
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Species.h"
-#include "../../pokemod/SpeciesMove.h"
+// Sigmod includes
+#include "../../sigmod/Move.h"
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Species.h"
+#include "../../sigmod/SpeciesMove.h"
// Qt includes
#include <QtCore/QFile>
@@ -36,47 +36,47 @@
// KDE includes
#include <KMenu>
-Pokemodr::SpeciesMoveModel::SpeciesMoveModel(BaseModel* parent, Pokemod::SpeciesMove* move) :
+Sigmodr::SpeciesMoveModel::SpeciesMoveModel(BaseModel* parent, Sigmod::SpeciesMove* move) :
ObjectModel(parent, move)
{
}
-Pokemodr::SpeciesMoveModel::~SpeciesMoveModel()
+Sigmodr::SpeciesMoveModel::~SpeciesMoveModel()
{
}
-QVariant Pokemodr::SpeciesMoveModel::data(int role) const
+QVariant Sigmodr::SpeciesMoveModel::data(int role) const
{
if (role == Qt::DisplayRole)
{
- const int index = qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->moveIndex(qobject_cast<Pokemod::SpeciesMove*>(m_object)->move());
+ const int index = qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->moveIndex(qobject_cast<Sigmod::SpeciesMove*>(m_object)->move());
if (index != INT_MAX)
- return qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod())->move(index)->name();
+ return qobject_cast<const Sigmod::Sigmod*>(m_object->sigmod())->move(index)->name();
return "";
}
- else if (role == Pokemodr::BaseModel::XmlRole)
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new SpeciesMoveUI(qobject_cast<Pokemod::SpeciesMove*>(m_object), NULL);
+ QWidget* widget = new SpeciesMoveUI(qobject_cast<Sigmod::SpeciesMove*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Move", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::SpeciesMoveModel::setData(const QVariant& value, int role)
+bool Sigmodr::SpeciesMoveModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -96,7 +96,7 @@ bool Pokemodr::SpeciesMoveModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::SpeciesMoveModel::deleteSelf()
+void Sigmodr::SpeciesMoveModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/SpeciesMoveModel.h b/sigmodr/models/SpeciesMoveModel.h
index f7544280..94a7841f 100644
--- a/sigmodr/models/SpeciesMoveModel.h
+++ b/sigmodr/models/SpeciesMoveModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPECIESMOVEMODEL__
-#define __POKEMODR_SPECIESMOVEMODEL__
+#ifndef __SIGMODR_SPECIESMOVEMODEL__
+#define __SIGMODR_SPECIESMOVEMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class SpeciesMove;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpeciesMoveModel : public ObjectModel
{
Q_OBJECT
public:
- SpeciesMoveModel(BaseModel* parent, Pokemod::SpeciesMove* move);
+ SpeciesMoveModel(BaseModel* parent, Sigmod::SpeciesMove* move);
~SpeciesMoveModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/SpriteGroupModel.cpp b/sigmodr/models/SpriteGroupModel.cpp
index 71ce1bc8..348f6aae 100644
--- a/sigmodr/models/SpriteGroupModel.cpp
+++ b/sigmodr/models/SpriteGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "SpriteModel.h"
-// Pokemod includes
-#include "../../pokemod/Sprite.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Sprite.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::SpriteGroupModel::SpriteGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Sprites")
+Sigmodr::SpriteGroupModel::SpriteGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Sprites")
{
- for (int i = 0; i < pokemod->spriteCount(); ++i)
- addObject(pokemod->sprite(i));
+ for (int i = 0; i < sigmod->spriteCount(); ++i)
+ addObject(sigmod->sprite(i));
}
-Pokemodr::SpriteGroupModel::~SpriteGroupModel()
+Sigmodr::SpriteGroupModel::~SpriteGroupModel()
{
}
-QVariant Pokemodr::SpriteGroupModel::data(const int role) const
+QVariant Sigmodr::SpriteGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Sprite", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::SpriteGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::SpriteGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::SpriteGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Sprite")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newSprite(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newSprite(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::SpriteGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::SpriteGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::SpriteGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newSprite();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newSprite();
if (object->className() == "Sprite")
- m_objects.append(new SpriteModel(this, qobject_cast<Pokemod::Sprite*>(object)));
+ m_objects.append(new SpriteModel(this, qobject_cast<Sigmod::Sprite*>(object)));
}
-void Pokemodr::SpriteGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::SpriteGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteSprite(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteSprite(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/SpriteGroupModel.h b/sigmodr/models/SpriteGroupModel.h
index 1a0d15fb..797adddd 100644
--- a/sigmodr/models/SpriteGroupModel.h
+++ b/sigmodr/models/SpriteGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPRITEGROUPMODEL__
-#define __POKEMODR_SPRITEGROUPMODEL__
+#ifndef __SIGMODR_SPRITEGROUPMODEL__
+#define __SIGMODR_SPRITEGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpriteGroupModel : public GroupModel
{
Q_OBJECT
public:
- SpriteGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ SpriteGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~SpriteGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/SpriteModel.cpp b/sigmodr/models/SpriteModel.cpp
index fb5d339a..daa6b43c 100644
--- a/sigmodr/models/SpriteModel.cpp
+++ b/sigmodr/models/SpriteModel.cpp
@@ -21,11 +21,11 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../SpriteUI.h"
-// Pokemod includes
-#include "../../pokemod/Sprite.h"
+// Sigmod includes
+#include "../../sigmod/Sprite.h"
// Qt includes
#include <QtCore/QFile>
@@ -33,42 +33,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::SpriteModel::SpriteModel(BaseModel* parent, Pokemod::Sprite* sprite) :
+Sigmodr::SpriteModel::SpriteModel(BaseModel* parent, Sigmod::Sprite* sprite) :
ObjectModel(parent, sprite)
{
}
-Pokemodr::SpriteModel::~SpriteModel()
+Sigmodr::SpriteModel::~SpriteModel()
{
}
-QVariant Pokemodr::SpriteModel::data(int role) const
+QVariant Sigmodr::SpriteModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Sprite*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Sprite*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new SpriteUI(qobject_cast<Pokemod::Sprite*>(m_object), NULL);
+ QWidget* widget = new SpriteUI(qobject_cast<Sigmod::Sprite*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Sprite", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::SpriteModel::setData(const QVariant& value, int role)
+bool Sigmodr::SpriteModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -88,7 +88,7 @@ bool Pokemodr::SpriteModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::SpriteModel::deleteSelf()
+void Sigmodr::SpriteModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/SpriteModel.h b/sigmodr/models/SpriteModel.h
index 26ab16aa..82cc0148 100644
--- a/sigmodr/models/SpriteModel.h
+++ b/sigmodr/models/SpriteModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_SPRITEMODEL__
-#define __POKEMODR_SPRITEMODEL__
+#ifndef __SIGMODR_SPRITEMODEL__
+#define __SIGMODR_SPRITEMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Sprite;
}
-namespace Pokemodr
+namespace Sigmodr
{
class SpriteModel : public ObjectModel
{
Q_OBJECT
public:
- SpriteModel(BaseModel* parent, Pokemod::Sprite* sprite);
+ SpriteModel(BaseModel* parent, Sigmod::Sprite* sprite);
~SpriteModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/StatusGroupModel.cpp b/sigmodr/models/StatusGroupModel.cpp
index d71fbbdd..caf352a5 100644
--- a/sigmodr/models/StatusGroupModel.cpp
+++ b/sigmodr/models/StatusGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "StatusModel.h"
-// Pokemod includes
-#include "../../pokemod/Status.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Status.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::StatusGroupModel::StatusGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Status Effects")
+Sigmodr::StatusGroupModel::StatusGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Status Effects")
{
- for (int i = 0; i < pokemod->statusCount(); ++i)
- addObject(pokemod->status(i));
+ for (int i = 0; i < sigmod->statusCount(); ++i)
+ addObject(sigmod->status(i));
}
-Pokemodr::StatusGroupModel::~StatusGroupModel()
+Sigmodr::StatusGroupModel::~StatusGroupModel()
{
}
-QVariant Pokemodr::StatusGroupModel::data(const int role) const
+QVariant Sigmodr::StatusGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Status", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::StatusGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::StatusGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::StatusGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Status")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newStatus(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newStatus(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::StatusGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::StatusGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::StatusGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newStatus();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newStatus();
if (object->className() == "Status")
- m_objects.append(new StatusModel(this, qobject_cast<Pokemod::Status*>(object)));
+ m_objects.append(new StatusModel(this, qobject_cast<Sigmod::Status*>(object)));
}
-void Pokemodr::StatusGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::StatusGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteStatus(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteStatus(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/StatusGroupModel.h b/sigmodr/models/StatusGroupModel.h
index ef6e8808..696d1a9d 100644
--- a/sigmodr/models/StatusGroupModel.h
+++ b/sigmodr/models/StatusGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_STATUSGROUPMODEL__
-#define __POKEMODR_STATUSGROUPMODEL__
+#ifndef __SIGMODR_STATUSGROUPMODEL__
+#define __SIGMODR_STATUSGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class StatusGroupModel : public GroupModel
{
Q_OBJECT
public:
- StatusGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ StatusGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~StatusGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/StatusModel.cpp b/sigmodr/models/StatusModel.cpp
index e627135e..d1b0148c 100644
--- a/sigmodr/models/StatusModel.cpp
+++ b/sigmodr/models/StatusModel.cpp
@@ -21,11 +21,11 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../StatusUI.h"
-// Pokemod includes
-#include "../../pokemod/Status.h"
+// Sigmod includes
+#include "../../sigmod/Status.h"
// Qt includes
#include <QtCore/QFile>
@@ -33,42 +33,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::StatusModel::StatusModel(BaseModel* parent, Pokemod::Status* status) :
+Sigmodr::StatusModel::StatusModel(BaseModel* parent, Sigmod::Status* status) :
ObjectModel(parent, status)
{
}
-Pokemodr::StatusModel::~StatusModel()
+Sigmodr::StatusModel::~StatusModel()
{
}
-QVariant Pokemodr::StatusModel::data(int role) const
+QVariant Sigmodr::StatusModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Status*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Status*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new StatusUI(qobject_cast<Pokemod::Status*>(m_object), NULL);
+ QWidget* widget = new StatusUI(qobject_cast<Sigmod::Status*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Status", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::StatusModel::setData(const QVariant& value, int role)
+bool Sigmodr::StatusModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -88,7 +88,7 @@ bool Pokemodr::StatusModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::StatusModel::deleteSelf()
+void Sigmodr::StatusModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/StatusModel.h b/sigmodr/models/StatusModel.h
index 857cf27d..3cdb15ac 100644
--- a/sigmodr/models/StatusModel.h
+++ b/sigmodr/models/StatusModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_STATUSMODEL__
-#define __POKEMODR_STATUSMODEL__
+#ifndef __SIGMODR_STATUSMODEL__
+#define __SIGMODR_STATUSMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Status;
}
-namespace Pokemodr
+namespace Sigmodr
{
class StatusModel : public ObjectModel
{
Q_OBJECT
public:
- StatusModel(BaseModel* parent, Pokemod::Status* status);
+ StatusModel(BaseModel* parent, Sigmod::Status* status);
~StatusModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/StoreGroupModel.cpp b/sigmodr/models/StoreGroupModel.cpp
index 66e2a99e..0d2bf699 100644
--- a/sigmodr/models/StoreGroupModel.cpp
+++ b/sigmodr/models/StoreGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "StoreModel.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Store.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Store.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::StoreGroupModel::StoreGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Stores")
+Sigmodr::StoreGroupModel::StoreGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Stores")
{
- for (int i = 0; i < pokemod->storeCount(); ++i)
- addObject(pokemod->store(i));
+ for (int i = 0; i < sigmod->storeCount(); ++i)
+ addObject(sigmod->store(i));
}
-Pokemodr::StoreGroupModel::~StoreGroupModel()
+Sigmodr::StoreGroupModel::~StoreGroupModel()
{
}
-QVariant Pokemodr::StoreGroupModel::data(const int role) const
+QVariant Sigmodr::StoreGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Store", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::StoreGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::StoreGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::StoreGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Store")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newStore(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newStore(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::StoreGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::StoreGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::StoreGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newStore();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newStore();
if (object->className() == "Store")
- m_objects.append(new StoreModel(this, qobject_cast<Pokemod::Store*>(object)));
+ m_objects.append(new StoreModel(this, qobject_cast<Sigmod::Store*>(object)));
}
-void Pokemodr::StoreGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::StoreGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteStore(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteStore(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/StoreGroupModel.h b/sigmodr/models/StoreGroupModel.h
index f1ac95df..db929615 100644
--- a/sigmodr/models/StoreGroupModel.h
+++ b/sigmodr/models/StoreGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_STOREGROUPMODEL__
-#define __POKEMODR_STOREGROUPMODEL__
+#ifndef __SIGMODR_STOREGROUPMODEL__
+#define __SIGMODR_STOREGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class StoreGroupModel : public GroupModel
{
Q_OBJECT
public:
- StoreGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ StoreGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~StoreGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/StoreModel.cpp b/sigmodr/models/StoreModel.cpp
index 17436a20..e1a989a0 100644
--- a/sigmodr/models/StoreModel.cpp
+++ b/sigmodr/models/StoreModel.cpp
@@ -21,12 +21,12 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../StoreUI.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Store.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Store.h"
// Qt includes
#include <QtCore/QFile>
@@ -34,42 +34,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::StoreModel::StoreModel(BaseModel* parent, Pokemod::Store* store) :
+Sigmodr::StoreModel::StoreModel(BaseModel* parent, Sigmod::Store* store) :
ObjectModel(parent, store)
{
}
-Pokemodr::StoreModel::~StoreModel()
+Sigmodr::StoreModel::~StoreModel()
{
}
-QVariant Pokemodr::StoreModel::data(int role) const
+QVariant Sigmodr::StoreModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Store*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Store*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new StoreUI(qobject_cast<Pokemod::Store*>(m_object), NULL);
+ QWidget* widget = new StoreUI(qobject_cast<Sigmod::Store*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Store", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::StoreModel::setData(const QVariant& value, int role)
+bool Sigmodr::StoreModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -89,7 +89,7 @@ bool Pokemodr::StoreModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::StoreModel::deleteSelf()
+void Sigmodr::StoreModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/StoreModel.h b/sigmodr/models/StoreModel.h
index b7ca4fae..cd9f03d7 100644
--- a/sigmodr/models/StoreModel.h
+++ b/sigmodr/models/StoreModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_STOREMODEL__
-#define __POKEMODR_STOREMODEL__
+#ifndef __SIGMODR_STOREMODEL__
+#define __SIGMODR_STOREMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Store;
}
-namespace Pokemodr
+namespace Sigmodr
{
class StoreModel : public ObjectModel
{
Q_OBJECT
public:
- StoreModel(BaseModel* parent, Pokemod::Store* store);
+ StoreModel(BaseModel* parent, Sigmod::Store* store);
~StoreModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/TileGroupModel.cpp b/sigmodr/models/TileGroupModel.cpp
index d9448c56..2fb782b6 100644
--- a/sigmodr/models/TileGroupModel.cpp
+++ b/sigmodr/models/TileGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "TileModel.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Tile.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Tile.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::TileGroupModel::TileGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Tiles")
+Sigmodr::TileGroupModel::TileGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Tiles")
{
- for (int i = 0; i < pokemod->tileCount(); ++i)
- addObject(pokemod->tile(i));
+ for (int i = 0; i < sigmod->tileCount(); ++i)
+ addObject(sigmod->tile(i));
}
-Pokemodr::TileGroupModel::~TileGroupModel()
+Sigmodr::TileGroupModel::~TileGroupModel()
{
}
-QVariant Pokemodr::TileGroupModel::data(const int role) const
+QVariant Sigmodr::TileGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Tile", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::TileGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::TileGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::TileGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Tile")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newTile(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newTile(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::TileGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::TileGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::TileGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newTile();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newTile();
if (object->className() == "Tile")
- m_objects.append(new TileModel(this, qobject_cast<Pokemod::Tile*>(object)));
+ m_objects.append(new TileModel(this, qobject_cast<Sigmod::Tile*>(object)));
}
-void Pokemodr::TileGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::TileGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteTile(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteTile(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/TileGroupModel.h b/sigmodr/models/TileGroupModel.h
index 817d3475..4dae436c 100644
--- a/sigmodr/models/TileGroupModel.h
+++ b/sigmodr/models/TileGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TILEGROUPMODEL__
-#define __POKEMODR_TILEGROUPMODEL__
+#ifndef __SIGMODR_TILEGROUPMODEL__
+#define __SIGMODR_TILEGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class TileGroupModel : public GroupModel
{
Q_OBJECT
public:
- TileGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ TileGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~TileGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/TileModel.cpp b/sigmodr/models/TileModel.cpp
index af39b52c..005849d8 100644
--- a/sigmodr/models/TileModel.cpp
+++ b/sigmodr/models/TileModel.cpp
@@ -21,12 +21,12 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../TileUI.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Tile.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Tile.h"
// Qt includes
#include <QtCore/QFile>
@@ -34,42 +34,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::TileModel::TileModel(BaseModel* parent, Pokemod::Tile* tile) :
+Sigmodr::TileModel::TileModel(BaseModel* parent, Sigmod::Tile* tile) :
ObjectModel(parent, tile)
{
}
-Pokemodr::TileModel::~TileModel()
+Sigmodr::TileModel::~TileModel()
{
}
-QVariant Pokemodr::TileModel::data(int role) const
+QVariant Sigmodr::TileModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Tile*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Tile*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new TileUI(qobject_cast<Pokemod::Tile*>(m_object), NULL);
+ QWidget* widget = new TileUI(qobject_cast<Sigmod::Tile*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Tile", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::TileModel::setData(const QVariant& value, int role)
+bool Sigmodr::TileModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -89,7 +89,7 @@ bool Pokemodr::TileModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::TileModel::deleteSelf()
+void Sigmodr::TileModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/TileModel.h b/sigmodr/models/TileModel.h
index d03e76c7..8ec03f26 100644
--- a/sigmodr/models/TileModel.h
+++ b/sigmodr/models/TileModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TILEMODEL__
-#define __POKEMODR_TILEMODEL__
+#ifndef __SIGMODR_TILEMODEL__
+#define __SIGMODR_TILEMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Tile;
}
-namespace Pokemodr
+namespace Sigmodr
{
class TileModel : public ObjectModel
{
Q_OBJECT
public:
- TileModel(BaseModel* parent, Pokemod::Tile* tile);
+ TileModel(BaseModel* parent, Sigmod::Tile* tile);
~TileModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/TimeGroupModel.cpp b/sigmodr/models/TimeGroupModel.cpp
index 3a16e852..a05cf53a 100644
--- a/sigmodr/models/TimeGroupModel.cpp
+++ b/sigmodr/models/TimeGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "TimeModel.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Time.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Time.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::TimeGroupModel::TimeGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Times")
+Sigmodr::TimeGroupModel::TimeGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Times")
{
- for (int i = 0; i < pokemod->timeCount(); ++i)
- addObject(pokemod->time(i));
+ for (int i = 0; i < sigmod->timeCount(); ++i)
+ addObject(sigmod->time(i));
}
-Pokemodr::TimeGroupModel::~TimeGroupModel()
+Sigmodr::TimeGroupModel::~TimeGroupModel()
{
}
-QVariant Pokemodr::TimeGroupModel::data(const int role) const
+QVariant Sigmodr::TimeGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Time", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::TimeGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::TimeGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::TimeGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Time")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newTime(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newTime(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::TimeGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::TimeGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::TimeGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newTime();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newTime();
if (object->className() == "Time")
- m_objects.append(new TimeModel(this, qobject_cast<Pokemod::Time*>(object)));
+ m_objects.append(new TimeModel(this, qobject_cast<Sigmod::Time*>(object)));
}
-void Pokemodr::TimeGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::TimeGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteTime(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteTime(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/TimeGroupModel.h b/sigmodr/models/TimeGroupModel.h
index de9c70be..904f273f 100644
--- a/sigmodr/models/TimeGroupModel.h
+++ b/sigmodr/models/TimeGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TIMEGROUPMODEL__
-#define __POKEMODR_TIMEGROUPMODEL__
+#ifndef __SIGMODR_TIMEGROUPMODEL__
+#define __SIGMODR_TIMEGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class TimeGroupModel : public GroupModel
{
Q_OBJECT
public:
- TimeGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ TimeGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~TimeGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/TimeModel.cpp b/sigmodr/models/TimeModel.cpp
index 0f49f65a..e1874b04 100644
--- a/sigmodr/models/TimeModel.cpp
+++ b/sigmodr/models/TimeModel.cpp
@@ -21,12 +21,12 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../TimeUI.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Time.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Time.h"
// Qt includes
#include <QtCore/QFile>
@@ -34,42 +34,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::TimeModel::TimeModel(BaseModel* parent, Pokemod::Time* time) :
+Sigmodr::TimeModel::TimeModel(BaseModel* parent, Sigmod::Time* time) :
ObjectModel(parent, time)
{
}
-Pokemodr::TimeModel::~TimeModel()
+Sigmodr::TimeModel::~TimeModel()
{
}
-QVariant Pokemodr::TimeModel::data(int role) const
+QVariant Sigmodr::TimeModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Time*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Time*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new TimeUI(qobject_cast<Pokemod::Time*>(m_object), NULL);
+ QWidget* widget = new TimeUI(qobject_cast<Sigmod::Time*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Time", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::TimeModel::setData(const QVariant& value, int role)
+bool Sigmodr::TimeModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -89,7 +89,7 @@ bool Pokemodr::TimeModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::TimeModel::deleteSelf()
+void Sigmodr::TimeModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/TimeModel.h b/sigmodr/models/TimeModel.h
index 2efdabc2..f141a4d6 100644
--- a/sigmodr/models/TimeModel.h
+++ b/sigmodr/models/TimeModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TIMEMODEL__
-#define __POKEMODR_TIMEMODEL__
+#ifndef __SIGMODR_TIMEMODEL__
+#define __SIGMODR_TIMEMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Time;
}
-namespace Pokemodr
+namespace Sigmodr
{
class TimeModel : public ObjectModel
{
Q_OBJECT
public:
- TimeModel(BaseModel* parent, Pokemod::Time* time);
+ TimeModel(BaseModel* parent, Sigmod::Time* time);
~TimeModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/TrainerGroupModel.cpp b/sigmodr/models/TrainerGroupModel.cpp
index c8adf533..253b46fe 100644
--- a/sigmodr/models/TrainerGroupModel.cpp
+++ b/sigmodr/models/TrainerGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "TrainerModel.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Trainer.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Trainer.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::TrainerGroupModel::TrainerGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Trainers")
+Sigmodr::TrainerGroupModel::TrainerGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Trainers")
{
- for (int i = 0; i < pokemod->trainerCount(); ++i)
- addObject(pokemod->trainer(i));
+ for (int i = 0; i < sigmod->trainerCount(); ++i)
+ addObject(sigmod->trainer(i));
}
-Pokemodr::TrainerGroupModel::~TrainerGroupModel()
+Sigmodr::TrainerGroupModel::~TrainerGroupModel()
{
}
-QVariant Pokemodr::TrainerGroupModel::data(const int role) const
+QVariant Sigmodr::TrainerGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Trainer", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::TrainerGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::TrainerGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::TrainerGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Trainer")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newTrainer(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newTrainer(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::TrainerGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::TrainerGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::TrainerGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newTrainer();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newTrainer();
if (object->className() == "Trainer")
- m_objects.append(new TrainerModel(this, qobject_cast<Pokemod::Trainer*>(object)));
+ m_objects.append(new TrainerModel(this, qobject_cast<Sigmod::Trainer*>(object)));
}
-void Pokemodr::TrainerGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::TrainerGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteTrainer(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteTrainer(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/TrainerGroupModel.h b/sigmodr/models/TrainerGroupModel.h
index 7aa0f3e2..1fd010e7 100644
--- a/sigmodr/models/TrainerGroupModel.h
+++ b/sigmodr/models/TrainerGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TRAINERGROUPMODEL__
-#define __POKEMODR_TRAINERGROUPMODEL__
+#ifndef __SIGMODR_TRAINERGROUPMODEL__
+#define __SIGMODR_TRAINERGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class TrainerGroupModel : public GroupModel
{
Q_OBJECT
public:
- TrainerGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ TrainerGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~TrainerGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/TrainerModel.cpp b/sigmodr/models/TrainerModel.cpp
index 5e07c8f2..8b3922fc 100644
--- a/sigmodr/models/TrainerModel.cpp
+++ b/sigmodr/models/TrainerModel.cpp
@@ -21,12 +21,12 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../TrainerUI.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Trainer.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Trainer.h"
// Qt includes
#include <QtCore/QFile>
@@ -34,42 +34,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::TrainerModel::TrainerModel(BaseModel* parent, Pokemod::Trainer* trainer) :
+Sigmodr::TrainerModel::TrainerModel(BaseModel* parent, Sigmod::Trainer* trainer) :
ObjectModel(parent, trainer)
{
}
-Pokemodr::TrainerModel::~TrainerModel()
+Sigmodr::TrainerModel::~TrainerModel()
{
}
-QVariant Pokemodr::TrainerModel::data(int role) const
+QVariant Sigmodr::TrainerModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Trainer*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Trainer*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new TrainerUI(qobject_cast<Pokemod::Trainer*>(m_object), NULL);
+ QWidget* widget = new TrainerUI(qobject_cast<Sigmod::Trainer*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Trainer", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::TrainerModel::setData(const QVariant& value, int role)
+bool Sigmodr::TrainerModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -89,7 +89,7 @@ bool Pokemodr::TrainerModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::TrainerModel::deleteSelf()
+void Sigmodr::TrainerModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/TrainerModel.h b/sigmodr/models/TrainerModel.h
index 58552a99..42768090 100644
--- a/sigmodr/models/TrainerModel.h
+++ b/sigmodr/models/TrainerModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TRAINERMODEL__
-#define __POKEMODR_TRAINERMODEL__
+#ifndef __SIGMODR_TRAINERMODEL__
+#define __SIGMODR_TRAINERMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Trainer;
}
-namespace Pokemodr
+namespace Sigmodr
{
class TrainerModel : public ObjectModel
{
Q_OBJECT
public:
- TrainerModel(BaseModel* parent, Pokemod::Trainer* trainer);
+ TrainerModel(BaseModel* parent, Sigmod::Trainer* trainer);
~TrainerModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/TypeGroupModel.cpp b/sigmodr/models/TypeGroupModel.cpp
index b27d9938..7332e1e9 100644
--- a/sigmodr/models/TypeGroupModel.cpp
+++ b/sigmodr/models/TypeGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "TypeModel.h"
-// Pokemod includes
-#include "../../pokemod/Pokemod.h"
-#include "../../pokemod/Type.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Type.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::TypeGroupModel::TypeGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Types")
+Sigmodr::TypeGroupModel::TypeGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Types")
{
- for (int i = 0; i < pokemod->typeCount(); ++i)
- addObject(pokemod->type(i));
+ for (int i = 0; i < sigmod->typeCount(); ++i)
+ addObject(sigmod->type(i));
}
-Pokemodr::TypeGroupModel::~TypeGroupModel()
+Sigmodr::TypeGroupModel::~TypeGroupModel()
{
}
-QVariant Pokemodr::TypeGroupModel::data(const int role) const
+QVariant Sigmodr::TypeGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Type", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::TypeGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::TypeGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::TypeGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Type")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newType(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newType(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::TypeGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::TypeGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::TypeGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newType();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newType();
if (object->className() == "Type")
- m_objects.append(new TypeModel(this, qobject_cast<Pokemod::Type*>(object)));
+ m_objects.append(new TypeModel(this, qobject_cast<Sigmod::Type*>(object)));
}
-void Pokemodr::TypeGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::TypeGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteType(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteType(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/TypeGroupModel.h b/sigmodr/models/TypeGroupModel.h
index 6a06852f..30e9d196 100644
--- a/sigmodr/models/TypeGroupModel.h
+++ b/sigmodr/models/TypeGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TYPEGROUPMODEL__
-#define __POKEMODR_TYPEGROUPMODEL__
+#ifndef __SIGMODR_TYPEGROUPMODEL__
+#define __SIGMODR_TYPEGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class TypeGroupModel : public GroupModel
{
Q_OBJECT
public:
- TypeGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ TypeGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~TypeGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/TypeModel.cpp b/sigmodr/models/TypeModel.cpp
index 1f4b2ecb..ee05ec5e 100644
--- a/sigmodr/models/TypeModel.cpp
+++ b/sigmodr/models/TypeModel.cpp
@@ -21,12 +21,12 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../TypeUI.h"
-// Pokemod includes
-#include "../../pokemod/Type.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Type.h"
// Qt includes
#include <QtCore/QFile>
@@ -34,42 +34,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::TypeModel::TypeModel(BaseModel* parent, Pokemod::Type* type) :
+Sigmodr::TypeModel::TypeModel(BaseModel* parent, Sigmod::Type* type) :
ObjectModel(parent, type)
{
}
-Pokemodr::TypeModel::~TypeModel()
+Sigmodr::TypeModel::~TypeModel()
{
}
-QVariant Pokemodr::TypeModel::data(int role) const
+QVariant Sigmodr::TypeModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Type*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Type*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new TypeUI(qobject_cast<Pokemod::Type*>(m_object), NULL);
+ QWidget* widget = new TypeUI(qobject_cast<Sigmod::Type*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Type", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::TypeModel::setData(const QVariant& value, int role)
+bool Sigmodr::TypeModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -89,7 +89,7 @@ bool Pokemodr::TypeModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::TypeModel::deleteSelf()
+void Sigmodr::TypeModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/TypeModel.h b/sigmodr/models/TypeModel.h
index d5e4c58a..13904544 100644
--- a/sigmodr/models/TypeModel.h
+++ b/sigmodr/models/TypeModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_TYPEMODEL__
-#define __POKEMODR_TYPEMODEL__
+#ifndef __SIGMODR_TYPEMODEL__
+#define __SIGMODR_TYPEMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Type;
}
-namespace Pokemodr
+namespace Sigmodr
{
class TypeModel : public ObjectModel
{
Q_OBJECT
public:
- TypeModel(BaseModel* parent, Pokemod::Type* type);
+ TypeModel(BaseModel* parent, Sigmod::Type* type);
~TypeModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/models/WeatherGroupModel.cpp b/sigmodr/models/WeatherGroupModel.cpp
index 293e069a..643ba026 100644
--- a/sigmodr/models/WeatherGroupModel.cpp
+++ b/sigmodr/models/WeatherGroupModel.cpp
@@ -21,9 +21,9 @@
// Model includes
#include "WeatherModel.h"
-// Pokemod includes
-#include "../../pokemod/Weather.h"
-#include "../../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../../sigmod/Sigmod.h"
+#include "../../sigmod/Weather.h"
// Qt includes
#include <QtCore/QFile>
@@ -31,31 +31,31 @@
// KDE includes
#include <KMenu>
-Pokemodr::WeatherGroupModel::WeatherGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod) :
- GroupModel(parent, pokemod, "Weathers")
+Sigmodr::WeatherGroupModel::WeatherGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod) :
+ GroupModel(parent, sigmod, "Weathers")
{
- for (int i = 0; i < pokemod->weatherCount(); ++i)
- addObject(pokemod->weather(i));
+ for (int i = 0; i < sigmod->weatherCount(); ++i)
+ addObject(sigmod->weather(i));
}
-Pokemodr::WeatherGroupModel::~WeatherGroupModel()
+Sigmodr::WeatherGroupModel::~WeatherGroupModel()
{
}
-QVariant Pokemodr::WeatherGroupModel::data(const int role) const
+QVariant Sigmodr::WeatherGroupModel::data(const int role) const
{
- if (role == Pokemodr::BaseModel::ContextMenuRole)
+ if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Add Weather", this, SLOT(addObject()));
return QVariant::fromValue(menu);
}
- return Pokemodr::GroupModel::data(role);
+ return Sigmodr::GroupModel::data(role);
}
-bool Pokemodr::WeatherGroupModel::setData(const QVariant& value, int role)
+bool Sigmodr::WeatherGroupModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -65,7 +65,7 @@ bool Pokemodr::WeatherGroupModel::setData(const QVariant& value, int role)
{
if (xml.doctype().name() == "Weather")
{
- addObject(qobject_cast<Pokemod::Pokemod*>(m_object)->newWeather(xml.documentElement()));
+ addObject(qobject_cast<Sigmod::Sigmod*>(m_object)->newWeather(xml.documentElement()));
return true;
}
file.close();
@@ -75,20 +75,20 @@ bool Pokemodr::WeatherGroupModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::WeatherGroupModel::addObject(Pokemod::Object* object)
+void Sigmodr::WeatherGroupModel::addObject(Sigmod::Object* object)
{
if (!object)
- object = qobject_cast<Pokemod::Pokemod*>(m_object)->newWeather();
+ object = qobject_cast<Sigmod::Sigmod*>(m_object)->newWeather();
if (object->className() == "Weather")
- m_objects.append(new WeatherModel(this, qobject_cast<Pokemod::Weather*>(object)));
+ m_objects.append(new WeatherModel(this, qobject_cast<Sigmod::Weather*>(object)));
}
-void Pokemodr::WeatherGroupModel::deleteObject(BaseObjectModel* model)
+void Sigmodr::WeatherGroupModel::deleteObject(BaseObjectModel* model)
{
const int index = m_objects.indexOf(model);
if (0 <= index)
{
- qobject_cast<Pokemod::Pokemod*>(m_object)->deleteWeather(index);
+ qobject_cast<Sigmod::Sigmod*>(m_object)->deleteWeather(index);
m_objects[index]->deleteLater();
m_objects.removeAt(index);
}
diff --git a/sigmodr/models/WeatherGroupModel.h b/sigmodr/models/WeatherGroupModel.h
index eb48d21c..a9d3ecf5 100644
--- a/sigmodr/models/WeatherGroupModel.h
+++ b/sigmodr/models/WeatherGroupModel.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_WEATHERGROUPMODEL__
-#define __POKEMODR_WEATHERGROUPMODEL__
+#ifndef __SIGMODR_WEATHERGROUPMODEL__
+#define __SIGMODR_WEATHERGROUPMODEL__
// Model includes
#include "GroupModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokemodr
+namespace Sigmodr
{
class WeatherGroupModel : public GroupModel
{
Q_OBJECT
public:
- WeatherGroupModel(BaseModel* parent, Pokemod::Pokemod* pokemod);
+ WeatherGroupModel(BaseModel* parent, Sigmod::Sigmod* sigmod);
~WeatherGroupModel();
QVariant data(const int role = Qt::DisplayRole) const;
bool setData(const QVariant& value, int role = Qt::EditRole);
public slots:
- void addObject(Pokemod::Object* object = NULL);
+ void addObject(Sigmod::Object* object = NULL);
void deleteObject(BaseObjectModel* model);
};
}
diff --git a/sigmodr/models/WeatherModel.cpp b/sigmodr/models/WeatherModel.cpp
index 6040b81e..837a7bad 100644
--- a/sigmodr/models/WeatherModel.cpp
+++ b/sigmodr/models/WeatherModel.cpp
@@ -21,11 +21,11 @@
// Model includes
#include "GroupModel.h"
-// Pokemodr includes
+// Sigmodr includes
#include "../WeatherUI.h"
-// Pokemod includes
-#include "../../pokemod/Weather.h"
+// Sigmod includes
+#include "../../sigmod/Weather.h"
// Qt includes
#include <QtCore/QFile>
@@ -33,42 +33,42 @@
// KDE includes
#include <KMenu>
-Pokemodr::WeatherModel::WeatherModel(BaseModel* parent, Pokemod::Weather* weather) :
+Sigmodr::WeatherModel::WeatherModel(BaseModel* parent, Sigmod::Weather* weather) :
ObjectModel(parent, weather)
{
}
-Pokemodr::WeatherModel::~WeatherModel()
+Sigmodr::WeatherModel::~WeatherModel()
{
}
-QVariant Pokemodr::WeatherModel::data(int role) const
+QVariant Sigmodr::WeatherModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return qobject_cast<Pokemod::Weather*>(m_object)->name();
- else if (role == Pokemodr::BaseModel::XmlRole)
+ return qobject_cast<Sigmod::Weather*>(m_object)->name();
+ else if (role == Sigmodr::BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());
xml.appendChild(m_object->save());
return xml.toString();
}
- else if (role == Pokemodr::BaseModel::WidgetRole)
+ else if (role == Sigmodr::BaseModel::WidgetRole)
{
- QWidget* widget = new WeatherUI(qobject_cast<Pokemod::Weather*>(m_object), NULL);
+ QWidget* widget = new WeatherUI(qobject_cast<Sigmod::Weather*>(m_object), NULL);
return QVariant::fromValue(widget);
}
- else if (role == Pokemodr::BaseModel::ContextMenuRole)
+ else if (role == Sigmodr::BaseModel::ContextMenuRole)
{
KMenu* menu = new KMenu;
menu->addAction("&Delete Weather", this, SLOT(deleteSelf()));
return QVariant::fromValue(menu);
}
- return Pokemodr::ObjectModel::data(role);
+ return Sigmodr::ObjectModel::data(role);
}
-bool Pokemodr::WeatherModel::setData(const QVariant& value, int role)
+bool Sigmodr::WeatherModel::setData(const QVariant& value, int role)
{
- if (role == Pokemodr::BaseModel::XmlRole)
+ if (role == Sigmodr::BaseModel::XmlRole)
{
if (value.canConvert<QString>())
{
@@ -88,7 +88,7 @@ bool Pokemodr::WeatherModel::setData(const QVariant& value, int role)
return false;
}
-void Pokemodr::WeatherModel::deleteSelf()
+void Sigmodr::WeatherModel::deleteSelf()
{
// qobject_cast<GroupModel*>(m_parent)->deleteObject(this);
}
diff --git a/sigmodr/models/WeatherModel.h b/sigmodr/models/WeatherModel.h
index a7334f36..86592169 100644
--- a/sigmodr/models/WeatherModel.h
+++ b/sigmodr/models/WeatherModel.h
@@ -15,26 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKEMODR_WEATHERMODEL__
-#define __POKEMODR_WEATHERMODEL__
+#ifndef __SIGMODR_WEATHERMODEL__
+#define __SIGMODR_WEATHERMODEL__
// Model includes
#include "ObjectModel.h"
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
class Weather;
}
-namespace Pokemodr
+namespace Sigmodr
{
class WeatherModel : public ObjectModel
{
Q_OBJECT
public:
- WeatherModel(BaseModel* parent, Pokemod::Weather* weather);
+ WeatherModel(BaseModel* parent, Sigmod::Weather* weather);
~WeatherModel();
QVariant data(int role = Qt::DisplayRole) const;
diff --git a/sigmodr/pokemodr.tex b/sigmodr/sigmodr.tex
index 0b1331f8..0b1331f8 100644
--- a/sigmodr/pokemodr.tex
+++ b/sigmodr/sigmodr.tex
diff --git a/sigmodr/pokemodrui.rc b/sigmodr/sigmodrui.rc
index de073ac9..02f39816 100644
--- a/sigmodr/pokemodrui.rc
+++ b/sigmodr/sigmodrui.rc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE kpartgui SYSTEM 'kpartgui.dtd'>
-<kpartgui version="1" name="pokemodr" >
+<kpartgui version="1" name="sigmodr" >
<MenuBar>
<Menu name="file" noMerge="1" >
<text>&amp;File</text>
@@ -25,8 +25,8 @@
<text>&amp;Edit</text>
<DefineGroup name="edit_undo_merge" />
<Separator />
- <Action name="download_pokemod" />
- <Action name="upload_pokemod" />
+ <Action name="download_sigmod" />
+ <Action name="upload_sigmod" />
<Separator />
<Action name="edit_cut" />
<Action name="edit_copy" />
diff --git a/sigscript/AbilityWrapper.cpp b/sigscript/AbilityWrapper.cpp
index c7641c87..5eb25bb9 100644
--- a/sigscript/AbilityWrapper.cpp
+++ b/sigscript/AbilityWrapper.cpp
@@ -18,45 +18,45 @@
// header include
#include "AbilityWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::AbilityWrapper* Pokescripting::AbilityWrapper::create(const Pokemod::Ability* ability, PokemodWrapper* parent)
+Sigscript::AbilityWrapper* Sigscript::AbilityWrapper::create(const Sigmod::Ability* ability, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, ability->id())))
m_instances[Signiture(parent, ability->id())] = new AbilityWrapper(ability, parent);
return qobject_cast<AbilityWrapper*>(m_instances[Signiture(parent, ability->id())]);
}
-Pokescripting::AbilityWrapper::AbilityWrapper(const Pokemod::Ability* ability, PokemodWrapper* parent) :
+Sigscript::AbilityWrapper::AbilityWrapper(const Sigmod::Ability* ability, SigmodWrapper* parent) :
ObjectWrapper(ability, parent),
m_ability(ability)
{
}
-QString Pokescripting::AbilityWrapper::name() const
+QString Sigscript::AbilityWrapper::name() const
{
return m_ability->name();
}
-int Pokescripting::AbilityWrapper::priority() const
+int Sigscript::AbilityWrapper::priority() const
{
if (value("priority").canConvert<int>())
return value("priority").toInt();
return m_ability->priority();
}
-QString Pokescripting::AbilityWrapper::description() const
+QString Sigscript::AbilityWrapper::description() const
{
return m_ability->description();
}
-Pokemod::Script Pokescripting::AbilityWrapper::battleScript() const
+Sigmod::Script Sigscript::AbilityWrapper::battleScript() const
{
return m_ability->battleScript();
}
-Pokemod::Script Pokescripting::AbilityWrapper::worldScript() const
+Sigmod::Script Sigscript::AbilityWrapper::worldScript() const
{
return m_ability->worldScript();
}
diff --git a/sigscript/AbilityWrapper.h b/sigscript/AbilityWrapper.h
index 1b1f040b..bb677555 100644
--- a/sigscript/AbilityWrapper.h
+++ b/sigscript/AbilityWrapper.h
@@ -15,36 +15,36 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_ABILITYWRAPPER__
-#define __POKESCRIPTING_ABILITYWRAPPER__
+#ifndef __SIGSCRIPT_ABILITYWRAPPER__
+#define __SIGSCRIPT_ABILITYWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Ability.h"
+// Sigmod includes
+#include "../sigmod/Ability.h"
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT AbilityWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT AbilityWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static AbilityWrapper* create(const Pokemod::Ability* ability, PokemodWrapper* parent);
+ static AbilityWrapper* create(const Sigmod::Ability* ability, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE int priority() const;
Q_SCRIPTABLE QString description() const;
- Q_SCRIPTABLE Pokemod::Script battleScript() const;
- Q_SCRIPTABLE Pokemod::Script worldScript() const;
+ Q_SCRIPTABLE Sigmod::Script battleScript() const;
+ Q_SCRIPTABLE Sigmod::Script worldScript() const;
private:
- AbilityWrapper(const Pokemod::Ability* ability, PokemodWrapper* parent);
+ AbilityWrapper(const Sigmod::Ability* ability, SigmodWrapper* parent);
AbilityWrapper& operator=(const AbilityWrapper& rhs);
- const Pokemod::Ability* m_ability;
+ const Sigmod::Ability* m_ability;
};
}
-Q_DECLARE_METATYPE(Pokescripting::AbilityWrapper*)
+Q_DECLARE_METATYPE(Sigscript::AbilityWrapper*)
#endif
diff --git a/sigscript/AuthorWrapper.cpp b/sigscript/AuthorWrapper.cpp
index 53834074..9398b1b8 100644
--- a/sigscript/AuthorWrapper.cpp
+++ b/sigscript/AuthorWrapper.cpp
@@ -18,33 +18,33 @@
// Header include
#include "AuthorWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::AuthorWrapper* Pokescripting::AuthorWrapper::create(const Pokemod::Author* author, PokemodWrapper* parent)
+Sigscript::AuthorWrapper* Sigscript::AuthorWrapper::create(const Sigmod::Author* author, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, author->id())))
m_instances[Signiture(parent, author->id())] = new AuthorWrapper(author, parent);
return qobject_cast<AuthorWrapper*>(m_instances[Signiture(parent, author->id())]);
}
-Pokescripting::AuthorWrapper::AuthorWrapper(const Pokemod::Author* author, PokemodWrapper* parent) :
+Sigscript::AuthorWrapper::AuthorWrapper(const Sigmod::Author* author, SigmodWrapper* parent) :
ObjectWrapper(author, parent),
m_author(author)
{
}
-QString Pokescripting::AuthorWrapper::name() const
+QString Sigscript::AuthorWrapper::name() const
{
return m_author->name();
}
-QString Pokescripting::AuthorWrapper::email() const
+QString Sigscript::AuthorWrapper::email() const
{
return m_author->email();
}
-QString Pokescripting::AuthorWrapper::role() const
+QString Sigscript::AuthorWrapper::role() const
{
return m_author->role();
}
diff --git a/sigscript/AuthorWrapper.h b/sigscript/AuthorWrapper.h
index 706f2d07..11e0661c 100644
--- a/sigscript/AuthorWrapper.h
+++ b/sigscript/AuthorWrapper.h
@@ -15,34 +15,34 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_AUTHORWRAPPER__
-#define __POKESCRIPTING_AUTHORWRAPPER__
+#ifndef __SIGSCRIPT_AUTHORWRAPPER__
+#define __SIGSCRIPT_AUTHORWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Author.h"
+// Sigmod includes
+#include "../sigmod/Author.h"
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT AuthorWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT AuthorWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static AuthorWrapper* create(const Pokemod::Author* author, PokemodWrapper* parent);
+ static AuthorWrapper* create(const Sigmod::Author* author, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE QString email() const;
Q_SCRIPTABLE QString role() const;
private:
- AuthorWrapper(const Pokemod::Author* author, PokemodWrapper* parent);
+ AuthorWrapper(const Sigmod::Author* author, SigmodWrapper* parent);
AuthorWrapper& operator=(const AuthorWrapper& rhs);
- const Pokemod::Author* m_author;
+ const Sigmod::Author* m_author;
};
}
-Q_DECLARE_METATYPE(Pokescripting::AuthorWrapper*)
+Q_DECLARE_METATYPE(Sigscript::AuthorWrapper*)
#endif
diff --git a/sigscript/BadgeWrapper.cpp b/sigscript/BadgeWrapper.cpp
index 0d495a15..d5444a31 100644
--- a/sigscript/BadgeWrapper.cpp
+++ b/sigscript/BadgeWrapper.cpp
@@ -18,43 +18,43 @@
// Header include
#include "BadgeWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::BadgeWrapper* Pokescripting::BadgeWrapper::create(const Pokemod::Badge* badge, PokemodWrapper* parent)
+Sigscript::BadgeWrapper* Sigscript::BadgeWrapper::create(const Sigmod::Badge* badge, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, badge->id())))
m_instances[Signiture(parent, badge->id())] = new BadgeWrapper(badge, parent);
return qobject_cast<BadgeWrapper*>(m_instances[Signiture(parent, badge->id())]);
}
-Pokescripting::BadgeWrapper::BadgeWrapper(const Pokemod::Badge* badge, PokemodWrapper* parent) :
+Sigscript::BadgeWrapper::BadgeWrapper(const Sigmod::Badge* badge, SigmodWrapper* parent) :
ObjectWrapper(badge, parent),
m_badge(badge)
{
}
-QString Pokescripting::BadgeWrapper::name() const
+QString Sigscript::BadgeWrapper::name() const
{
return m_badge->name();
}
-Pokescripting::SpriteWrapper* Pokescripting::BadgeWrapper::face()
+Sigscript::SpriteWrapper* Sigscript::BadgeWrapper::face()
{
- return pokemod()->sprite(m_badge->face());
+ return sigmod()->sprite(m_badge->face());
}
-Pokescripting::SpriteWrapper* Pokescripting::BadgeWrapper::badge()
+Sigscript::SpriteWrapper* Sigscript::BadgeWrapper::badge()
{
- return pokemod()->sprite(m_badge->badge());
+ return sigmod()->sprite(m_badge->badge());
}
-int Pokescripting::BadgeWrapper::obey() const
+int Sigscript::BadgeWrapper::obey() const
{
return m_badge->obey();
}
-Pokemod::Fraction Pokescripting::BadgeWrapper::stat(const Pokemod::Stat stat) const
+Sigmod::Fraction Sigscript::BadgeWrapper::stat(const Sigmod::Stat stat) const
{
return m_badge->stat(stat);
}
diff --git a/sigscript/BadgeWrapper.h b/sigscript/BadgeWrapper.h
index 1feeb6e9..955e660f 100644
--- a/sigscript/BadgeWrapper.h
+++ b/sigscript/BadgeWrapper.h
@@ -15,39 +15,39 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_BADGEWRAPPER__
-#define __POKESCRIPTING_BADGEWRAPPER__
+#ifndef __SIGSCRIPT_BADGEWRAPPER__
+#define __SIGSCRIPT_BADGEWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Badge.h"
+// Sigmod includes
+#include "../sigmod/Badge.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class SpriteWrapper;
-class POKESCRIPTING_EXPORT BadgeWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT BadgeWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static BadgeWrapper* create(const Pokemod::Badge* badge, PokemodWrapper* parent);
+ static BadgeWrapper* create(const Sigmod::Badge* badge, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE SpriteWrapper* face();
Q_SCRIPTABLE SpriteWrapper* badge();
Q_SCRIPTABLE int obey() const;
- Q_SCRIPTABLE Pokemod::Fraction stat(const Pokemod::Stat stat) const;
+ Q_SCRIPTABLE Sigmod::Fraction stat(const Sigmod::Stat stat) const;
private:
- BadgeWrapper(const Pokemod::Badge* badge, PokemodWrapper* parent);
+ BadgeWrapper(const Sigmod::Badge* badge, SigmodWrapper* parent);
BadgeWrapper& operator=(const BadgeWrapper& rhs);
- const Pokemod::Badge* m_badge;
+ const Sigmod::Badge* m_badge;
};
}
-Q_DECLARE_METATYPE(Pokescripting::BadgeWrapper*)
+Q_DECLARE_METATYPE(Sigscript::BadgeWrapper*)
#endif
diff --git a/sigscript/CMakeLists.txt b/sigscript/CMakeLists.txt
index 81308327..5d32b6fd 100644
--- a/sigscript/CMakeLists.txt
+++ b/sigscript/CMakeLists.txt
@@ -1,12 +1,12 @@
-PROJECT(pokescripting)
+PROJECT(sigscript)
IF(NOT BUILT_FROM_ROOT)
MESSAGE(FATAL_ERROR "Not built from source root")
ENDIF(NOT BUILT_FROM_ROOT)
-ADD_DEFINITIONS(-DMAKE_POKESCRIPTING_LIB)
+ADD_DEFINITIONS(-DMAKE_SIGSCRIPT_LIB)
-SET(pokescripting_MOC_HEADERS
+SET(sigscript_MOC_HEADERS
Config.h
AbilityWrapper.h
AuthorWrapper.h
@@ -27,8 +27,8 @@ SET(pokescripting_MOC_HEADERS
MoveWrapper.h
NatureWrapper.h
ObjectWrapper.h
- PokemodWrapper.h
RulesWrapper.h
+ SigmodWrapper.h
SkinWrapper.h
SoundWrapper.h
SpeciesWrapper.h
@@ -44,14 +44,14 @@ SET(pokescripting_MOC_HEADERS
TypeWrapper.h
WeatherWrapper.h
)
-QT4_WRAP_CPP(pokescripting_MOC_SRCS ${pokescripting_MOC_HEADERS})
-SET(pokescripting_HEADERS
+QT4_WRAP_CPP(sigscript_MOC_SRCS ${sigscript_MOC_HEADERS})
+SET(sigscript_HEADERS
)
-SET(pokescripting_DEVEL
- ${pokescripting_HEADERS}
- ${pokescripting_MOC_HEADERS}
+SET(sigscript_DEVEL
+ ${sigscript_HEADERS}
+ ${sigscript_MOC_HEADERS}
)
-SET(pokescripting_SRCS
+SET(sigscript_SRCS
Config.cpp
AbilityWrapper.cpp
AuthorWrapper.cpp
@@ -72,8 +72,8 @@ SET(pokescripting_SRCS
MoveWrapper.cpp
NatureWrapper.cpp
ObjectWrapper.cpp
- PokemodWrapper.cpp
RulesWrapper.cpp
+ SigmodWrapper.cpp
SkinWrapper.cpp
SoundWrapper.cpp
SpeciesWrapper.cpp
@@ -90,31 +90,31 @@ SET(pokescripting_SRCS
WeatherWrapper.cpp
)
-ADD_LIBRARY(pokescripting
- ${pokescripting_SRCS}
- ${pokescripting_MOC_SRCS}
+ADD_LIBRARY(sigscript
+ ${sigscript_SRCS}
+ ${sigscript_MOC_SRCS}
)
-SET_TARGET_PROPERTIES(pokescripting
+SET_TARGET_PROPERTIES(sigscript
PROPERTIES
VERSION ${POKEGEN_VERSION}
SOVERSION ${POKEGEN_SOVERSION}
LINK_INTERFACE_LIBRARIES ""
)
-TARGET_LINK_LIBRARIES(pokescripting
+TARGET_LINK_LIBRARIES(sigscript
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${PHONON_LIBRARY}
- pokemod
+ sigmod
)
INSTALL(
- TARGETS pokescripting
+ TARGETS sigscript
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
COMPONENT runtime
)
INSTALL(
- FILES ${pokescripting_DEVEL}
+ FILES ${sigscript_DEVEL}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${CMAKE_PROJECT_NAME}/${PROJECT_NAME}
COMPONENT development
)
diff --git a/sigscript/CoinListObjectWrapper.cpp b/sigscript/CoinListObjectWrapper.cpp
index 9ebff168..a445fe09 100644
--- a/sigscript/CoinListObjectWrapper.cpp
+++ b/sigscript/CoinListObjectWrapper.cpp
@@ -18,59 +18,59 @@
// Header include
#include "CoinListObjectWrapper.h"
-// Pokescripting includes
+// Sigscript includes
#include "CoinListWrapper.h"
-#include "PokemodWrapper.h"
+#include "SigmodWrapper.h"
-Pokescripting::CoinListObjectWrapper* Pokescripting::CoinListObjectWrapper::create(const Pokemod::CoinListObject* object, CoinListWrapper* parent)
+Sigscript::CoinListObjectWrapper* Sigscript::CoinListObjectWrapper::create(const Sigmod::CoinListObject* object, CoinListWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, object->id())))
m_instances[Signiture(parent, object->id())] = new CoinListObjectWrapper(object, parent);
return qobject_cast<CoinListObjectWrapper*>(m_instances[Signiture(parent, object->id())]);
}
-Pokescripting::CoinListObjectWrapper::CoinListObjectWrapper(const Pokemod::CoinListObject* object, CoinListWrapper* parent) :
+Sigscript::CoinListObjectWrapper::CoinListObjectWrapper(const Sigmod::CoinListObject* object, CoinListWrapper* parent) :
ObjectWrapper(object, parent),
m_object(object)
{
}
-Pokemod::CoinListObject::Type Pokescripting::CoinListObjectWrapper::type(const QString& name) const
+Sigmod::CoinListObject::Type Sigscript::CoinListObjectWrapper::type(const QString& name) const
{
if (name == "Item")
- return Pokemod::CoinListObject::Item;
+ return Sigmod::CoinListObject::Item;
else if (name == "Species")
- return Pokemod::CoinListObject::Species;
- return QVariant(-1).value<Pokemod::CoinListObject::Type>();
+ return Sigmod::CoinListObject::Species;
+ return QVariant(-1).value<Sigmod::CoinListObject::Type>();
}
-Pokemod::CoinListObject::Type Pokescripting::CoinListObjectWrapper::type() const
+Sigmod::CoinListObject::Type Sigscript::CoinListObjectWrapper::type() const
{
return m_object->type();
}
-Pokescripting::ItemWrapper* Pokescripting::CoinListObjectWrapper::itemObject()
+Sigscript::ItemWrapper* Sigscript::CoinListObjectWrapper::itemObject()
{
- if (m_object->type() == Pokemod::CoinListObject::Item)
- return pokemod()->item(m_object->object());
+ if (m_object->type() == Sigmod::CoinListObject::Item)
+ return sigmod()->item(m_object->object());
return NULL;
}
-Pokescripting::SpeciesWrapper* Pokescripting::CoinListObjectWrapper::speciesObject()
+Sigscript::SpeciesWrapper* Sigscript::CoinListObjectWrapper::speciesObject()
{
- if (m_object->type() == Pokemod::CoinListObject::Species)
- return pokemod()->species(m_object->object());
+ if (m_object->type() == Sigmod::CoinListObject::Species)
+ return sigmod()->species(m_object->object());
return NULL;
}
-int Pokescripting::CoinListObjectWrapper::amount() const
+int Sigscript::CoinListObjectWrapper::amount() const
{
if (value("amount").canConvert<int>())
return value("amount").toInt();
return m_object->amount();
}
-int Pokescripting::CoinListObjectWrapper::cost() const
+int Sigscript::CoinListObjectWrapper::cost() const
{
if (value("cost").canConvert<int>())
return value("cost").toInt();
diff --git a/sigscript/CoinListObjectWrapper.h b/sigscript/CoinListObjectWrapper.h
index 57a2330d..31bb915f 100644
--- a/sigscript/CoinListObjectWrapper.h
+++ b/sigscript/CoinListObjectWrapper.h
@@ -15,43 +15,43 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_COINLISTOBJECTWRAPPER__
-#define __POKESCRIPTING_COINLISTOBJECTWRAPPER__
+#ifndef __SIGSCRIPT_COINLISTOBJECTWRAPPER__
+#define __SIGSCRIPT_COINLISTOBJECTWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/CoinListObject.h"
+// Sigmod includes
+#include "../sigmod/CoinListObject.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class CoinListWrapper;
class ItemWrapper;
class SpeciesWrapper;
-class POKESCRIPTING_EXPORT CoinListObjectWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT CoinListObjectWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static CoinListObjectWrapper* create(const Pokemod::CoinListObject* object, CoinListWrapper* parent);
+ static CoinListObjectWrapper* create(const Sigmod::CoinListObject* object, CoinListWrapper* parent);
- Q_SCRIPTABLE Pokemod::CoinListObject::Type type(const QString& name) const;
+ Q_SCRIPTABLE Sigmod::CoinListObject::Type type(const QString& name) const;
- Q_SCRIPTABLE Pokemod::CoinListObject::Type type() const;
+ Q_SCRIPTABLE Sigmod::CoinListObject::Type type() const;
Q_SCRIPTABLE ItemWrapper* itemObject();
Q_SCRIPTABLE SpeciesWrapper* speciesObject();
Q_SCRIPTABLE int amount() const;
Q_SCRIPTABLE int cost() const;
private:
- CoinListObjectWrapper(const Pokemod::CoinListObject* object, CoinListWrapper* parent);
+ CoinListObjectWrapper(const Sigmod::CoinListObject* object, CoinListWrapper* parent);
CoinListObjectWrapper& operator=(const CoinListObjectWrapper& rhs);
- const Pokemod::CoinListObject* m_object;
+ const Sigmod::CoinListObject* m_object;
};
}
-Q_DECLARE_METATYPE(Pokescripting::CoinListObjectWrapper*)
+Q_DECLARE_METATYPE(Sigscript::CoinListObjectWrapper*)
#endif
diff --git a/sigscript/CoinListWrapper.cpp b/sigscript/CoinListWrapper.cpp
index 38807810..a15c25a3 100644
--- a/sigscript/CoinListWrapper.cpp
+++ b/sigscript/CoinListWrapper.cpp
@@ -18,39 +18,39 @@
// Header include
#include "CoinListWrapper.h"
-// Pokescripting includes
+// Sigscript includes
#include "CoinListObjectWrapper.h"
-#include "PokemodWrapper.h"
+#include "SigmodWrapper.h"
-Pokescripting::CoinListWrapper* Pokescripting::CoinListWrapper::create(const Pokemod::CoinList* coinList, PokemodWrapper* parent)
+Sigscript::CoinListWrapper* Sigscript::CoinListWrapper::create(const Sigmod::CoinList* coinList, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, coinList->id())))
m_instances[Signiture(parent, coinList->id())] = new CoinListWrapper(coinList, parent);
return qobject_cast<CoinListWrapper*>(m_instances[Signiture(parent, coinList->id())]);
}
-Pokescripting::CoinListWrapper::CoinListWrapper(const Pokemod::CoinList* coinList, PokemodWrapper* parent) :
+Sigscript::CoinListWrapper::CoinListWrapper(const Sigmod::CoinList* coinList, SigmodWrapper* parent) :
ObjectWrapper(coinList, parent),
m_coinList(coinList)
{
}
-QString Pokescripting::CoinListWrapper::name() const
+QString Sigscript::CoinListWrapper::name() const
{
return m_coinList->name();
}
-Pokemod::Script Pokescripting::CoinListWrapper::script() const
+Sigmod::Script Sigscript::CoinListWrapper::script() const
{
return m_coinList->script();
}
-Pokescripting::CoinListObjectWrapper* Pokescripting::CoinListWrapper::object(const int index)
+Sigscript::CoinListObjectWrapper* Sigscript::CoinListWrapper::object(const int index)
{
return CoinListObjectWrapper::create(m_coinList->object(index), this);
}
-int Pokescripting::CoinListWrapper::objectCount() const
+int Sigscript::CoinListWrapper::objectCount() const
{
return m_coinList->objectCount();
}
diff --git a/sigscript/CoinListWrapper.h b/sigscript/CoinListWrapper.h
index 819a817e..63c3712a 100644
--- a/sigscript/CoinListWrapper.h
+++ b/sigscript/CoinListWrapper.h
@@ -15,40 +15,40 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_COINLISTWRAPPER__
-#define __POKESCRIPTING_COINLISTWRAPPER__
+#ifndef __SIGSCRIPT_COINLISTWRAPPER__
+#define __SIGSCRIPT_COINLISTWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/CoinList.h"
+// Sigmod includes
+#include "../sigmod/CoinList.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class CoinListObjectWrapper;
-class PokemodWrapper;
+class SigmodWrapper;
-class POKESCRIPTING_EXPORT CoinListWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT CoinListWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static CoinListWrapper* create(const Pokemod::CoinList* coinList, PokemodWrapper* parent);
+ static CoinListWrapper* create(const Sigmod::CoinList* coinList, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
- Q_SCRIPTABLE Pokemod::Script script() const;
+ Q_SCRIPTABLE Sigmod::Script script() const;
Q_SCRIPTABLE CoinListObjectWrapper* object(const int index);
Q_SCRIPTABLE int objectCount() const;
private:
- CoinListWrapper(const Pokemod::CoinList* coinList, PokemodWrapper* parent);
+ CoinListWrapper(const Sigmod::CoinList* coinList, SigmodWrapper* parent);
CoinListWrapper& operator=(const CoinListWrapper& rhs);
- const Pokemod::CoinList* m_coinList;
+ const Sigmod::CoinList* m_coinList;
};
}
-Q_DECLARE_METATYPE(Pokescripting::CoinListWrapper*)
+Q_DECLARE_METATYPE(Sigscript::CoinListWrapper*)
#endif
diff --git a/sigscript/Config.cpp b/sigscript/Config.cpp
index a0739591..6460053c 100644
--- a/sigscript/Config.cpp
+++ b/sigscript/Config.cpp
@@ -18,12 +18,12 @@
// Header include
#include "Config.h"
-Pokescripting::Config::Config(QObject* parent) :
+Sigscript::Config::Config(QObject* parent) :
QObject(parent)
{
}
-void Pokescripting::Config::addValue(const QString& name, const QVariant& value, const bool temporary)
+void Sigscript::Config::addValue(const QString& name, const QVariant& value, const bool temporary)
{
if (!m_values.contains(name))
{
@@ -32,7 +32,7 @@ void Pokescripting::Config::addValue(const QString& name, const QVariant& value,
}
}
-void Pokescripting::Config::setValue(const QString& name, const QVariant& value, const bool temporary)
+void Sigscript::Config::setValue(const QString& name, const QVariant& value, const bool temporary)
{
const QVariant& oldValue = m_values[name];
m_values[name] = value;
@@ -46,14 +46,14 @@ void Pokescripting::Config::setValue(const QString& name, const QVariant& value,
emit(valueChanged(name, oldValue, value));
}
-void Pokescripting::Config::removeValue(const QString& name)
+void Sigscript::Config::removeValue(const QString& name)
{
m_values.remove(name);
m_temporaries.removeAll(name);
emit(valueRemoved(name));
}
-QVariant Pokescripting::Config::value(const QString& name, const bool recursive) const
+QVariant Sigscript::Config::value(const QString& name, const bool recursive) const
{
if (m_values.contains(name))
return m_values[name];
@@ -70,7 +70,7 @@ QVariant Pokescripting::Config::value(const QString& name, const bool recursive)
return QVariant();
}
-bool Pokescripting::Config::hasValue(const QString& name, const bool recursive) const
+bool Sigscript::Config::hasValue(const QString& name, const bool recursive) const
{
if (m_values.contains(name))
return true;
@@ -79,12 +79,12 @@ bool Pokescripting::Config::hasValue(const QString& name, const bool recursive)
return false;
}
-void Pokescripting::Config::clearTemporary()
+void Sigscript::Config::clearTemporary()
{
while (m_temporaries.size())
removeValue(m_temporaries[0]);
}
-void Pokescripting::Config::writeBack()
+void Sigscript::Config::writeBack()
{
}
diff --git a/sigscript/Config.h b/sigscript/Config.h
index 16be5ade..6cfe95b9 100644
--- a/sigscript/Config.h
+++ b/sigscript/Config.h
@@ -15,10 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_CONFIG__
-#define __POKESCRIPTING_CONFIG__
+#ifndef __SIGSCRIPT_CONFIG__
+#define __SIGSCRIPT_CONFIG__
-// Pokescripting includes
+// Sigscript includes
#include "Global.h"
// Qt includes
@@ -29,14 +29,14 @@
#include <QtCore/QVariant>
// Forward declarations
-namespace Pokemod
+namespace Sigmod
{
-class Pokemod;
+class Sigmod;
}
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT Config : public QObject
+class SIGSCRIPT_EXPORT Config : public QObject
{
Q_OBJECT
@@ -62,6 +62,6 @@ class POKESCRIPTING_EXPORT Config : public QObject
QList<QString> m_temporaries;
};
}
-Q_DECLARE_METATYPE(Pokescripting::Config*)
+Q_DECLARE_METATYPE(Sigscript::Config*)
#endif
diff --git a/sigscript/EggGroupWrapper.cpp b/sigscript/EggGroupWrapper.cpp
index 2f3f9051..7ed1ddf2 100644
--- a/sigscript/EggGroupWrapper.cpp
+++ b/sigscript/EggGroupWrapper.cpp
@@ -18,23 +18,23 @@
// Header include
#include "EggGroupWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::EggGroupWrapper* Pokescripting::EggGroupWrapper::create(const Pokemod::EggGroup* eggGroup, PokemodWrapper* parent)
+Sigscript::EggGroupWrapper* Sigscript::EggGroupWrapper::create(const Sigmod::EggGroup* eggGroup, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, eggGroup->id())))
m_instances[Signiture(parent, eggGroup->id())] = new EggGroupWrapper(eggGroup, parent);
return qobject_cast<EggGroupWrapper*>(m_instances[Signiture(parent, eggGroup->id())]);
}
-Pokescripting::EggGroupWrapper::EggGroupWrapper(const Pokemod::EggGroup* eggGroup, PokemodWrapper* parent) :
+Sigscript::EggGroupWrapper::EggGroupWrapper(const Sigmod::EggGroup* eggGroup, SigmodWrapper* parent) :
ObjectWrapper(eggGroup, parent),
m_eggGroup(eggGroup)
{
}
-QString Pokescripting::EggGroupWrapper::name() const
+QString Sigscript::EggGroupWrapper::name() const
{
return m_eggGroup->name();
}
diff --git a/sigscript/EggGroupWrapper.h b/sigscript/EggGroupWrapper.h
index 6c139c1e..7511da3c 100644
--- a/sigscript/EggGroupWrapper.h
+++ b/sigscript/EggGroupWrapper.h
@@ -15,32 +15,32 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_EGGGROUPWRAPPER__
-#define __POKESCRIPTING_EGGGROUPWRAPPER__
+#ifndef __SIGSCRIPT_EGGGROUPWRAPPER__
+#define __SIGSCRIPT_EGGGROUPWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/EggGroup.h"
+// Sigmod includes
+#include "../sigmod/EggGroup.h"
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT EggGroupWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT EggGroupWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static EggGroupWrapper* create(const Pokemod::EggGroup* eggGroup, PokemodWrapper* parent);
+ static EggGroupWrapper* create(const Sigmod::EggGroup* eggGroup, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
private:
- EggGroupWrapper(const Pokemod::EggGroup* eggGroup, PokemodWrapper* parent);
+ EggGroupWrapper(const Sigmod::EggGroup* eggGroup, SigmodWrapper* parent);
EggGroupWrapper& operator=(const EggGroupWrapper& rhs);
- const Pokemod::EggGroup* m_eggGroup;
+ const Sigmod::EggGroup* m_eggGroup;
};
}
-Q_DECLARE_METATYPE(Pokescripting::EggGroupWrapper*)
+Q_DECLARE_METATYPE(Sigscript::EggGroupWrapper*)
#endif
diff --git a/sigscript/Global.h b/sigscript/Global.h
index d77ef326..fcba2b30 100644
--- a/sigscript/Global.h
+++ b/sigscript/Global.h
@@ -15,24 +15,24 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_GLOBAL__
-#define __POKESCRIPTING_GLOBAL__
+#ifndef __SIGSCRIPT_GLOBAL__
+#define __SIGSCRIPT_GLOBAL__
// KDE includes
#include <kdemacros.h>
-#ifndef POKESCRIPTING_EXPORT
-# ifdef MAKE_POKESCRIPTING_LIB
+#ifndef SIGSCRIPT_EXPORT
+# ifdef MAKE_SIGSCRIPT_LIB
/* We are building this library */
-# define POKESCRIPTING_EXPORT KDE_EXPORT
+# define SIGSCRIPT_EXPORT KDE_EXPORT
# else
/* We are using this library */
-# define POKESCRIPTING_EXPORT KDE_IMPORT
+# define SIGSCRIPT_EXPORT KDE_IMPORT
# endif
#endif
-# ifndef POKESCRIPTING_EXPORT_DEPRECATED
-# define POKESCRIPTING_EXPORT_DEPRECATED KDE_DEPRECATED POKESCRIPTING_EXPORT
+# ifndef SIGSCRIPT_EXPORT_DEPRECATED
+# define SIGSCRIPT_EXPORT_DEPRECATED KDE_DEPRECATED SIGSCRIPT_EXPORT
# endif
#endif
diff --git a/sigscript/GlobalScriptWrapper.cpp b/sigscript/GlobalScriptWrapper.cpp
index 34a3fa62..0be3e2ed 100644
--- a/sigscript/GlobalScriptWrapper.cpp
+++ b/sigscript/GlobalScriptWrapper.cpp
@@ -18,28 +18,28 @@
// Header include
#include "GlobalScriptWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::GlobalScriptWrapper* Pokescripting::GlobalScriptWrapper::create(const Pokemod::GlobalScript* globalScript, PokemodWrapper* parent)
+Sigscript::GlobalScriptWrapper* Sigscript::GlobalScriptWrapper::create(const Sigmod::GlobalScript* globalScript, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, globalScript->id())))
m_instances[Signiture(parent, globalScript->id())] = new GlobalScriptWrapper(globalScript, parent);
return qobject_cast<GlobalScriptWrapper*>(m_instances[Signiture(parent, globalScript->id())]);
}
-Pokescripting::GlobalScriptWrapper::GlobalScriptWrapper(const Pokemod::GlobalScript* globalScript, PokemodWrapper* parent) :
+Sigscript::GlobalScriptWrapper::GlobalScriptWrapper(const Sigmod::GlobalScript* globalScript, SigmodWrapper* parent) :
ObjectWrapper(globalScript, parent),
m_globalScript(globalScript)
{
}
-QString Pokescripting::GlobalScriptWrapper::name() const
+QString Sigscript::GlobalScriptWrapper::name() const
{
return m_globalScript->name();
}
-Pokemod::Script Pokescripting::GlobalScriptWrapper::script() const
+Sigmod::Script Sigscript::GlobalScriptWrapper::script() const
{
return m_globalScript->script();
}
diff --git a/sigscript/GlobalScriptWrapper.h b/sigscript/GlobalScriptWrapper.h
index dd5f3e36..27a778ae 100644
--- a/sigscript/GlobalScriptWrapper.h
+++ b/sigscript/GlobalScriptWrapper.h
@@ -15,33 +15,33 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_GLOBALSCRIPTWRAPPER__
-#define __POKESCRIPTING_GLOBALSCRIPTWRAPPER__
+#ifndef __SIGSCRIPT_GLOBALSCRIPTWRAPPER__
+#define __SIGSCRIPT_GLOBALSCRIPTWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/GlobalScript.h"
+// Sigmod includes
+#include "../sigmod/GlobalScript.h"
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT GlobalScriptWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT GlobalScriptWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static GlobalScriptWrapper* create(const Pokemod::GlobalScript* globalScript, PokemodWrapper* parent);
+ static GlobalScriptWrapper* create(const Sigmod::GlobalScript* globalScript, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
- Q_SCRIPTABLE Pokemod::Script script() const;
+ Q_SCRIPTABLE Sigmod::Script script() const;
private:
- GlobalScriptWrapper(const Pokemod::GlobalScript* globalScript, PokemodWrapper* parent);
+ GlobalScriptWrapper(const Sigmod::GlobalScript* globalScript, SigmodWrapper* parent);
GlobalScriptWrapper& operator=(const GlobalScriptWrapper& rhs);
- const Pokemod::GlobalScript* m_globalScript;
+ const Sigmod::GlobalScript* m_globalScript;
};
}
-Q_DECLARE_METATYPE(Pokescripting::GlobalScriptWrapper*)
+Q_DECLARE_METATYPE(Sigscript::GlobalScriptWrapper*)
#endif
diff --git a/sigscript/ItemTypeWrapper.cpp b/sigscript/ItemTypeWrapper.cpp
index f9111db2..11808787 100644
--- a/sigscript/ItemTypeWrapper.cpp
+++ b/sigscript/ItemTypeWrapper.cpp
@@ -18,47 +18,47 @@
// Header include
#include "ItemTypeWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::ItemTypeWrapper* Pokescripting::ItemTypeWrapper::create(const Pokemod::ItemType* itemType, PokemodWrapper* parent)
+Sigscript::ItemTypeWrapper* Sigscript::ItemTypeWrapper::create(const Sigmod::ItemType* itemType, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, itemType->id())))
m_instances[Signiture(parent, itemType->id())] = new ItemTypeWrapper(itemType, parent);
return qobject_cast<ItemTypeWrapper*>(m_instances[Signiture(parent, itemType->id())]);
}
-Pokescripting::ItemTypeWrapper::ItemTypeWrapper(const Pokemod::ItemType* itemType, PokemodWrapper* parent) :
+Sigscript::ItemTypeWrapper::ItemTypeWrapper(const Sigmod::ItemType* itemType, SigmodWrapper* parent) :
ObjectWrapper(itemType, parent),
m_itemType(itemType)
{
}
-Pokemod::ItemType::Count Pokescripting::ItemTypeWrapper::count(const QString& name) const
+Sigmod::ItemType::Count Sigscript::ItemTypeWrapper::count(const QString& name) const
{
if (name == "Distinct")
- return Pokemod::ItemType::Distinct;
+ return Sigmod::ItemType::Distinct;
else if (name == "Total")
- return Pokemod::ItemType::Total;
- return QVariant(-1).value<Pokemod::ItemType::Count>();
+ return Sigmod::ItemType::Total;
+ return QVariant(-1).value<Sigmod::ItemType::Count>();
}
-QString Pokescripting::ItemTypeWrapper::name() const
+QString Sigscript::ItemTypeWrapper::name() const
{
return m_itemType->name();
}
-int Pokescripting::ItemTypeWrapper::computer() const
+int Sigscript::ItemTypeWrapper::computer() const
{
return m_itemType->computer();
}
-int Pokescripting::ItemTypeWrapper::player() const
+int Sigscript::ItemTypeWrapper::player() const
{
return m_itemType->player();
}
-int Pokescripting::ItemTypeWrapper::count() const
+int Sigscript::ItemTypeWrapper::count() const
{
return m_itemType->count();
}
diff --git a/sigscript/ItemTypeWrapper.h b/sigscript/ItemTypeWrapper.h
index f9e61ccc..8b608456 100644
--- a/sigscript/ItemTypeWrapper.h
+++ b/sigscript/ItemTypeWrapper.h
@@ -15,37 +15,37 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_ITEMTYPEWRAPPER__
-#define __POKESCRIPTING_ITEMTYPEWRAPPER__
+#ifndef __SIGSCRIPT_ITEMTYPEWRAPPER__
+#define __SIGSCRIPT_ITEMTYPEWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/ItemType.h"
+// Sigmod includes
+#include "../sigmod/ItemType.h"
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT ItemTypeWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT ItemTypeWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static ItemTypeWrapper* create(const Pokemod::ItemType* itemType, PokemodWrapper* parent);
+ static ItemTypeWrapper* create(const Sigmod::ItemType* itemType, SigmodWrapper* parent);
- Q_SCRIPTABLE Pokemod::ItemType::Count count(const QString& name) const;
+ Q_SCRIPTABLE Sigmod::ItemType::Count count(const QString& name) const;
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE int computer() const;
Q_SCRIPTABLE int player() const;
Q_SCRIPTABLE int count() const;
private:
- ItemTypeWrapper(const Pokemod::ItemType* itemType, PokemodWrapper* parent);
+ ItemTypeWrapper(const Sigmod::ItemType* itemType, SigmodWrapper* parent);
ItemTypeWrapper& operator=(const ItemTypeWrapper& rhs);
- const Pokemod::ItemType* m_itemType;
+ const Sigmod::ItemType* m_itemType;
};
}
-Q_DECLARE_METATYPE(Pokescripting::ItemTypeWrapper*)
+Q_DECLARE_METATYPE(Sigscript::ItemTypeWrapper*)
#endif
diff --git a/sigscript/ItemWrapper.cpp b/sigscript/ItemWrapper.cpp
index 002efea6..c1732e56 100644
--- a/sigscript/ItemWrapper.cpp
+++ b/sigscript/ItemWrapper.cpp
@@ -18,50 +18,50 @@
// Header include
#include "ItemWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::ItemWrapper* Pokescripting::ItemWrapper::create(const Pokemod::Item* item, PokemodWrapper* parent)
+Sigscript::ItemWrapper* Sigscript::ItemWrapper::create(const Sigmod::Item* item, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, item->id())))
m_instances[Signiture(parent, item->id())] = new ItemWrapper(item, parent);
return qobject_cast<ItemWrapper*>(m_instances[Signiture(parent, item->id())]);
}
-Pokescripting::ItemWrapper::ItemWrapper(const Pokemod::Item* item, PokemodWrapper* parent) :
+Sigscript::ItemWrapper::ItemWrapper(const Sigmod::Item* item, SigmodWrapper* parent) :
ObjectWrapper(item, parent),
m_item(item)
{
}
-QString Pokescripting::ItemWrapper::name() const
+QString Sigscript::ItemWrapper::name() const
{
return m_item->name();
}
-bool Pokescripting::ItemWrapper::sellable() const
+bool Sigscript::ItemWrapper::sellable() const
{
return m_item->sellable();
}
-Pokescripting::ItemTypeWrapper* Pokescripting::ItemWrapper::type()
+Sigscript::ItemTypeWrapper* Sigscript::ItemWrapper::type()
{
- return pokemod()->itemType(m_item->type());
+ return sigmod()->itemType(m_item->type());
}
-int Pokescripting::ItemWrapper::price() const
+int Sigscript::ItemWrapper::price() const
{
if (value("price").canConvert<int>())
return value("price").toInt();
return m_item->price();
}
-QString Pokescripting::ItemWrapper::description() const
+QString Sigscript::ItemWrapper::description() const
{
return m_item->description();
}
-Pokemod::Script Pokescripting::ItemWrapper::script() const
+Sigmod::Script Sigscript::ItemWrapper::script() const
{
return m_item->script();
}
diff --git a/sigscript/ItemWrapper.h b/sigscript/ItemWrapper.h
index 1550c2f9..45edf11d 100644
--- a/sigscript/ItemWrapper.h
+++ b/sigscript/ItemWrapper.h
@@ -15,40 +15,40 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_ITEMWRAPPER__
-#define __POKESCRIPTING_ITEMWRAPPER__
+#ifndef __SIGSCRIPT_ITEMWRAPPER__
+#define __SIGSCRIPT_ITEMWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Item.h"
+// Sigmod includes
+#include "../sigmod/Item.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class ItemTypeWrapper;
-class POKESCRIPTING_EXPORT ItemWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT ItemWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static ItemWrapper* create(const Pokemod::Item* item, PokemodWrapper* parent);
+ static ItemWrapper* create(const Sigmod::Item* item, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE bool sellable() const;
Q_SCRIPTABLE ItemTypeWrapper* type();
Q_SCRIPTABLE int price() const;
Q_SCRIPTABLE QString description() const;
- Q_SCRIPTABLE Pokemod::Script script() const;
+ Q_SCRIPTABLE Sigmod::Script script() const;
private:
- ItemWrapper(const Pokemod::Item* item, PokemodWrapper* parent);
+ ItemWrapper(const Sigmod::Item* item, SigmodWrapper* parent);
ItemWrapper& operator=(const ItemWrapper& rhs);
- const Pokemod::Item* m_item;
+ const Sigmod::Item* m_item;
};
}
-Q_DECLARE_METATYPE(Pokescripting::ItemWrapper*)
+Q_DECLARE_METATYPE(Sigscript::ItemWrapper*)
#endif
diff --git a/sigscript/MapEffectWrapper.cpp b/sigscript/MapEffectWrapper.cpp
index ac1d7c41..f1d135c8 100644
--- a/sigscript/MapEffectWrapper.cpp
+++ b/sigscript/MapEffectWrapper.cpp
@@ -18,48 +18,48 @@
// Header include
#include "MapEffectWrapper.h"
-// Pokescripting includes
+// Sigscript includes
#include "MapWrapper.h"
-#include "PokemodWrapper.h"
+#include "SigmodWrapper.h"
-Pokescripting::MapEffectWrapper* Pokescripting::MapEffectWrapper::create(const Pokemod::MapEffect* effect, MapWrapper* parent)
+Sigscript::MapEffectWrapper* Sigscript::MapEffectWrapper::create(const Sigmod::MapEffect* effect, MapWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, effect->id())))
m_instances[Signiture(parent, effect->id())] = new MapEffectWrapper(effect, parent);
return qobject_cast<MapEffectWrapper*>(m_instances[Signiture(parent, effect->id())]);
}
-Pokescripting::MapEffectWrapper::MapEffectWrapper(const Pokemod::MapEffect* effect, MapWrapper* parent) :
+Sigscript::MapEffectWrapper::MapEffectWrapper(const Sigmod::MapEffect* effect, MapWrapper* parent) :
ObjectWrapper(effect, parent),
m_effect(effect)
{
}
-QString Pokescripting::MapEffectWrapper::name() const
+QString Sigscript::MapEffectWrapper::name() const
{
return m_effect->name();
}
-QPoint Pokescripting::MapEffectWrapper::coordinate() const
+QPoint Sigscript::MapEffectWrapper::coordinate() const
{
if (value("coordinate").canConvert<QPoint>())
return value("coordinate").toPoint();
return m_effect->coordinate();
}
-Pokescripting::SkinWrapper* Pokescripting::MapEffectWrapper::skin()
+Sigscript::SkinWrapper* Sigscript::MapEffectWrapper::skin()
{
- return pokemod()->skin(m_effect->skin());
+ return sigmod()->skin(m_effect->skin());
}
-bool Pokescripting::MapEffectWrapper::isGhost() const
+bool Sigscript::MapEffectWrapper::isGhost() const
{
if (value("ghost").canConvert<bool>())
return value("ghost").toBool();
return m_effect->isGhost();
}
-Pokemod::Script Pokescripting::MapEffectWrapper::script() const
+Sigmod::Script Sigscript::MapEffectWrapper::script() const
{
return m_effect->script();
}
diff --git a/sigscript/MapEffectWrapper.h b/sigscript/MapEffectWrapper.h
index 8ccb2781..206d0b0e 100644
--- a/sigscript/MapEffectWrapper.h
+++ b/sigscript/MapEffectWrapper.h
@@ -15,40 +15,40 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_MAPEFFECTWRAPPER__
-#define __POKESCRIPTING_MAPEFFECTWRAPPER__
+#ifndef __SIGSCRIPT_MAPEFFECTWRAPPER__
+#define __SIGSCRIPT_MAPEFFECTWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/MapEffect.h"
+// Sigmod includes
+#include "../sigmod/MapEffect.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class MapWrapper;
class SkinWrapper;
-class POKESCRIPTING_EXPORT MapEffectWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT MapEffectWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static MapEffectWrapper* create(const Pokemod::MapEffect* effect, MapWrapper* parent);
+ static MapEffectWrapper* create(const Sigmod::MapEffect* effect, MapWrapper* parent);
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE QPoint coordinate() const;
Q_SCRIPTABLE SkinWrapper* skin();
Q_SCRIPTABLE bool isGhost() const;
- Q_SCRIPTABLE Pokemod::Script script() const;
+ Q_SCRIPTABLE Sigmod::Script script() const;
private:
- MapEffectWrapper(const Pokemod::MapEffect* effect, MapWrapper* parent);
+ MapEffectWrapper(const Sigmod::MapEffect* effect, MapWrapper* parent);
MapEffectWrapper& operator=(const MapEffectWrapper& rhs);
- const Pokemod::MapEffect* m_effect;
+ const Sigmod::MapEffect* m_effect;
};
}
-Q_DECLARE_METATYPE(Pokescripting::MapEffectWrapper*)
+Q_DECLARE_METATYPE(Sigscript::MapEffectWrapper*)
#endif
diff --git a/sigscript/MapTrainerTeamMemberWrapper.cpp b/sigscript/MapTrainerTeamMemberWrapper.cpp
index a7b52c35..74966579 100644
--- a/sigscript/MapTrainerTeamMemberWrapper.cpp
+++ b/sigscript/MapTrainerTeamMemberWrapper.cpp
@@ -18,67 +18,67 @@
// Header include
#include "MapTrainerTeamMemberWrapper.h"
-// Pokescripting includes
+// Sigscript includes
#include "MapTrainerWrapper.h"
-#include "PokemodWrapper.h"
+#include "SigmodWrapper.h"
-Pokescripting::MapTrainerTeamMemberWrapper* Pokescripting::MapTrainerTeamMemberWrapper::create(const Pokemod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent)
+Sigscript::MapTrainerTeamMemberWrapper* Sigscript::MapTrainerTeamMemberWrapper::create(const Sigmod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, teamMember->id())))
m_instances[Signiture(parent, teamMember->id())] = new MapTrainerTeamMemberWrapper(teamMember, parent);
return qobject_cast<MapTrainerTeamMemberWrapper*>(m_instances[Signiture(parent, teamMember->id())]);
}
-Pokescripting::MapTrainerTeamMemberWrapper::MapTrainerTeamMemberWrapper(const Pokemod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent) :
+Sigscript::MapTrainerTeamMemberWrapper::MapTrainerTeamMemberWrapper(const Sigmod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent) :
ObjectWrapper(teamMember, parent),
m_teamMember(teamMember)
{
}
-Pokescripting::SpeciesWrapper* Pokescripting::MapTrainerTeamMemberWrapper::species()
+Sigscript::SpeciesWrapper* Sigscript::MapTrainerTeamMemberWrapper::species()
{
- return pokemod()->species(m_teamMember->species());
+ return sigmod()->species(m_teamMember->species());
}
-int Pokescripting::MapTrainerTeamMemberWrapper::level() const
+int Sigscript::MapTrainerTeamMemberWrapper::level() const
{
if (value("level").canConvert<int>())
return value("level").toInt();
return m_teamMember->level();
}
-QList<Pokescripting::AbilityWrapper*> Pokescripting::MapTrainerTeamMemberWrapper::abilities()
+QList<Sigscript::AbilityWrapper*> Sigscript::MapTrainerTeamMemberWrapper::abilities()
{
QList<int> abilityIds = m_teamMember->abilities();
QList<AbilityWrapper*> abilities;
foreach (int id, abilityIds)
- abilities.append(pokemod()->ability(id));
+ abilities.append(sigmod()->ability(id));
return abilities;
}
-QList<Pokescripting::ItemWrapper*> Pokescripting::MapTrainerTeamMemberWrapper::items()
+QList<Sigscript::ItemWrapper*> Sigscript::MapTrainerTeamMemberWrapper::items()
{
QList<int> itemIds = m_teamMember->items();
QList<ItemWrapper*> items;
foreach (int id, itemIds)
- items.append(pokemod()->item(id));
+ items.append(sigmod()->item(id));
return items;
}
-QList<Pokescripting::MoveWrapper*> Pokescripting::MapTrainerTeamMemberWrapper::moves()
+QList<Sigscript::MoveWrapper*> Sigscript::MapTrainerTeamMemberWrapper::moves()
{
QList<int> moveIds = m_teamMember->moves();
QList<MoveWrapper*> moves;
foreach (int id, moveIds)
- moves.append(pokemod()->move(id));
+ moves.append(sigmod()->move(id));
return moves;
}
-QList<Pokescripting::NatureWrapper*> Pokescripting::MapTrainerTeamMemberWrapper::natures()
+QList<Sigscript::NatureWrapper*> Sigscript::MapTrainerTeamMemberWrapper::natures()
{
QList<int> natureIds = m_teamMember->natures();
QList<NatureWrapper*> natures;
foreach (int id, natureIds)
- natures.append(pokemod()->nature(id));
+ natures.append(sigmod()->nature(id));
return natures;
}
diff --git a/sigscript/MapTrainerTeamMemberWrapper.h b/sigscript/MapTrainerTeamMemberWrapper.h
index 313fe3f2..58409ea8 100644
--- a/sigscript/MapTrainerTeamMemberWrapper.h
+++ b/sigscript/MapTrainerTeamMemberWrapper.h
@@ -15,16 +15,16 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_MAPTRAINERTEAMMEMBERWRAPPER__
-#define __POKESCRIPTING_MAPTRAINERTEAMMEMBERWRAPPER__
+#ifndef __SIGSCRIPT_MAPTRAINERTEAMMEMBERWRAPPER__
+#define __SIGSCRIPT_MAPTRAINERTEAMMEMBERWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/MapTrainerTeamMember.h"
+// Sigmod includes
+#include "../sigmod/MapTrainerTeamMember.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class AbilityWrapper;
@@ -34,12 +34,12 @@ class MoveWrapper;
class NatureWrapper;
class SpeciesWrapper;
-class POKESCRIPTING_EXPORT MapTrainerTeamMemberWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT MapTrainerTeamMemberWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static MapTrainerTeamMemberWrapper* create(const Pokemod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent);
+ static MapTrainerTeamMemberWrapper* create(const Sigmod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent);
Q_SCRIPTABLE SpeciesWrapper* species();
Q_SCRIPTABLE int level() const;
@@ -48,12 +48,12 @@ class POKESCRIPTING_EXPORT MapTrainerTeamMemberWrapper : public ObjectWrapper
Q_SCRIPTABLE QList<MoveWrapper*> moves();
Q_SCRIPTABLE QList<NatureWrapper*> natures();
private:
- MapTrainerTeamMemberWrapper(const Pokemod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent);
+ MapTrainerTeamMemberWrapper(const Sigmod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent);
MapTrainerTeamMemberWrapper& operator=(const MapTrainerTeamMemberWrapper& rhs);
- const Pokemod::MapTrainerTeamMember* m_teamMember;
+ const Sigmod::MapTrainerTeamMember* m_teamMember;
};
}
-Q_DECLARE_METATYPE(Pokescripting::MapTrainerTeamMemberWrapper*)
+Q_DECLARE_METATYPE(Sigscript::MapTrainerTeamMemberWrapper*)
#endif
diff --git a/sigscript/MapTrainerWrapper.cpp b/sigscript/MapTrainerWrapper.cpp
index a3ac6050..dc2830b4 100644
--- a/sigscript/MapTrainerWrapper.cpp
+++ b/sigscript/MapTrainerWrapper.cpp
@@ -18,55 +18,55 @@
// Header include
#include "MapTrainerWrapper.h"
-// Pokescripting includes
+// Sigscript includes
#include "MapWrapper.h"
#include "MapTrainerTeamMemberWrapper.h"
-#include "PokemodWrapper.h"
+#include "SigmodWrapper.h"
-Pokescripting::MapTrainerWrapper* Pokescripting::MapTrainerWrapper::create(const Pokemod::MapTrainer* trainer, MapWrapper* parent)
+Sigscript::MapTrainerWrapper* Sigscript::MapTrainerWrapper::create(const Sigmod::MapTrainer* trainer, MapWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, trainer->id())))
m_instances[Signiture(parent, trainer->id())] = new MapTrainerWrapper(trainer, parent);
return qobject_cast<MapTrainerWrapper*>(m_instances[Signiture(parent, trainer->id())]);
}
-Pokescripting::MapTrainerWrapper::MapTrainerWrapper(const Pokemod::MapTrainer* trainer, MapWrapper* parent) :
+Sigscript::MapTrainerWrapper::MapTrainerWrapper(const Sigmod::MapTrainer* trainer, MapWrapper* parent) :
ObjectWrapper(trainer, parent),
m_trainer(trainer)
{
}
-QString Pokescripting::MapTrainerWrapper::name() const
+QString Sigscript::MapTrainerWrapper::name() const
{
return m_trainer->name();
}
-Pokescripting::TrainerWrapper* Pokescripting::MapTrainerWrapper::trainerClass()
+Sigscript::TrainerWrapper* Sigscript::MapTrainerWrapper::trainerClass()
{
- return pokemod()->trainer(m_trainer->trainerClass());
+ return sigmod()->trainer(m_trainer->trainerClass());
}
-int Pokescripting::MapTrainerWrapper::numberFight() const
+int Sigscript::MapTrainerWrapper::numberFight() const
{
return m_trainer->numberFight();
}
-Pokescripting::MapTrainerTeamMemberWrapper* Pokescripting::MapTrainerWrapper::leadTeamMember()
+Sigscript::MapTrainerTeamMemberWrapper* Sigscript::MapTrainerWrapper::leadTeamMember()
{
return teamMember(m_trainer->leadTeamMember());
}
-Pokemod::Script Pokescripting::MapTrainerWrapper::script() const
+Sigmod::Script Sigscript::MapTrainerWrapper::script() const
{
return m_trainer->script();
}
-Pokescripting::MapTrainerTeamMemberWrapper* Pokescripting::MapTrainerWrapper::teamMember(const int index)
+Sigscript::MapTrainerTeamMemberWrapper* Sigscript::MapTrainerWrapper::teamMember(const int index)
{
return MapTrainerTeamMemberWrapper::create(m_trainer->teamMember(index), this);
}
-int Pokescripting::MapTrainerWrapper::teamMemberCount() const
+int Sigscript::MapTrainerWrapper::teamMemberCount() const
{
return m_trainer->teamMemberCount();
}
diff --git a/sigscript/MapTrainerWrapper.h b/sigscript/MapTrainerWrapper.h
index 0c65b186..0c83843b 100644
--- a/sigscript/MapTrainerWrapper.h
+++ b/sigscript/MapTrainerWrapper.h
@@ -15,44 +15,44 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_MAPTRAINERWRAPPER__
-#define __POKESCRIPTING_MAPTRAINERWRAPPER__
+#ifndef __SIGSCRIPT_MAPTRAINERWRAPPER__
+#define __SIGSCRIPT_MAPTRAINERWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/MapTrainer.h"
+// Sigmod includes
+#include "../sigmod/MapTrainer.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class MapWrapper;
class MapTrainerTeamMemberWrapper;
class TrainerWrapper;
-class POKESCRIPTING_EXPORT MapTrainerWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT MapTrainerWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static MapTrainerWrapper* create(const Pokemod::MapTrainer* trainer, MapWrapper* parent);
+ static MapTrainerWrapper* create(const Sigmod::MapTrainer* trainer, MapWrapper* parent);
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE TrainerWrapper* trainerClass();
Q_SCRIPTABLE int numberFight() const;
Q_SCRIPTABLE MapTrainerTeamMemberWrapper* leadTeamMember();
- Q_SCRIPTABLE Pokemod::Script script() const;
+ Q_SCRIPTABLE Sigmod::Script script() const;
Q_SCRIPTABLE MapTrainerTeamMemberWrapper* teamMember(const int index);
Q_SCRIPTABLE int teamMemberCount() const;
private:
- MapTrainerWrapper(const Pokemod::MapTrainer* trainer, MapWrapper* parent);
+ MapTrainerWrapper(const Sigmod::MapTrainer* trainer, MapWrapper* parent);
MapTrainerWrapper& operator=(const MapTrainerWrapper& rhs);
- const Pokemod::MapTrainer* m_trainer;
+ const Sigmod::MapTrainer* m_trainer;
};
}
-Q_DECLARE_METATYPE(Pokescripting::MapTrainerWrapper*)
+Q_DECLARE_METATYPE(Sigscript::MapTrainerWrapper*)
#endif
diff --git a/sigscript/MapWarpWrapper.cpp b/sigscript/MapWarpWrapper.cpp
index 370ad6f5..fe6bdd42 100644
--- a/sigscript/MapWarpWrapper.cpp
+++ b/sigscript/MapWarpWrapper.cpp
@@ -18,59 +18,59 @@
// Header include
#include "MapWarpWrapper.h"
-// Pokescripting includes
+// Sigscript includes
#include "MapWrapper.h"
-#include "PokemodWrapper.h"
+#include "SigmodWrapper.h"
-Pokescripting::MapWarpWrapper* Pokescripting::MapWarpWrapper::create(const Pokemod::MapWarp* warp, MapWrapper* parent)
+Sigscript::MapWarpWrapper* Sigscript::MapWarpWrapper::create(const Sigmod::MapWarp* warp, MapWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, warp->id())))
m_instances[Signiture(parent, warp->id())] = new MapWarpWrapper(warp, parent);
return qobject_cast<MapWarpWrapper*>(m_instances[Signiture(parent, warp->id())]);
}
-Pokescripting::MapWarpWrapper::MapWarpWrapper(const Pokemod::MapWarp* warp, MapWrapper* parent) :
+Sigscript::MapWarpWrapper::MapWarpWrapper(const Sigmod::MapWarp* warp, MapWrapper* parent) :
ObjectWrapper(warp, parent),
m_warp(warp)
{
}
-Pokemod::MapWarp::Type Pokescripting::MapWarpWrapper::type(const QString& name) const
+Sigmod::MapWarp::Type Sigscript::MapWarpWrapper::type(const QString& name) const
{
if (name == "Door")
- return Pokemod::MapWarp::Door;
+ return Sigmod::MapWarp::Door;
else if (name == "Warp")
- return Pokemod::MapWarp::Warp;
+ return Sigmod::MapWarp::Warp;
else if (name == "Hole")
- return Pokemod::MapWarp::Hole;
+ return Sigmod::MapWarp::Hole;
else if (name == "Boundary")
- return Pokemod::MapWarp::Boundary;
- return QVariant(-1).value<Pokemod::MapWarp::Type>();
+ return Sigmod::MapWarp::Boundary;
+ return QVariant(-1).value<Sigmod::MapWarp::Type>();
}
-QString Pokescripting::MapWarpWrapper::name() const
+QString Sigscript::MapWarpWrapper::name() const
{
return m_warp->name();
}
-QPoint Pokescripting::MapWarpWrapper::coordinate() const
+QPoint Sigscript::MapWarpWrapper::coordinate() const
{
if (value("coordinate").canConvert<QPoint>())
return value("coordinate").toPoint();
return m_warp->coordinate();
}
-Pokemod::MapWarp::Type Pokescripting::MapWarpWrapper::type() const
+Sigmod::MapWarp::Type Sigscript::MapWarpWrapper::type() const
{
return m_warp->type();
}
-Pokescripting::MapWarpWrapper* Pokescripting::MapWarpWrapper::toWarp()
+Sigscript::MapWarpWrapper* Sigscript::MapWarpWrapper::toWarp()
{
- return pokemod()->map(m_warp->toMap())->warp(m_warp->toWarp());
+ return sigmod()->map(m_warp->toMap())->warp(m_warp->toWarp());
}
-Pokemod::Script Pokescripting::MapWarpWrapper::script() const
+Sigmod::Script Sigscript::MapWarpWrapper::script() const
{
return m_warp->script();
}
diff --git a/sigscript/MapWarpWrapper.h b/sigscript/MapWarpWrapper.h
index ac894b04..422ab073 100644
--- a/sigscript/MapWarpWrapper.h
+++ b/sigscript/MapWarpWrapper.h
@@ -15,41 +15,41 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_MAPWARPWRAPPER__
-#define __POKESCRIPTING_MAPWARPWRAPPER__
+#ifndef __SIGSCRIPT_MAPWARPWRAPPER__
+#define __SIGSCRIPT_MAPWARPWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/MapWarp.h"
+// Sigmod includes
+#include "../sigmod/MapWarp.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declartions
class MapWrapper;
-class POKESCRIPTING_EXPORT MapWarpWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT MapWarpWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static MapWarpWrapper* create(const Pokemod::MapWarp* warp, MapWrapper* parent);
+ static MapWarpWrapper* create(const Sigmod::MapWarp* warp, MapWrapper* parent);
- Q_SCRIPTABLE Pokemod::MapWarp::Type type(const QString& name) const;
+ Q_SCRIPTABLE Sigmod::MapWarp::Type type(const QString& name) const;
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE QPoint coordinate() const;
- Q_SCRIPTABLE Pokemod::MapWarp::Type type() const;
+ Q_SCRIPTABLE Sigmod::MapWarp::Type type() const;
Q_SCRIPTABLE MapWarpWrapper* toWarp();
- Q_SCRIPTABLE Pokemod::Script script() const;
+ Q_SCRIPTABLE Sigmod::Script script() const;
private:
- MapWarpWrapper(const Pokemod::MapWarp* warp, MapWrapper* parent);
+ MapWarpWrapper(const Sigmod::MapWarp* warp, MapWrapper* parent);
MapWarpWrapper& operator=(const MapWarpWrapper& rhs);
- const Pokemod::MapWarp* m_warp;
+ const Sigmod::MapWarp* m_warp;
};
}
-Q_DECLARE_METATYPE(Pokescripting::MapWarpWrapper*)
+Q_DECLARE_METATYPE(Sigscript::MapWarpWrapper*)
#endif
diff --git a/sigscript/MapWildListEncounterWrapper.cpp b/sigscript/MapWildListEncounterWrapper.cpp
index 6d37d5ae..cf01d938 100644
--- a/sigscript/MapWildListEncounterWrapper.cpp
+++ b/sigscript/MapWildListEncounterWrapper.cpp
@@ -18,36 +18,36 @@
// Header include
#include "MapWildListEncounterWrapper.h"
-// Pokescripting includes
+// Sigscript includes
#include "MapWildListWrapper.h"
-#include "PokemodWrapper.h"
+#include "SigmodWrapper.h"
-Pokescripting::MapWildListEncounterWrapper* Pokescripting::MapWildListEncounterWrapper::create(const Pokemod::MapWildListEncounter* encounter, MapWildListWrapper* parent)
+Sigscript::MapWildListEncounterWrapper* Sigscript::MapWildListEncounterWrapper::create(const Sigmod::MapWildListEncounter* encounter, MapWildListWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, encounter->id())))
m_instances[Signiture(parent, encounter->id())] = new MapWildListEncounterWrapper(encounter, parent);
return qobject_cast<MapWildListEncounterWrapper*>(m_instances[Signiture(parent, encounter->id())]);
}
-Pokescripting::MapWildListEncounterWrapper::MapWildListEncounterWrapper(const Pokemod::MapWildListEncounter* encounter, MapWildListWrapper* parent) :
+Sigscript::MapWildListEncounterWrapper::MapWildListEncounterWrapper(const Sigmod::MapWildListEncounter* encounter, MapWildListWrapper* parent) :
ObjectWrapper(encounter, parent),
m_encounter(encounter)
{
}
-Pokescripting::SpeciesWrapper* Pokescripting::MapWildListEncounterWrapper::species()
+Sigscript::SpeciesWrapper* Sigscript::MapWildListEncounterWrapper::species()
{
- return pokemod()->species(m_encounter->species());
+ return sigmod()->species(m_encounter->species());
}
-int Pokescripting::MapWildListEncounterWrapper::level() const
+int Sigscript::MapWildListEncounterWrapper::level() const
{
if (value("level").canConvert<int>())
return value("level").toInt();
return m_encounter->level();
}
-int Pokescripting::MapWildListEncounterWrapper::weight() const
+int Sigscript::MapWildListEncounterWrapper::weight() const
{
if (value("weight").canConvert<int>())
return value("weight").toInt();
diff --git a/sigscript/MapWildListEncounterWrapper.h b/sigscript/MapWildListEncounterWrapper.h
index c9459430..6bb28ff7 100644
--- a/sigscript/MapWildListEncounterWrapper.h
+++ b/sigscript/MapWildListEncounterWrapper.h
@@ -15,38 +15,38 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_MAPWILDLISTENCOUNTERWRAPPER__
-#define __POKESCRIPTING_MAPWILDLISTENCOUNTERWRAPPER__
+#ifndef __SIGSCRIPT_MAPWILDLISTENCOUNTERWRAPPER__
+#define __SIGSCRIPT_MAPWILDLISTENCOUNTERWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/MapWildListEncounter.h"
+// Sigmod includes
+#include "../sigmod/MapWildListEncounter.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class MapWildListWrapper;
class SpeciesWrapper;
-class POKESCRIPTING_EXPORT MapWildListEncounterWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT MapWildListEncounterWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static MapWildListEncounterWrapper* create(const Pokemod::MapWildListEncounter* encounter, MapWildListWrapper* parent);
+ static MapWildListEncounterWrapper* create(const Sigmod::MapWildListEncounter* encounter, MapWildListWrapper* parent);
Q_SCRIPTABLE SpeciesWrapper* species();
Q_SCRIPTABLE int level() const;
Q_SCRIPTABLE int weight() const;
private:
- MapWildListEncounterWrapper(const Pokemod::MapWildListEncounter* encounter, MapWildListWrapper* parent);
+ MapWildListEncounterWrapper(const Sigmod::MapWildListEncounter* encounter, MapWildListWrapper* parent);
MapWildListEncounterWrapper& operator=(const MapWildListEncounterWrapper& rhs);
- const Pokemod::MapWildListEncounter* m_encounter;
+ const Sigmod::MapWildListEncounter* m_encounter;
};
}
-Q_DECLARE_METATYPE(Pokescripting::MapWildListEncounterWrapper*)
+Q_DECLARE_METATYPE(Sigscript::MapWildListEncounterWrapper*)
#endif
diff --git a/sigscript/MapWildListWrapper.cpp b/sigscript/MapWildListWrapper.cpp
index 3b725b34..f00442da 100644
--- a/sigscript/MapWildListWrapper.cpp
+++ b/sigscript/MapWildListWrapper.cpp
@@ -18,42 +18,42 @@
// Header include
#include "MapWildListWrapper.h"
-// Pokescripting includes
+// Sigscript includes
#include "MapWrapper.h"
#include "MapWildListEncounterWrapper.h"
-Pokescripting::MapWildListWrapper* Pokescripting::MapWildListWrapper::create(const Pokemod::MapWildList* wildList, MapWrapper* parent)
+Sigscript::MapWildListWrapper* Sigscript::MapWildListWrapper::create(const Sigmod::MapWildList* wildList, MapWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, wildList->id())))
m_instances[Signiture(parent, wildList->id())] = new MapWildListWrapper(wildList, parent);
return qobject_cast<MapWildListWrapper*>(m_instances[Signiture(parent, wildList->id())]);
}
-Pokescripting::MapWildListWrapper::MapWildListWrapper(const Pokemod::MapWildList* wildList, MapWrapper* parent) :
+Sigscript::MapWildListWrapper::MapWildListWrapper(const Sigmod::MapWildList* wildList, MapWrapper* parent) :
ObjectWrapper(wildList, parent),
m_wildList(wildList)
{
}
-Pokemod::Hat<Pokescripting::MapWildListEncounterWrapper*> Pokescripting::MapWildListWrapper::encounterHat()
+Sigmod::Hat<Sigscript::MapWildListEncounterWrapper*> Sigscript::MapWildListWrapper::encounterHat()
{
- Pokemod::Hat<MapWildListEncounterWrapper*> hat;
+ Sigmod::Hat<MapWildListEncounterWrapper*> hat;
for (int i = 0; i < encounterCount(); ++i)
hat.add(encounter(i), encounter(i)->weight());
return hat;
}
-QString Pokescripting::MapWildListWrapper::name() const
+QString Sigscript::MapWildListWrapper::name() const
{
return m_wildList->name();
}
-Pokescripting::MapWildListEncounterWrapper* Pokescripting::MapWildListWrapper::encounter(const int index)
+Sigscript::MapWildListEncounterWrapper* Sigscript::MapWildListWrapper::encounter(const int index)
{
return MapWildListEncounterWrapper::create(m_wildList->encounter(index), this);
}
-int Pokescripting::MapWildListWrapper::encounterCount() const
+int Sigscript::MapWildListWrapper::encounterCount() const
{
return m_wildList->encounterCount();
}
diff --git a/sigscript/MapWildListWrapper.h b/sigscript/MapWildListWrapper.h
index 661a3ef7..08707e03 100644
--- a/sigscript/MapWildListWrapper.h
+++ b/sigscript/MapWildListWrapper.h
@@ -15,42 +15,42 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_MAPWILDLISTWRAPPER__
-#define __POKESCRIPTING_MAPWILDLISTWRAPPER__
+#ifndef __SIGSCRIPT_MAPWILDLISTWRAPPER__
+#define __SIGSCRIPT_MAPWILDLISTWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Hat.h"
-#include "../pokemod/MapWildList.h"
+// Sigmod includes
+#include "../sigmod/Hat.h"
+#include "../sigmod/MapWildList.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class MapWrapper;
class MapWildListEncounterWrapper;
-class POKESCRIPTING_EXPORT MapWildListWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT MapWildListWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static MapWildListWrapper* create(const Pokemod::MapWildList* wildList, MapWrapper* parent);
+ static MapWildListWrapper* create(const Sigmod::MapWildList* wildList, MapWrapper* parent);
- Pokemod::Hat<MapWildListEncounterWrapper*> encounterHat();
+ Sigmod::Hat<MapWildListEncounterWrapper*> encounterHat();
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE MapWildListEncounterWrapper* encounter(const int index);
Q_SCRIPTABLE int encounterCount() const;
private:
- MapWildListWrapper(const Pokemod::MapWildList* wildList, MapWrapper* parent);
+ MapWildListWrapper(const Sigmod::MapWildList* wildList, MapWrapper* parent);
MapWildListWrapper& operator=(const MapWildListWrapper& rhs);
- const Pokemod::MapWildList* m_wildList;
+ const Sigmod::MapWildList* m_wildList;
};
}
-Q_DECLARE_METATYPE(Pokescripting::MapWildListWrapper*)
+Q_DECLARE_METATYPE(Sigscript::MapWildListWrapper*)
#endif
diff --git a/sigscript/MapWrapper.cpp b/sigscript/MapWrapper.cpp
index ebd37ceb..279e0b58 100644
--- a/sigscript/MapWrapper.cpp
+++ b/sigscript/MapWrapper.cpp
@@ -18,83 +18,83 @@
// Header include
#include "MapWrapper.h"
-// Pokescripting includes
+// Sigscript includes
#include "MapEffectWrapper.h"
#include "MapTrainerWrapper.h"
#include "MapWarpWrapper.h"
#include "MapWildListWrapper.h"
-#include "PokemodWrapper.h"
+#include "SigmodWrapper.h"
-Pokescripting::MapWrapper* Pokescripting::MapWrapper::create(const Pokemod::Map* map, PokemodWrapper* parent)
+Sigscript::MapWrapper* Sigscript::MapWrapper::create(const Sigmod::Map* map, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, map->id())))
m_instances[Signiture(parent, map->id())] = new MapWrapper(map, parent);
return qobject_cast<MapWrapper*>(m_instances[Signiture(parent, map->id())]);
}
-Pokescripting::MapWrapper::MapWrapper(const Pokemod::Map* map, PokemodWrapper* parent) :
+Sigscript::MapWrapper::MapWrapper(const Sigmod::Map* map, SigmodWrapper* parent) :
ObjectWrapper(map, parent),
m_map(map)
{
}
-Pokescripting::MapEffectWrapper* Pokescripting::MapWrapper::effect(const int id)
+Sigscript::MapEffectWrapper* Sigscript::MapWrapper::effect(const int id)
{
return MapEffectWrapper::create(m_map->effectById(id), this);
}
-Pokescripting::MapTrainerWrapper* Pokescripting::MapWrapper::trainer(const int id)
+Sigscript::MapTrainerWrapper* Sigscript::MapWrapper::trainer(const int id)
{
return MapTrainerWrapper::create(m_map->trainerById(id), this);
}
-Pokescripting::MapWarpWrapper* Pokescripting::MapWrapper::warp(const int id)
+Sigscript::MapWarpWrapper* Sigscript::MapWrapper::warp(const int id)
{
return MapWarpWrapper::create(m_map->warpById(id), this);
}
-Pokescripting::MapWildListWrapper* Pokescripting::MapWrapper::wildList(const int id)
+Sigscript::MapWildListWrapper* Sigscript::MapWrapper::wildList(const int id)
{
return MapWildListWrapper::create(m_map->wildListById(id), this);
}
-Pokemod::Map::Type Pokescripting::MapWrapper::type(const QString& name) const
+Sigmod::Map::Type Sigscript::MapWrapper::type(const QString& name) const
{
if (name == "Outdoor")
- return Pokemod::Map::Outdoor;
+ return Sigmod::Map::Outdoor;
else if (name == "Dungeon")
- return Pokemod::Map::Dungeon;
+ return Sigmod::Map::Dungeon;
else if (name == "Building")
- return Pokemod::Map::Building;
- return QVariant(-1).value<Pokemod::Map::Type>();
+ return Sigmod::Map::Building;
+ return QVariant(-1).value<Sigmod::Map::Type>();
}
-QString Pokescripting::MapWrapper::name() const
+QString Sigscript::MapWrapper::name() const
{
return m_map->name();
}
-Pokescripting::MapWarpWrapper* Pokescripting::MapWrapper::flyWarp()
+Sigscript::MapWarpWrapper* Sigscript::MapWrapper::flyWarp()
{
return MapWarpWrapper::create(m_map->warpById(m_map->flyWarp()), this);
}
-Pokemod::Map::Type Pokescripting::MapWrapper::type() const
+Sigmod::Map::Type Sigscript::MapWrapper::type() const
{
return m_map->type();
}
-Pokescripting::TileWrapper* Pokescripting::MapWrapper::tile(const int row, const int column)
+Sigscript::TileWrapper* Sigscript::MapWrapper::tile(const int row, const int column)
{
- return pokemod()->tile(m_map->tile(row, column));
+ return sigmod()->tile(m_map->tile(row, column));
}
-QPoint Pokescripting::MapWrapper::mapSize() const
+QPoint Sigscript::MapWrapper::mapSize() const
{
return m_map->size();
}
-Pokescripting::MapEffectWrapper* Pokescripting::MapWrapper::effect(const QString& name)
+Sigscript::MapEffectWrapper* Sigscript::MapWrapper::effect(const QString& name)
{
for (int i = 0; i < m_map->effectCount(); ++i)
{
@@ -104,7 +104,7 @@ Pokescripting::MapEffectWrapper* Pokescripting::MapWrapper::effect(const QString
return NULL;
}
-Pokescripting::MapTrainerWrapper* Pokescripting::MapWrapper::trainer(const QString& name)
+Sigscript::MapTrainerWrapper* Sigscript::MapWrapper::trainer(const QString& name)
{
for (int i = 0; i < m_map->trainerCount(); ++i)
{
@@ -114,7 +114,7 @@ Pokescripting::MapTrainerWrapper* Pokescripting::MapWrapper::trainer(const QStri
return NULL;
}
-Pokescripting::MapWarpWrapper* Pokescripting::MapWrapper::warp(const QString& name)
+Sigscript::MapWarpWrapper* Sigscript::MapWrapper::warp(const QString& name)
{
for (int i = 0; i < m_map->warpCount(); ++i)
{
@@ -124,7 +124,7 @@ Pokescripting::MapWarpWrapper* Pokescripting::MapWrapper::warp(const QString& na
return NULL;
}
-Pokescripting::MapWildListWrapper* Pokescripting::MapWrapper::wildList(const QString& name)
+Sigscript::MapWildListWrapper* Sigscript::MapWrapper::wildList(const QString& name)
{
for (int i = 0; i < m_map->wildListCount(); ++i)
{
diff --git a/sigscript/MapWrapper.h b/sigscript/MapWrapper.h
index f0f8980f..e09520b2 100644
--- a/sigscript/MapWrapper.h
+++ b/sigscript/MapWrapper.h
@@ -15,16 +15,16 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_MAPWRAPPER__
-#define __POKESCRIPTING_MAPWRAPPER__
+#ifndef __SIGSCRIPT_MAPWRAPPER__
+#define __SIGSCRIPT_MAPWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Map.h"
+// Sigmod includes
+#include "../sigmod/Map.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class MapEffectWrapper;
@@ -33,23 +33,23 @@ class MapWarpWrapper;
class MapWildListWrapper;
class TileWrapper;
-class POKESCRIPTING_EXPORT MapWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT MapWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static MapWrapper* create(const Pokemod::Map* map, PokemodWrapper* parent);
+ static MapWrapper* create(const Sigmod::Map* map, SigmodWrapper* parent);
MapEffectWrapper* effect(const int id);
MapTrainerWrapper* trainer(const int id);
MapWarpWrapper* warp(const int id);
MapWildListWrapper* wildList(const int id);
- Q_SCRIPTABLE Pokemod::Map::Type type(const QString& name) const;
+ Q_SCRIPTABLE Sigmod::Map::Type type(const QString& name) const;
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE MapWarpWrapper* flyWarp();
- Q_SCRIPTABLE Pokemod::Map::Type type() const;
+ Q_SCRIPTABLE Sigmod::Map::Type type() const;
Q_SCRIPTABLE TileWrapper* tile(const int row, const int column);
Q_SCRIPTABLE QPoint mapSize() const;
@@ -58,12 +58,12 @@ class POKESCRIPTING_EXPORT MapWrapper : public ObjectWrapper
Q_SCRIPTABLE MapWarpWrapper* warp(const QString& name);
Q_SCRIPTABLE MapWildListWrapper* wildList(const QString& name);
private:
- MapWrapper(const Pokemod::Map* map, PokemodWrapper* parent);
+ MapWrapper(const Sigmod::Map* map, SigmodWrapper* parent);
MapWrapper& operator=(const MapWrapper& rhs);
- const Pokemod::Map* m_map;
+ const Sigmod::Map* m_map;
};
}
-Q_DECLARE_METATYPE(Pokescripting::MapWrapper*)
+Q_DECLARE_METATYPE(Sigscript::MapWrapper*)
#endif
diff --git a/sigscript/MoveWrapper.cpp b/sigscript/MoveWrapper.cpp
index 1bf5d3f8..8ddc47d1 100644
--- a/sigscript/MoveWrapper.cpp
+++ b/sigscript/MoveWrapper.cpp
@@ -18,74 +18,74 @@
// Header include
#include "MoveWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::MoveWrapper* Pokescripting::MoveWrapper::create(const Pokemod::Move* move, PokemodWrapper* parent)
+Sigscript::MoveWrapper* Sigscript::MoveWrapper::create(const Sigmod::Move* move, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, move->id())))
m_instances[Signiture(parent, move->id())] = new MoveWrapper(move, parent);
return qobject_cast<MoveWrapper*>(m_instances[Signiture(parent, move->id())]);
}
-Pokescripting::MoveWrapper::MoveWrapper(const Pokemod::Move* move, PokemodWrapper* parent) :
+Sigscript::MoveWrapper::MoveWrapper(const Sigmod::Move* move, SigmodWrapper* parent) :
ObjectWrapper(move, parent),
m_move(move)
{
}
-QString Pokescripting::MoveWrapper::name() const
+QString Sigscript::MoveWrapper::name() const
{
return m_move->name();
}
-Pokemod::Fraction Pokescripting::MoveWrapper::accuracy() const
+Sigmod::Fraction Sigscript::MoveWrapper::accuracy() const
{
- if (value("accuracy").canConvert<Pokemod::Fraction>())
- return value("accuracy").value<Pokemod::Fraction>();
+ if (value("accuracy").canConvert<Sigmod::Fraction>())
+ return value("accuracy").value<Sigmod::Fraction>();
return m_move->accuracy();
}
-int Pokescripting::MoveWrapper::power() const
+int Sigscript::MoveWrapper::power() const
{
if (value("power").canConvert<int>())
return value("power").toInt();
return m_move->power();
}
-Pokescripting::TypeWrapper* Pokescripting::MoveWrapper::type()
+Sigscript::TypeWrapper* Sigscript::MoveWrapper::type()
{
- return pokemod()->type(m_move->type());
+ return sigmod()->type(m_move->type());
}
-bool Pokescripting::MoveWrapper::special() const
+bool Sigscript::MoveWrapper::special() const
{
return m_move->special();
}
-int Pokescripting::MoveWrapper::powerPoints() const
+int Sigscript::MoveWrapper::powerPoints() const
{
return m_move->powerPoints();
}
-int Pokescripting::MoveWrapper::priority() const
+int Sigscript::MoveWrapper::priority() const
{
if (value("priority").canConvert<int>())
return value("priority").toInt();
return m_move->priority();
}
-QString Pokescripting::MoveWrapper::description() const
+QString Sigscript::MoveWrapper::description() const
{
return m_move->description();
}
-Pokemod::Script Pokescripting::MoveWrapper::battleScript() const
+Sigmod::Script Sigscript::MoveWrapper::battleScript() const
{
return m_move->battleScript();
}
-Pokemod::Script Pokescripting::MoveWrapper::worldScript() const
+Sigmod::Script Sigscript::MoveWrapper::worldScript() const
{
return m_move->worldScript();
}
diff --git a/sigscript/MoveWrapper.h b/sigscript/MoveWrapper.h
index 37a7192f..0ae57288 100644
--- a/sigscript/MoveWrapper.h
+++ b/sigscript/MoveWrapper.h
@@ -15,44 +15,44 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_MOVEWRAPPER__
-#define __POKESCRIPTING_MOVEWRAPPER__
+#ifndef __SIGSCRIPT_MOVEWRAPPER__
+#define __SIGSCRIPT_MOVEWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Move.h"
+// Sigmod includes
+#include "../sigmod/Move.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class TypeWrapper;
-class POKESCRIPTING_EXPORT MoveWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT MoveWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static MoveWrapper* create(const Pokemod::Move* move, PokemodWrapper* parent);
+ static MoveWrapper* create(const Sigmod::Move* move, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
- Q_SCRIPTABLE Pokemod::Fraction accuracy() const;
+ Q_SCRIPTABLE Sigmod::Fraction accuracy() const;
Q_SCRIPTABLE int power() const;
Q_SCRIPTABLE TypeWrapper* type();
Q_SCRIPTABLE bool special() const;
Q_SCRIPTABLE int powerPoints() const;
Q_SCRIPTABLE int priority() const;
Q_SCRIPTABLE QString description() const;
- Q_SCRIPTABLE Pokemod::Script battleScript() const;
- Q_SCRIPTABLE Pokemod::Script worldScript() const;
+ Q_SCRIPTABLE Sigmod::Script battleScript() const;
+ Q_SCRIPTABLE Sigmod::Script worldScript() const;
private:
- MoveWrapper(const Pokemod::Move* move, PokemodWrapper* parent);
+ MoveWrapper(const Sigmod::Move* move, SigmodWrapper* parent);
MoveWrapper& operator=(const MoveWrapper& rhs);
- const Pokemod::Move* m_move;
+ const Sigmod::Move* m_move;
};
}
-Q_DECLARE_METATYPE(Pokescripting::MoveWrapper*)
+Q_DECLARE_METATYPE(Sigscript::MoveWrapper*)
#endif
diff --git a/sigscript/NatureWrapper.cpp b/sigscript/NatureWrapper.cpp
index fa9f1c06..49ca54a3 100644
--- a/sigscript/NatureWrapper.cpp
+++ b/sigscript/NatureWrapper.cpp
@@ -18,33 +18,33 @@
// Header include
#include "NatureWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::NatureWrapper* Pokescripting::NatureWrapper::create(const Pokemod::Nature* nature, PokemodWrapper* parent)
+Sigscript::NatureWrapper* Sigscript::NatureWrapper::create(const Sigmod::Nature* nature, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, nature->id())))
m_instances[Signiture(parent, nature->id())] = new NatureWrapper(nature, parent);
return qobject_cast<NatureWrapper*>(m_instances[Signiture(parent, nature->id())]);
}
-Pokescripting::NatureWrapper::NatureWrapper(const Pokemod::Nature* nature, PokemodWrapper* parent) :
+Sigscript::NatureWrapper::NatureWrapper(const Sigmod::Nature* nature, SigmodWrapper* parent) :
ObjectWrapper(nature, parent),
m_nature(nature)
{
}
-QString Pokescripting::NatureWrapper::name() const
+QString Sigscript::NatureWrapper::name() const
{
return m_nature->name();
}
-Pokemod::Fraction Pokescripting::NatureWrapper::stat(const Pokemod::Stat stat) const
+Sigmod::Fraction Sigscript::NatureWrapper::stat(const Sigmod::Stat stat) const
{
return m_nature->stat(stat);
}
-int Pokescripting::NatureWrapper::weight() const
+int Sigscript::NatureWrapper::weight() const
{
return m_nature->weight();
}
diff --git a/sigscript/NatureWrapper.h b/sigscript/NatureWrapper.h
index 037a014c..c4b55272 100644
--- a/sigscript/NatureWrapper.h
+++ b/sigscript/NatureWrapper.h
@@ -15,34 +15,34 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_NATUREWRAPPER__
-#define __POKESCRIPTING_NATUREWRAPPER__
+#ifndef __SIGSCRIPT_NATUREWRAPPER__
+#define __SIGSCRIPT_NATUREWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Nature.h"
+// Sigmod includes
+#include "../sigmod/Nature.h"
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT NatureWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT NatureWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static NatureWrapper* create(const Pokemod::Nature* nature, PokemodWrapper* parent);
+ static NatureWrapper* create(const Sigmod::Nature* nature, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
- Q_SCRIPTABLE Pokemod::Fraction stat(const Pokemod::Stat stat) const;
+ Q_SCRIPTABLE Sigmod::Fraction stat(const Sigmod::Stat stat) const;
Q_SCRIPTABLE int weight() const;
private:
- NatureWrapper(const Pokemod::Nature* nature, PokemodWrapper* parent);
+ NatureWrapper(const Sigmod::Nature* nature, SigmodWrapper* parent);
NatureWrapper& operator=(const NatureWrapper& rhs);
- const Pokemod::Nature* m_nature;
+ const Sigmod::Nature* m_nature;
};
}
-Q_DECLARE_METATYPE(Pokescripting::NatureWrapper*)
+Q_DECLARE_METATYPE(Sigscript::NatureWrapper*)
#endif
diff --git a/sigscript/ObjectWrapper.cpp b/sigscript/ObjectWrapper.cpp
index d1af3220..8917c375 100644
--- a/sigscript/ObjectWrapper.cpp
+++ b/sigscript/ObjectWrapper.cpp
@@ -18,42 +18,42 @@
// Header include
#include "ObjectWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-QMap<Pokescripting::ObjectWrapper::Signiture, Pokescripting::ObjectWrapper*> Pokescripting::ObjectWrapper::m_instances;
+QMap<Sigscript::ObjectWrapper::Signiture, Sigscript::ObjectWrapper*> Sigscript::ObjectWrapper::m_instances;
-Pokescripting::ObjectWrapper::ObjectWrapper(const Pokemod::Object* object, ObjectWrapper* parent) :
+Sigscript::ObjectWrapper::ObjectWrapper(const Sigmod::Object* object, ObjectWrapper* parent) :
Config(parent),
m_object(object)
{
}
-int Pokescripting::ObjectWrapper::id() const
+int Sigscript::ObjectWrapper::id() const
{
return m_object->id();
}
-const Pokescripting::ObjectWrapper* Pokescripting::ObjectWrapper::parent() const
+const Sigscript::ObjectWrapper* Sigscript::ObjectWrapper::parent() const
{
return m_parent;
}
-Pokescripting::ObjectWrapper* Pokescripting::ObjectWrapper::parent()
+Sigscript::ObjectWrapper* Sigscript::ObjectWrapper::parent()
{
return m_parent;
}
-const Pokescripting::PokemodWrapper* Pokescripting::ObjectWrapper::pokemod() const
+const Sigscript::SigmodWrapper* Sigscript::ObjectWrapper::sigmod() const
{
if (m_parent)
- return m_parent->pokemod();
- return qobject_cast<const PokemodWrapper*>(m_parent);
+ return m_parent->sigmod();
+ return qobject_cast<const SigmodWrapper*>(m_parent);
}
-Pokescripting::PokemodWrapper* Pokescripting::ObjectWrapper::pokemod()
+Sigscript::SigmodWrapper* Sigscript::ObjectWrapper::sigmod()
{
if (m_parent)
- return m_parent->pokemod();
- return qobject_cast<PokemodWrapper*>(m_parent);
+ return m_parent->sigmod();
+ return qobject_cast<SigmodWrapper*>(m_parent);
}
diff --git a/sigscript/ObjectWrapper.h b/sigscript/ObjectWrapper.h
index 648b693b..d5260b74 100644
--- a/sigscript/ObjectWrapper.h
+++ b/sigscript/ObjectWrapper.h
@@ -15,27 +15,27 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_OBJECTWRAPPER__
-#define __POKESCRIPTING_OBJECTWRAPPER__
+#ifndef __SIGSCRIPT_OBJECTWRAPPER__
+#define __SIGSCRIPT_OBJECTWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "Config.h"
-// Pokemod includes
-#include "../pokemod/Object.h"
-#include "../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../sigmod/Object.h"
+#include "../sigmod/Sigmod.h"
// Qt includes
#include <QtCore/QMap>
#include <QtCore/QObject>
#include <QtCore/QPair>
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
-class PokemodWrapper;
+class SigmodWrapper;
-class POKESCRIPTING_EXPORT ObjectWrapper : public Config
+class SIGSCRIPT_EXPORT ObjectWrapper : public Config
{
Q_OBJECT
Q_PROPERTY(int id READ id)
@@ -43,20 +43,20 @@ class POKESCRIPTING_EXPORT ObjectWrapper : public Config
public:
typedef QPair<ObjectWrapper*, int> Signiture;
- ObjectWrapper(const Pokemod::Object* object, ObjectWrapper* parent);
+ ObjectWrapper(const Sigmod::Object* object, ObjectWrapper* parent);
int id() const;
const ObjectWrapper* parent() const;
ObjectWrapper* parent();
- const PokemodWrapper* pokemod() const;
- PokemodWrapper* pokemod();
+ const SigmodWrapper* sigmod() const;
+ SigmodWrapper* sigmod();
protected:
static QMap<Signiture, ObjectWrapper*> m_instances;
private:
ObjectWrapper* m_parent;
- const Pokemod::Object* m_object;
+ const Sigmod::Object* m_object;
};
}
diff --git a/sigscript/PokemodWrapper.cpp b/sigscript/PokemodWrapper.cpp
deleted file mode 100644
index 247fb409..00000000
--- a/sigscript/PokemodWrapper.cpp
+++ /dev/null
@@ -1,460 +0,0 @@
-/*
- * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-// Header include
-#include "PokemodWrapper.h"
-
-// Pokescripting includes
-#include "AbilityWrapper.h"
-#include "AuthorWrapper.h"
-#include "BadgeWrapper.h"
-#include "CoinListWrapper.h"
-#include "EggGroupWrapper.h"
-#include "GlobalScriptWrapper.h"
-#include "ItemWrapper.h"
-#include "ItemTypeWrapper.h"
-#include "MapWrapper.h"
-#include "MapWarpWrapper.h"
-#include "MoveWrapper.h"
-#include "NatureWrapper.h"
-#include "RulesWrapper.h"
-#include "SkinWrapper.h"
-#include "SoundWrapper.h"
-#include "SpeciesWrapper.h"
-#include "SpriteWrapper.h"
-#include "StatusWrapper.h"
-#include "StoreWrapper.h"
-#include "TileWrapper.h"
-#include "TimeWrapper.h"
-#include "TrainerWrapper.h"
-#include "TypeWrapper.h"
-#include "WeatherWrapper.h"
-
-Pokescripting::PokemodWrapper::PokemodWrapper(const Pokemod::Pokemod* pokemod) :
- ObjectWrapper(pokemod, NULL),
- m_pokemod(pokemod)
-{
-}
-
-Pokemod::Hat<Pokescripting::NatureWrapper*> Pokescripting::PokemodWrapper::natureHat()
-{
- Pokemod::Hat<NatureWrapper*> hat;
- for (int i = 0; i < m_pokemod->natureCount(); ++i)
- {
- NatureWrapper* nature = NatureWrapper::create(m_pokemod->nature(i), this);
- hat.add(nature, nature->weight());
- }
- return hat;
-}
-
-Pokescripting::AbilityWrapper* Pokescripting::PokemodWrapper::ability(const int id)
-{
- return AbilityWrapper::create(m_pokemod->abilityById(id), this);
-}
-
-Pokescripting::AuthorWrapper* Pokescripting::PokemodWrapper::author(const int id)
-{
- return AuthorWrapper::create(m_pokemod->authorById(id), this);
-}
-
-Pokescripting::BadgeWrapper* Pokescripting::PokemodWrapper::badge(const int id)
-{
- return BadgeWrapper::create(m_pokemod->badgeById(id), this);
-}
-
-Pokescripting::CoinListWrapper* Pokescripting::PokemodWrapper::coinList(const int id)
-{
- return CoinListWrapper::create(m_pokemod->coinListById(id), this);
-}
-
-Pokescripting::EggGroupWrapper* Pokescripting::PokemodWrapper::eggGroup(const int id)
-{
- return EggGroupWrapper::create(m_pokemod->eggGroupById(id), this);
-}
-
-Pokescripting::GlobalScriptWrapper* Pokescripting::PokemodWrapper::globalScript(const int id)
-{
- return GlobalScriptWrapper::create(m_pokemod->globalScriptById(id), this);
-}
-
-Pokescripting::ItemWrapper* Pokescripting::PokemodWrapper::item(const int id)
-{
- return ItemWrapper::create(m_pokemod->itemById(id), this);
-}
-
-Pokescripting::ItemTypeWrapper* Pokescripting::PokemodWrapper::itemType(const int id)
-{
- return ItemTypeWrapper::create(m_pokemod->itemTypeById(id), this);
-}
-
-Pokescripting::MapWrapper* Pokescripting::PokemodWrapper::map(const int id)
-{
- return MapWrapper::create(m_pokemod->mapById(id), this);
-}
-
-Pokescripting::MoveWrapper* Pokescripting::PokemodWrapper::move(const int id)
-{
- return MoveWrapper::create(m_pokemod->moveById(id), this);
-}
-
-Pokescripting::NatureWrapper* Pokescripting::PokemodWrapper::nature(const int id)
-{
- return NatureWrapper::create(m_pokemod->natureById(id), this);
-}
-
-Pokescripting::SkinWrapper* Pokescripting::PokemodWrapper::skin(const int id)
-{
- return SkinWrapper::create(m_pokemod->skinById(id), this);
-}
-
-Pokescripting::SoundWrapper* Pokescripting::PokemodWrapper::sound(const int id)
-{
- return SoundWrapper::create(m_pokemod->soundById(id), this);
-}
-
-Pokescripting::SpeciesWrapper* Pokescripting::PokemodWrapper::species(const int id)
-{
- return SpeciesWrapper::create(m_pokemod->speciesById(id), this);
-}
-
-Pokescripting::SpriteWrapper* Pokescripting::PokemodWrapper::sprite(const int id)
-{
- return SpriteWrapper::create(m_pokemod->spriteById(id), this);
-}
-
-Pokescripting::StatusWrapper* Pokescripting::PokemodWrapper::status(const int id)
-{
- return StatusWrapper::create(m_pokemod->statusById(id), this);
-}
-
-Pokescripting::StoreWrapper* Pokescripting::PokemodWrapper::store(const int id)
-{
- return StoreWrapper::create(m_pokemod->storeById(id), this);
-}
-
-Pokescripting::TileWrapper* Pokescripting::PokemodWrapper::tile(const int id)
-{
- return TileWrapper::create(m_pokemod->tileById(id), this);
-}
-
-Pokescripting::TimeWrapper* Pokescripting::PokemodWrapper::time(const int id)
-{
- return TimeWrapper::create(m_pokemod->timeById(id), this);
-}
-
-Pokescripting::TrainerWrapper* Pokescripting::PokemodWrapper::trainer(const int id)
-{
- return TrainerWrapper::create(m_pokemod->trainerById(id), this);
-}
-
-Pokescripting::TypeWrapper* Pokescripting::PokemodWrapper::type(const int id)
-{
- return TypeWrapper::create(m_pokemod->typeById(id), this);
-}
-
-Pokescripting::WeatherWrapper* Pokescripting::PokemodWrapper::weather(const int id)
-{
- return WeatherWrapper::create(m_pokemod->weatherById(id), this);
-}
-
-Pokemod::Stat Pokescripting::PokemodWrapper::stat(const QString& name) const
-{
- if (name == "HP")
- return Pokemod::ST_HP;
- else if (name == "Attack")
- return Pokemod::ST_Attack;
- else if (name == "Defense")
- return Pokemod::ST_Defense;
- else if (name == "Speed")
- return Pokemod::ST_Speed;
- else if (name == "Special")
- return Pokemod::ST_Special;
- else if (name == "Special Attack")
- return Pokemod::ST_SpecialAttack;
- else if (name == "Special Defense")
- return Pokemod::ST_SpecialAttack;
- else if (name == "Accuracy")
- return Pokemod::ST_Accuracy;
- else if (name == "Evasion")
- return Pokemod::ST_Evasion;
- return QVariant(-1).value<Pokemod::Stat>();
-}
-
-Pokemod::Direction Pokescripting::PokemodWrapper::direction(const QString& name) const
-{
- if (name == "Up")
- return Pokemod::D_Up;
- else if (name == "Down")
- return Pokemod::D_Down;
- else if (name == "Left")
- return Pokemod::D_Left;
- else if (name == "Right")
- return Pokemod::D_Right;
- else if (name == "None")
- return Pokemod::D_None;
- return QVariant(-1).value<Pokemod::Direction>();
-}
-
-QString Pokescripting::PokemodWrapper::title() const
-{
- return m_pokemod->title();
-}
-
-QString Pokescripting::PokemodWrapper::version() const
-{
- return m_pokemod->version();
-}
-
-QString Pokescripting::PokemodWrapper::description() const
-{
- return m_pokemod->description();
-}
-
-Pokescripting::MapWarpWrapper* Pokescripting::PokemodWrapper::startWarp()
-{
- return map(m_pokemod->startMap())->warp(m_pokemod->startWarp());
-}
-
-Pokemod::Fraction Pokescripting::PokemodWrapper::effectiveness(const TypeWrapper* attacker, const TypeWrapper* defender) const
-{
- return m_pokemod->typechart(m_pokemod->typeIndex(attacker->id()), m_pokemod->typeIndex(defender->id()));
-}
-
-Pokescripting::RulesWrapper* Pokescripting::PokemodWrapper::rules()
-{
- return RulesWrapper::create(m_pokemod->rules(), this);
-}
-
-Pokescripting::AbilityWrapper* Pokescripting::PokemodWrapper::ability(const QString& name)
-{
- for (int i = 0; i < m_pokemod->abilityCount(); ++i)
- {
- if (m_pokemod->ability(i)->name() == name)
- return AbilityWrapper::create(m_pokemod->ability(i), this);
- }
- return NULL;
-}
-
-Pokescripting::AuthorWrapper* Pokescripting::PokemodWrapper::author(const QString& name)
-{
- for (int i = 0; i < m_pokemod->authorCount(); ++i)
- {
- if (m_pokemod->author(i)->name() == name)
- return AuthorWrapper::create(m_pokemod->author(i), this);
- }
- return NULL;
-}
-
-Pokescripting::BadgeWrapper* Pokescripting::PokemodWrapper::badge(const QString& name)
-{
- for (int i = 0; i < m_pokemod->badgeCount(); ++i)
- {
- if (m_pokemod->badge(i)->name() == name)
- return BadgeWrapper::create(m_pokemod->badge(i), this);
- }
- return NULL;
-}
-
-Pokescripting::CoinListWrapper* Pokescripting::PokemodWrapper::coinList(const QString& name)
-{
- for (int i = 0; i < m_pokemod->coinListCount(); ++i)
- {
- if (m_pokemod->coinList(i)->name() == name)
- return CoinListWrapper::create(m_pokemod->coinList(i), this);
- }
- return NULL;
-}
-
-Pokescripting::EggGroupWrapper* Pokescripting::PokemodWrapper::eggGroup(const QString& name)
-{
- for (int i = 0; i < m_pokemod->eggGroupCount(); ++i)
- {
- if (m_pokemod->eggGroup(i)->name() == name)
- return EggGroupWrapper::create(m_pokemod->eggGroup(i), this);
- }
- return NULL;
-}
-
-Pokescripting::GlobalScriptWrapper* Pokescripting::PokemodWrapper::globalScript(const QString& name)
-{
- for (int i = 0; i < m_pokemod->globalScriptCount(); ++i)
- {
- if (m_pokemod->globalScript(i)->name() == name)
- return GlobalScriptWrapper::create(m_pokemod->globalScript(i), this);
- }
- return NULL;
-}
-
-Pokescripting::ItemWrapper* Pokescripting::PokemodWrapper::item(const QString& name)
-{
- for (int i = 0; i < m_pokemod->itemCount(); ++i)
- {
- if (m_pokemod->item(i)->name() == name)
- return ItemWrapper::create(m_pokemod->item(i), this);
- }
- return NULL;
-}
-
-Pokescripting::ItemTypeWrapper* Pokescripting::PokemodWrapper::itemType(const QString& name)
-{
- for (int i = 0; i < m_pokemod->itemTypeCount(); ++i)
- {
- if (m_pokemod->itemType(i)->name() == name)
- return ItemTypeWrapper::create(m_pokemod->itemType(i), this);
- }
- return NULL;
-}
-
-Pokescripting::MapWrapper* Pokescripting::PokemodWrapper::map(const QString& name)
-{
- for (int i = 0; i < m_pokemod->mapCount(); ++i)
- {
- if (m_pokemod->map(i)->name() == name)
- return MapWrapper::create(m_pokemod->map(i), this);
- }
- return NULL;
-}
-
-Pokescripting::MoveWrapper* Pokescripting::PokemodWrapper::move(const QString& name)
-{
- for (int i = 0; i < m_pokemod->moveCount(); ++i)
- {
- if (m_pokemod->move(i)->name() == name)
- return MoveWrapper::create(m_pokemod->move(i), this);
- }
- return NULL;
-}
-
-Pokescripting::NatureWrapper* Pokescripting::PokemodWrapper::nature(const QString& name)
-{
- for (int i = 0; i < m_pokemod->natureCount(); ++i)
- {
- if (m_pokemod->nature(i)->name() == name)
- return NatureWrapper::create(m_pokemod->nature(i), this);
- }
- return NULL;
-}
-
-Pokescripting::SkinWrapper* Pokescripting::PokemodWrapper::skin(const QString& name)
-{
- for (int i = 0; i < m_pokemod->skinCount(); ++i)
- {
- if (m_pokemod->skin(i)->name() == name)
- return SkinWrapper::create(m_pokemod->skin(i), this);
- }
- return NULL;
-}
-
-Pokescripting::SoundWrapper* Pokescripting::PokemodWrapper::sound(const QString& name)
-{
- for (int i = 0; i < m_pokemod->soundCount(); ++i)
- {
- if (m_pokemod->sound(i)->name() == name)
- return SoundWrapper::create(m_pokemod->sound(i), this);
- }
- return NULL;
-}
-
-Pokescripting::SpeciesWrapper* Pokescripting::PokemodWrapper::species(const QString& name)
-{
- for (int i = 0; i < m_pokemod->speciesCount(); ++i)
- {
- if (m_pokemod->species(i)->name() == name)
- return SpeciesWrapper::create(m_pokemod->species(i), this);
- }
- return NULL;
-}
-
-Pokescripting::SpriteWrapper* Pokescripting::PokemodWrapper::sprite(const QString& name)
-{
- for (int i = 0; i < m_pokemod->spriteCount(); ++i)
- {
- if (m_pokemod->sprite(i)->name() == name)
- return SpriteWrapper::create(m_pokemod->sprite(i), this);
- }
- return NULL;
-}
-
-Pokescripting::StatusWrapper* Pokescripting::PokemodWrapper::status(const QString& name)
-{
- for (int i = 0; i < m_pokemod->statusCount(); ++i)
- {
- if (m_pokemod->status(i)->name() == name)
- return StatusWrapper::create(m_pokemod->status(i), this);
- }
- return NULL;
-}
-
-Pokescripting::StoreWrapper* Pokescripting::PokemodWrapper::store(const QString& name)
-{
- for (int i = 0; i < m_pokemod->storeCount(); ++i)
- {
- if (m_pokemod->store(i)->name() == name)
- return StoreWrapper::create(m_pokemod->store(i), this);
- }
- return NULL;
-}
-
-Pokescripting::TileWrapper* Pokescripting::PokemodWrapper::tile(const QString& name)
-{
- for (int i = 0; i < m_pokemod->tileCount(); ++i)
- {
- if (m_pokemod->tile(i)->name() == name)
- return TileWrapper::create(m_pokemod->tile(i), this);
- }
- return NULL;
-}
-
-Pokescripting::TimeWrapper* Pokescripting::PokemodWrapper::time(const QString& name)
-{
- for (int i = 0; i < m_pokemod->timeCount(); ++i)
- {
- if (m_pokemod->time(i)->name() == name)
- return TimeWrapper::create(m_pokemod->time(i), this);
- }
- return NULL;
-}
-
-Pokescripting::TrainerWrapper* Pokescripting::PokemodWrapper::trainer(const QString& name)
-{
- for (int i = 0; i < m_pokemod->trainerCount(); ++i)
- {
- if (m_pokemod->trainer(i)->name() == name)
- return TrainerWrapper::create(m_pokemod->trainer(i), this);
- }
- return NULL;
-}
-
-Pokescripting::TypeWrapper* Pokescripting::PokemodWrapper::type(const QString& name)
-{
- for (int i = 0; i < m_pokemod->typeCount(); ++i)
- {
- if (m_pokemod->type(i)->name() == name)
- return TypeWrapper::create(m_pokemod->type(i), this);
- }
- return NULL;
-}
-
-Pokescripting::WeatherWrapper* Pokescripting::PokemodWrapper::weather(const QString& name)
-{
- for (int i = 0; i < m_pokemod->weatherCount(); ++i)
- {
- if (m_pokemod->weather(i)->name() == name)
- return WeatherWrapper::create(m_pokemod->weather(i), this);
- }
- return NULL;
-}
diff --git a/sigscript/RulesWrapper.cpp b/sigscript/RulesWrapper.cpp
index e70e4af0..aa2a2108 100644
--- a/sigscript/RulesWrapper.cpp
+++ b/sigscript/RulesWrapper.cpp
@@ -18,157 +18,157 @@
// Header include
#include "RulesWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::RulesWrapper* Pokescripting::RulesWrapper::create(const Pokemod::Rules* rules, PokemodWrapper* parent)
+Sigscript::RulesWrapper* Sigscript::RulesWrapper::create(const Sigmod::Rules* rules, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, rules->id())))
m_instances[Signiture(parent, rules->id())] = new RulesWrapper(rules, parent);
return qobject_cast<RulesWrapper*>(m_instances[Signiture(parent, rules->id())]);
}
-Pokescripting::RulesWrapper::RulesWrapper(const Pokemod::Rules* rules, PokemodWrapper* parent) :
+Sigscript::RulesWrapper::RulesWrapper(const Sigmod::Rules* rules, SigmodWrapper* parent) :
ObjectWrapper(rules, parent),
m_rules(rules)
{
}
-bool Pokescripting::RulesWrapper::genderAllowed() const
+bool Sigscript::RulesWrapper::genderAllowed() const
{
return m_rules->genderAllowed();
}
-bool Pokescripting::RulesWrapper::breedingAllowed() const
+bool Sigscript::RulesWrapper::breedingAllowed() const
{
return m_rules->breedingAllowed();
}
-bool Pokescripting::RulesWrapper::criticalDomains() const
+bool Sigscript::RulesWrapper::criticalDomains() const
{
return m_rules->criticalDomains();
}
-bool Pokescripting::RulesWrapper::useTurns() const
+bool Sigscript::RulesWrapper::useTurns() const
{
return m_rules->useTurns();
}
-int Pokescripting::RulesWrapper::numBoxes() const
+int Sigscript::RulesWrapper::numBoxes() const
{
if (value("numBoxes").canConvert<int>())
return value("numBoxes").toInt();
return m_rules->numBoxes();
}
-int Pokescripting::RulesWrapper::boxSize() const
+int Sigscript::RulesWrapper::boxSize() const
{
if (value("boxSize").canConvert<int>())
return value("boxSize").toInt();
return m_rules->boxSize();
}
-int Pokescripting::RulesWrapper::maxParty() const
+int Sigscript::RulesWrapper::maxParty() const
{
if (value("maxParty").canConvert<int>())
return value("maxParty").toInt();
return m_rules->maxParty();
}
-int Pokescripting::RulesWrapper::maxFight() const
+int Sigscript::RulesWrapper::maxFight() const
{
if (value("maxFight").canConvert<int>())
return value("maxFight").toInt();
return m_rules->maxFight();
}
-int Pokescripting::RulesWrapper::maxPlayers() const
+int Sigscript::RulesWrapper::maxPlayers() const
{
if (value("maxFight").canConvert<int>())
return value("maxFight").toInt();
return m_rules->maxPlayers();
}
-int Pokescripting::RulesWrapper::maxHeldItems() const
+int Sigscript::RulesWrapper::maxHeldItems() const
{
if (value("maxHeldItems").canConvert<int>())
return value("maxHeldItems").toInt();
return m_rules->maxHeldItems();
}
-int Pokescripting::RulesWrapper::maxAbilities() const
+int Sigscript::RulesWrapper::maxAbilities() const
{
return m_rules->maxAbilities();
}
-int Pokescripting::RulesWrapper::maxNatures() const
+int Sigscript::RulesWrapper::maxNatures() const
{
return m_rules->maxNatures();
}
-int Pokescripting::RulesWrapper::maxMoves() const
+int Sigscript::RulesWrapper::maxMoves() const
{
if (value("maxMoves").canConvert<int>())
return value("maxMoves").toInt();
return m_rules->maxMoves();
}
-int Pokescripting::RulesWrapper::maxLevel() const
+int Sigscript::RulesWrapper::maxLevel() const
{
if (value("maxLevel").canConvert<int>())
return value("maxLevel").toInt();
return m_rules->maxLevel();
}
-int Pokescripting::RulesWrapper::maxStages() const
+int Sigscript::RulesWrapper::maxStages() const
{
if (value("maxStages").canConvert<int>())
return value("maxStages").toInt();
return m_rules->maxStages();
}
-int Pokescripting::RulesWrapper::maxMoney() const
+int Sigscript::RulesWrapper::maxMoney() const
{
if (value("maxMoney").canConvert<int>())
return value("maxMoney").toInt();
return m_rules->maxMoney();
}
-bool Pokescripting::RulesWrapper::hardCash() const
+bool Sigscript::RulesWrapper::hardCash() const
{
return m_rules->hardCash();
}
-bool Pokescripting::RulesWrapper::allowSwitchStyle() const
+bool Sigscript::RulesWrapper::allowSwitchStyle() const
{
if (value("allowSwitchStyle").canConvert<bool>())
return value("allowSwitchStyle").toBool();
return m_rules->allowSwitchStyle();
}
-bool Pokescripting::RulesWrapper::specialSplit() const
+bool Sigscript::RulesWrapper::specialSplit() const
{
return m_rules->specialSplit();
}
-bool Pokescripting::RulesWrapper::specialDVSplit() const
+bool Sigscript::RulesWrapper::specialDVSplit() const
{
return m_rules->specialDVSplit();
}
-bool Pokescripting::RulesWrapper::effortValuesAllowed() const
+bool Sigscript::RulesWrapper::effortValuesAllowed() const
{
return m_rules->effortValuesAllowed();
}
-int Pokescripting::RulesWrapper::maxTotalEV() const
+int Sigscript::RulesWrapper::maxTotalEV() const
{
if (value("maxTotalEV").canConvert<int>())
return value("maxTotalEV").toInt();
return m_rules->maxTotalEV();
}
-int Pokescripting::RulesWrapper::maxEVPerStat() const
+int Sigscript::RulesWrapper::maxEVPerStat() const
{
if (value("maxEVPerStat").canConvert<int>())
return value("maxEVPerStat").toInt();
diff --git a/sigscript/RulesWrapper.h b/sigscript/RulesWrapper.h
index a4492022..b5aeaad8 100644
--- a/sigscript/RulesWrapper.h
+++ b/sigscript/RulesWrapper.h
@@ -15,23 +15,23 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_RULESWRAPPER__
-#define __POKESCRIPTING_RULESWRAPPER__
+#ifndef __SIGSCRIPT_RULESWRAPPER__
+#define __SIGSCRIPT_RULESWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Rules.h"
+// Sigmod includes
+#include "../sigmod/Rules.h"
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT RulesWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT RulesWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static RulesWrapper* create(const Pokemod::Rules* rules, PokemodWrapper* parent);
+ static RulesWrapper* create(const Sigmod::Rules* rules, SigmodWrapper* parent);
Q_SCRIPTABLE bool genderAllowed() const;
Q_SCRIPTABLE bool breedingAllowed() const;
@@ -57,12 +57,12 @@ class POKESCRIPTING_EXPORT RulesWrapper : public ObjectWrapper
Q_SCRIPTABLE int maxTotalEV() const;
Q_SCRIPTABLE int maxEVPerStat() const;
private:
- RulesWrapper(const Pokemod::Rules* rules, PokemodWrapper* parent);
+ RulesWrapper(const Sigmod::Rules* rules, SigmodWrapper* parent);
RulesWrapper& operator=(const RulesWrapper& rhs);
- const Pokemod::Rules* m_rules;
+ const Sigmod::Rules* m_rules;
};
}
-Q_DECLARE_METATYPE(Pokescripting::RulesWrapper*)
+Q_DECLARE_METATYPE(Sigscript::RulesWrapper*)
#endif
diff --git a/sigscript/SigmodWrapper.cpp b/sigscript/SigmodWrapper.cpp
new file mode 100644
index 00000000..473ffddc
--- /dev/null
+++ b/sigscript/SigmodWrapper.cpp
@@ -0,0 +1,460 @@
+/*
+ * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Header include
+#include "SigmodWrapper.h"
+
+// Sigscript includes
+#include "AbilityWrapper.h"
+#include "AuthorWrapper.h"
+#include "BadgeWrapper.h"
+#include "CoinListWrapper.h"
+#include "EggGroupWrapper.h"
+#include "GlobalScriptWrapper.h"
+#include "ItemWrapper.h"
+#include "ItemTypeWrapper.h"
+#include "MapWrapper.h"
+#include "MapWarpWrapper.h"
+#include "MoveWrapper.h"
+#include "NatureWrapper.h"
+#include "RulesWrapper.h"
+#include "SkinWrapper.h"
+#include "SoundWrapper.h"
+#include "SpeciesWrapper.h"
+#include "SpriteWrapper.h"
+#include "StatusWrapper.h"
+#include "StoreWrapper.h"
+#include "TileWrapper.h"
+#include "TimeWrapper.h"
+#include "TrainerWrapper.h"
+#include "TypeWrapper.h"
+#include "WeatherWrapper.h"
+
+Sigscript::SigmodWrapper::SigmodWrapper(const Sigmod::Sigmod* sigmod) :
+ ObjectWrapper(sigmod, NULL),
+ m_sigmod(sigmod)
+{
+}
+
+Sigmod::Hat<Sigscript::NatureWrapper*> Sigscript::SigmodWrapper::natureHat()
+{
+ Sigmod::Hat<NatureWrapper*> hat;
+ for (int i = 0; i < m_sigmod->natureCount(); ++i)
+ {
+ NatureWrapper* nature = NatureWrapper::create(m_sigmod->nature(i), this);
+ hat.add(nature, nature->weight());
+ }
+ return hat;
+}
+
+Sigscript::AbilityWrapper* Sigscript::SigmodWrapper::ability(const int id)
+{
+ return AbilityWrapper::create(m_sigmod->abilityById(id), this);
+}
+
+Sigscript::AuthorWrapper* Sigscript::SigmodWrapper::author(const int id)
+{
+ return AuthorWrapper::create(m_sigmod->authorById(id), this);
+}
+
+Sigscript::BadgeWrapper* Sigscript::SigmodWrapper::badge(const int id)
+{
+ return BadgeWrapper::create(m_sigmod->badgeById(id), this);
+}
+
+Sigscript::CoinListWrapper* Sigscript::SigmodWrapper::coinList(const int id)
+{
+ return CoinListWrapper::create(m_sigmod->coinListById(id), this);
+}
+
+Sigscript::EggGroupWrapper* Sigscript::SigmodWrapper::eggGroup(const int id)
+{
+ return EggGroupWrapper::create(m_sigmod->eggGroupById(id), this);
+}
+
+Sigscript::GlobalScriptWrapper* Sigscript::SigmodWrapper::globalScript(const int id)
+{
+ return GlobalScriptWrapper::create(m_sigmod->globalScriptById(id), this);
+}
+
+Sigscript::ItemWrapper* Sigscript::SigmodWrapper::item(const int id)
+{
+ return ItemWrapper::create(m_sigmod->itemById(id), this);
+}
+
+Sigscript::ItemTypeWrapper* Sigscript::SigmodWrapper::itemType(const int id)
+{
+ return ItemTypeWrapper::create(m_sigmod->itemTypeById(id), this);
+}
+
+Sigscript::MapWrapper* Sigscript::SigmodWrapper::map(const int id)
+{
+ return MapWrapper::create(m_sigmod->mapById(id), this);
+}
+
+Sigscript::MoveWrapper* Sigscript::SigmodWrapper::move(const int id)
+{
+ return MoveWrapper::create(m_sigmod->moveById(id), this);
+}
+
+Sigscript::NatureWrapper* Sigscript::SigmodWrapper::nature(const int id)
+{
+ return NatureWrapper::create(m_sigmod->natureById(id), this);
+}
+
+Sigscript::SkinWrapper* Sigscript::SigmodWrapper::skin(const int id)
+{
+ return SkinWrapper::create(m_sigmod->skinById(id), this);
+}
+
+Sigscript::SoundWrapper* Sigscript::SigmodWrapper::sound(const int id)
+{
+ return SoundWrapper::create(m_sigmod->soundById(id), this);
+}
+
+Sigscript::SpeciesWrapper* Sigscript::SigmodWrapper::species(const int id)
+{
+ return SpeciesWrapper::create(m_sigmod->speciesById(id), this);
+}
+
+Sigscript::SpriteWrapper* Sigscript::SigmodWrapper::sprite(const int id)
+{
+ return SpriteWrapper::create(m_sigmod->spriteById(id), this);
+}
+
+Sigscript::StatusWrapper* Sigscript::SigmodWrapper::status(const int id)
+{
+ return StatusWrapper::create(m_sigmod->statusById(id), this);
+}
+
+Sigscript::StoreWrapper* Sigscript::SigmodWrapper::store(const int id)
+{
+ return StoreWrapper::create(m_sigmod->storeById(id), this);
+}
+
+Sigscript::TileWrapper* Sigscript::SigmodWrapper::tile(const int id)
+{
+ return TileWrapper::create(m_sigmod->tileById(id), this);
+}
+
+Sigscript::TimeWrapper* Sigscript::SigmodWrapper::time(const int id)
+{
+ return TimeWrapper::create(m_sigmod->timeById(id), this);
+}
+
+Sigscript::TrainerWrapper* Sigscript::SigmodWrapper::trainer(const int id)
+{
+ return TrainerWrapper::create(m_sigmod->trainerById(id), this);
+}
+
+Sigscript::TypeWrapper* Sigscript::SigmodWrapper::type(const int id)
+{
+ return TypeWrapper::create(m_sigmod->typeById(id), this);
+}
+
+Sigscript::WeatherWrapper* Sigscript::SigmodWrapper::weather(const int id)
+{
+ return WeatherWrapper::create(m_sigmod->weatherById(id), this);
+}
+
+Sigmod::Stat Sigscript::SigmodWrapper::stat(const QString& name) const
+{
+ if (name == "HP")
+ return Sigmod::ST_HP;
+ else if (name == "Attack")
+ return Sigmod::ST_Attack;
+ else if (name == "Defense")
+ return Sigmod::ST_Defense;
+ else if (name == "Speed")
+ return Sigmod::ST_Speed;
+ else if (name == "Special")
+ return Sigmod::ST_Special;
+ else if (name == "Special Attack")
+ return Sigmod::ST_SpecialAttack;
+ else if (name == "Special Defense")
+ return Sigmod::ST_SpecialAttack;
+ else if (name == "Accuracy")
+ return Sigmod::ST_Accuracy;
+ else if (name == "Evasion")
+ return Sigmod::ST_Evasion;
+ return QVariant(-1).value<Sigmod::Stat>();
+}
+
+Sigmod::Direction Sigscript::SigmodWrapper::direction(const QString& name) const
+{
+ if (name == "Up")
+ return Sigmod::D_Up;
+ else if (name == "Down")
+ return Sigmod::D_Down;
+ else if (name == "Left")
+ return Sigmod::D_Left;
+ else if (name == "Right")
+ return Sigmod::D_Right;
+ else if (name == "None")
+ return Sigmod::D_None;
+ return QVariant(-1).value<Sigmod::Direction>();
+}
+
+QString Sigscript::SigmodWrapper::title() const
+{
+ return m_sigmod->title();
+}
+
+QString Sigscript::SigmodWrapper::version() const
+{
+ return m_sigmod->version();
+}
+
+QString Sigscript::SigmodWrapper::description() const
+{
+ return m_sigmod->description();
+}
+
+Sigscript::MapWarpWrapper* Sigscript::SigmodWrapper::startWarp()
+{
+ return map(m_sigmod->startMap())->warp(m_sigmod->startWarp());
+}
+
+Sigmod::Fraction Sigscript::SigmodWrapper::effectiveness(const TypeWrapper* attacker, const TypeWrapper* defender) const
+{
+ return m_sigmod->typechart(m_sigmod->typeIndex(attacker->id()), m_sigmod->typeIndex(defender->id()));
+}
+
+Sigscript::RulesWrapper* Sigscript::SigmodWrapper::rules()
+{
+ return RulesWrapper::create(m_sigmod->rules(), this);
+}
+
+Sigscript::AbilityWrapper* Sigscript::SigmodWrapper::ability(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->abilityCount(); ++i)
+ {
+ if (m_sigmod->ability(i)->name() == name)
+ return AbilityWrapper::create(m_sigmod->ability(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::AuthorWrapper* Sigscript::SigmodWrapper::author(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->authorCount(); ++i)
+ {
+ if (m_sigmod->author(i)->name() == name)
+ return AuthorWrapper::create(m_sigmod->author(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::BadgeWrapper* Sigscript::SigmodWrapper::badge(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->badgeCount(); ++i)
+ {
+ if (m_sigmod->badge(i)->name() == name)
+ return BadgeWrapper::create(m_sigmod->badge(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::CoinListWrapper* Sigscript::SigmodWrapper::coinList(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->coinListCount(); ++i)
+ {
+ if (m_sigmod->coinList(i)->name() == name)
+ return CoinListWrapper::create(m_sigmod->coinList(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::EggGroupWrapper* Sigscript::SigmodWrapper::eggGroup(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->eggGroupCount(); ++i)
+ {
+ if (m_sigmod->eggGroup(i)->name() == name)
+ return EggGroupWrapper::create(m_sigmod->eggGroup(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::GlobalScriptWrapper* Sigscript::SigmodWrapper::globalScript(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->globalScriptCount(); ++i)
+ {
+ if (m_sigmod->globalScript(i)->name() == name)
+ return GlobalScriptWrapper::create(m_sigmod->globalScript(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::ItemWrapper* Sigscript::SigmodWrapper::item(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->itemCount(); ++i)
+ {
+ if (m_sigmod->item(i)->name() == name)
+ return ItemWrapper::create(m_sigmod->item(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::ItemTypeWrapper* Sigscript::SigmodWrapper::itemType(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->itemTypeCount(); ++i)
+ {
+ if (m_sigmod->itemType(i)->name() == name)
+ return ItemTypeWrapper::create(m_sigmod->itemType(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::MapWrapper* Sigscript::SigmodWrapper::map(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->mapCount(); ++i)
+ {
+ if (m_sigmod->map(i)->name() == name)
+ return MapWrapper::create(m_sigmod->map(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::MoveWrapper* Sigscript::SigmodWrapper::move(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->moveCount(); ++i)
+ {
+ if (m_sigmod->move(i)->name() == name)
+ return MoveWrapper::create(m_sigmod->move(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::NatureWrapper* Sigscript::SigmodWrapper::nature(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->natureCount(); ++i)
+ {
+ if (m_sigmod->nature(i)->name() == name)
+ return NatureWrapper::create(m_sigmod->nature(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::SkinWrapper* Sigscript::SigmodWrapper::skin(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->skinCount(); ++i)
+ {
+ if (m_sigmod->skin(i)->name() == name)
+ return SkinWrapper::create(m_sigmod->skin(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::SoundWrapper* Sigscript::SigmodWrapper::sound(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->soundCount(); ++i)
+ {
+ if (m_sigmod->sound(i)->name() == name)
+ return SoundWrapper::create(m_sigmod->sound(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::SpeciesWrapper* Sigscript::SigmodWrapper::species(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->speciesCount(); ++i)
+ {
+ if (m_sigmod->species(i)->name() == name)
+ return SpeciesWrapper::create(m_sigmod->species(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::SpriteWrapper* Sigscript::SigmodWrapper::sprite(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->spriteCount(); ++i)
+ {
+ if (m_sigmod->sprite(i)->name() == name)
+ return SpriteWrapper::create(m_sigmod->sprite(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::StatusWrapper* Sigscript::SigmodWrapper::status(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->statusCount(); ++i)
+ {
+ if (m_sigmod->status(i)->name() == name)
+ return StatusWrapper::create(m_sigmod->status(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::StoreWrapper* Sigscript::SigmodWrapper::store(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->storeCount(); ++i)
+ {
+ if (m_sigmod->store(i)->name() == name)
+ return StoreWrapper::create(m_sigmod->store(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::TileWrapper* Sigscript::SigmodWrapper::tile(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->tileCount(); ++i)
+ {
+ if (m_sigmod->tile(i)->name() == name)
+ return TileWrapper::create(m_sigmod->tile(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::TimeWrapper* Sigscript::SigmodWrapper::time(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->timeCount(); ++i)
+ {
+ if (m_sigmod->time(i)->name() == name)
+ return TimeWrapper::create(m_sigmod->time(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::TrainerWrapper* Sigscript::SigmodWrapper::trainer(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->trainerCount(); ++i)
+ {
+ if (m_sigmod->trainer(i)->name() == name)
+ return TrainerWrapper::create(m_sigmod->trainer(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::TypeWrapper* Sigscript::SigmodWrapper::type(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->typeCount(); ++i)
+ {
+ if (m_sigmod->type(i)->name() == name)
+ return TypeWrapper::create(m_sigmod->type(i), this);
+ }
+ return NULL;
+}
+
+Sigscript::WeatherWrapper* Sigscript::SigmodWrapper::weather(const QString& name)
+{
+ for (int i = 0; i < m_sigmod->weatherCount(); ++i)
+ {
+ if (m_sigmod->weather(i)->name() == name)
+ return WeatherWrapper::create(m_sigmod->weather(i), this);
+ }
+ return NULL;
+}
diff --git a/sigscript/PokemodWrapper.h b/sigscript/SigmodWrapper.h
index cf97c60c..1e946ac0 100644
--- a/sigscript/PokemodWrapper.h
+++ b/sigscript/SigmodWrapper.h
@@ -15,17 +15,17 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_POKEMODWRAPPER__
-#define __POKESCRIPTING_POKEMODWRAPPER__
+#ifndef __SIGSCRIPT_SIGMODWRAPPER__
+#define __SIGSCRIPT_SIGMODWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Hat.h"
-#include "../pokemod/Pokemod.h"
+// Sigmod includes
+#include "../sigmod/Hat.h"
+#include "../sigmod/Sigmod.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class AbilityWrapper;
@@ -53,14 +53,14 @@ class TrainerWrapper;
class TypeWrapper;
class WeatherWrapper;
-class POKESCRIPTING_EXPORT PokemodWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT SigmodWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- PokemodWrapper(const Pokemod::Pokemod* pokemod);
+ SigmodWrapper(const Sigmod::Sigmod* sigmod);
- Pokemod::Hat<NatureWrapper*> natureHat();
+ Sigmod::Hat<NatureWrapper*> natureHat();
AbilityWrapper* ability(const int id);
AuthorWrapper* author(const int id);
@@ -85,14 +85,14 @@ class POKESCRIPTING_EXPORT PokemodWrapper : public ObjectWrapper
TypeWrapper* type(const int id);
WeatherWrapper* weather(const int id);
- Q_SCRIPTABLE Pokemod::Stat stat(const QString& name) const;
- Q_SCRIPTABLE Pokemod::Direction direction(const QString& direction) const;
+ Q_SCRIPTABLE Sigmod::Stat stat(const QString& name) const;
+ Q_SCRIPTABLE Sigmod::Direction direction(const QString& direction) const;
Q_SCRIPTABLE QString title() const;
Q_SCRIPTABLE QString version() const;
Q_SCRIPTABLE QString description() const;
Q_SCRIPTABLE MapWarpWrapper* startWarp();
- Q_SCRIPTABLE Pokemod::Fraction effectiveness(const TypeWrapper* attacker, const TypeWrapper* defender) const;
+ Q_SCRIPTABLE Sigmod::Fraction effectiveness(const TypeWrapper* attacker, const TypeWrapper* defender) const;
Q_SCRIPTABLE RulesWrapper* rules();
Q_SCRIPTABLE AbilityWrapper* ability(const QString& name);
@@ -118,11 +118,11 @@ class POKESCRIPTING_EXPORT PokemodWrapper : public ObjectWrapper
Q_SCRIPTABLE TypeWrapper* type(const QString& name);
Q_SCRIPTABLE WeatherWrapper* weather(const QString& name);
private:
- PokemodWrapper& operator=(const PokemodWrapper& rhs);
+ SigmodWrapper& operator=(const SigmodWrapper& rhs);
- const Pokemod::Pokemod* m_pokemod;
+ const Sigmod::Sigmod* m_sigmod;
};
}
-Q_DECLARE_METATYPE(Pokescripting::PokemodWrapper*)
+Q_DECLARE_METATYPE(Sigscript::SigmodWrapper*)
#endif
diff --git a/sigscript/SkinWrapper.cpp b/sigscript/SkinWrapper.cpp
index be19a8f1..4fa49120 100644
--- a/sigscript/SkinWrapper.cpp
+++ b/sigscript/SkinWrapper.cpp
@@ -18,28 +18,28 @@
// Header include
#include "SkinWrapper.h"
-// Pokemod scripting
-#include "PokemodWrapper.h"
+// Sigmod scripting
+#include "SigmodWrapper.h"
-Pokescripting::SkinWrapper* Pokescripting::SkinWrapper::create(const Pokemod::Skin* skin, PokemodWrapper* parent)
+Sigscript::SkinWrapper* Sigscript::SkinWrapper::create(const Sigmod::Skin* skin, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, skin->id())))
m_instances[Signiture(parent, skin->id())] = new SkinWrapper(skin, parent);
return qobject_cast<SkinWrapper*>(m_instances[Signiture(parent, skin->id())]);
}
-Pokescripting::SkinWrapper::SkinWrapper(const Pokemod::Skin* skin, PokemodWrapper* parent) :
+Sigscript::SkinWrapper::SkinWrapper(const Sigmod::Skin* skin, SigmodWrapper* parent) :
ObjectWrapper(skin, parent),
m_skin(skin)
{
}
-QString Pokescripting::SkinWrapper::name() const
+QString Sigscript::SkinWrapper::name() const
{
return m_skin->name();
}
-Pokemod::Script Pokescripting::SkinWrapper::script() const
+Sigmod::Script Sigscript::SkinWrapper::script() const
{
return m_skin->script();
}
diff --git a/sigscript/SkinWrapper.h b/sigscript/SkinWrapper.h
index 1604d3f4..75ee337e 100644
--- a/sigscript/SkinWrapper.h
+++ b/sigscript/SkinWrapper.h
@@ -15,33 +15,33 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_SKINWRAPPER__
-#define __POKESCRIPTING_SKINWRAPPER__
+#ifndef __SIGSCRIPT_SKINWRAPPER__
+#define __SIGSCRIPT_SKINWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Skin.h"
+// Sigmod includes
+#include "../sigmod/Skin.h"
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT SkinWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT SkinWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static SkinWrapper* create(const Pokemod::Skin* skin, PokemodWrapper* parent);
+ static SkinWrapper* create(const Sigmod::Skin* skin, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
- Q_SCRIPTABLE Pokemod::Script script() const;
+ Q_SCRIPTABLE Sigmod::Script script() const;
private:
- SkinWrapper(const Pokemod::Skin* skin, PokemodWrapper* parent);
+ SkinWrapper(const Sigmod::Skin* skin, SigmodWrapper* parent);
SkinWrapper& operator=(const SkinWrapper& rhs);
- const Pokemod::Skin* m_skin;
+ const Sigmod::Skin* m_skin;
};
}
-Q_DECLARE_METATYPE(Pokescripting::SkinWrapper*)
+Q_DECLARE_METATYPE(Sigscript::SkinWrapper*)
#endif
diff --git a/sigscript/SoundWrapper.cpp b/sigscript/SoundWrapper.cpp
index ebecdfc2..0e48d5cc 100644
--- a/sigscript/SoundWrapper.cpp
+++ b/sigscript/SoundWrapper.cpp
@@ -18,8 +18,8 @@
// Header include
#include "SoundWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
// Qt includes
#include <QtCore/QBuffer>
@@ -28,39 +28,39 @@
#include <Phonon/MediaObject>
#include <Phonon/MediaSource>
-Pokescripting::SoundWrapper* Pokescripting::SoundWrapper::create(const Pokemod::Sound* sound, PokemodWrapper* parent)
+Sigscript::SoundWrapper* Sigscript::SoundWrapper::create(const Sigmod::Sound* sound, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, sound->id())))
m_instances[Signiture(parent, sound->id())] = new SoundWrapper(sound, parent);
return qobject_cast<SoundWrapper*>(m_instances[Signiture(parent, sound->id())]);
}
-Pokescripting::SoundWrapper::SoundWrapper(const Pokemod::Sound* sound, PokemodWrapper* parent) :
+Sigscript::SoundWrapper::SoundWrapper(const Sigmod::Sound* sound, SigmodWrapper* parent) :
ObjectWrapper(sound, parent),
m_sound(sound)
{
}
-Pokemod::Sound::Type Pokescripting::SoundWrapper::type(const QString& name) const
+Sigmod::Sound::Type Sigscript::SoundWrapper::type(const QString& name) const
{
if (name == "Sound Effect")
- return Pokemod::Sound::SoundEffect;
+ return Sigmod::Sound::SoundEffect;
else if (name == "Music")
- return Pokemod::Sound::Music;
- return QVariant(-1).value<Pokemod::Sound::Type>();
+ return Sigmod::Sound::Music;
+ return QVariant(-1).value<Sigmod::Sound::Type>();
}
-QString Pokescripting::SoundWrapper::name() const
+QString Sigscript::SoundWrapper::name() const
{
return m_sound->name();
}
-Pokemod::Sound::Type Pokescripting::SoundWrapper::type() const
+Sigmod::Sound::Type Sigscript::SoundWrapper::type() const
{
return m_sound->type();
}
-Phonon::MediaObject* Pokescripting::SoundWrapper::audio()
+Phonon::MediaObject* Sigscript::SoundWrapper::audio()
{
Phonon::MediaObject* media = new Phonon::MediaObject(this);
QBuffer* buffer = new QBuffer(media);
diff --git a/sigscript/SoundWrapper.h b/sigscript/SoundWrapper.h
index 54ac3f38..a225f728 100644
--- a/sigscript/SoundWrapper.h
+++ b/sigscript/SoundWrapper.h
@@ -15,14 +15,14 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_SOUNDWRAPPER__
-#define __POKESCRIPTING_SOUNDWRAPPER__
+#ifndef __SIGSCRIPT_SOUNDWRAPPER__
+#define __SIGSCRIPT_SOUNDWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Sound.h"
+// Sigmod includes
+#include "../sigmod/Sound.h"
// Forward declarations
namespace Phonon
@@ -30,27 +30,27 @@ namespace Phonon
class MediaObject;
}
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT SoundWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT SoundWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static SoundWrapper* create(const Pokemod::Sound* sound, PokemodWrapper* parent);
+ static SoundWrapper* create(const Sigmod::Sound* sound, SigmodWrapper* parent);
- Q_SCRIPTABLE Pokemod::Sound::Type type(const QString& name) const;
+ Q_SCRIPTABLE Sigmod::Sound::Type type(const QString& name) const;
Q_SCRIPTABLE QString name() const;
- Q_SCRIPTABLE Pokemod::Sound::Type type() const;
+ Q_SCRIPTABLE Sigmod::Sound::Type type() const;
Q_SCRIPTABLE Phonon::MediaObject* audio();
private:
- SoundWrapper(const Pokemod::Sound* sound, PokemodWrapper* parent);
+ SoundWrapper(const Sigmod::Sound* sound, SigmodWrapper* parent);
SoundWrapper& operator=(const SoundWrapper& rhs);
- const Pokemod::Sound* m_sound;
+ const Sigmod::Sound* m_sound;
};
}
-Q_DECLARE_METATYPE(Pokescripting::SoundWrapper*)
+Q_DECLARE_METATYPE(Sigscript::SoundWrapper*)
#endif
diff --git a/sigscript/SpeciesAbilityWrapper.cpp b/sigscript/SpeciesAbilityWrapper.cpp
index fb392653..e5aafc19 100644
--- a/sigscript/SpeciesAbilityWrapper.cpp
+++ b/sigscript/SpeciesAbilityWrapper.cpp
@@ -18,29 +18,29 @@
// Header include
#include "SpeciesAbilityWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
#include "SpeciesWrapper.h"
-Pokescripting::SpeciesAbilityWrapper* Pokescripting::SpeciesAbilityWrapper::create(const Pokemod::SpeciesAbility* ability, SpeciesWrapper* parent)
+Sigscript::SpeciesAbilityWrapper* Sigscript::SpeciesAbilityWrapper::create(const Sigmod::SpeciesAbility* ability, SpeciesWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, ability->id())))
m_instances[Signiture(parent, ability->id())] = new SpeciesAbilityWrapper(ability, parent);
return qobject_cast<SpeciesAbilityWrapper*>(m_instances[Signiture(parent, ability->id())]);
}
-Pokescripting::SpeciesAbilityWrapper::SpeciesAbilityWrapper(const Pokemod::SpeciesAbility* ability, SpeciesWrapper* parent) :
+Sigscript::SpeciesAbilityWrapper::SpeciesAbilityWrapper(const Sigmod::SpeciesAbility* ability, SpeciesWrapper* parent) :
ObjectWrapper(ability, parent),
m_ability(ability)
{
}
-Pokescripting::AbilityWrapper* Pokescripting::SpeciesAbilityWrapper::ability()
+Sigscript::AbilityWrapper* Sigscript::SpeciesAbilityWrapper::ability()
{
- return pokemod()->ability(m_ability->ability());
+ return sigmod()->ability(m_ability->ability());
}
-int Pokescripting::SpeciesAbilityWrapper::weight() const
+int Sigscript::SpeciesAbilityWrapper::weight() const
{
return m_ability->weight();
}
diff --git a/sigscript/SpeciesAbilityWrapper.h b/sigscript/SpeciesAbilityWrapper.h
index dafe9dbe..b51980cc 100644
--- a/sigscript/SpeciesAbilityWrapper.h
+++ b/sigscript/SpeciesAbilityWrapper.h
@@ -15,37 +15,37 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_SPECIESABILITYWRAPPER__
-#define __POKESCRIPTING_SPECIESABILITYWRAPPER__
+#ifndef __SIGSCRIPT_SPECIESABILITYWRAPPER__
+#define __SIGSCRIPT_SPECIESABILITYWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/SpeciesAbility.h"
+// Sigmod includes
+#include "../sigmod/SpeciesAbility.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class AbilityWrapper;
class SpeciesWrapper;
-class POKESCRIPTING_EXPORT SpeciesAbilityWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT SpeciesAbilityWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static SpeciesAbilityWrapper* create(const Pokemod::SpeciesAbility* ability, SpeciesWrapper* parent);
+ static SpeciesAbilityWrapper* create(const Sigmod::SpeciesAbility* ability, SpeciesWrapper* parent);
Q_SCRIPTABLE AbilityWrapper* ability();
Q_SCRIPTABLE int weight() const;
private:
- SpeciesAbilityWrapper(const Pokemod::SpeciesAbility* ability, SpeciesWrapper* parent);
+ SpeciesAbilityWrapper(const Sigmod::SpeciesAbility* ability, SpeciesWrapper* parent);
SpeciesAbilityWrapper& operator=(const SpeciesAbilityWrapper& rhs);
- const Pokemod::SpeciesAbility* m_ability;
+ const Sigmod::SpeciesAbility* m_ability;
};
}
-Q_DECLARE_METATYPE(Pokescripting::SpeciesAbilityWrapper*)
+Q_DECLARE_METATYPE(Sigscript::SpeciesAbilityWrapper*)
#endif
diff --git a/sigscript/SpeciesItemWrapper.cpp b/sigscript/SpeciesItemWrapper.cpp
index 23d4afa1..16807886 100644
--- a/sigscript/SpeciesItemWrapper.cpp
+++ b/sigscript/SpeciesItemWrapper.cpp
@@ -18,29 +18,29 @@
// Header include
#include "SpeciesItemWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
#include "SpeciesWrapper.h"
-Pokescripting::SpeciesItemWrapper* Pokescripting::SpeciesItemWrapper::create(const Pokemod::SpeciesItem* item, SpeciesWrapper* parent)
+Sigscript::SpeciesItemWrapper* Sigscript::SpeciesItemWrapper::create(const Sigmod::SpeciesItem* item, SpeciesWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, item->id())))
m_instances[Signiture(parent, item->id())] = new SpeciesItemWrapper(item, parent);
return qobject_cast<SpeciesItemWrapper*>(m_instances[Signiture(parent, item->id())]);
}
-Pokescripting::SpeciesItemWrapper::SpeciesItemWrapper(const Pokemod::SpeciesItem* item, SpeciesWrapper* parent) :
+Sigscript::SpeciesItemWrapper::SpeciesItemWrapper(const Sigmod::SpeciesItem* item, SpeciesWrapper* parent) :
ObjectWrapper(item, parent),
m_item(item)
{
}
-Pokescripting::ItemWrapper* Pokescripting::SpeciesItemWrapper::item()
+Sigscript::ItemWrapper* Sigscript::SpeciesItemWrapper::item()
{
- return pokemod()->item(m_item->item());
+ return sigmod()->item(m_item->item());
}
-int Pokescripting::SpeciesItemWrapper::weight() const
+int Sigscript::SpeciesItemWrapper::weight() const
{
if (value("weight").canConvert<int>())
return value("weight").toInt();
diff --git a/sigscript/SpeciesItemWrapper.h b/sigscript/SpeciesItemWrapper.h
index b172b32f..a02a6d3c 100644
--- a/sigscript/SpeciesItemWrapper.h
+++ b/sigscript/SpeciesItemWrapper.h
@@ -15,37 +15,37 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_SPECIESITEMWRAPPER__
-#define __POKESCRIPTING_SPECIESITEMWRAPPER__
+#ifndef __SIGSCRIPT_SPECIESITEMWRAPPER__
+#define __SIGSCRIPT_SPECIESITEMWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/SpeciesItem.h"
+// Sigmod includes
+#include "../sigmod/SpeciesItem.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class ItemWrapper;
class SpeciesWrapper;
-class POKESCRIPTING_EXPORT SpeciesItemWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT SpeciesItemWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static SpeciesItemWrapper* create(const Pokemod::SpeciesItem* item, SpeciesWrapper* parent);
+ static SpeciesItemWrapper* create(const Sigmod::SpeciesItem* item, SpeciesWrapper* parent);
Q_SCRIPTABLE ItemWrapper* item();
Q_SCRIPTABLE int weight() const;
private:
- SpeciesItemWrapper(const Pokemod::SpeciesItem* item, SpeciesWrapper* parent);
+ SpeciesItemWrapper(const Sigmod::SpeciesItem* item, SpeciesWrapper* parent);
SpeciesItemWrapper& operator=(const SpeciesItemWrapper& rhs);
- const Pokemod::SpeciesItem* m_item;
+ const Sigmod::SpeciesItem* m_item;
};
}
-Q_DECLARE_METATYPE(Pokescripting::SpeciesItemWrapper*)
+Q_DECLARE_METATYPE(Sigscript::SpeciesItemWrapper*)
#endif
diff --git a/sigscript/SpeciesMoveWrapper.cpp b/sigscript/SpeciesMoveWrapper.cpp
index d1c33864..b98905a5 100644
--- a/sigscript/SpeciesMoveWrapper.cpp
+++ b/sigscript/SpeciesMoveWrapper.cpp
@@ -18,34 +18,34 @@
// Header include
#include "SpeciesMoveWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
#include "SpeciesWrapper.h"
-Pokescripting::SpeciesMoveWrapper* Pokescripting::SpeciesMoveWrapper::create(const Pokemod::SpeciesMove* move, SpeciesWrapper* parent)
+Sigscript::SpeciesMoveWrapper* Sigscript::SpeciesMoveWrapper::create(const Sigmod::SpeciesMove* move, SpeciesWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, move->id())))
m_instances[Signiture(parent, move->id())] = new SpeciesMoveWrapper(move, parent);
return qobject_cast<SpeciesMoveWrapper*>(m_instances[Signiture(parent, move->id())]);
}
-Pokescripting::SpeciesMoveWrapper::SpeciesMoveWrapper(const Pokemod::SpeciesMove* move, SpeciesWrapper* parent) :
+Sigscript::SpeciesMoveWrapper::SpeciesMoveWrapper(const Sigmod::SpeciesMove* move, SpeciesWrapper* parent) :
ObjectWrapper(move, parent),
m_move(move)
{
}
-Pokescripting::MoveWrapper* Pokescripting::SpeciesMoveWrapper::move()
+Sigscript::MoveWrapper* Sigscript::SpeciesMoveWrapper::move()
{
- return pokemod()->move(m_move->move());
+ return sigmod()->move(m_move->move());
}
-int Pokescripting::SpeciesMoveWrapper::level() const
+int Sigscript::SpeciesMoveWrapper::level() const
{
return m_move->level();
}
-int Pokescripting::SpeciesMoveWrapper::wild() const
+int Sigscript::SpeciesMoveWrapper::wild() const
{
return m_move->wild();
}
diff --git a/sigscript/SpeciesMoveWrapper.h b/sigscript/SpeciesMoveWrapper.h
index 6d575fda..bfc91613 100644
--- a/sigscript/SpeciesMoveWrapper.h
+++ b/sigscript/SpeciesMoveWrapper.h
@@ -15,38 +15,38 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_SPECIESMOVEWRAPPER__
-#define __POKESCRIPTING_SPECIESMOVEWRAPPER__
+#ifndef __SIGSCRIPT_SPECIESMOVEWRAPPER__
+#define __SIGSCRIPT_SPECIESMOVEWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "MoveWrapper.h"
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/SpeciesMove.h"
+// Sigmod includes
+#include "../sigmod/SpeciesMove.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class SpeciesWrapper;
-class POKESCRIPTING_EXPORT SpeciesMoveWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT SpeciesMoveWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static SpeciesMoveWrapper* create(const Pokemod::SpeciesMove* move, SpeciesWrapper* parent);
+ static SpeciesMoveWrapper* create(const Sigmod::SpeciesMove* move, SpeciesWrapper* parent);
Q_SCRIPTABLE MoveWrapper* move();
Q_SCRIPTABLE int level() const;
Q_SCRIPTABLE int wild() const;
private:
- SpeciesMoveWrapper(const Pokemod::SpeciesMove* move, SpeciesWrapper* parent);
+ SpeciesMoveWrapper(const Sigmod::SpeciesMove* move, SpeciesWrapper* parent);
SpeciesMoveWrapper& operator=(const SpeciesMoveWrapper& rhs);
- const Pokemod::SpeciesMove* m_move;
+ const Sigmod::SpeciesMove* m_move;
};
}
-Q_DECLARE_METATYPE(Pokescripting::SpeciesMoveWrapper*)
+Q_DECLARE_METATYPE(Sigscript::SpeciesMoveWrapper*)
#endif
diff --git a/sigscript/SpeciesWrapper.cpp b/sigscript/SpeciesWrapper.cpp
index e80c364d..6b730d30 100644
--- a/sigscript/SpeciesWrapper.cpp
+++ b/sigscript/SpeciesWrapper.cpp
@@ -18,220 +18,220 @@
// Header include
#include "SpeciesWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
#include "SpeciesAbilityWrapper.h"
#include "SpeciesItemWrapper.h"
#include "SpeciesMoveWrapper.h"
-Pokescripting::SpeciesWrapper* Pokescripting::SpeciesWrapper::create(const Pokemod::Species* species, PokemodWrapper* parent)
+Sigscript::SpeciesWrapper* Sigscript::SpeciesWrapper::create(const Sigmod::Species* species, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, species->id())))
m_instances[Signiture(parent, species->id())] = new SpeciesWrapper(species, parent);
return qobject_cast<SpeciesWrapper*>(m_instances[Signiture(parent, species->id())]);
}
-Pokescripting::SpeciesWrapper::SpeciesWrapper(const Pokemod::Species* species, PokemodWrapper* parent) :
+Sigscript::SpeciesWrapper::SpeciesWrapper(const Sigmod::Species* species, SigmodWrapper* parent) :
ObjectWrapper(species, parent),
m_species(species)
{
}
-Pokemod::Hat<Pokescripting::AbilityWrapper*> Pokescripting::SpeciesWrapper::abilityHat()
+Sigmod::Hat<Sigscript::AbilityWrapper*> Sigscript::SpeciesWrapper::abilityHat()
{
- Pokemod::Hat<AbilityWrapper*> hat;
+ Sigmod::Hat<AbilityWrapper*> hat;
for (int i = 0; i < abilityCount(); ++i)
hat.add(ability(i)->ability(), ability(i)->weight());
return hat;
}
-Pokemod::Hat<Pokescripting::ItemWrapper*> Pokescripting::SpeciesWrapper::itemHat()
+Sigmod::Hat<Sigscript::ItemWrapper*> Sigscript::SpeciesWrapper::itemHat()
{
- Pokemod::Hat<ItemWrapper*> hat;
+ Sigmod::Hat<ItemWrapper*> hat;
for (int i = 0; i < itemCount(); ++i)
hat.add(item(i)->item(), item(i)->weight());
return hat;
}
-Pokemod::Species::Style Pokescripting::SpeciesWrapper::growth(const QString& name) const
+Sigmod::Species::Style Sigscript::SpeciesWrapper::growth(const QString& name) const
{
if (name == "Fluctuating")
- return Pokemod::Species::Fluctuating;
+ return Sigmod::Species::Fluctuating;
else if (name == "Fading")
- return Pokemod::Species::Fading;
+ return Sigmod::Species::Fading;
else if (name == "Slow")
- return Pokemod::Species::Slow;
+ return Sigmod::Species::Slow;
else if (name == "Normal")
- return Pokemod::Species::Normal;
+ return Sigmod::Species::Normal;
else if (name == "Fast")
- return Pokemod::Species::Fast;
+ return Sigmod::Species::Fast;
else if (name == "Erratic")
- return Pokemod::Species::Erratic;
- return QVariant(-1).value<Pokemod::Species::Style>();
+ return Sigmod::Species::Erratic;
+ return QVariant(-1).value<Sigmod::Species::Style>();
}
-QString Pokescripting::SpeciesWrapper::name() const
+QString Sigscript::SpeciesWrapper::name() const
{
return m_species->name();
}
-int Pokescripting::SpeciesWrapper::baseStat(const Pokemod::Stat stat) const
+int Sigscript::SpeciesWrapper::baseStat(const Sigmod::Stat stat) const
{
return m_species->baseStat(stat);
}
-int Pokescripting::SpeciesWrapper::effortValue(const Pokemod::Stat stat) const
+int Sigscript::SpeciesWrapper::effortValue(const Sigmod::Stat stat) const
{
return m_species->effortValue(stat);
}
-Pokemod::Species::Style Pokescripting::SpeciesWrapper::growth() const
+Sigmod::Species::Style Sigscript::SpeciesWrapper::growth() const
{
return m_species->growth();
}
-int Pokescripting::SpeciesWrapper::experienceValue() const
+int Sigscript::SpeciesWrapper::experienceValue() const
{
return m_species->experienceValue();
}
-int Pokescripting::SpeciesWrapper::catchValue() const
+int Sigscript::SpeciesWrapper::catchValue() const
{
return m_species->catchValue();
}
-Pokemod::Fraction Pokescripting::SpeciesWrapper::runChance() const
+Sigmod::Fraction Sigscript::SpeciesWrapper::runChance() const
{
- if (value("runChance").canConvert<Pokemod::Fraction>())
- return value("runChance").value<Pokemod::Fraction>();
+ if (value("runChance").canConvert<Sigmod::Fraction>())
+ return value("runChance").value<Sigmod::Fraction>();
return m_species->runChance();
}
-Pokemod::Fraction Pokescripting::SpeciesWrapper::fleeChance() const
+Sigmod::Fraction Sigscript::SpeciesWrapper::fleeChance() const
{
- if (value("fleeChance").canConvert<Pokemod::Fraction>())
- return value("fleeChance").value<Pokemod::Fraction>();
+ if (value("fleeChance").canConvert<Sigmod::Fraction>())
+ return value("fleeChance").value<Sigmod::Fraction>();
return m_species->fleeChance();
}
-Pokemod::Fraction Pokescripting::SpeciesWrapper::itemChance() const
+Sigmod::Fraction Sigscript::SpeciesWrapper::itemChance() const
{
- if (value("itemChance").canConvert<Pokemod::Fraction>())
- return value("itemChance").value<Pokemod::Fraction>();
+ if (value("itemChance").canConvert<Sigmod::Fraction>())
+ return value("itemChance").value<Sigmod::Fraction>();
return m_species->itemChance();
}
-int Pokescripting::SpeciesWrapper::pokedexNumber() const
+int Sigscript::SpeciesWrapper::encyclopediaNumber() const
{
- return m_species->pokedexNumber();
+ return m_species->encyclopediaNumber();
}
-int Pokescripting::SpeciesWrapper::weight() const
+int Sigscript::SpeciesWrapper::weight() const
{
return m_species->weight();
}
-int Pokescripting::SpeciesWrapper::height() const
+int Sigscript::SpeciesWrapper::height() const
{
return m_species->height();
}
-QString Pokescripting::SpeciesWrapper::pokedexEntry() const
+QString Sigscript::SpeciesWrapper::encyclopediaEntry() const
{
- return m_species->pokedexEntry();
+ return m_species->encyclopediaEntry();
}
-Pokescripting::SpriteWrapper* Pokescripting::SpeciesWrapper::frontMaleSprite()
+Sigscript::SpriteWrapper* Sigscript::SpeciesWrapper::frontMaleSprite()
{
- return pokemod()->sprite(m_species->frontMaleSprite());
+ return sigmod()->sprite(m_species->frontMaleSprite());
}
-Pokescripting::SpriteWrapper* Pokescripting::SpeciesWrapper::backMaleSprite()
+Sigscript::SpriteWrapper* Sigscript::SpeciesWrapper::backMaleSprite()
{
- return pokemod()->sprite(m_species->backMaleSprite());
+ return sigmod()->sprite(m_species->backMaleSprite());
}
-Pokescripting::SpriteWrapper* Pokescripting::SpeciesWrapper::frontFemaleSprite()
+Sigscript::SpriteWrapper* Sigscript::SpeciesWrapper::frontFemaleSprite()
{
- return pokemod()->sprite(m_species->frontFemaleSprite());
+ return sigmod()->sprite(m_species->frontFemaleSprite());
}
-Pokescripting::SpriteWrapper* Pokescripting::SpeciesWrapper::backFemaleSprite()
+Sigscript::SpriteWrapper* Sigscript::SpeciesWrapper::backFemaleSprite()
{
- return pokemod()->sprite(m_species->backFemaleSprite());
+ return sigmod()->sprite(m_species->backFemaleSprite());
}
-Pokescripting::SkinWrapper* Pokescripting::SpeciesWrapper::skin()
+Sigscript::SkinWrapper* Sigscript::SpeciesWrapper::skin()
{
- return pokemod()->skin(m_species->skin());
+ return sigmod()->skin(m_species->skin());
}
-Pokemod::Fraction Pokescripting::SpeciesWrapper::genderFactor() const
+Sigmod::Fraction Sigscript::SpeciesWrapper::genderFactor() const
{
return m_species->genderFactor();
}
-int Pokescripting::SpeciesWrapper::eggSpecies() const
+int Sigscript::SpeciesWrapper::eggSpecies() const
{
if (value("eggSpecies").canConvert<int>())
return value("eggSpecies").toInt();
return m_species->eggSpecies();
}
-int Pokescripting::SpeciesWrapper::eggSteps() const
+int Sigscript::SpeciesWrapper::eggSteps() const
{
return m_species->eggSteps();
}
-QList<Pokescripting::TypeWrapper*> Pokescripting::SpeciesWrapper::types()
+QList<Sigscript::TypeWrapper*> Sigscript::SpeciesWrapper::types()
{
QList<int> typeIds = m_species->types();
QList<TypeWrapper*> types;
foreach (int id, typeIds)
- types.append(pokemod()->type(id));
+ types.append(sigmod()->type(id));
return types;
}
-QList<Pokescripting::EggGroupWrapper*> Pokescripting::SpeciesWrapper::eggGroups()
+QList<Sigscript::EggGroupWrapper*> Sigscript::SpeciesWrapper::eggGroups()
{
QList<int> eggGroupIds = m_species->eggGroups();
QList<EggGroupWrapper*> eggGroups;
foreach (int id, eggGroupIds)
- eggGroups.append(pokemod()->eggGroup(id));
+ eggGroups.append(sigmod()->eggGroup(id));
return eggGroups;
}
-Pokemod::Script Pokescripting::SpeciesWrapper::evolution() const
+Sigmod::Script Sigscript::SpeciesWrapper::evolution() const
{
return m_species->evolution();
}
-Pokescripting::SpeciesAbilityWrapper* Pokescripting::SpeciesWrapper::ability(const int index)
+Sigscript::SpeciesAbilityWrapper* Sigscript::SpeciesWrapper::ability(const int index)
{
return SpeciesAbilityWrapper::create(m_species->ability(index), this);
}
-int Pokescripting::SpeciesWrapper::abilityCount() const
+int Sigscript::SpeciesWrapper::abilityCount() const
{
return m_species->abilityCount();
}
-Pokescripting::SpeciesItemWrapper* Pokescripting::SpeciesWrapper::item(const int index)
+Sigscript::SpeciesItemWrapper* Sigscript::SpeciesWrapper::item(const int index)
{
return SpeciesItemWrapper::create(m_species->item(index), this);
}
-int Pokescripting::SpeciesWrapper::itemCount() const
+int Sigscript::SpeciesWrapper::itemCount() const
{
return m_species->itemCount();
}
-Pokescripting::SpeciesMoveWrapper* Pokescripting::SpeciesWrapper::move(const int index)
+Sigscript::SpeciesMoveWrapper* Sigscript::SpeciesWrapper::move(const int index)
{
return SpeciesMoveWrapper::create(m_species->move(index), this);
}
-int Pokescripting::SpeciesWrapper::moveCount() const
+int Sigscript::SpeciesWrapper::moveCount() const
{
return m_species->moveCount();
}
diff --git a/sigscript/SpeciesWrapper.h b/sigscript/SpeciesWrapper.h
index f42e628d..ec157266 100644
--- a/sigscript/SpeciesWrapper.h
+++ b/sigscript/SpeciesWrapper.h
@@ -15,17 +15,17 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_SPECIESWRAPPER__
-#define __POKESCRIPTING_SPECIESWRAPPER__
+#ifndef __SIGSCRIPT_SPECIESWRAPPER__
+#define __SIGSCRIPT_SPECIESWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Hat.h"
-#include "../pokemod/Species.h"
+// Sigmod includes
+#include "../sigmod/Hat.h"
+#include "../sigmod/Species.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class AbilityWrapper;
@@ -38,42 +38,42 @@ class SpeciesMoveWrapper;
class SpriteWrapper;
class TypeWrapper;
-class POKESCRIPTING_EXPORT SpeciesWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT SpeciesWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static SpeciesWrapper* create(const Pokemod::Species* species, PokemodWrapper* parent);
+ static SpeciesWrapper* create(const Sigmod::Species* species, SigmodWrapper* parent);
- Pokemod::Hat<AbilityWrapper*> abilityHat();
- Pokemod::Hat<ItemWrapper*> itemHat();
+ Sigmod::Hat<AbilityWrapper*> abilityHat();
+ Sigmod::Hat<ItemWrapper*> itemHat();
- Q_SCRIPTABLE Pokemod::Species::Style growth(const QString& name) const;
+ Q_SCRIPTABLE Sigmod::Species::Style growth(const QString& name) const;
Q_SCRIPTABLE QString name() const;
- Q_SCRIPTABLE int baseStat(const Pokemod::Stat stat) const;
- Q_SCRIPTABLE int effortValue(const Pokemod::Stat stat) const;
- Q_SCRIPTABLE Pokemod::Species::Style growth() const;
+ Q_SCRIPTABLE int baseStat(const Sigmod::Stat stat) const;
+ Q_SCRIPTABLE int effortValue(const Sigmod::Stat stat) const;
+ Q_SCRIPTABLE Sigmod::Species::Style growth() const;
Q_SCRIPTABLE int experienceValue() const;
Q_SCRIPTABLE int catchValue() const;
- Q_SCRIPTABLE Pokemod::Fraction runChance() const;
- Q_SCRIPTABLE Pokemod::Fraction fleeChance() const;
- Q_SCRIPTABLE Pokemod::Fraction itemChance() const;
- Q_SCRIPTABLE int pokedexNumber() const;
+ Q_SCRIPTABLE Sigmod::Fraction runChance() const;
+ Q_SCRIPTABLE Sigmod::Fraction fleeChance() const;
+ Q_SCRIPTABLE Sigmod::Fraction itemChance() const;
+ Q_SCRIPTABLE int encyclopediaNumber() const;
Q_SCRIPTABLE int weight() const;
Q_SCRIPTABLE int height() const;
- Q_SCRIPTABLE QString pokedexEntry() const;
+ Q_SCRIPTABLE QString encyclopediaEntry() const;
Q_SCRIPTABLE SpriteWrapper* frontMaleSprite();
Q_SCRIPTABLE SpriteWrapper* backMaleSprite();
Q_SCRIPTABLE SpriteWrapper* frontFemaleSprite();
Q_SCRIPTABLE SpriteWrapper* backFemaleSprite();
Q_SCRIPTABLE SkinWrapper* skin();
- Q_SCRIPTABLE Pokemod::Fraction genderFactor() const;
+ Q_SCRIPTABLE Sigmod::Fraction genderFactor() const;
Q_SCRIPTABLE int eggSpecies() const;
Q_SCRIPTABLE int eggSteps() const;
Q_SCRIPTABLE QList<TypeWrapper*> types();
Q_SCRIPTABLE QList<EggGroupWrapper*> eggGroups();
- Q_SCRIPTABLE Pokemod::Script evolution() const;
+ Q_SCRIPTABLE Sigmod::Script evolution() const;
Q_SCRIPTABLE SpeciesAbilityWrapper* ability(const int index);
Q_SCRIPTABLE int abilityCount() const;
@@ -84,12 +84,12 @@ class POKESCRIPTING_EXPORT SpeciesWrapper : public ObjectWrapper
Q_SCRIPTABLE SpeciesMoveWrapper* move(const int index);
Q_SCRIPTABLE int moveCount() const;
private:
- SpeciesWrapper(const Pokemod::Species* species, PokemodWrapper* parent);
+ SpeciesWrapper(const Sigmod::Species* species, SigmodWrapper* parent);
SpeciesWrapper& operator=(const SpeciesWrapper& rhs);
- const Pokemod::Species* m_species;
+ const Sigmod::Species* m_species;
};
}
-Q_DECLARE_METATYPE(Pokescripting::SpeciesWrapper*)
+Q_DECLARE_METATYPE(Sigscript::SpeciesWrapper*)
#endif
diff --git a/sigscript/SpriteWrapper.cpp b/sigscript/SpriteWrapper.cpp
index 0233e996..440d41fa 100644
--- a/sigscript/SpriteWrapper.cpp
+++ b/sigscript/SpriteWrapper.cpp
@@ -18,28 +18,28 @@
// Header include
#include "SpriteWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::SpriteWrapper* Pokescripting::SpriteWrapper::create(const Pokemod::Sprite* sprite, PokemodWrapper* parent)
+Sigscript::SpriteWrapper* Sigscript::SpriteWrapper::create(const Sigmod::Sprite* sprite, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, sprite->id())))
m_instances[Signiture(parent, sprite->id())] = new SpriteWrapper(sprite, parent);
return qobject_cast<SpriteWrapper*>(m_instances[Signiture(parent, sprite->id())]);
}
-Pokescripting::SpriteWrapper::SpriteWrapper(const Pokemod::Sprite* sprite, PokemodWrapper* parent) :
+Sigscript::SpriteWrapper::SpriteWrapper(const Sigmod::Sprite* sprite, SigmodWrapper* parent) :
ObjectWrapper(sprite, parent),
m_sprite(sprite)
{
}
-QString Pokescripting::SpriteWrapper::name() const
+QString Sigscript::SpriteWrapper::name() const
{
return m_sprite->name();
}
-QImage Pokescripting::SpriteWrapper::sprite() const
+QImage Sigscript::SpriteWrapper::sprite() const
{
return m_sprite->sprite();
}
diff --git a/sigscript/SpriteWrapper.h b/sigscript/SpriteWrapper.h
index 77db2e47..0b58c066 100644
--- a/sigscript/SpriteWrapper.h
+++ b/sigscript/SpriteWrapper.h
@@ -15,33 +15,33 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_SPRITEWRAPPER__
-#define __POKESCRIPTING_SPRITEWRAPPER__
+#ifndef __SIGSCRIPT_SPRITEWRAPPER__
+#define __SIGSCRIPT_SPRITEWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Sprite.h"
+// Sigmod includes
+#include "../sigmod/Sprite.h"
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT SpriteWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT SpriteWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static SpriteWrapper* create(const Pokemod::Sprite* sprite, PokemodWrapper* parent);
+ static SpriteWrapper* create(const Sigmod::Sprite* sprite, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE QImage sprite() const;
private:
- SpriteWrapper(const Pokemod::Sprite* sprite, PokemodWrapper* parent);
+ SpriteWrapper(const Sigmod::Sprite* sprite, SigmodWrapper* parent);
SpriteWrapper& operator=(const SpriteWrapper& rhs);
- const Pokemod::Sprite* m_sprite;
+ const Sigmod::Sprite* m_sprite;
};
}
-Q_DECLARE_METATYPE(Pokescripting::SpriteWrapper*)
+Q_DECLARE_METATYPE(Sigscript::SpriteWrapper*)
#endif
diff --git a/sigscript/StatusWrapper.cpp b/sigscript/StatusWrapper.cpp
index 4c5191ad..54269671 100644
--- a/sigscript/StatusWrapper.cpp
+++ b/sigscript/StatusWrapper.cpp
@@ -18,33 +18,33 @@
// Header include
#include "StatusWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::StatusWrapper* Pokescripting::StatusWrapper::create(const Pokemod::Status* status, PokemodWrapper* parent)
+Sigscript::StatusWrapper* Sigscript::StatusWrapper::create(const Sigmod::Status* status, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, status->id())))
m_instances[Signiture(parent, status->id())] = new StatusWrapper(status, parent);
return qobject_cast<StatusWrapper*>(m_instances[Signiture(parent, status->id())]);
}
-Pokescripting::StatusWrapper::StatusWrapper(const Pokemod::Status* status, PokemodWrapper* parent) :
+Sigscript::StatusWrapper::StatusWrapper(const Sigmod::Status* status, SigmodWrapper* parent) :
ObjectWrapper(status, parent),
m_status(status)
{
}
-QString Pokescripting::StatusWrapper::name() const
+QString Sigscript::StatusWrapper::name() const
{
return m_status->name();
}
-Pokemod::Script Pokescripting::StatusWrapper::battleScript() const
+Sigmod::Script Sigscript::StatusWrapper::battleScript() const
{
return m_status->battleScript();
}
-Pokemod::Script Pokescripting::StatusWrapper::worldScript() const
+Sigmod::Script Sigscript::StatusWrapper::worldScript() const
{
return m_status->worldScript();
}
diff --git a/sigscript/StatusWrapper.h b/sigscript/StatusWrapper.h
index 1a84e0a4..ef8bb2e8 100644
--- a/sigscript/StatusWrapper.h
+++ b/sigscript/StatusWrapper.h
@@ -15,34 +15,34 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_STATUSWRAPPER__
-#define __POKESCRIPTING_STATUSWRAPPER__
+#ifndef __SIGSCRIPT_STATUSWRAPPER__
+#define __SIGSCRIPT_STATUSWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Status.h"
+// Sigmod includes
+#include "../sigmod/Status.h"
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT StatusWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT StatusWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static StatusWrapper* create(const Pokemod::Status* status, PokemodWrapper* parent);
+ static StatusWrapper* create(const Sigmod::Status* status, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
- Q_SCRIPTABLE Pokemod::Script battleScript() const;
- Q_SCRIPTABLE Pokemod::Script worldScript() const;
+ Q_SCRIPTABLE Sigmod::Script battleScript() const;
+ Q_SCRIPTABLE Sigmod::Script worldScript() const;
private:
- StatusWrapper(const Pokemod::Status* status, PokemodWrapper* parent);
+ StatusWrapper(const Sigmod::Status* status, SigmodWrapper* parent);
StatusWrapper& operator=(const StatusWrapper& rhs);
- const Pokemod::Status* m_status;
+ const Sigmod::Status* m_status;
};
}
-Q_DECLARE_METATYPE(Pokescripting::StatusWrapper*)
+Q_DECLARE_METATYPE(Sigscript::StatusWrapper*)
#endif
diff --git a/sigscript/StoreWrapper.cpp b/sigscript/StoreWrapper.cpp
index 111d0bd0..c747b4eb 100644
--- a/sigscript/StoreWrapper.cpp
+++ b/sigscript/StoreWrapper.cpp
@@ -18,32 +18,32 @@
// Header include
#include "StoreWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::StoreWrapper* Pokescripting::StoreWrapper::create(const Pokemod::Store* store, PokemodWrapper* parent)
+Sigscript::StoreWrapper* Sigscript::StoreWrapper::create(const Sigmod::Store* store, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, store->id())))
m_instances[Signiture(parent, store->id())] = new StoreWrapper(store, parent);
return qobject_cast<StoreWrapper*>(m_instances[Signiture(parent, store->id())]);
}
-Pokescripting::StoreWrapper::StoreWrapper(const Pokemod::Store* store, PokemodWrapper* parent) :
+Sigscript::StoreWrapper::StoreWrapper(const Sigmod::Store* store, SigmodWrapper* parent) :
ObjectWrapper(store, parent),
m_store(store)
{
}
-QString Pokescripting::StoreWrapper::name() const
+QString Sigscript::StoreWrapper::name() const
{
return m_store->name();
}
-QList<Pokescripting::ItemWrapper*> Pokescripting::StoreWrapper::items()
+QList<Sigscript::ItemWrapper*> Sigscript::StoreWrapper::items()
{
QList<int> itemIds = m_store->items();
QList<ItemWrapper*> items;
foreach (int id, itemIds)
- items.append(pokemod()->item(id));
+ items.append(sigmod()->item(id));
return items;
}
diff --git a/sigscript/StoreWrapper.h b/sigscript/StoreWrapper.h
index 18892e8f..4938fb51 100644
--- a/sigscript/StoreWrapper.h
+++ b/sigscript/StoreWrapper.h
@@ -15,36 +15,36 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_STOREWRAPPER__
-#define __POKESCRIPTING_STOREWRAPPER__
+#ifndef __SIGSCRIPT_STOREWRAPPER__
+#define __SIGSCRIPT_STOREWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Store.h"
+// Sigmod includes
+#include "../sigmod/Store.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class ItemWrapper;
-class POKESCRIPTING_EXPORT StoreWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT StoreWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static StoreWrapper* create(const Pokemod::Store* store, PokemodWrapper* parent);
+ static StoreWrapper* create(const Sigmod::Store* store, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE QList<ItemWrapper*> items();
private:
- StoreWrapper(const Pokemod::Store* store, PokemodWrapper* parent);
+ StoreWrapper(const Sigmod::Store* store, SigmodWrapper* parent);
StoreWrapper& operator=(const StoreWrapper& rhs);
- const Pokemod::Store* m_store;
+ const Sigmod::Store* m_store;
};
}
-Q_DECLARE_METATYPE(Pokescripting::StoreWrapper*)
+Q_DECLARE_METATYPE(Sigscript::StoreWrapper*)
#endif
diff --git a/sigscript/TileWrapper.cpp b/sigscript/TileWrapper.cpp
index 648bd39d..8efbe209 100644
--- a/sigscript/TileWrapper.cpp
+++ b/sigscript/TileWrapper.cpp
@@ -18,47 +18,47 @@
// Header include
#include "TileWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
#include "SpriteWrapper.h"
-Pokescripting::TileWrapper* Pokescripting::TileWrapper::create(const Pokemod::Tile* tile, PokemodWrapper* parent)
+Sigscript::TileWrapper* Sigscript::TileWrapper::create(const Sigmod::Tile* tile, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, tile->id())))
m_instances[Signiture(parent, tile->id())] = new TileWrapper(tile, parent);
return qobject_cast<TileWrapper*>(m_instances[Signiture(parent, tile->id())]);
}
-Pokescripting::TileWrapper::TileWrapper(const Pokemod::Tile* tile, PokemodWrapper* parent) :
+Sigscript::TileWrapper::TileWrapper(const Sigmod::Tile* tile, SigmodWrapper* parent) :
ObjectWrapper(tile, parent),
m_tile(tile)
{
}
-QString Pokescripting::TileWrapper::name() const
+QString Sigscript::TileWrapper::name() const
{
return m_tile->name();
}
-Pokescripting::SpriteWrapper* Pokescripting::TileWrapper::sprite()
+Sigscript::SpriteWrapper* Sigscript::TileWrapper::sprite()
{
if (value("sprite").canConvert<QString>())
{
- SpriteWrapper* sprite = pokemod()->sprite(value("sprite").toString());
+ SpriteWrapper* sprite = sigmod()->sprite(value("sprite").toString());
if (sprite && sprite->sprite().size() == QSize(64, 64))
return sprite;
}
- return pokemod()->sprite(m_tile->sprite());
+ return sigmod()->sprite(m_tile->sprite());
}
-bool Pokescripting::TileWrapper::from(const Pokemod::Direction direction) const
+bool Sigscript::TileWrapper::from(const Sigmod::Direction direction) const
{
if (value(QString("direction-%1").arg(direction)).canConvert<bool>())
return value(QString("direction-%1").arg(direction)).toBool();
return m_tile->from(direction);
}
-Pokemod::Script Pokescripting::TileWrapper::script() const
+Sigmod::Script Sigscript::TileWrapper::script() const
{
return m_tile->script();
}
diff --git a/sigscript/TileWrapper.h b/sigscript/TileWrapper.h
index a32d3594..b75352e9 100644
--- a/sigscript/TileWrapper.h
+++ b/sigscript/TileWrapper.h
@@ -15,38 +15,38 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_TILEWRAPPER__
-#define __POKESCRIPTING_TILEWRAPPER__
+#ifndef __SIGSCRIPT_TILEWRAPPER__
+#define __SIGSCRIPT_TILEWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Tile.h"
+// Sigmod includes
+#include "../sigmod/Tile.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class SpriteWrapper;
-class POKESCRIPTING_EXPORT TileWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT TileWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static TileWrapper* create(const Pokemod::Tile* tile, PokemodWrapper* parent);
+ static TileWrapper* create(const Sigmod::Tile* tile, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE SpriteWrapper* sprite();
- Q_SCRIPTABLE bool from(const Pokemod::Direction direction) const;
- Q_SCRIPTABLE Pokemod::Script script() const;
+ Q_SCRIPTABLE bool from(const Sigmod::Direction direction) const;
+ Q_SCRIPTABLE Sigmod::Script script() const;
private:
- TileWrapper(const Pokemod::Tile* tile, PokemodWrapper* parent);
+ TileWrapper(const Sigmod::Tile* tile, SigmodWrapper* parent);
TileWrapper& operator=(const TileWrapper& rhs);
- const Pokemod::Tile* m_tile;
+ const Sigmod::Tile* m_tile;
};
}
-Q_DECLARE_METATYPE(Pokescripting::TileWrapper*)
+Q_DECLARE_METATYPE(Sigscript::TileWrapper*)
#endif
diff --git a/sigscript/TimeWrapper.cpp b/sigscript/TimeWrapper.cpp
index 1971582b..befcee9b 100644
--- a/sigscript/TimeWrapper.cpp
+++ b/sigscript/TimeWrapper.cpp
@@ -18,33 +18,33 @@
// Header include
#include "TimeWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::TimeWrapper* Pokescripting::TimeWrapper::create(const Pokemod::Time* time, PokemodWrapper* parent)
+Sigscript::TimeWrapper* Sigscript::TimeWrapper::create(const Sigmod::Time* time, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, time->id())))
m_instances[Signiture(parent, time->id())] = new TimeWrapper(time, parent);
return qobject_cast<TimeWrapper*>(m_instances[Signiture(parent, time->id())]);
}
-Pokescripting::TimeWrapper::TimeWrapper(const Pokemod::Time* time, PokemodWrapper* parent) :
+Sigscript::TimeWrapper::TimeWrapper(const Sigmod::Time* time, SigmodWrapper* parent) :
ObjectWrapper(time, parent),
m_time(time)
{
}
-QString Pokescripting::TimeWrapper::TimeWrapper::name() const
+QString Sigscript::TimeWrapper::TimeWrapper::name() const
{
return m_time->name();
}
-int Pokescripting::TimeWrapper::TimeWrapper::hour() const
+int Sigscript::TimeWrapper::TimeWrapper::hour() const
{
return m_time->hour();
}
-int Pokescripting::TimeWrapper::TimeWrapper::minute() const
+int Sigscript::TimeWrapper::TimeWrapper::minute() const
{
return m_time->minute();
}
diff --git a/sigscript/TimeWrapper.h b/sigscript/TimeWrapper.h
index e7326cfb..23835653 100644
--- a/sigscript/TimeWrapper.h
+++ b/sigscript/TimeWrapper.h
@@ -15,34 +15,34 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_TIMEWRAPPER__
-#define __POKESCRIPTING_TIMEWRAPPER__
+#ifndef __SIGSCRIPT_TIMEWRAPPER__
+#define __SIGSCRIPT_TIMEWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Time.h"
+// Sigmod includes
+#include "../sigmod/Time.h"
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT TimeWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT TimeWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static TimeWrapper* create(const Pokemod::Time* time, PokemodWrapper* parent);
+ static TimeWrapper* create(const Sigmod::Time* time, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE int hour() const;
Q_SCRIPTABLE int minute() const;
private:
- TimeWrapper(const Pokemod::Time* time, PokemodWrapper* parent);
+ TimeWrapper(const Sigmod::Time* time, SigmodWrapper* parent);
TimeWrapper& operator=(const TimeWrapper& rhs);
- const Pokemod::Time* m_time;
+ const Sigmod::Time* m_time;
};
}
-Q_DECLARE_METATYPE(Pokescripting::TimeWrapper*)
+Q_DECLARE_METATYPE(Sigscript::TimeWrapper*)
#endif
diff --git a/sigscript/TrainerWrapper.cpp b/sigscript/TrainerWrapper.cpp
index d552070b..c3ca4c7a 100644
--- a/sigscript/TrainerWrapper.cpp
+++ b/sigscript/TrainerWrapper.cpp
@@ -18,80 +18,80 @@
// Header include
#include "TrainerWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::TrainerWrapper* Pokescripting::TrainerWrapper::create(const Pokemod::Trainer* trainer, PokemodWrapper* parent)
+Sigscript::TrainerWrapper* Sigscript::TrainerWrapper::create(const Sigmod::Trainer* trainer, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, trainer->id())))
m_instances[Signiture(parent, trainer->id())] = new TrainerWrapper(trainer, parent);
return qobject_cast<TrainerWrapper*>(m_instances[Signiture(parent, trainer->id())]);
}
-Pokescripting::TrainerWrapper::TrainerWrapper(const Pokemod::Trainer* trainer, PokemodWrapper* parent) :
+Sigscript::TrainerWrapper::TrainerWrapper(const Sigmod::Trainer* trainer, SigmodWrapper* parent) :
ObjectWrapper(trainer, parent),
m_trainer(trainer)
{
}
-Pokemod::Trainer::Intelligence Pokescripting::TrainerWrapper::intelligence(const QString& name) const
+Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::intelligence(const QString& name) const
{
if (name == "Ignorant")
- return Pokemod::Trainer::Ignorant;
+ return Sigmod::Trainer::Ignorant;
else if (name == "Determine")
- return Pokemod::Trainer::Determine;
+ return Sigmod::Trainer::Determine;
else if (name == "Remember")
- return Pokemod::Trainer::Remember;
+ return Sigmod::Trainer::Remember;
else if (name == "Cheating")
- return Pokemod::Trainer::Cheating;
- return QVariant(-1).value<Pokemod::Trainer::Intelligence>();
+ return Sigmod::Trainer::Cheating;
+ return QVariant(-1).value<Sigmod::Trainer::Intelligence>();
}
-QString Pokescripting::TrainerWrapper::TrainerWrapper::name() const
+QString Sigscript::TrainerWrapper::TrainerWrapper::name() const
{
return m_trainer->name();
}
-int Pokescripting::TrainerWrapper::TrainerWrapper::moneyFactor() const
+int Sigscript::TrainerWrapper::TrainerWrapper::moneyFactor() const
{
if (value("moneyFactor").canConvert<int>())
return value("moneyFactor").toInt();
return m_trainer->moneyFactor();
}
-Pokescripting::SkinWrapper* Pokescripting::TrainerWrapper::TrainerWrapper::skin()
+Sigscript::SkinWrapper* Sigscript::TrainerWrapper::TrainerWrapper::skin()
{
- return pokemod()->skin(m_trainer->skin());
+ return sigmod()->skin(m_trainer->skin());
}
-int Pokescripting::TrainerWrapper::TrainerWrapper::depth() const
+int Sigscript::TrainerWrapper::TrainerWrapper::depth() const
{
if (value("depth").canConvert<int>())
return value("depth").toInt();
return m_trainer->depth();
}
-Pokemod::Trainer::Intelligence Pokescripting::TrainerWrapper::TrainerWrapper::teamIntel() const
+Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::teamIntel() const
{
return m_trainer->teamIntel();
}
-Pokemod::Trainer::Intelligence Pokescripting::TrainerWrapper::TrainerWrapper::moveIntel() const
+Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::moveIntel() const
{
return m_trainer->moveIntel();
}
-Pokemod::Trainer::Intelligence Pokescripting::TrainerWrapper::TrainerWrapper::itemIntel() const
+Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::itemIntel() const
{
return m_trainer->itemIntel();
}
-Pokemod::Trainer::Intelligence Pokescripting::TrainerWrapper::TrainerWrapper::abilityIntel() const
+Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::abilityIntel() const
{
return m_trainer->abilityIntel();
}
-Pokemod::Trainer::Intelligence Pokescripting::TrainerWrapper::TrainerWrapper::statIntel() const
+Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::statIntel() const
{
return m_trainer->statIntel();
}
diff --git a/sigscript/TrainerWrapper.h b/sigscript/TrainerWrapper.h
index c8ae6e85..96894f67 100644
--- a/sigscript/TrainerWrapper.h
+++ b/sigscript/TrainerWrapper.h
@@ -15,45 +15,45 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_TRAINERWRAPPER__
-#define __POKESCRIPTING_TRAINERWRAPPER__
+#ifndef __SIGSCRIPT_TRAINERWRAPPER__
+#define __SIGSCRIPT_TRAINERWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Trainer.h"
+// Sigmod includes
+#include "../sigmod/Trainer.h"
-namespace Pokescripting
+namespace Sigscript
{
// Forward declarations
class SkinWrapper;
-class POKESCRIPTING_EXPORT TrainerWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT TrainerWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static TrainerWrapper* create(const Pokemod::Trainer* trainer, PokemodWrapper* parent);
+ static TrainerWrapper* create(const Sigmod::Trainer* trainer, SigmodWrapper* parent);
- Q_SCRIPTABLE Pokemod::Trainer::Intelligence intelligence(const QString& name) const;
+ Q_SCRIPTABLE Sigmod::Trainer::Intelligence intelligence(const QString& name) const;
Q_SCRIPTABLE QString name() const;
Q_SCRIPTABLE int moneyFactor() const;
Q_SCRIPTABLE SkinWrapper* skin();
Q_SCRIPTABLE int depth() const;
- Q_SCRIPTABLE Pokemod::Trainer::Intelligence teamIntel() const;
- Q_SCRIPTABLE Pokemod::Trainer::Intelligence moveIntel() const;
- Q_SCRIPTABLE Pokemod::Trainer::Intelligence itemIntel() const;
- Q_SCRIPTABLE Pokemod::Trainer::Intelligence abilityIntel() const;
- Q_SCRIPTABLE Pokemod::Trainer::Intelligence statIntel() const;
+ Q_SCRIPTABLE Sigmod::Trainer::Intelligence teamIntel() const;
+ Q_SCRIPTABLE Sigmod::Trainer::Intelligence moveIntel() const;
+ Q_SCRIPTABLE Sigmod::Trainer::Intelligence itemIntel() const;
+ Q_SCRIPTABLE Sigmod::Trainer::Intelligence abilityIntel() const;
+ Q_SCRIPTABLE Sigmod::Trainer::Intelligence statIntel() const;
private:
- TrainerWrapper(const Pokemod::Trainer* trainer, PokemodWrapper* parent);
+ TrainerWrapper(const Sigmod::Trainer* trainer, SigmodWrapper* parent);
TrainerWrapper& operator=(const TrainerWrapper& rhs);
- const Pokemod::Trainer* m_trainer;
+ const Sigmod::Trainer* m_trainer;
};
}
-Q_DECLARE_METATYPE(Pokescripting::TrainerWrapper*)
+Q_DECLARE_METATYPE(Sigscript::TrainerWrapper*)
#endif
diff --git a/sigscript/TypeWrapper.cpp b/sigscript/TypeWrapper.cpp
index d752a9fa..216916d4 100644
--- a/sigscript/TypeWrapper.cpp
+++ b/sigscript/TypeWrapper.cpp
@@ -18,28 +18,28 @@
// Header include
#include "TypeWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::TypeWrapper* Pokescripting::TypeWrapper::create(const Pokemod::Type* type, PokemodWrapper* parent)
+Sigscript::TypeWrapper* Sigscript::TypeWrapper::create(const Sigmod::Type* type, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, type->id())))
m_instances[Signiture(parent, type->id())] = new TypeWrapper(type, parent);
return qobject_cast<TypeWrapper*>(m_instances[Signiture(parent, type->id())]);
}
-Pokescripting::TypeWrapper::TypeWrapper(const Pokemod::Type* type, PokemodWrapper* parent) :
+Sigscript::TypeWrapper::TypeWrapper(const Sigmod::Type* type, SigmodWrapper* parent) :
ObjectWrapper(type, parent),
m_type(type)
{
}
-QString Pokescripting::TypeWrapper::TypeWrapper::name() const
+QString Sigscript::TypeWrapper::TypeWrapper::name() const
{
return m_type->name();
}
-Pokemod::Fraction Pokescripting::TypeWrapper::TypeWrapper::stab() const
+Sigmod::Fraction Sigscript::TypeWrapper::TypeWrapper::stab() const
{
return m_type->stab();
}
diff --git a/sigscript/TypeWrapper.h b/sigscript/TypeWrapper.h
index 02dba293..57a62bcd 100644
--- a/sigscript/TypeWrapper.h
+++ b/sigscript/TypeWrapper.h
@@ -15,33 +15,33 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_TYPEWRAPPER__
-#define __POKESCRIPTING_TYPEWRAPPER__
+#ifndef __SIGSCRIPT_TYPEWRAPPER__
+#define __SIGSCRIPT_TYPEWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Type.h"
+// Sigmod includes
+#include "../sigmod/Type.h"
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT TypeWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT TypeWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static TypeWrapper* create(const Pokemod::Type* type, PokemodWrapper* parent);
+ static TypeWrapper* create(const Sigmod::Type* type, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
- Q_SCRIPTABLE Pokemod::Fraction stab() const;
+ Q_SCRIPTABLE Sigmod::Fraction stab() const;
private:
- TypeWrapper(const Pokemod::Type* type, PokemodWrapper* parent);
+ TypeWrapper(const Sigmod::Type* type, SigmodWrapper* parent);
TypeWrapper& operator=(const TypeWrapper& rhs);
- const Pokemod::Type* m_type;
+ const Sigmod::Type* m_type;
};
}
-Q_DECLARE_METATYPE(Pokescripting::TypeWrapper*)
+Q_DECLARE_METATYPE(Sigscript::TypeWrapper*)
#endif
diff --git a/sigscript/WeatherWrapper.cpp b/sigscript/WeatherWrapper.cpp
index ad7bc990..34965d9d 100644
--- a/sigscript/WeatherWrapper.cpp
+++ b/sigscript/WeatherWrapper.cpp
@@ -18,28 +18,28 @@
// Header include
#include "WeatherWrapper.h"
-// Pokescripting includes
-#include "PokemodWrapper.h"
+// Sigscript includes
+#include "SigmodWrapper.h"
-Pokescripting::WeatherWrapper* Pokescripting::WeatherWrapper::create(const Pokemod::Weather* weather, PokemodWrapper* parent)
+Sigscript::WeatherWrapper* Sigscript::WeatherWrapper::create(const Sigmod::Weather* weather, SigmodWrapper* parent)
{
if (!m_instances.contains(Signiture(parent, weather->id())))
m_instances[Signiture(parent, weather->id())] = new WeatherWrapper(weather, parent);
return qobject_cast<WeatherWrapper*>(m_instances[Signiture(parent, weather->id())]);
}
-Pokescripting::WeatherWrapper::WeatherWrapper(const Pokemod::Weather* weather, PokemodWrapper* parent) :
+Sigscript::WeatherWrapper::WeatherWrapper(const Sigmod::Weather* weather, SigmodWrapper* parent) :
ObjectWrapper(weather, parent),
m_weather(weather)
{
}
-QString Pokescripting::WeatherWrapper::name() const
+QString Sigscript::WeatherWrapper::name() const
{
return m_weather->name();
}
-Pokemod::Script Pokescripting::WeatherWrapper::script() const
+Sigmod::Script Sigscript::WeatherWrapper::script() const
{
return m_weather->script();
}
diff --git a/sigscript/WeatherWrapper.h b/sigscript/WeatherWrapper.h
index 4a915af2..97b683f9 100644
--- a/sigscript/WeatherWrapper.h
+++ b/sigscript/WeatherWrapper.h
@@ -15,33 +15,33 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __POKESCRIPTING_WEATHERWRAPPER__
-#define __POKESCRIPTING_WEATHERWRAPPER__
+#ifndef __SIGSCRIPT_WEATHERWRAPPER__
+#define __SIGSCRIPT_WEATHERWRAPPER__
-// Pokescripting includes
+// Sigscript includes
#include "ObjectWrapper.h"
-// Pokemod includes
-#include "../pokemod/Weather.h"
+// Sigmod includes
+#include "../sigmod/Weather.h"
-namespace Pokescripting
+namespace Sigscript
{
-class POKESCRIPTING_EXPORT WeatherWrapper : public ObjectWrapper
+class SIGSCRIPT_EXPORT WeatherWrapper : public ObjectWrapper
{
Q_OBJECT
public:
- static WeatherWrapper* create(const Pokemod::Weather* weather, PokemodWrapper* parent);
+ static WeatherWrapper* create(const Sigmod::Weather* weather, SigmodWrapper* parent);
Q_SCRIPTABLE QString name() const;
- Q_SCRIPTABLE Pokemod::Script script() const;
+ Q_SCRIPTABLE Sigmod::Script script() const;
private:
- WeatherWrapper(const Pokemod::Weather* weather, PokemodWrapper* parent);
+ WeatherWrapper(const Sigmod::Weather* weather, SigmodWrapper* parent);
WeatherWrapper& operator=(const WeatherWrapper& rhs);
- const Pokemod::Weather* m_weather;
+ const Sigmod::Weather* m_weather;
};
}
-Q_DECLARE_METATYPE(Pokescripting::WeatherWrapper*)
+Q_DECLARE_METATYPE(Sigscript::WeatherWrapper*)
#endif