Frapper  1.0a
WidgetPlugin.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of FRAPPER
4 research.animationsinstitut.de
5 sourceforge.net/projects/frapper
6 
7 Copyright (c) 2008-2009 Filmakademie Baden-Wuerttemberg, Institute of Animation
8 
9 This program is free software; you can redistribute it and/or modify it under
10 the terms of the GNU Lesser General Public License as published by the Free Software
11 Foundation; either version 2 of the License, or (at your option) any later
12 version.
13 
14 This program is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
17 
18 You should have received a copy of the GNU Lesser General Public License along with
19 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
21 http://www.gnu.org/copyleft/lesser.txt.
22 -----------------------------------------------------------------------------
23 */
24 
33 
34 #ifndef WIDGETPLUGIN_H
35 #define WIDGETPLUGIN_H
36 
37 #include <QtGui/QWidget>
38 #include <QtCore/QVariant>
39 
40 #include "FrapperPrerequisites.h"
41 #include "ParameterPlugin.h"
42 
43 namespace Frapper {
44 
45 class FRAPPER_GUI_EXPORT WidgetPlugin: public QWidget
46 {
47  Q_OBJECT
48 
49 
50 public:// constructors and destructors : public Parameter
51 
58  WidgetPlugin( QWidget *parent , ParameterPlugin * parameter);
59 
67  virtual ~WidgetPlugin(void);
68 
69 public: // functions
70 
76  QVariant getParameterValue();
77 
83  void setParameterValue(QVariant value);
84 
90  QString getParameterName();
91 
95  void widgetUpdate();
96 
102  void updateParameterValue(QVariant value);
103 
109  void setFlags(QMap<QString, QVariant> flags);
110 
117  void setFlag(QString key, QVariant value);
118 
124  QMap<QString, QVariant> getFlags();
125 
131  void setParameterTriggersRedraw(bool trigger);
132 
138  QStringList getFlagList();
139 
146  bool checkFlag(QString flag);
147 
154  QVariant getFlag(QString flag);
155 
156 
157 public: // data
158 
159 private slots:
160 
164  void redrawByParameterChange();
165 
166 protected: // Data
167 
172 
173 private: // Data
174 
179 
180 signals:
181 
185  void updateWidget();
186 };
187 
188 } // end namespace Frapper
189 
190 #endif