Commit 5eaced92 authored by Jan Möbius's avatar Jan Möbius

New Toolbox Interface

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7248 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a75ae377
...@@ -245,17 +245,10 @@ void MovePlugin::pluginsInitialized() { ...@@ -245,17 +245,10 @@ void MovePlugin::pluginsInitialized() {
ToolBoxInterface implementation ToolBoxInterface implementation
*******************************************************************************/ *******************************************************************************/
/** \brief Create the move toolbox-widget and return a reference to it void MovePlugin::initializePlugin()
*
* @param _widget A reference to the move toolbox that we will return
* @return return wether the widget was successfully generated
*/
bool MovePlugin::initializeToolbox(QWidget*& _widget)
{ {
toolboxActive_ = false; toolboxActive_ = false;
tool_ = new moveToolbarWidget(); tool_ = new moveToolbarWidget();
// tool_ -> setMaximumWidth(300);
_widget = tool_;
connect(tool_->moveToOrigin,SIGNAL(clicked() ),this,SLOT(slotMoveToOrigin())); connect(tool_->moveToOrigin,SIGNAL(clicked() ),this,SLOT(slotMoveToOrigin()));
...@@ -268,7 +261,7 @@ bool MovePlugin::initializeToolbox(QWidget*& _widget) ...@@ -268,7 +261,7 @@ bool MovePlugin::initializeToolbox(QWidget*& _widget)
lastActiveManipulator_ = -1; lastActiveManipulator_ = -1;
return true; emit addToolbox( tr("Move") , tool_ );
} }
......
...@@ -116,10 +116,14 @@ class MovePlugin : public QObject, BaseInterface, MouseInterface, KeyInterface, ...@@ -116,10 +116,14 @@ class MovePlugin : public QObject, BaseInterface, MouseInterface, KeyInterface,
// KeyInterface // KeyInterface
void registerKey(int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse = false); void registerKey(int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse = false);
// ToolboxInterface
void addToolbox( QString _name , QWidget* _widget );
private slots : private slots :
// BaseInterface // BaseInterface
void initializePlugin();
void pluginsInitialized(); void pluginsInitialized();
// MouseInterface // MouseInterface
...@@ -145,9 +149,6 @@ class MovePlugin : public QObject, BaseInterface, MouseInterface, KeyInterface, ...@@ -145,9 +149,6 @@ class MovePlugin : public QObject, BaseInterface, MouseInterface, KeyInterface,
/// Destructor /// Destructor
~MovePlugin(); ~MovePlugin();
/// Initialize the toolbar (create a widget in the right side toolbox)
bool initializeToolbox(QWidget*& _widget);
/// Name of the Plugin /// Name of the Plugin
QString name(){ return (QString("Move")); }; QString name(){ return (QString("Move")); };
......
Markdown is supported
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