diff options
Diffstat (limited to 'sigmodr/PokemodrUI.h')
-rw-r--r-- | sigmodr/PokemodrUI.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/sigmodr/PokemodrUI.h b/sigmodr/PokemodrUI.h new file mode 100644 index 00000000..d5663f94 --- /dev/null +++ b/sigmodr/PokemodrUI.h @@ -0,0 +1,87 @@ +/* + * 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/>. + */ + +#ifndef __POKEMODR_POKEMODRUI__ +#define __POKEMODR_POKEMODRUI__ + +// Qt includes +#include <QtXml/QDomDocument> + +// KDE includes +#include <KConfigGroup> +#include <KXmlGuiWindow> + +// Form include +#include "ui_pokemodr.h" + +// Forward declarations +class KUrl; +namespace Pokemod +{ +class Object; +class Pokemod; +} + +namespace Pokemodr +{ +class PokemodrUI : public KXmlGuiWindow, private Ui::formPokemodr +{ + Q_OBJECT + + public: + PokemodrUI(QWidget* parent = 0); + ~PokemodrUI(); + protected slots: + void update(); + + void closeEvent(QCloseEvent* event); + + void setChangedTitle(const bool changed); + + 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 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); + private: + void setupActions(); + + KConfigGroup m_config; + QDomDocument m_clipboard; +}; +} + +#endif |