#ifndef __DEFAULT_PROJECTOR_WIDGET_H__ #define __DEFAULT_PROJECTOR_WIDGET_H__ // Includes Projection Designer headers #include // Includes the ui_ header #include "ui_defaultprojectorwidget.h" // Includes local headers #include "DefaultProjectorData.h" /** * Implementation of the DefaultProjectorWidget class. * * This widget is used in a stacked widget with all the other projectors, to * configure the projector. * */ class DefaultProjectorWidget : public ProjectorWidget, private Ui::DefaultProjectorWidget { Q_OBJECT public: /** * Default constructor. * */ DefaultProjectorWidget(ProjectorInterface *plugin, QWidget* pParent=0, Qt::WFlags flag=0); /** * Destructor. * */ ~DefaultProjectorWidget(); /** * Updates the widget. * * This method can be used it two ways: to force a refresh or to update the * data of the widget. * * @param data A const pointer on the data to be used for the widget. This * data will be duplicated in the widget. If data is NULL, the * current data are used and the refresh is forced. If no data * is given, NULL is used. * */ void updateGUI(const ProjectorData* 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 data. * * @return A const reference on the data of the widget. * */ const ProjectorData& data(void) const {return m_data;} signals: /** * [signal] Notify that the data of the widget have changed. * * This signal is emitted each time that a field is changed. * * @param data A const reference on the new data (the same as returned by * the data() method). * */ virtual void dataChanged(const ProjectorData& data); private slots: /** * [private slot] Called when the Fov changes. * */ void on_fovEdit_editingFinished(); /** * [private slot] Called when the Aspect Ratio changes. * */ void on_aspectRatioEdit_editingFinished(); /** * [private slot] Called when the Near changes. * */ void on_nearEdit_editingFinished(); /** * [private slot] Called when the Far changes. * */ void on_farEdit_editingFinished(); /** * [private slot] Called when the OffAxis-X changes. * */ void on_offaxisXEdit_editingFinished(); /** * [private slot] Called when the OffAxis-Y changes. * */ void on_offaxisYEdit_editingFinished(); private: /// The current DefaultPluginData of the widget. DefaultPluginData m_data; }; #endif // __DEFAULT_PROJECTOR_WIDGET_H__