Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
f7be68fc
Commit
f7be68fc
authored
Jun 18, 2010
by
Sebastian Eichelbaum
Browse files
[CHANGE] - unified combineraction and the action list
parent
829dbbfd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
20 deletions
+22
-20
src/gui/qt4/CMakeLists.txt
src/gui/qt4/CMakeLists.txt
+1
-1
src/gui/qt4/WQtCombinerActionList.cpp
src/gui/qt4/WQtCombinerActionList.cpp
+9
-5
src/gui/qt4/WQtCombinerToolbar.cpp
src/gui/qt4/WQtCombinerToolbar.cpp
+0
-1
src/gui/qt4/datasetbrowser/WQtDatasetBrowser.cpp
src/gui/qt4/datasetbrowser/WQtDatasetBrowser.cpp
+0
-1
src/gui/qt4/guiElements/WQtModuleOneToOneCombinerAction.cpp
src/gui/qt4/guiElements/WQtModuleOneToOneCombinerAction.cpp
+4
-4
src/gui/qt4/guiElements/WQtModuleOneToOneCombinerAction.h
src/gui/qt4/guiElements/WQtModuleOneToOneCombinerAction.h
+8
-8
No files found.
src/gui/qt4/CMakeLists.txt
View file @
f7be68fc
...
...
@@ -16,7 +16,7 @@ SET(GUI_QT4_MOC_HDRS
WQtNavGLWidget.h
WQtCombinerToolbar.h
guiElements/WQtPushButton.h
guiElements/WQt
Apply
ModuleAction.h
guiElements/WQtModule
OneToOneCombiner
Action.h
guiElements/WQtPropertyBoolAction.h
datasetbrowser/WPropertyWidget.h
datasetbrowser/WPropertyBoolWidget.h
...
...
src/gui/qt4/WQtCombinerActionList.cpp
View file @
f7be68fc
...
...
@@ -32,7 +32,7 @@
#include "../../common/WPreferences.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleCombiner.h"
#include "guiElements/WQt
Apply
ModuleAction.h"
#include "guiElements/WQtModule
OneToOneCombiner
Action.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 );
}
}
*/
}
}
...
...
src/gui/qt4/WQtCombinerToolbar.cpp
View file @
f7be68fc
...
...
@@ -34,7 +34,6 @@
#include "WMainWindow.h"
#include "WQtToolBar.h"
#include "guiElements/WQtApplyModuleAction.h"
#include "WQtCombinerActionList.h"
#include "WQtCombinerToolbar.h"
...
...
src/gui/qt4/datasetbrowser/WQtDatasetBrowser.cpp
View file @
f7be68fc
...
...
@@ -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"
...
...
src/gui/qt4/guiElements/WQt
Apply
ModuleAction.cpp
→
src/gui/qt4/guiElements/WQtModule
OneToOneCombiner
Action.cpp
View file @
f7be68fc
...
...
@@ -24,9 +24,9 @@
#include <string>
#include "WQt
Apply
ModuleAction.h"
#include "WQtModule
OneToOneCombiner
Action.h"
WQt
Apply
ModuleAction
::
WQt
Apply
ModuleAction
(
QWidget
*
parent
,
WIconManager
*
iconManager
,
boost
::
shared_ptr
<
W
Apply
Combiner
>
combiner
,
WQtModule
OneToOneCombiner
Action
::
WQtModule
OneToOneCombiner
Action
(
QWidget
*
parent
,
WIconManager
*
iconManager
,
boost
::
shared_ptr
<
W
ModuleOneToOne
Combiner
>
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
()
)
);
}
WQt
Apply
ModuleAction
::~
WQt
Apply
ModuleAction
()
WQtModule
OneToOneCombiner
Action
::~
WQtModule
OneToOneCombiner
Action
()
{
}
void
WQt
Apply
ModuleAction
::
applyCombiner
()
void
WQtModule
OneToOneCombiner
Action
::
applyCombiner
()
{
m_combiner
->
run
();
}
...
...
src/gui/qt4/guiElements/WQt
Apply
ModuleAction.h
→
src/gui/qt4/guiElements/WQtModule
OneToOneCombiner
Action.h
View file @
f7be68fc
...
...
@@ -22,8 +22,8 @@
//
//---------------------------------------------------------------------------
#ifndef WQT
APPLY
MODULEACTION_H
#define WQT
APPLY
MODULEACTION_H
#ifndef WQTMODULE
ONETOONECOMBINER
ACTION_H
#define WQTMODULE
ONETOONECOMBINER
ACTION_H
#include <string>
...
...
@@ -32,14 +32,14 @@
#include <QtGui/QAction>
#include "../../../kernel/WModule.h"
#include "../../../kernel/combiner/W
Apply
Combiner.h"
#include "../../../kernel/combiner/W
ModuleOneToOne
Combiner.h"
#include "../WIconManager.h"
/**
* Implements a action which applies the specified combiners (of the specified group) if pressed.
*/
class
WQt
Apply
ModuleAction
:
public
QAction
class
WQtModule
OneToOneCombiner
Action
:
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
*/
WQt
Apply
ModuleAction
(
QWidget
*
parent
,
WIconManager
*
iconManager
,
boost
::
shared_ptr
<
W
Apply
Combiner
>
combiner
,
WQtModule
OneToOneCombiner
Action
(
QWidget
*
parent
,
WIconManager
*
iconManager
,
boost
::
shared_ptr
<
W
ModuleOneToOne
Combiner
>
combiner
,
bool
advancedText
=
false
);
/**
* destructor
*/
virtual
~
WQt
Apply
ModuleAction
();
virtual
~
WQtModule
OneToOneCombiner
Action
();
protected:
/**
* The combiner of this action
*/
boost
::
shared_ptr
<
W
Apply
Combiner
>
m_combiner
;
boost
::
shared_ptr
<
W
ModuleOneToOne
Combiner
>
m_combiner
;
private:
public
slots
:
...
...
@@ -77,4 +77,4 @@ public slots:
void
applyCombiner
();
};
#endif // WQT
APPLY
MODULEACTION_H
#endif // WQTMODULE
ONETOONECOMBINER
ACTION_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment