source: projectionDesigner/trunk/projdesignerplugins/defaultplugin/defaultplugin.h @ 293

Last change on this file since 293 was 4, checked in by Torben Dannhauer, 15 years ago
File size: 3.4 KB
Line 
1#ifndef __DEFAULTPLUGIN_H__
2#define __DEFAULTPLUGIN_H__
3
4// Includes Qt headers
5#include <QObject>
6
7// Includes Projection Designer headers
8#include <projdesigner/include/interfaces.h>
9
10// Includes local headers
11#include "DefaultProjectorWidget.h"
12#include "DefaultEmptySceneWidget.h"
13#include "DefaultTeapotSceneWidget.h"
14#include "DefaultCubemapSceneWidget.h"
15#include "DefaultModelSceneWidget.h"
16
17
18/**
19 * DefaultPlugin class implementation.
20 *
21 * This class is the main class of the plugin, the one which implements the
22 * ...Interfaces.
23 *
24 */
25class DefaultPlugin : public QObject,
26                      public ProjectorInterface,
27                      public SceneInterface
28{
29    Q_OBJECT
30    Q_INTERFACES(ProjectorInterface SceneInterface)
31
32public:
33
34
35    /**
36     * Default constructor of the DefaultPlugin class.
37     *
38     * This constructor should be called just one time, by Qt mechanisms
39     * (not manually).
40     *
41     */
42    DefaultPlugin();
43
44
45    /**
46     * DefaultPlugin destructor.
47     *
48     * This destructor, just like the constructor, is not called manually.
49     *
50     */
51    ~DefaultPlugin();
52
53
54    /**
55     * Gets the name of the Interface (ie. the public name of the plugin).
56     *
57     * @return The name of the Interface (ie. the public name of the plugin).
58     *
59     */
60    QString name() const;
61
62
63    /**
64     * Gets the list of the projectors implemented by the DefaultPlugin.
65     *
66     * @return The list of the projectors implemented by the DefaultPlugin.
67     *
68     */
69    QStringList projectors() const;
70
71
72    /**
73     * Gets a new ProjectorWidget for a projector.
74     *
75     * @remark The responsability is transfered to the user, especially the
76     *         responsability to delete the widget at the end of use.
77     *
78     * @param projector The name of a projector, from the projectors()-list.
79     *
80     * @return A pointer on the ProjectorWidget.
81     *
82     */
83    ProjectorWidget* newProjectorWidget(const QString& projector);
84
85
86    /**
87     * Gets a new ProjectorData for a projector.
88     *
89     * @remark The responsability is transfered to the user, especially the
90     *         responsability to delete the data at the end of use.
91     *
92     * @param projector The name of a projector, from the projectors()-list.
93     *
94     * @return A pointer on the ProjectorData.
95     *
96     */
97    ProjectorData *newProjectorData(const QString& projector);
98
99
100    /**
101     * Gets the list of the scenes implemented by the DefaultPlugin.
102     *
103     * @return The list of the scenes implemented by the DefaultPlugin.
104     *
105     */
106    QStringList scenes() const;
107
108
109    /**
110     * Gets a new SceneWidget for a scene.
111     *
112     * @remark The responsability is transfered to the user, especially the
113     *         responsability to delete the widget at the end of use.
114     *
115     * @param scene_name The name of a scene, from the scenes()-list.
116     *
117     * @return A pointer on the SceneWidget.
118     *
119     */
120    SceneWidget* newSceneWidget(const QString& scene_name);
121
122
123    /**
124     * Gets a new SceneContent for a scene.
125     *
126     * @remark The responsability is transfered to the user, especially the
127     *         responsability to delete the content at the end of use.
128     *
129     * @param scene The name of a scene, from the scenes()-list.
130     *
131     * @return A pointer on the SceneContent.
132     *
133     */
134    SceneContent* newSceneContent(const QString& scene_name);
135
136};
137
138#endif // __DEFAULTPLUGIN_H__
Note: See TracBrowser for help on using the repository browser.