Commit f7be68fc authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - unified combineraction and the action list

parent 829dbbfd
......@@ -16,7 +16,7 @@ SET(GUI_QT4_MOC_HDRS
WQtNavGLWidget.h
WQtCombinerToolbar.h
guiElements/WQtPushButton.h
guiElements/WQtApplyModuleAction.h
guiElements/WQtModuleOneToOneCombinerAction.h
guiElements/WQtPropertyBoolAction.h
datasetbrowser/WPropertyWidget.h
datasetbrowser/WPropertyBoolWidget.h
......
......@@ -32,7 +32,7 @@
#include "../../common/WPreferences.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleCombiner.h"
#include "guiElements/WQtApplyModuleAction.h"
#include "guiElements/WQtModuleOneToOneCombinerAction.h"
#include "WMainWindow.h"
#include "WQtCombinerActionList.h"
......@@ -58,8 +58,10 @@ WQtCombinerActionList::WQtCombinerActionList( QWidget* parent, WIconManager* ico
}
// create a new action for this group
WQtApplyModuleAction* group = new WQtApplyModuleAction( parent, icons, *( *groups ).second.begin() );
group->setIconVisibleInMenu( true );
/*WQtModuleOneToOneCombinerAction* group = new WQtModuleOneToOneCombinerAction( parent, icons,
boost::shared_static_cast< WModuleOneToOneCombiner >( ( *( *groups ).second.begin() ) )
);*/
/*group->setIconVisibleInMenu( true );
push_back( group );
// only add a sub menu if there are more than 1 items in the group
......@@ -70,12 +72,14 @@ WQtCombinerActionList::WQtCombinerActionList( QWidget* parent, WIconManager* ico
for ( WCombinerTypes::WCompatibleCombiners::iterator combiner = ( *groups ).second.begin();
combiner != ( *groups ).second.end(); ++combiner )
{
WQtApplyModuleAction* a = new WQtApplyModuleAction( parent, icons, ( *combiner ), true );
WQtModuleOneToOneCombinerAction* a = new WQtModuleOneToOneCombinerAction( parent, icons,
boost::shared_static_cast< WModuleOneToOneCombiner >( *combiner ), true
);
a->setIconVisibleInMenu( true );
groupMenu->addAction( a );
}
group->setMenu( groupMenu );
}
}*/
}
}
......
......@@ -34,7 +34,6 @@
#include "WMainWindow.h"
#include "WQtToolBar.h"
#include "guiElements/WQtApplyModuleAction.h"
#include "WQtCombinerActionList.h"
#include "WQtCombinerToolbar.h"
......
......@@ -49,7 +49,6 @@
#include "../events/WModuleRemovedEvent.h"
#include "../events/WRoiAssocEvent.h"
#include "../events/WRoiRemoveEvent.h"
#include "../guiElements/WQtApplyModuleAction.h"
#include "../WMainWindow.h"
#include "../WQt4Gui.h"
#include "../WQtCombinerActionList.h"
......
......@@ -24,9 +24,9 @@
#include <string>
#include "WQtApplyModuleAction.h"
#include "WQtModuleOneToOneCombinerAction.h"
WQtApplyModuleAction::WQtApplyModuleAction( QWidget* parent, WIconManager* iconManager, boost::shared_ptr< WApplyCombiner > combiner,
WQtModuleOneToOneCombinerAction::WQtModuleOneToOneCombinerAction( QWidget* parent, WIconManager* iconManager, boost::shared_ptr< WModuleOneToOneCombiner > combiner,
bool advancedText ):
QAction( parent ),
m_combiner( combiner )
......@@ -70,11 +70,11 @@ WQtApplyModuleAction::WQtApplyModuleAction( QWidget* parent, WIconManager* iconM
connect( this, SIGNAL( triggered() ), this, SLOT( applyCombiner() ) );
}
WQtApplyModuleAction::~WQtApplyModuleAction()
WQtModuleOneToOneCombinerAction::~WQtModuleOneToOneCombinerAction()
{
}
void WQtApplyModuleAction::applyCombiner()
void WQtModuleOneToOneCombinerAction::applyCombiner()
{
m_combiner->run();
}
......
......@@ -22,8 +22,8 @@
//
//---------------------------------------------------------------------------
#ifndef WQTAPPLYMODULEACTION_H
#define WQTAPPLYMODULEACTION_H
#ifndef WQTMODULEONETOONECOMBINERACTION_H
#define WQTMODULEONETOONECOMBINERACTION_H
#include <string>
......@@ -32,14 +32,14 @@
#include <QtGui/QAction>
#include "../../../kernel/WModule.h"
#include "../../../kernel/combiner/WApplyCombiner.h"
#include "../../../kernel/combiner/WModuleOneToOneCombiner.h"
#include "../WIconManager.h"
/**
* Implements a action which applies the specified combiners (of the specified group) if pressed.
*/
class WQtApplyModuleAction : public QAction
class WQtModuleOneToOneCombinerAction : public QAction
{
Q_OBJECT
......@@ -53,20 +53,20 @@ public:
* \param combiner the apply combiner which gets applied when triggered
* \param advancedText if true a more complex text showing the used connectors is used instead of the plane target-module name
*/
WQtApplyModuleAction( QWidget* parent, WIconManager* iconManager, boost::shared_ptr< WApplyCombiner > combiner,
WQtModuleOneToOneCombinerAction( QWidget* parent, WIconManager* iconManager, boost::shared_ptr< WModuleOneToOneCombiner > combiner,
bool advancedText = false );
/**
* destructor
*/
virtual ~WQtApplyModuleAction();
virtual ~WQtModuleOneToOneCombinerAction();
protected:
/**
* The combiner of this action
*/
boost::shared_ptr< WApplyCombiner > m_combiner;
boost::shared_ptr< WModuleOneToOneCombiner > m_combiner;
private:
public slots:
......@@ -77,4 +77,4 @@ public slots:
void applyCombiner();
};
#endif // WQTAPPLYMODULEACTION_H
#endif // WQTMODULEONETOONECOMBINERACTION_H
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