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

New Toolbox Interface ... This will break all Toolbox Plugins!!!

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7240 383ad7c9-94d9-4d36-a494-682f7c89f535
parent de9236a7
...@@ -117,18 +117,12 @@ void DataControlPlugin::pluginsInitialized() { ...@@ -117,18 +117,12 @@ void DataControlPlugin::pluginsInitialized() {
//****************************************************************************** //******************************************************************************
/** \brief initialize the toolBox void DataControlPlugin::initializePlugin()
*
* @param _widget a reference to the toolBox
* @return returns if the toolbox was created successfully
*/
bool DataControlPlugin::initializeToolbox(QWidget*& _widget)
{ {
locked = false; locked = false;
tool_ = new DatacontrolToolboxWidget(); tool_ = new DatacontrolToolboxWidget();
connect( tool_ , SIGNAL( keyEvent( QKeyEvent* ) ), connect( tool_ , SIGNAL( keyEvent( QKeyEvent* ) ),
this , SLOT(slotKeyEvent ( QKeyEvent* ) )); this , SLOT(slotKeyEvent ( QKeyEvent* ) ));
_widget = tool_;
QSize size(300, 300); QSize size(300, 300);
tool_->resize(size); tool_->resize(size);
...@@ -167,7 +161,7 @@ bool DataControlPlugin::initializeToolbox(QWidget*& _widget) ...@@ -167,7 +161,7 @@ bool DataControlPlugin::initializeToolbox(QWidget*& _widget)
connect( viewHeader_, SIGNAL(customContextMenuRequested ( const QPoint & ) ), connect( viewHeader_, SIGNAL(customContextMenuRequested ( const QPoint & ) ),
this, SLOT(slotHeaderCustomContextMenuRequested ( const QPoint & ) )); this, SLOT(slotHeaderCustomContextMenuRequested ( const QPoint & ) ));
return true; emit addToolbox("Data Control", tool_);
} }
......
...@@ -90,16 +90,22 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn ...@@ -90,16 +90,22 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn
// LoggingInterface // LoggingInterface
void log(Logtype _type, QString _message); void log(Logtype _type, QString _message);
void log(QString _message); void log(QString _message);
// ContextMenuInterface // ContextMenuInterface
void addContextMenuItem(QAction* _action , ContextMenuType _type); void addContextMenuItem(QAction* _action , ContextMenuType _type);
void addContextMenuItem(QAction* _action , DataType _objectType , ContextMenuType _type ); void addContextMenuItem(QAction* _action , DataType _objectType , ContextMenuType _type );
// LoadSaveInterface // LoadSaveInterface
void deleteObject( int _id ); void deleteObject( int _id );
void emptyObjectAdded( int _id ); void emptyObjectAdded( int _id );
void copyObject( int _oldId, int& _newId); void copyObject( int _oldId, int& _newId);
// ToolboxInterface
void addToolbox( QString _name , QWidget* _widget );
private slots : private slots :
// BaseInterface // BaseInterface
void initializePlugin();
void pluginsInitialized(); void pluginsInitialized();
void slotObjectUpdated ( int _identifier ); void slotObjectUpdated ( int _identifier );
void slotVisibilityChanged ( int _identifier ); void slotVisibilityChanged ( int _identifier );
...@@ -123,9 +129,6 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn ...@@ -123,9 +129,6 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn
/// Destructor /// Destructor
~DataControlPlugin() {}; ~DataControlPlugin() {};
/// Initialize the ToolBox
bool initializeToolbox(QWidget*& _widget);
/// Name of the Plugin /// Name of the Plugin
QString name(){ return (QString("DataControl")); }; QString name(){ return (QString("DataControl")); };
......
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