#ifndef __DEFAULT_TEAPOT_SCENE_WIDGET_H__ #define __DEFAULT_TEAPOT_SCENE_WIDGET_H__ // Includes Projection Designer headers #include // Includes ui_... headers #include "ui_defaultteapotscenewidget.h" // Includes local headers #include "DefaultTeapotSceneContent.h" /** * This class implements the widget that enables the control of the teapot * scene. * */ class DefaultTeapotSceneWidget : public SceneWidget, private Ui::DefaultTeapotSceneWidget { Q_OBJECT public: /** * Default constructor. * */ DefaultTeapotSceneWidget(SceneInterface *plugin, QWidget* pParent=0, Qt::WFlags flag=0); /** * Destructor. * */ ~DefaultTeapotSceneWidget(); /** * Updates the widget. * * This method can be used it two ways: to force a refresh or to update the * contents of the widget. * * @param content A const pointer on the contents to be used for the widget. * This contents will be duplicated in the widget. If content * is NULL, the current contents are used and the refresh is * forced. If no content is given, NULL is used. * */ void updateGUI(const SceneContent* data=NULL); /** * Clears the fields of the widget. * * This method is typically used when the widget will be disabled (if no * channel is specified in Projection Designer, the widget is visible but * disabled: fields must be empty). * */ void clear(void); /** * Gets the widget contents. * * @return A const reference on the contents of the widget. * */ const SceneContent& content(void) const {return m_content;} signals: /** * [signal] Notify that the contents of the widget have changed. * * This signal is emitted each time that a field is changed. * * @param content A const reference on the new contents (the same as * returned by the content() method). * */ virtual void dataChanged(const SceneContent& content); private slots: /** * [private slot] Called when the wireframe checkbox state changes. * */ void on_wireframeCheckBox_stateChanged(int state); /** * [private slot] Called when the width changes. * */ void on_widthSpinBox_valueChanged(int width); private: /// The current DefaultPluginData of the widget. DefaultTeapotSceneContent m_content; }; #endif // __DEFAULT_TEAPOT_SCENE_WIDGET_H__