#ifndef __DEFAULT_MODEL_SCENE_WIDGET_H__ #define __DEFAULT_MODEL_SCENE_WIDGET_H__ // Includes Projection Designer headers #include // Includes the ui_ header #include "ui_defaultmodelscenewidget.h" // Includes local headers #include "DefaultModelSceneContent.h" /** * Implementation of the DefaultModelSceneWidget class. * * This widget is used in a stacked widget with all the other scene, * to configure the GLM scene. * */ class DefaultModelSceneWidget : public SceneWidget, private Ui::DefaultModelSceneWidget { Q_OBJECT public: /** * Default constructor. * */ DefaultModelSceneWidget(SceneInterface *plugin, QWidget* pParent=0, Qt::WFlags flag=0); /** * Destructor. * */ ~DefaultModelSceneWidget(); /** * Updates the widget. * * This method can be used it two ways: to force a refresh or to update the * data 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 content are used and the refresh is * forced. If no content are given, NULL is used. * */ void updateGUI(const SceneContent* data=NULL); /** * Gets the widget contents. * * @return A const reference on the content 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&); private slots: /** * [private slot] Called when the "filename" field is edited. * */ void on_modelFileNameEdit_editingFinished(); /** * [private slot] Called when the "browse" button is pressed. * */ void on_modelBrowseButton_clicked(); /** * [private slot] Called when the culling checkbox state changes. * * @param checked true if the checkbox is checked. */ void on_modelCullingCheckBox_toggled(bool checked); /** * [private slot] Called when the smooth checkbox state changes. * * @param checked true if the checkbox is checked. * */ void on_modelSmoothingCheckBox_toggled(bool checked); private: /// The current DefaultModelSceneContent of the widget. DefaultModelSceneContent m_content; }; #endif // __DEFAULT_MODEL_SCENE_WIDGET_H__