summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-02-24 02:38:08 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-02-24 02:38:08 +0000
commitfc3046a7e917458e024d76fd37ec531ce7efe217 (patch)
tree5623616277cfccd98d6c7fd67ee8335173a17b2c
parent35c3bd12416bc4a44efb12bd92757837d661ec21 (diff)
downloadsigen-fc3046a7e917458e024d76fd37ec531ce7efe217.tar.gz
sigen-fc3046a7e917458e024d76fd37ec531ce7efe217.tar.xz
sigen-fc3046a7e917458e024d76fd37ec531ce7efe217.zip
[FIX] Include cleanup
[FIX] Consolidate skins into Pokemod UI forms [FIX] Now using KMainWindow [FIX] Some code for the tree set up git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@79 6ecfd1a5-f3ed-3746-8530-beee90d26b22
-rw-r--r--Changelog10
-rw-r--r--pokemod/MapEffect.cpp4
-rw-r--r--pokemod/MapTrainer.cpp8
-rw-r--r--pokemod/MapTrainer.h2
-rw-r--r--pokemod/Object.h2
-rw-r--r--pokemodr/AbilityUI.h2
-rw-r--r--pokemodr/AuthorUI.h2
-rw-r--r--pokemodr/BadgeUI.h2
-rw-r--r--pokemodr/CoinListObjectUI.h2
-rw-r--r--pokemodr/CoinListUI.h2
-rw-r--r--pokemodr/EggGroupUI.h2
-rw-r--r--pokemodr/ItemTypeUI.h5
-rw-r--r--pokemodr/ItemUI.h2
-rw-r--r--pokemodr/MapTrainerTeamMemberUI.h2
-rw-r--r--pokemodr/MapUI.h2
-rw-r--r--pokemodr/MapWarpUI.h2
-rw-r--r--pokemodr/MapWildListEncounterUI.h2
-rw-r--r--pokemodr/MapWildListUI.h2
-rw-r--r--pokemodr/MoveUI.h2
-rw-r--r--pokemodr/NatureUI.h2
-rw-r--r--pokemodr/ObjectUI.h35
-rw-r--r--pokemodr/PokeModTreeItem.h20
-rw-r--r--pokemodr/PokeModrUI.cpp99
-rw-r--r--pokemodr/PokeModrUI.h4
-rw-r--r--pokemodr/PokemodUI.cpp146
-rw-r--r--pokemodr/PokemodUI.h8
-rw-r--r--pokemodr/RulesUI.h2
-rw-r--r--pokemodr/SpeciesAbilityUI.h2
-rw-r--r--pokemodr/SpeciesItemUI.h2
-rw-r--r--pokemodr/SpeciesMoveUI.h2
-rw-r--r--pokemodr/SpeciesUI.h2
-rw-r--r--pokemodr/StoreUI.h2
-rw-r--r--pokemodr/TODO3
-rw-r--r--pokemodr/TileUI.h2
-rw-r--r--pokemodr/TimeUI.h2
-rw-r--r--pokemodr/TypeUI.h2
-rw-r--r--pokemodr/gui/pokemod.ui674
-rw-r--r--pokemodr/gui/pokemodr.ui12
-rw-r--r--pokemodr/images/overlays.qrc14
-rw-r--r--pokemodr/pokemodr.pro12
40 files changed, 864 insertions, 240 deletions
diff --git a/Changelog b/Changelog
index 1eafde85..3e20848f 100644
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,14 @@
-----------------
+Rev: 79
+Date: 23 February 2008
+User: MathStuf
+-----------------
+[FIX] Include cleanup
+[FIX] Consolidate skins into Pokemod UI forms
+[FIX] Now using KMainWindow
+[FIX] Some code for the tree set up
+
+-----------------
Rev: 78
Date: 23 February 2008
User: MathStuf
diff --git a/pokemod/MapEffect.cpp b/pokemod/MapEffect.cpp
index c7c2c1c1..5ca7f96f 100644
--- a/pokemod/MapEffect.cpp
+++ b/pokemod/MapEffect.cpp
@@ -69,7 +69,7 @@ bool MapEffect::validate() const
pokemod->validationMsg("Invalid existence flag status");
valid = false;
}
- if (!QFile::exists(QString("%1/image/skin/%2.png").arg(pokemod->getPath()).arg(skin)))
+ if (!QFile::exists(getSkin()))
{
pokemod->validationMsg(QString("Skin not found"));
valid = false;
@@ -286,7 +286,7 @@ Flag MapEffect::getExistFlag() const
QString MapEffect::getSkin() const
{
- return skin;
+ return QString("%1/image/skin/%2.png").arg(pokemod->getPath()).arg(skin);
}
int MapEffect::getEffect() const
diff --git a/pokemod/MapTrainer.cpp b/pokemod/MapTrainer.cpp
index 306b50ec..cd6b4c98 100644
--- a/pokemod/MapTrainer.cpp
+++ b/pokemod/MapTrainer.cpp
@@ -69,7 +69,7 @@ bool MapTrainer::validate() const
pokemod->validationMsg("Name is not defined");
valid = false;
}
- if (!QFile::exists(QString("%1/image/skin/%2.png").arg(pokemod->getPath()).arg(skin)))
+ if (!QFile::exists(getSkin()))
{
pokemod->validationMsg("Skin could't be found");
valid = false;
@@ -84,7 +84,7 @@ bool MapTrainer::validate() const
pokemod->validationMsg("Invalid number of Pokémon for a fight");
valid = false;
}
- if (!QFile::exists(QString("%1/ai/%2.pai").arg(pokemod->getPath()).arg(ai)))
+ if (!QFile::exists(getAI()))
{
pokemod->validationMsg("AI file couldn\'t be found");
valid = false;
@@ -314,7 +314,7 @@ Point MapTrainer::getCoordinate() const
QString MapTrainer::getSkin() const
{
- return skin;
+ return QString("%1/image/skin/%2.png").arg(pokemod->getPath()).arg(skin);
}
int MapTrainer::getSight() const
@@ -334,7 +334,7 @@ int MapTrainer::getNumFight() const
QString MapTrainer::getAI() const
{
- return ai;
+ return QString("%1/ai/%2.pai").arg(pokemod->getPath()).arg(ai);
}
Flag MapTrainer::getAppearFlag() const
diff --git a/pokemod/MapTrainer.h b/pokemod/MapTrainer.h
index 467b3ac9..168c1053 100644
--- a/pokemod/MapTrainer.h
+++ b/pokemod/MapTrainer.h
@@ -65,11 +65,9 @@ class MapTrainer : public Object
QString getName() const;
Point getCoordinate() const;
QString getSkin() const;
- bool getSkinExists() const;
int getSight() const;
int getDirection() const;
int getNumFight() const;
- bool getAIExists() const;
QString getAI() const;
Flag getAppearFlag() const;
int getOverworldDialog() const;
diff --git a/pokemod/Object.h b/pokemod/Object.h
index 6105d121..a0c774ef 100644
--- a/pokemod/Object.h
+++ b/pokemod/Object.h
@@ -62,7 +62,7 @@ class Object
return (0 <= id);
}
- const QString& getClassName() const
+ QString getClassName() const
{
return className;
}
diff --git a/pokemodr/AbilityUI.h b/pokemodr/AbilityUI.h
index 52ddb22d..a93253ea 100644
--- a/pokemodr/AbilityUI.h
+++ b/pokemodr/AbilityUI.h
@@ -23,12 +23,12 @@
#ifndef __POKEMODR_ABILITYUI__
#define __POKEMODR_ABILITYUI__
-#include <ktoolbar.h>
#include <QString>
#include <Ability.h>
#include "ObjectUI.h"
+
#include "ui_ability.h"
class AbilityUI : public ObjectUI, private Ui::formAbility
diff --git a/pokemodr/AuthorUI.h b/pokemodr/AuthorUI.h
index d94b1f54..296a3d6e 100644
--- a/pokemodr/AuthorUI.h
+++ b/pokemodr/AuthorUI.h
@@ -23,12 +23,12 @@
#ifndef __POKEMODR_AUTHORUI__
#define __POKEMODR_AUTHORUI__
-#include <ktoolbar.h>
#include <QString>
#include <Author.h>
#include "ObjectUI.h"
+
#include "ui_author.h"
class AuthorUI : public ObjectUI, private Ui::formAuthor
diff --git a/pokemodr/BadgeUI.h b/pokemodr/BadgeUI.h
index 0f93152a..fec60b79 100644
--- a/pokemodr/BadgeUI.h
+++ b/pokemodr/BadgeUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_BADGEUI__
#define __POKEMODR_BADGEUI__
-#include <ktoolbar.h>
-
#include <QString>
#include <Badge.h>
diff --git a/pokemodr/CoinListObjectUI.h b/pokemodr/CoinListObjectUI.h
index fbd7da60..53dae3aa 100644
--- a/pokemodr/CoinListObjectUI.h
+++ b/pokemodr/CoinListObjectUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_COINLISTOBJECTUI__
#define __POKEMODR_COINLISTOBJECTUI__
-#include <ktoolbar.h>
-
#include <CoinListObject.h>
#include "ObjectUI.h"
diff --git a/pokemodr/CoinListUI.h b/pokemodr/CoinListUI.h
index 6b32c534..d6b166a6 100644
--- a/pokemodr/CoinListUI.h
+++ b/pokemodr/CoinListUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_COINLISTUI__
#define __POKEMODR_COINLISTUI__
-#include <ktoolbar.h>
-
#include <QString>
#include <CoinList.h>
diff --git a/pokemodr/EggGroupUI.h b/pokemodr/EggGroupUI.h
index dcd89357..d5f8bd75 100644
--- a/pokemodr/EggGroupUI.h
+++ b/pokemodr/EggGroupUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_EGGGROUPUI__
#define __POKEMODR_EGGGROUPUI__
-#include <ktoolbar.h>
-
#include <QString>
#include <EggGroup.h>
diff --git a/pokemodr/ItemTypeUI.h b/pokemodr/ItemTypeUI.h
index 32c98df3..923de180 100644
--- a/pokemodr/ItemTypeUI.h
+++ b/pokemodr/ItemTypeUI.h
@@ -23,11 +23,6 @@
#ifndef __POKEMODR_ITEMTYPEUI__
#define __POKEMODR_ITEMTYPEUI__
-#include <ktoolbar.h>
-
-#include <QObject>
-#include <QWidget>
-
#include <ItemType.h>
#include "ObjectUI.h"
diff --git a/pokemodr/ItemUI.h b/pokemodr/ItemUI.h
index 1047f881..587e1481 100644
--- a/pokemodr/ItemUI.h
+++ b/pokemodr/ItemUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_ITEMUI__
#define __POKEMODR_ITEMUI__
-#include <ktoolbar.h>
-
#include <QString>
#include <Item.h>
diff --git a/pokemodr/MapTrainerTeamMemberUI.h b/pokemodr/MapTrainerTeamMemberUI.h
index c7082a19..42146d6f 100644
--- a/pokemodr/MapTrainerTeamMemberUI.h
+++ b/pokemodr/MapTrainerTeamMemberUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_MAPTRAINERTEAMMEMBERUI__
#define __POKEMODR_MAPTRAINERTEAMMEMBERUI__
-#include <ktoolbar.h>
-
#include <MapTrainerTeamMember.h>
#include "ObjectUI.h"
diff --git a/pokemodr/MapUI.h b/pokemodr/MapUI.h
index 2fdd4de1..fdf7ef1f 100644
--- a/pokemodr/MapUI.h
+++ b/pokemodr/MapUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_MAPUI__
#define __POKEMODR_MAPUI__
-#include <ktoolbar.h>
-
#include <QString>
#include <Map.h>
diff --git a/pokemodr/MapWarpUI.h b/pokemodr/MapWarpUI.h
index 3d73ca5e..0201a400 100644
--- a/pokemodr/MapWarpUI.h
+++ b/pokemodr/MapWarpUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_MAPWARPUI__
#define __POKEMODR_MAPWARPUI__
-#include <ktoolbar.h>
-
#include <QString>
#include <MapWarp.h>
diff --git a/pokemodr/MapWildListEncounterUI.h b/pokemodr/MapWildListEncounterUI.h
index e65e927b..cfbe3ef2 100644
--- a/pokemodr/MapWildListEncounterUI.h
+++ b/pokemodr/MapWildListEncounterUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_MAPWILDLISTENCOUNTERUI__
#define __POKEMODR_MAPWILDLISTENCOUNTERUI__
-#include <ktoolbar.h>
-
#include <MapWildListEncounter.h>
#include "ObjectUI.h"
diff --git a/pokemodr/MapWildListUI.h b/pokemodr/MapWildListUI.h
index 5aa5d8bb..a37eec8a 100644
--- a/pokemodr/MapWildListUI.h
+++ b/pokemodr/MapWildListUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_MAPWILDLISTUI__
#define __POKEMODR_MAPWILDLISTUI__
-#include <ktoolbar.h>
-
#include <MapWildList.h>
#include "ObjectUI.h"
diff --git a/pokemodr/MoveUI.h b/pokemodr/MoveUI.h
index a2ec8439..1248c491 100644
--- a/pokemodr/MoveUI.h
+++ b/pokemodr/MoveUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_MOVEUI__
#define __POKEMODR_MOVEUI__
-#include <ktoolbar.h>
-
#include <QString>
#include <Move.h>
diff --git a/pokemodr/NatureUI.h b/pokemodr/NatureUI.h
index 4b6f9e56..c7130fee 100644
--- a/pokemodr/NatureUI.h
+++ b/pokemodr/NatureUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_NATUREUI__
#define __POKEMODR_NATUREUI__
-#include <ktoolbar.h>
-
#include <QString>
#include <Nature.h>
diff --git a/pokemodr/ObjectUI.h b/pokemodr/ObjectUI.h
index 691fcb1a..1901c1de 100644
--- a/pokemodr/ObjectUI.h
+++ b/pokemodr/ObjectUI.h
@@ -23,8 +23,11 @@
#ifndef __POKEMODR_OBJECTUI__
#define __POKEMODR_OBJECTUI__
+#include <kdialog.h>
#include <ktoolbar.h>
+#include <QCloseEvent>
+#include <QLabel>
#include <QObject>
#include <QWidget>
@@ -39,17 +42,40 @@ class ObjectUI : public QWidget
public:
ObjectUI(QWidget* parent) :
QWidget(parent),
+ m_changed(false),
obj(NULL),
obj_mod(NULL)
{
connect(this, SIGNAL(changed(bool)), parent->parent()->parent()->parent(), SLOT(setChangedTitle(bool)));
+ connect(this, SIGNAL(changed(bool)), SLOT(setChanged(bool)));
}
virtual ~ObjectUI()
{
}
+ void closeEvent (QCloseEvent* event)
+ {
+ KDialog* dialog = new KDialog(this, Qt::Dialog);
+ dialog->setModal(true);
+ dialog->setCaption("My title");
+ dialog->setButtons(KDialog::Yes | KDialog::No | KDialog::Cancel);
+ QLabel* label = new QLabel("You have unsaved changes, would you like to save them?", dialog);
+ dialog->setMainWidget(label);
+ connect(dialog, SIGNAL(yesClicked()), this, SLOT(on_buttonApply_clicked()));
+ connect(dialog, SIGNAL(noClicked()), this, SLOT(on_buttonDiscard_clicked()));
+ if (dialog->exec() == QDialog::Rejected)
+ event->ignore();
+ else
+ event->accept();
+ }
+
// virtual KToolBar getToolbar(QWidget* parent) = 0;
+ bool isChanged() const
+ {
+ return m_changed;
+ }
+
const Object* getOriginal() const
{
return obj;
@@ -68,6 +94,13 @@ class ObjectUI : public QWidget
}
signals:
void changed(bool);
+ public slots:
+ void setChanged(const bool c)
+ {
+ m_changed = c;
+ }
+ virtual void on_buttonApply_clicked() = 0;
+ virtual void on_buttonDiscard_clicked() = 0;
protected:
void setObjects(Object* orig, Object* mod)
{
@@ -77,6 +110,8 @@ class ObjectUI : public QWidget
virtual void setGui() = 0;
+ bool m_changed;
+
Object* obj;
Object* obj_mod;
};
diff --git a/pokemodr/PokeModTreeItem.h b/pokemodr/PokeModTreeItem.h
index c94886b0..0469d333 100644
--- a/pokemodr/PokeModTreeItem.h
+++ b/pokemodr/PokeModTreeItem.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
// Name: pokegen/PokeModTreeItem.h
-// Purpose: Subclass of QTreeItem that allows information to be tacked on
-// as well
+// Purpose: Subclass of QTreeWidgetItem that allows information to be
+// tacked on as well
// Author: Ben Boeckel
// Modified by: Ben Boeckel
// Created: Tue Jan 22 19:12:17 2008
@@ -34,16 +34,24 @@ class PokeModTreeItem : public QObject, public QTreeWidgetItem
Q_OBJECT
public:
- PokeModTreeItem(Object& o, QTreeWidget* parent) :
+ PokeModTreeItem(Object* o, QTreeWidget* parent) :
QTreeWidgetItem(parent, QTreeWidgetItem::UserType),
- obj(&o)
+ obj(o)
{
+ if (obj)
+ updateName();
}
- Object& getObject()
+ const Object* getObject() const
{
- return *obj;
+ return obj;
}
+ Object* getObject()
+ {
+ return obj;
+ }
+ public slots:
+ void updateName();
private:
Object* obj;
};
diff --git a/pokemodr/PokeModrUI.cpp b/pokemodr/PokeModrUI.cpp
index 19e86090..a8490551 100644
--- a/pokemodr/PokeModrUI.cpp
+++ b/pokemodr/PokeModrUI.cpp
@@ -30,8 +30,8 @@
#include <Exception.h>
#include "PokeModrUI.h"
+#include "PokeModTreeItem.h"
-// Debugging includes
#include "AbilityUI.h"
#include "AuthorUI.h"
#include "BadgeUI.h"
@@ -41,7 +41,10 @@
#include "ItemUI.h"
#include "ItemTypeUI.h"
#include "MapUI.h"
+#include "MapTrainerTeamMemberUI.h"
#include "MapWarpUI.h"
+#include "MapWildListUI.h"
+#include "MapWildListEncounterUI.h"
#include "MoveUI.h"
#include "NatureUI.h"
#include "PokemodUI.h"
@@ -57,16 +60,16 @@
#include "TypeUI.h"
PokeModrUI::PokeModrUI(KConfigGroup cfg, KConfigGroup history, QWidget* parent) :
- QMainWindow(parent),
+ KMainWindow(parent),
config(cfg),
recent("&Recent Files...", NULL)
{
setupUi(this);
QMetaObject::connectSlotsByName(this);
-// recent.loadEntries(history);
-// menuBar()->addMenu(helpMenu("", false));
-// restoreWindowSize(cfg);
-// cfg.readEntry("splitterPos", 100);
+ recent.loadEntries(history);
+ menuBar()->addMenu(customHelpMenu(false));
+ restoreWindowSize(cfg);
+ cfg.readEntry("splitterPos", 100);
// if (cfg.readEntry("reloadOnStart", false).toBool())
// open(recent.urls().at(0));
@@ -115,6 +118,7 @@ void PokeModrUI::PokeModrUI::on_actionNew_triggered()
void PokeModrUI::on_actionOpen_triggered()
{
+
}
void PokeModrUI::on_actionSave_triggered()
@@ -149,6 +153,83 @@ void PokeModrUI::on_splitter_splitterMoved(const int pos)
{
}
-// void PokeModrUI::on_treePokemod_itemChanged(QTreeWidgetItem* item)
-// {
-// }
+void PokeModrUI::on_treePokemod_itemSelectionChanged()
+{
+ QTreeWidgetItem* cur = treePokemod->currentItem();
+ PokeModTreeItem* selected = static_cast<PokeModTreeItem*>(treePokemod->selectedItems()[0]);
+ if (selected->getObject() || static_cast<ObjectUI*>(formPanel->widget())->close())
+ {
+ Object* o = selected->getObject();
+ QString name(o->getClassName());
+ ObjectUI* widget = NULL;
+ if (name == "Ability")
+ widget = new AbilityUI(static_cast<Ability*>(o), formPanel);
+// else if (name == "AbilityEffect")
+// widget = new AbilityEffectUI(static_cast<AbilityEffect*>(o), formPanel);
+ else if (name == "Author")
+ widget = new AuthorUI(static_cast<Author*>(o), formPanel);
+ else if (name == "Badge")
+ widget = new BadgeUI(static_cast<Badge*>(o), formPanel);
+ else if (name == "CoinList")
+ widget = new CoinListUI(static_cast<CoinList*>(o), formPanel);
+ else if (name == "CoinListObject")
+ widget = new CoinListObjectUI(static_cast<CoinListObject*>(o), formPanel);
+// else if (name == "Dialog")
+// widget = new DialogUI(static_cast<Dialog*>(o), formPanel);
+ else if (name == "EggGroup")
+ widget = new EggGroupUI(static_cast<EggGroup*>(o), formPanel);
+ else if (name == "Item")
+ widget = new ItemUI(static_cast<Item*>(o), formPanel);
+// else if (name == "ItemEffect")
+// widget = new ItemEffectUI(static_cast<ItemEffect*>(o), formPanel);
+ else if (name == "ItemType")
+ widget = new ItemTypeUI(static_cast<ItemType*>(o), formPanel);
+ else if (name == "Map")
+ widget = new MapUI(static_cast<Map*>(o), formPanel);
+// else if (name == "MapEffect")
+// widget = new MapEffectUI(static_cast<MapEffect*>(o), formPanel);
+// else if (name == "MapTrainer")
+// widget = new MapTrainerUI(static_cast<MapTrainer*>(o), formPanel);
+ else if (name == "MapTrainerTeamMember")
+ widget = new MapTrainerTeamMemberUI(static_cast<MapTrainerTeamMember*>(o), formPanel);
+ else if (name == "MapWarp")
+ widget = new MapWarpUI(static_cast<MapWarp*>(o), formPanel);
+ else if (name == "MapWildList")
+ widget = new MapWildListUI(static_cast<MapWildList*>(o), formPanel);
+ else if (name == "MapWildListEncounter")
+ widget = new MapWildListEncounterUI(static_cast<MapWildListEncounter*>(o), formPanel);
+ else if (name == "Move")
+ widget = new MoveUI(static_cast<Move*>(o), formPanel);
+// else if (name == "MoveEffect")
+// widget = new MoveEffectUI(static_cast<MoveEffect*>(o), formPanel);
+ else if (name == "Nature")
+ widget = new NatureUI(static_cast<Nature*>(o), formPanel);
+ else if (name == "Pokemod")
+ widget = new PokemodUI(static_cast<Pokemod*>(o), formPanel);
+ else if (name == "Rules")
+ widget = new RulesUI(static_cast<Rules*>(o), formPanel);
+ else if (name == "Species")
+ widget = new SpeciesUI(static_cast<Species*>(o), formPanel);
+ else if (name == "SpeciesAbility")
+ widget = new SpeciesAbilityUI(static_cast<SpeciesAbility*>(o), formPanel);
+ else if (name == "SpeciesEvolution")
+ widget = new SpeciesEvolutionUI(static_cast<SpeciesEvolution*>(o), formPanel);
+ else if (name == "SpeciesItem")
+ widget = new SpeciesItemUI(static_cast<SpeciesItem*>(o), formPanel);
+ else if (name == "SpeciesMove")
+ widget = new SpeciesMoveUI(static_cast<SpeciesMove*>(o), formPanel);
+ else if (name == "Store")
+ widget = new StoreUI(static_cast<Store*>(o), formPanel);
+ else if (name == "Tile")
+ widget = new TileUI(static_cast<Tile*>(o), formPanel);
+ else if (name == "Time")
+ widget = new TimeUI(static_cast<Time*>(o), formPanel);
+ else if (name == "Type")
+ widget = new TypeUI(static_cast<Type*>(o), formPanel);
+ formPanel->setWidget(widget);
+ connect(widget, SIGNAL(changed(bool)), selected, SLOT(updateName()));
+ formPanel->show();
+ }
+ else
+ treePokemod->setCurrentItem(cur);
+}
diff --git a/pokemodr/PokeModrUI.h b/pokemodr/PokeModrUI.h
index 89bc85ad..137c2c21 100644
--- a/pokemodr/PokeModrUI.h
+++ b/pokemodr/PokeModrUI.h
@@ -35,7 +35,7 @@
#include "ui_pokemodr.h"
-class PokeModrUI : public QMainWindow, private Ui::formPokeModr
+class PokeModrUI : public KMainWindow, private Ui::formPokeModr
{
Q_OBJECT
@@ -55,7 +55,7 @@ class PokeModrUI : public QMainWindow, private Ui::formPokeModr
void on_actionPaste_triggered();
void on_actionPreferences_triggered();
void on_splitter_splitterMoved(const int pos);
-// void on_treePokemod_itemChanged(QTreeWidgetItem* item);
+ void on_treePokemod_itemSelectionChanged();
private:
KConfigGroup config;
KRecentFilesAction recent;
diff --git a/pokemodr/PokemodUI.cpp b/pokemodr/PokemodUI.cpp
index bb06b359..e6bb3f91 100644
--- a/pokemodr/PokemodUI.cpp
+++ b/pokemodr/PokemodUI.cpp
@@ -24,7 +24,9 @@
#include <BugCatcher.h>
#include <Exception.h>
+#include <ImageCache.h>
+#include "ImageDialog.h"
#include "PokemodUI.h"
PokemodUI::PokemodUI(Pokemod* p, QWidget* parent) :
@@ -80,6 +82,54 @@ void PokemodUI::setGui()
varWarp->setCurrentIndex(varWarp->findData(pokemod_mod->getStartWarp()));
varSuperPCUsername->setText(pokemod_mod->getSuperPCUname());
varSuperPCPassword->setText(pokemod_mod->getSuperPCPasswd());
+ try
+ {
+ varWalkSkin->setIcon(ImageCache::open(pokemod->getWalkSkin()));
+ }
+ catch (OpenException& e)
+ {
+ BugCatcher::report(e);
+ }
+ try
+ {
+ varBikeSkin->setIcon(ImageCache::open(pokemod->getBikeSkin()));
+ }
+ catch (OpenException& e)
+ {
+ BugCatcher::report(e);
+ }
+ try
+ {
+ varFlySkin->setIcon(ImageCache::open(pokemod->getFlySkin()));
+ }
+ catch (OpenException& e)
+ {
+ BugCatcher::report(e);
+ }
+ try
+ {
+ varSurfSkin->setIcon(ImageCache::open(pokemod->getSurfSkin()));
+ }
+ catch (OpenException& e)
+ {
+ BugCatcher::report(e);
+ }
+ try
+ {
+ varFishSkin->setIcon(ImageCache::open(pokemod->getFishSkin()));
+ }
+ catch (OpenException& e)
+ {
+ BugCatcher::report(e);
+ }
+ try
+ {
+ varSurfFishSkin->setIcon(ImageCache::open(pokemod->getSurfFishSkin()));
+ }
+ catch (OpenException& e)
+ {
+ BugCatcher::report(e);
+ }
}
void PokemodUI::on_buttonApply_clicked()
@@ -152,3 +202,99 @@ void PokemodUI::on_varSuperPCPassword_textChanged(const QString& p)
pokemod_mod->setSuperPCPasswd(p);
emit(changed(true));
}
+
+void PokemodUI::on_varWalkSkin_pressed()
+{
+ if (ImageDialog::exec())
+ {
+ try
+ {
+ pokemod->setWalkSkin(ImageDialog::selectedUrl());
+ }
+ catch (SaveException& e)
+ {
+ BugCatcher::report(e);
+ }
+ setGui();
+ }
+}
+
+void PokemodUI::on_varBikeSkin_pressed()
+{
+ if (ImageDialog::exec())
+ {
+ try
+ {
+ pokemod->setBikeSkin(ImageDialog::selectedUrl());
+ }
+ catch (SaveException& e)
+ {
+ BugCatcher::report(e);
+ }
+ setGui();
+ }
+}
+
+void PokemodUI::on_varFlySkin_pressed()
+{
+ if (ImageDialog::exec())
+ {
+ try
+ {
+ pokemod->setFlySkin(ImageDialog::selectedUrl());
+ }
+ catch (SaveException& e)
+ {
+ BugCatcher::report(e);
+ }
+ setGui();
+ }
+}
+
+void PokemodUI::on_varSurfSkin_pressed()
+{
+ if (ImageDialog::exec())
+ {
+ try
+ {
+ pokemod->setSurfSkin(ImageDialog::selectedUrl());
+ }
+ catch (SaveException& e)
+ {
+ BugCatcher::report(e);
+ }
+ setGui();
+ }
+}
+
+void PokemodUI::on_varFishSkin_pressed()
+{
+ if (ImageDialog::exec())
+ {
+ try
+ {
+ pokemod->setFishSkin(ImageDialog::selectedUrl());
+ }
+ catch (SaveException& e)
+ {
+ BugCatcher::report(e);
+ }
+ setGui();
+ }
+}
+
+void PokemodUI::on_varSurfFishSkin_pressed()
+{
+ if (ImageDialog::exec())
+ {
+ try
+ {
+ pokemod->setSurfFishSkin(ImageDialog::selectedUrl());
+ }
+ catch (SaveException& e)
+ {
+ BugCatcher::report(e);
+ }
+ setGui();
+ }
+}
diff --git a/pokemodr/PokemodUI.h b/pokemodr/PokemodUI.h
index 64f2275d..837500d0 100644
--- a/pokemodr/PokemodUI.h
+++ b/pokemodr/PokemodUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_POKEMODUI__
#define __POKEMODR_POKEMODUI__
-#include <ktoolbar.h>
-
#include <QString>
#include <Pokemod.h>
@@ -55,6 +53,12 @@ class PokemodUI : public ObjectUI, private Ui::formPokemod
void on_varWarp_currentIndexChanged(const int s);
void on_varSuperPCUsername_textChanged(const QString& u);
void on_varSuperPCPassword_textChanged(const QString& p);
+ void on_varWalkSkin_pressed();
+ void on_varBikeSkin_pressed();
+ void on_varFlySkin_pressed();
+ void on_varSurfSkin_pressed();
+ void on_varFishSkin_pressed();
+ void on_varSurfFishSkin_pressed();
private:
void setGui();
diff --git a/pokemodr/RulesUI.h b/pokemodr/RulesUI.h
index bf2c043b..061e69ca 100644
--- a/pokemodr/RulesUI.h
+++ b/pokemodr/RulesUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_RULESUI__
#define __POKEMODR_RULESUI__
-#include <ktoolbar.h>
-
#include <Rules.h>
#include "ObjectUI.h"
diff --git a/pokemodr/SpeciesAbilityUI.h b/pokemodr/SpeciesAbilityUI.h
index cc31ac54..8f85daa3 100644
--- a/pokemodr/SpeciesAbilityUI.h
+++ b/pokemodr/SpeciesAbilityUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_SPECIESABILITYUI__
#define __POKEMODR_SPECIESABILITYUI__
-#include <ktoolbar.h>
-
#include <SpeciesAbility.h>
#include "ObjectUI.h"
diff --git a/pokemodr/SpeciesItemUI.h b/pokemodr/SpeciesItemUI.h
index 2e9c19b7..7538184d 100644
--- a/pokemodr/SpeciesItemUI.h
+++ b/pokemodr/SpeciesItemUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_SPECIESITEMUI__
#define __POKEMODR_SPECIESITEMUI__
-#include <ktoolbar.h>
-
#include <SpeciesItem.h>
#include "ObjectUI.h"
diff --git a/pokemodr/SpeciesMoveUI.h b/pokemodr/SpeciesMoveUI.h
index 7e3c6f93..ed6f5647 100644
--- a/pokemodr/SpeciesMoveUI.h
+++ b/pokemodr/SpeciesMoveUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_SPECIESMOVEUI__
#define __POKEMODR_SPECIESMOVEUI__
-#include <ktoolbar.h>
-
#include <SpeciesMove.h>
#include "ObjectUI.h"
diff --git a/pokemodr/SpeciesUI.h b/pokemodr/SpeciesUI.h
index 82536c48..bdfdfcf6 100644
--- a/pokemodr/SpeciesUI.h
+++ b/pokemodr/SpeciesUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_SPECIESUI__
#define __POKEMODR_SPECIESUI__
-#include <ktoolbar.h>
-
#include <QString>
#include <Species.h>
diff --git a/pokemodr/StoreUI.h b/pokemodr/StoreUI.h
index bb11f5a5..a3ebaa59 100644
--- a/pokemodr/StoreUI.h
+++ b/pokemodr/StoreUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_STOREUI__
#define __POKEMODR_STOREUI__
-#include <ktoolbar.h>
-
#include <QString>
#include <Store.h>
diff --git a/pokemodr/TODO b/pokemodr/TODO
index cff537df..b38e904f 100644
--- a/pokemodr/TODO
+++ b/pokemodr/TODO
@@ -1,5 +1,5 @@
AbilityEffect
-Dialog
+Dialog (with command dialogs)
ItemEffect
MapEffect
MapTrainer
@@ -11,4 +11,3 @@ Tree Handling
Toolbar loading
Menu stuff
Help Menu
-QMainWindow->KMainWindow
diff --git a/pokemodr/TileUI.h b/pokemodr/TileUI.h
index eb758b54..ef93b675 100644
--- a/pokemodr/TileUI.h
+++ b/pokemodr/TileUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_TILEUI__
#define __POKEMODR_TILEUI__
-#include <ktoolbar.h>
-
#include <QListIterator>
#include <QString>
diff --git a/pokemodr/TimeUI.h b/pokemodr/TimeUI.h
index 404519e8..63e02840 100644
--- a/pokemodr/TimeUI.h
+++ b/pokemodr/TimeUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_TIMEUI__
#define __POKEMODR_TIMEUI__
-#include <ktoolbar.h>
-
#include <QString>
#include <QTime>
diff --git a/pokemodr/TypeUI.h b/pokemodr/TypeUI.h
index d77f6cb7..57ec1482 100644
--- a/pokemodr/TypeUI.h
+++ b/pokemodr/TypeUI.h
@@ -23,8 +23,6 @@
#ifndef __POKEMODR_TYPEUI__
#define __POKEMODR_TYPEUI__
-#include <ktoolbar.h>
-
#include <QString>
#include <Type.h>
diff --git a/pokemodr/gui/pokemod.ui b/pokemodr/gui/pokemod.ui
index 317cada0..a8eee900 100644
--- a/pokemodr/gui/pokemod.ui
+++ b/pokemodr/gui/pokemod.ui
@@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>244</width>
- <height>689</height>
+ <width>460</width>
+ <height>748</height>
</rect>
</property>
<layout class="QVBoxLayout" >
@@ -43,148 +43,522 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="boxTitle" >
- <property name="title" >
- <string>Title</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KLineEdit" name="varTitle" >
- <property name="toolTip" >
- <string>The title of the PokéMod</string>
- </property>
- <property name="showClearButton" stdset="0" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxVersion" >
- <property name="title" >
- <string>Version</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KLineEdit" name="varVersion" >
- <property name="toolTip" >
- <string>PokéMod version</string>
- </property>
- <property name="showClearButton" stdset="0" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxDescription" >
- <property name="title" >
- <string>Description</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KTextEdit" name="varDescription" >
- <property name="toolTip" >
- <string>Description of the PokéMod</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxStartPosition" >
- <property name="title" >
- <string>Start Map</string>
+ <widget class="QTabWidget" name="notebookPokemod" >
+ <property name="currentIndex" >
+ <number>0</number>
</property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="KComboBox" name="varMap" >
- <property name="toolTip" >
- <string>Map the player starts on</string>
- </property>
- <property name="insertPolicy" >
- <enum>QComboBox::NoInsert</enum>
- </property>
- <property name="sizeAdjustPolicy" >
- <enum>QComboBox::AdjustToContents</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxWarp" >
- <property name="title" >
- <string>Warp</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KComboBox" name="varWarp" >
- <property name="toolTip" >
- <string>Warp the player starts on</string>
- </property>
- <property name="insertPolicy" >
- <enum>QComboBox::NoInsert</enum>
- </property>
- <property name="sizeAdjustPolicy" >
- <enum>QComboBox::AdjustToContents</enum>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxSuperPC" >
- <property name="title" >
- <string>Super PC</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QGroupBox" name="boxUsername" >
- <property name="title" >
- <string>Username</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KLineEdit" name="varSuperPCUsername" >
- <property name="toolTip" >
- <string>Username to access the Super PC</string>
- </property>
- <property name="showClearButton" stdset="0" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxPassword" >
- <property name="title" >
- <string>Password</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="KLineEdit" name="varSuperPCPassword" >
- <property name="toolTip" >
- <string>Password to access the Super PC</string>
- </property>
- <property name="showClearButton" stdset="0" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
+ <widget class="QWidget" name="tabGeneral" >
+ <attribute name="title" >
+ <string>General</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QGroupBox" name="boxTitle" >
+ <property name="title" >
+ <string>Title</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KLineEdit" name="varTitle" >
+ <property name="toolTip" >
+ <string>The title of the PokéMod</string>
+ </property>
+ <property name="showClearButton" stdset="0" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxVersion" >
+ <property name="title" >
+ <string>Version</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KLineEdit" name="varVersion" >
+ <property name="toolTip" >
+ <string>PokéMod version</string>
+ </property>
+ <property name="showClearButton" stdset="0" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxDescription" >
+ <property name="title" >
+ <string>Description</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KTextEdit" name="varDescription" >
+ <property name="toolTip" >
+ <string>Description of the PokéMod</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxStartPosition" >
+ <property name="title" >
+ <string>Start Map</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="KComboBox" name="varMap" >
+ <property name="toolTip" >
+ <string>Map the player starts on</string>
+ </property>
+ <property name="insertPolicy" >
+ <enum>QComboBox::NoInsert</enum>
+ </property>
+ <property name="sizeAdjustPolicy" >
+ <enum>QComboBox::AdjustToContents</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxWarp" >
+ <property name="title" >
+ <string>Warp</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KComboBox" name="varWarp" >
+ <property name="toolTip" >
+ <string>Warp the player starts on</string>
+ </property>
+ <property name="insertPolicy" >
+ <enum>QComboBox::NoInsert</enum>
+ </property>
+ <property name="sizeAdjustPolicy" >
+ <enum>QComboBox::AdjustToContents</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxSuperPC" >
+ <property name="title" >
+ <string>Super PC</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QGroupBox" name="boxUsername" >
+ <property name="title" >
+ <string>Username</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KLineEdit" name="varSuperPCUsername" >
+ <property name="toolTip" >
+ <string>Username to access the Super PC</string>
+ </property>
+ <property name="showClearButton" stdset="0" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxPassword" >
+ <property name="title" >
+ <string>Password</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KLineEdit" name="varSuperPCPassword" >
+ <property name="toolTip" >
+ <string>Password to access the Super PC</string>
+ </property>
+ <property name="showClearButton" stdset="0" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tabSkins" >
+ <attribute name="title" >
+ <string>Skins</string>
+ </attribute>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QGroupBox" name="boxWalkingSkin" >
+ <property name="title" >
+ <string>Walking</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <property name="leftMargin" >
+ <number>4</number>
+ </property>
+ <property name="topMargin" >
+ <number>4</number>
+ </property>
+ <property name="rightMargin" >
+ <number>4</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>4</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KIconButton" name="varWalkSkin" >
+ <property name="minimumSize" >
+ <size>
+ <width>192</width>
+ <height>128</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QGroupBox" name="boxBikingSkin" >
+ <property name="title" >
+ <string>Biking</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KIconButton" name="varBikeSkin" >
+ <property name="minimumSize" >
+ <size>
+ <width>192</width>
+ <height>128</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QGroupBox" name="boxFlyingSkin" >
+ <property name="title" >
+ <string>Flying</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KIconButton" name="varFlySkin" >
+ <property name="minimumSize" >
+ <size>
+ <width>192</width>
+ <height>128</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QGroupBox" name="boxSurfingSkin" >
+ <property name="title" >
+ <string>Surfing</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KIconButton" name="varSurfSkin" >
+ <property name="minimumSize" >
+ <size>
+ <width>192</width>
+ <height>128</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QGroupBox" name="boxFishingSkin" >
+ <property name="title" >
+ <string>Fishing</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KIconButton" name="varFishSkin" >
+ <property name="minimumSize" >
+ <size>
+ <width>192</width>
+ <height>128</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QGroupBox" name="boxSurfFishingSkin" >
+ <property name="title" >
+ <string>Surf Fishing</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="KIconButton" name="varSurfFishSkin" >
+ <property name="minimumSize" >
+ <size>
+ <width>192</width>
+ <height>128</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>424</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tabTypechart" >
+ <attribute name="title" >
+ <string>Typechart</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QTableView" name="varTypechart" />
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxEffectiveness" >
+ <property name="title" >
+ <string/>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="KLineEdit" name="varEffectiveness" >
+ <property name="toolTip" >
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varEffectivenessNum" />
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varEffectivenessDenom" />
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
<item>
@@ -194,8 +568,8 @@
</property>
<property name="sizeHint" >
<size>
- <width>20</width>
- <height>40</height>
+ <width>452</width>
+ <height>16</height>
</size>
</property>
</spacer>
@@ -209,6 +583,16 @@
<header>kcombobox.h</header>
</customwidget>
<customwidget>
+ <class>KIconButton</class>
+ <extends>QPushButton</extends>
+ <header>kicondialog.h</header>
+ </customwidget>
+ <customwidget>
+ <class>KIntNumInput</class>
+ <extends>QWidget</extends>
+ <header>knuminput.h</header>
+ </customwidget>
+ <customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header>klineedit.h</header>
diff --git a/pokemodr/gui/pokemodr.ui b/pokemodr/gui/pokemodr.ui
index 21c52cd8..5ef9c1c2 100644
--- a/pokemodr/gui/pokemodr.ui
+++ b/pokemodr/gui/pokemodr.ui
@@ -1,6 +1,6 @@
<ui version="4.0" >
<class>formPokeModr</class>
- <widget class="QMainWindow" name="mainWindow" >
+ <widget class="KMainWindow" name="formPokeModr" >
<property name="geometry" >
<rect>
<x>0</x>
@@ -19,7 +19,7 @@
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
- <widget class="QTreeWidget" name="treeWidget" >
+ <widget class="QTreeWidget" name="treePokemod" >
<column>
<property name="text" >
<string>PokéMod Elements</string>
@@ -44,7 +44,7 @@
<x>0</x>
<y>0</y>
<width>817</width>
- <height>25</height>
+ <height>29</height>
</rect>
</property>
<widget class="QMenu" name="menuFile" >
@@ -196,6 +196,12 @@
<header>QScrollArea</header>
<container>1</container>
</customwidget>
+ <customwidget>
+ <class>KMainWindow</class>
+ <extends>QMainWindow</extends>
+ <header>kmainwindow.h</header>
+ <container>1</container>
+ </customwidget>
</customwidgets>
<resources/>
<connections/>
diff --git a/pokemodr/images/overlays.qrc b/pokemodr/images/overlays.qrc
index 0db7ffa1..98be3f31 100644
--- a/pokemodr/images/overlays.qrc
+++ b/pokemodr/images/overlays.qrc
@@ -1,11 +1,11 @@
<RCC>
<qresource prefix="/overlays" >
- <file>images/overlays/effect.png</file>
- <file>images/overlays/no-walk.png</file>
- <file>images/overlays/trainer.png</file>
- <file>images/overlays/walk.png</file>
- <file>images/overlays/warp.png</file>
- <file>images/overlays/water.png</file>
- <file>images/overlays/wilds.png</file>
+ <file>overlays/effect.png</file>
+ <file>overlays/no-walk.png</file>
+ <file>overlays/trainer.png</file>
+ <file>overlays/walk.png</file>
+ <file>overlays/warp.png</file>
+ <file>overlays/water.png</file>
+ <file>overlays/wilds.png</file>
</qresource>
</RCC>
diff --git a/pokemodr/pokemodr.pro b/pokemodr/pokemodr.pro
index 6a5087a5..7177c977 100644
--- a/pokemodr/pokemodr.pro
+++ b/pokemodr/pokemodr.pro
@@ -68,7 +68,6 @@ SOURCES += AbilityUI.cpp \
PokeModr.cpp \
PokeModrUI.cpp \
RulesUI.cpp \
- SkinsUI.cpp \
SpeciesUI.cpp \
SpeciesAbilityUI.cpp \
SpeciesEvolutionUI.cpp \
@@ -83,7 +82,8 @@ SOURCES += AbilityUI.cpp \
MapWarpUI.cpp \
MapWildListEncounterUI.cpp \
MapTrainerTeamMemberUI.cpp \
- MapWildListUI.cpp
+ MapWildListUI.cpp \
+ PokeModTreeItem.cpp
HEADERS += AbilityUI.h \
AuthorUI.h \
@@ -103,7 +103,6 @@ HEADERS += AbilityUI.h \
PokeModrUI.h \
PokeModTreeItem.h \
RulesUI.h \
- SkinsUI.h \
SpeciesUI.h \
SpeciesAbilityUI.h \
SpeciesEvolutionUI.h \
@@ -144,7 +143,6 @@ FORMS += gui/ability.ui \
gui/pokemod.ui \
gui/pokemodr.ui \
gui/rules.ui \
- gui/skins.ui \
gui/species.ui \
gui/speciesability.ui \
gui/speciesevolution.ui \
@@ -153,5 +151,7 @@ FORMS += gui/ability.ui \
gui/store.ui \
gui/tile.ui \
gui/time.ui \
- gui/type.ui \
- gui/typechart.ui
+ gui/type.ui
+
+RESOURCES += images/overlays.qrc
+