Commit 7750140c authored by Jan Möbius's avatar Jan Möbius
Browse files

New Toolbox Interface

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7253 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 4b672e7d
...@@ -50,11 +50,10 @@ ...@@ -50,11 +50,10 @@
#include "OpenFlipper/BasePlugin/PluginFunctions.hh" #include "OpenFlipper/BasePlugin/PluginFunctions.hh"
bool SmootherPlugin::initializeToolbox(QWidget*& _widget) void SmootherPlugin::initializePlugin()
{ {
// Create the Toolbox Widget // Create the Toolbox Widget
QWidget* toolBox = new QWidget(); QWidget* toolBox = new QWidget();
_widget = toolBox;
QGridLayout* layout = new QGridLayout(toolBox); QGridLayout* layout = new QGridLayout(toolBox);
...@@ -75,7 +74,7 @@ bool SmootherPlugin::initializeToolbox(QWidget*& _widget) ...@@ -75,7 +74,7 @@ bool SmootherPlugin::initializeToolbox(QWidget*& _widget)
connect( smoothButton, SIGNAL(clicked()), this, SLOT(simpleLaplace()) ); connect( smoothButton, SIGNAL(clicked()), this, SLOT(simpleLaplace()) );
return true; emit addToolbox( tr("Simple Smoother") , toolBox );
} }
/** \brief /** \brief
......
...@@ -66,12 +66,12 @@ class SmootherPlugin : public QObject, BaseInterface, ToolboxInterface, LoggingI ...@@ -66,12 +66,12 @@ class SmootherPlugin : public QObject, BaseInterface, ToolboxInterface, LoggingI
//LoggingInterface //LoggingInterface
void log(Logtype _type, QString _message); void log(Logtype _type, QString _message);
void log(QString _message); void log(QString _message);
// ToolboxInterface
void addToolbox( QString _name , QWidget* _widget );
public: public:
// ToolboxInterface
bool initializeToolbox(QWidget*& _widget);
// BaseInterface // BaseInterface
QString name() { return (QString("Simple Smoother")); }; QString name() { return (QString("Simple Smoother")); };
QString description( ) { return (QString("Smooths the active Mesh")); }; QString description( ) { return (QString("Smooths the active Mesh")); };
...@@ -83,6 +83,9 @@ class SmootherPlugin : public QObject, BaseInterface, ToolboxInterface, LoggingI ...@@ -83,6 +83,9 @@ class SmootherPlugin : public QObject, BaseInterface, ToolboxInterface, LoggingI
private slots: private slots:
void simpleLaplace(); void simpleLaplace();
void initializePlugin(); // BaseInterface
public slots: public slots:
QString version() { return QString("1.0"); }; QString version() { return QString("1.0"); };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment