diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2008-01-24 22:45:38 +0000 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2008-01-24 22:45:38 +0000 |
commit | 095c93a62b0be0893063748d67051e35810a7f48 (patch) | |
tree | 9a0e66e63f674a1e28e428cc5779724e4b07a763 /pokemodr/ObjectUI.h | |
parent | ec3636befb2b12138c9de05ae4ffd432fd8b528a (diff) | |
download | sigen-095c93a62b0be0893063748d67051e35810a7f48.tar.gz sigen-095c93a62b0be0893063748d67051e35810a7f48.tar.xz sigen-095c93a62b0be0893063748d67051e35810a7f48.zip |
[FIX] general.pro file now links to phonon for Audio
[ADD] generic ObjectUI object to handle general form* stuff
[ADD] TimeUI.{h, cpp}
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@44 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/ObjectUI.h')
-rw-r--r-- | pokemodr/ObjectUI.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/pokemodr/ObjectUI.h b/pokemodr/ObjectUI.h new file mode 100644 index 00000000..0b178641 --- /dev/null +++ b/pokemodr/ObjectUI.h @@ -0,0 +1,81 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: pokegen/ObjectUI.h +// Purpose: Generic UI form handling +// Author: Ben Boeckel +// Modified by: Ben Boeckel +// Created: Thu Jan 24 16:15:40 2008 +// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions +// Licence: +// 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_OBJECTUI__ +#define __POKEMODR_OBJECTUI__ + +#include <ktoolbar.h> +#include <QObject> +#include <QWidget> +#include "../pokemod/Object.h" + +class ObjectUI : public QWidget +{ + Q_OBJECT + + public: + ObjectUI(Object* orig, Object* mod, QWidget* parent) : + QWidget(parent), + obj(orig), + obj_mod(mod) + { + connect(this, SIGNAL(changed(bool)), parent->parent(), SLOT(setChangedTitle(bool))); + connect(this, SIGNAL(changed(bool)), SLOT(setChanged(bool))); + } + virtual ~ObjectUI() + { + } + +// virtual KToolBar getToolbar(QWidget* parent) = 0; + void setChanged(const bool c) + { + isChanged = c; + } + + const Object* getOriginal() const + { + return obj; + } + Object* getOriginal() + { + return obj; + } + const Object* getModified() const + { + return obj_mod; + } + Object* getModified() + { + return obj_mod; + } + signals: + void changed(bool); + protected: + virtual void setGui() = 0; + + bool isChanged; + + Object* obj; + Object* obj_mod; +}; + +#endif |