Developer Documentation

SmootherPlugin.hh
1 #ifndef SMOOTHERPLUGIN_HH
2 #define SMOOTHERPLUGIN_HH
3
4 #include <OpenFlipper/BasePlugin/BaseInterface.hh>
5 #include <OpenFlipper/BasePlugin/ToolboxInterface.hh>
6 #include <OpenFlipper/BasePlugin/LoggingInterface.hh>
7 #include <OpenFlipper/common/Types.hh>
8
9 #include <QPushButton>
10 #include <QLabel>
11 #include <QGridLayout>
12 #include <QSpinBox>
13
14 class SmootherPlugin : public QObject, BaseInterface, ToolboxInterface, LoggingInterface
15 {
16 Q_OBJECT
17 Q_INTERFACES(BaseInterface)
18 Q_INTERFACES(ToolboxInterface)
19 Q_INTERFACES(LoggingInterface)
20 Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.examples.SmootherPlugin")
21
22 signals:
23 //BaseInterface
24 void updateView();
25 void updatedObject(int _identifier, const UpdateType& _type);
26
27 //LoggingInterface
28 void log(Logtype _type, QString _message);
29 void log(QString _message);
30
31 // ToolboxInterface
32 void addToolbox( QString _name, QWidget* _widget );
33
34 public:
35
36 SmootherPlugin();
37
38 // BaseInterface
39 QString name() { return (QString("Simple Smoother")); };
40 QString description( ) { return (QString("Smooths the active Mesh")); };
41
42 private:
43
45 QSpinBox* iterationsSpinbox_;
46
47 private slots:
48
49 // BaseInterface
50 void initializePlugin();
51
52
53 void simpleLaplace();
54
55 public slots:
56 QString version() { return QString("1.0"); };
57 };
58
59 #endif //SMOOTHERPLUGIN_HH
ToolboxInterface.hh
ToolboxInterface
Plugins can add its own toolbox to the main widget&#39;s toolbox area by using this interface.
Definition: ToolboxInterface.hh:68
Logtype
Logtype
Log types for Message Window.
Definition: LoggingInterface.hh:92
SmootherPlugin::simpleLaplace
void simpleLaplace()
simpleLaplace
Definition: SmootherPlugin.cc:75
LoggingInterface
Interface for all Plugins which do logging to the logging window of the framework.
Definition: LoggingInterface.hh:112
SmootherPlugin
Definition: SmootherPlugin.hh:14
LoggingInterface.hh
UpdateType
Update type class.
Definition: UpdateType.hh:60
SmootherPlugin::iterationsSpinbox_
QSpinBox * iterationsSpinbox_
SpinBox for Number of iterations.
Definition: SmootherPlugin.hh:40
SmootherPlugin::description
QString description()
Return a description of what the plugin is doing.
Definition: SmootherPlugin.hh:40
Types.hh
BaseInterface
Interface class from which all plugins have to be created.
Definition: BaseInterface.hh:65
BaseInterface.hh
SmootherPlugin::name
QString name()
Return a name for the plugin.
Definition: SmootherPlugin.hh:39