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 #pragma once
43 
45 
46 
66 
67  //===========================================================================
72  //===========================================================================
73 
74  private slots:
83  virtual void initializePlugin() {};
84 
91  virtual void pluginsInitialized() {};
92 
101  virtual void pluginsInitialized(QVector<QPair<QString, QString>> const& _pluginOptions) {};
102 
103 
106  //===========================================================================
112  //===========================================================================
113 
114  signals :
122  virtual void updateView() {};
123 
133  virtual void blockScenegraphUpdates(bool _block) {};
134 
146  virtual void updatedObject(int _objectId) {};
147 
160  virtual void updatedObject(int _identifier, const UpdateType& _type) {};
161 
169  virtual void nodeVisibilityChanged( int _identifier ) {};
170 
171  private slots:
172 
185  virtual void slotObjectUpdated( int _identifier ) {};
186 
200  virtual void slotObjectUpdated( int _identifier, const UpdateType& _type ) {};
201 
208  virtual void slotAllCleared( ) {};
209 
217  virtual void slotObjectSelectionChanged( int _identifier ) {};
218 
226  virtual void slotVisibilityChanged( int _identifier ) {};
227 
235  virtual void slotObjectPropertiesChanged( int _identifier ) {};
236 
244  virtual void slotViewChanged() {};
245 
256  virtual void slotSceneDrawn() {};
257 
262  virtual void slotDrawModeChanged(int _viewerId) {};
265  //===========================================================================
268  //===========================================================================
269  public :
270 
275  virtual QString name() = 0;
276 
281  virtual QString description() = 0;
282 
283  public slots:
291  virtual QString version() { return QString("-1"); };
292 
293  signals:
294 
305  virtual void setSlotDescription(QString _slotName , QString _slotDescription,
306  QStringList _parameters , QStringList _descriptions) {};
307 
310  //===========================================================================
313  //===========================================================================
314  signals:
315 
321  virtual void setRenderer(unsigned int _viewer, QString _rendererName) {};
322 
328  virtual void getCurrentRenderer(unsigned int _viewer, QString& _rendererName) {};
329 
332  public slots :
333 
337  virtual void exit(){};
338 
343  virtual void noguiSupported( ) {} ;
344 
345  public :
346 
348  virtual ~BaseInterface() {};
349 
350 };
351 
352 
468 Q_DECLARE_INTERFACE(BaseInterface,"OpenFlipper.BaseInterface/1.0")
469 
Update type class.
Definition: UpdateType.hh:60
virtual QString version()
Return a version string for your plugin.
virtual void pluginsInitialized()
Initialize Plugin step 2.
virtual QString description()=0
Return a description of what the plugin is doing.
virtual void pluginsInitialized(QVector< QPair< QString, QString >> const &_pluginOptions)
Initialize Plugin step 2 alternative.
virtual void exit()
virtual void slotDrawModeChanged(int _viewerId)
A viewer changed its draw mode.
virtual void slotAllCleared()
Called if the whole scene is cleared.
virtual ~BaseInterface()
Destructor.
virtual void slotViewChanged()
View has changed.
virtual void slotObjectSelectionChanged(int _identifier)
The active object has changed.
virtual void updatedObject(int _objectId)
An object has been changed or added by this plugin.
virtual QString name()=0
Return a name for the plugin.
virtual void slotSceneDrawn()
triggered after a scene has been drawn
virtual void noguiSupported()
virtual void blockScenegraphUpdates(bool _block)
Tell the core to prevent scenegraph updates.
virtual void slotObjectUpdated(int _identifier)
An object has been updated by another plugin.
virtual void slotVisibilityChanged(int _identifier)
An object has been shown or hidden.
Interface class from which all plugins have to be created.
virtual void initializePlugin()
Initialize Plugin.
virtual void slotObjectPropertiesChanged(int _identifier)
Object properties have been changed.
virtual void nodeVisibilityChanged(int _identifier)
A scenegraph node has been shown or hidden.
virtual void updateView()
Update current view in Main Application.
virtual void slotObjectUpdated(int _identifier, const UpdateType &_type)
An object has been updated by another plugin.
virtual void getCurrentRenderer(unsigned int _viewer, QString &_rendererName)
Get the current renderer for the given viewer.
virtual void updatedObject(int _identifier, const UpdateType &_type)
An object has been changed or added by this plugin.
virtual void setRenderer(unsigned int _viewer, QString _rendererName)
Set a renderer for the given viewer.
virtual void setSlotDescription(QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
Set a description for a public slot.