From 8d3ef73814f6813e194b3712b8568558fb25451b Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 30 May 2008 10:21:45 +0000 Subject: [PATCH] VISU 2008 - Unification of the VISU selection functionality (debug) --- src/VISUGUI/VisuGUI.cxx | 13 +++++++++++++ src/VISUGUI/VisuGUI.h | 1 + src/VISUGUI/VisuGUI_SelectionPanel.cxx | 2 ++ src/VISUGUI/VisuGUI_SelectionPanel.h | 3 +++ 4 files changed, 19 insertions(+) diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index f0ab08f5..a7b7c0fe 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -1834,6 +1834,18 @@ VisuGUI } } +//---------------------------------------------------------------------------- +void +VisuGUI +::OnSwitchSelectionMode( int theId ) +{ + for( int anId = VISU_ACTOR_SELECTION; anId <= VISU_GAUSS_POINT_SELECTION; anId++ ) + { + QAction* aRefAction = action( anId ); + aRefAction->setChecked( anId == VISU_ACTOR_SELECTION + theId ); + } +} + //---------------------------------------------------------------------------- void VisuGUI @@ -2759,6 +2771,7 @@ void VisuGUI::createSelectionPanel() { mySelectionPanel = new VisuGUI_SelectionPanel( this ); mySelectionPanel->update(); + connect( mySelectionPanel, SIGNAL( selectionModeChanged( int ) ), this, SLOT( OnSwitchSelectionMode( int ) ) ); } //*************************************************************************** diff --git a/src/VISUGUI/VisuGUI.h b/src/VISUGUI/VisuGUI.h index 560f7c2e..92ba9595 100644 --- a/src/VISUGUI/VisuGUI.h +++ b/src/VISUGUI/VisuGUI.h @@ -134,6 +134,7 @@ protected slots: void OnToggleSelectionPanel(); void OnSwitchSelectionMode(); + void OnSwitchSelectionMode( int ); void OnMakeSurfaceframe(); void OnMakeInsideframe(); diff --git a/src/VISUGUI/VisuGUI_SelectionPanel.cxx b/src/VISUGUI/VisuGUI_SelectionPanel.cxx index 16e5ce69..0d5a6e2f 100644 --- a/src/VISUGUI/VisuGUI_SelectionPanel.cxx +++ b/src/VISUGUI/VisuGUI_SelectionPanel.cxx @@ -440,6 +440,8 @@ void VisuGUI_SelectionPanel::onSelectionModeChanged( int theId ) onSelectionEvent(); break; } + + emit selectionModeChanged( theId ); } void VisuGUI_SelectionPanel::showEvent( QShowEvent* theEvent ) diff --git a/src/VISUGUI/VisuGUI_SelectionPanel.h b/src/VISUGUI/VisuGUI_SelectionPanel.h index 17aad529..12cdbffd 100644 --- a/src/VISUGUI/VisuGUI_SelectionPanel.h +++ b/src/VISUGUI/VisuGUI_SelectionPanel.h @@ -87,6 +87,9 @@ private slots: void onPointIdEdit(); void onCellIdEdit(); +signals: + void selectionModeChanged( int ); + private: void clearFields(); -- 2.39.2