source: projectionDesigner/trunk/projdesignerplugins/defaultplugin/DefaultModelSceneWidget.h @ 368

Last change on this file since 368 was 4, checked in by Torben Dannhauer, 15 years ago
File size: 2.7 KB
Line 
1#ifndef __DEFAULT_MODEL_SCENE_WIDGET_H__
2#define __DEFAULT_MODEL_SCENE_WIDGET_H__
3
4
5// Includes Projection Designer headers
6#include <projdesigner/include/interfaces.h>
7
8// Includes the ui_ header
9#include "ui_defaultmodelscenewidget.h"
10
11// Includes local headers
12#include "DefaultModelSceneContent.h"
13
14
15/**
16 * Implementation of the DefaultModelSceneWidget class.
17 *
18 * This widget is used in a stacked widget with all the other scene,
19 * to configure the GLM scene.
20 *
21 */
22class DefaultModelSceneWidget : public SceneWidget,
23                                private Ui::DefaultModelSceneWidget
24{
25    Q_OBJECT
26               
27public:
28
29
30    /**
31     * Default constructor.
32     *
33     */
34    DefaultModelSceneWidget(SceneInterface *plugin, QWidget* pParent=0, Qt::WFlags flag=0);
35
36
37    /**
38     * Destructor.
39     *
40     */
41    ~DefaultModelSceneWidget();
42
43
44    /**
45     * Updates the widget.
46     *
47     * This method can be used it two ways: to force a refresh or to update the
48     * data of the widget.
49     *
50     * @param content A const pointer on the contents to be used for the widget.
51     *                This contents will be duplicated in the widget. If content
52     *                is NULL, the current content are used and the refresh is
53     *                forced. If no content are given, NULL is used.
54     *
55     */
56    void updateGUI(const SceneContent* data=NULL);
57
58
59    /**
60     * Gets the widget contents.
61     *
62     * @return A const reference on the content of the widget.
63     *
64     */
65    const SceneContent& content(void) const {return m_content;}
66
67
68signals:
69
70
71    /**
72     * [signal] Notify that the contents of the widget have changed.
73     *
74     * This signal is emitted each time that a field is changed.
75     *
76     * @param content A const reference on the new contents (the same as
77     *                returned by the content() method).
78     *
79     */
80    virtual void dataChanged(const SceneContent&);
81
82
83private slots:
84
85
86    /**
87     * [private slot] Called when the "filename" field is edited.
88     *
89     */
90    void on_modelFileNameEdit_editingFinished();
91
92
93    /**
94     * [private slot] Called when the "browse" button is pressed.
95     *
96     */
97    void on_modelBrowseButton_clicked();
98
99
100    /**
101     * [private slot] Called when the culling checkbox state changes.
102     *
103     * @param checked true if the checkbox is checked.
104     */
105    void on_modelCullingCheckBox_toggled(bool checked);
106
107
108    /**
109     * [private slot] Called when the smooth checkbox state changes.
110     *
111     * @param checked true if the checkbox is checked.
112     *
113     */
114    void on_modelSmoothingCheckBox_toggled(bool checked);
115
116
117private:
118
119
120    /// The current DefaultModelSceneContent of the widget.
121    DefaultModelSceneContent m_content;
122
123};
124
125
126#endif // __DEFAULT_MODEL_SCENE_WIDGET_H__
Note: See TracBrowser for help on using the repository browser.