00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GLUONCREATOR_PROPERTYWIDGETCONTAINER_H
00018 #define GLUONCREATOR_PROPERTYWIDGETCONTAINER_H
00019
00020 #include <QtGui/QWidget>
00021 #include <QtCore/QString>
00022
00023 namespace GluonCore
00024 {
00025 class GluonObject;
00026 }
00027
00028 namespace GluonCreator
00029 {
00030 class PropertyWidgetItem;
00031 class PropertyWidgetContainer : public QWidget
00032 {
00033 Q_OBJECT
00034 Q_PROPERTY( bool expanded READ expanded WRITE setExpanded )
00035 Q_PROPERTY( bool enabled READ enabled WRITE setEnabled )
00036 Q_PROPERTY( QString title READ title WRITE setTitle )
00037
00038 public:
00039 PropertyWidgetContainer( GluonCore::GluonObject* theObject, QWidget* parent = 0, Qt::WindowFlags f = 0 );
00040 ~PropertyWidgetContainer();
00041
00042 void setObject( GluonCore::GluonObject* theObject );
00043
00044 bool expanded() const;
00045 void setExpanded( const bool& newExpanded );
00046 Q_SLOT void toggleExpanded();
00047
00048 bool enabled() const;
00049 Q_SLOT void setEnabled( const bool& newEnabled );
00050
00051 QString title() const;
00052 void setTitle( const QString& newTitle );
00053
00054 void addDefaultMenuItems();
00055 void addMenuItem( QAction* menuItem );
00056 void removeMenuItem( QAction* menuItem );
00057
00058 Q_SIGNALS:
00059 void propertyChanged( QObject* object, const QString& property, const QVariant& oldValue, const QVariant& newValue );
00060
00061 public Q_SLOTS:
00062 void upTriggered();
00063 void downTriggered();
00064 void delTriggered();
00065
00066 private:
00067 class PropertyWidgetContainerPrivate;
00068 PropertyWidgetContainerPrivate* d;
00069 };
00070 }
00071
00072 #endif // GLUONCREATOR_PROPERTYWIDGETCONTAINER_H