Developer Documentation
BaseInterface.hh
Go to the documentation of this file.
1 /*===========================================================================*\
2 * *
3 * OpenFlipper *
4  * Copyright (c) 2001-2015, RWTH-Aachen University *
5  * Department of Computer Graphics and Multimedia *
6  * All rights reserved. *
7  * www.openflipper.org *
8  * *
9  *---------------------------------------------------------------------------*
10  * This file is part of OpenFlipper. *
11  *---------------------------------------------------------------------------*
12  * *
13  * Redistribution and use in source and binary forms, with or without *
14  * modification, are permitted provided that the following conditions *
15  * are met: *
16  * *
17  * 1. Redistributions of source code must retain the above copyright notice, *
18  * this list of conditions and the following disclaimer. *
19  * *
20  * 2. Redistributions in binary form must reproduce the above copyright *
21  * notice, this list of conditions and the following disclaimer in the *
22  * documentation and/or other materials provided with the distribution. *
23  * *
24  * 3. Neither the name of the copyright holder nor the names of its *
25  * contributors may be used to endorse or promote products derived from *
26  * this software without specific prior written permission. *
27  * *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39 * *
40 \*===========================================================================*/
41 
42 /*===========================================================================*\
43 * *
44 * $Revision$ *
45 * $LastChangedBy$ *
46 * $Date$ *
47 * *
48 \*===========================================================================*/
49 
50 #ifndef BASEINTERFACE_HH
51 #define BASEINTERFACE_HH
52 
53 #include <QtPlugin>
55 #include "WhatsThisGenerator.hh"
56 
57 
77 
78  //===========================================================================
83  //===========================================================================
84 
85  private slots:
94  virtual void initializePlugin() {};
95 
102  virtual void pluginsInitialized() {};
103 
104 
107  //===========================================================================
113  //===========================================================================
114 
115  signals :
123  virtual void updateView() {};
124 
134  virtual void blockScenegraphUpdates(bool _block) {};
135 
147  virtual void updatedObject(int _objectId) {};
148 
161  virtual void updatedObject(int _identifier, const UpdateType& _type) {};
162 
170  virtual void nodeVisibilityChanged( int _identifier ) {};
171 
172  private slots:
173 
186  virtual void slotObjectUpdated( int _identifier ) {};
187 
201  virtual void slotObjectUpdated( int _identifier, const UpdateType& _type ) {};
202 
209  virtual void slotAllCleared( ) {};
210 
218  virtual void slotObjectSelectionChanged( int _identifier ) {};
219 
227  virtual void slotVisibilityChanged( int _identifier ) {};
228 
236  virtual void slotObjectPropertiesChanged( int _identifier ) {};
237 
245  virtual void slotViewChanged() {};
246 
257  virtual void slotSceneDrawn() {};
258 
263  virtual void slotDrawModeChanged(int _viewerId) {};
266  //===========================================================================
269  //===========================================================================
270  public :
271 
276  virtual QString name() = 0;
277 
282  virtual QString description() = 0;
283 
284  public slots:
292  virtual QString version() { return QString("-1"); };
293 
294  signals:
295 
306  virtual void setSlotDescription(QString _slotName , QString _slotDescription,
307  QStringList _parameters , QStringList _descriptions) {};
308 
311  //===========================================================================
314  //===========================================================================
315  signals:
316 
322  virtual void setRenderer(unsigned int _viewer, QString _rendererName) {};
323 
329  virtual void getCurrentRenderer(unsigned int _viewer, QString& _rendererName) {};
330 
333  public slots :
334 
338  virtual void exit(){};
339 
344  virtual void noguiSupported( ) {} ;
345 
346  public :
347 
349  virtual ~BaseInterface() {};
350 
351 };
352 
353 
469 Q_DECLARE_INTERFACE(BaseInterface,"OpenFlipper.BaseInterface/1.0")
470 
471 #endif // BASEINTERFACE_HH
virtual void setSlotDescription(QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
Set a description for a public slot.
virtual void updatedObject(int _objectId)
An object has been changed or added by this plugin.
virtual void slotVisibilityChanged(int _identifier)
An object has been shown or hidden.
virtual void slotObjectUpdated(int _identifier)
An object has been updated by another plugin.
virtual void slotObjectPropertiesChanged(int _identifier)
Object properties have been changed.
Interface class from which all plugins have to be created.
virtual void initializePlugin()
Initialize Plugin.
virtual void slotObjectUpdated(int _identifier, const UpdateType &_type)
An object has been updated by another plugin.
virtual void noguiSupported()
Update type class.
Definition: UpdateType.hh:70
virtual void slotViewChanged()
View has changed.
virtual void blockScenegraphUpdates(bool _block)
Tell the core to prevent scenegraph updates.
virtual void pluginsInitialized()
Initialize Plugin step 2.
virtual void slotAllCleared()
Called if the whole scene is cleared.
virtual void exit()
virtual void setRenderer(unsigned int _viewer, QString _rendererName)
Set a renderer for the given viewer.
virtual void slotSceneDrawn()
triggered after a scene has been drawn
virtual QString name()=0
Return a name for the plugin.
virtual void slotDrawModeChanged(int _viewerId)
A viewer changed its draw mode.
virtual void nodeVisibilityChanged(int _identifier)
A scenegraph node has been shown or hidden.
virtual QString description()=0
Return a description of what the plugin is doing.
virtual void updateView()
Update current view in Main Application.
virtual void slotObjectSelectionChanged(int _identifier)
The active object has changed.
virtual ~BaseInterface()
Destructor.
virtual QString version()
Return a version string for your plugin.
virtual void updatedObject(int _identifier, const UpdateType &_type)
An object has been changed or added by this plugin.
virtual void getCurrentRenderer(unsigned int _viewer, QString &_rendererName)
Get the current renderer for the given viewer.