Developer Documentation
SmootherPlugin.hh
1 #ifndef SMOOTHERPLUGIN_HH
2 #define SMOOTHERPLUGIN_HH
3 
8 
9 #include <QPushButton>
10 #include <QLabel>
11 #include <QGridLayout>
12 #include <QSpinBox>
13 
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 
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
Plugins can add its own toolbox to the main widget&#39;s toolbox area by using this interface.
Logtype
Log types for Message Window.
void simpleLaplace()
simpleLaplace
Interface for all Plugins which do logging to the logging window of the framework.
Update type class.
Definition: UpdateType.hh:59
QSpinBox * iterationsSpinbox_
SpinBox for Number of iterations.
QString description()
Return a description of what the plugin is doing.
Interface class from which all plugins have to be created.
QString name()
Return a name for the plugin.