From 8aab8f5cb588b34f09bbe2d1e9a0b453a3b3286f Mon Sep 17 00:00:00 2001 From: gdd Date: Wed, 23 Nov 2011 14:42:28 +0000 Subject: [PATCH] rnc: - connected mouseRelease event to a slot in GEOMGUI - modified translations in feature detection dialog --- src/GEOMGUI/GEOMGUI.cxx | 9 +++++++++ src/GEOMGUI/GEOMGUI.h | 1 + src/GEOMGUI/GEOM_msg_en.ts | 6 +++++- src/GEOMGUI/GeometryGUI.cxx | 16 +++++++++++++++- src/GEOMGUI/GeometryGUI.h | 1 + 5 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/GEOMGUI/GEOMGUI.cxx b/src/GEOMGUI/GEOMGUI.cxx index 945382b00..34699bd47 100644 --- a/src/GEOMGUI/GEOMGUI.cxx +++ b/src/GEOMGUI/GEOMGUI.cxx @@ -76,6 +76,15 @@ bool GEOMGUI::OnMouseMove( QMouseEvent* /*pe*/, SUIT_Desktop* /*parent*/, SUIT_V return TRUE; } +//================================================================================= +// class : GEOMGUI::OnMouseMove +// purpose : Mouse move event processing +//================================================================================= +bool GEOMGUI::OnMouseRelease( QMouseEvent* /*pe*/, SUIT_Desktop* /*parent*/, SUIT_ViewWindow* /*studyFrame*/ ) +{ + return TRUE; +} + //================================================================================= // class : GEOMGUI::OnKeyPress // purpose : Key press event processing diff --git a/src/GEOMGUI/GEOMGUI.h b/src/GEOMGUI/GEOMGUI.h index 4b76564af..2405efdff 100644 --- a/src/GEOMGUI/GEOMGUI.h +++ b/src/GEOMGUI/GEOMGUI.h @@ -54,6 +54,7 @@ public : virtual bool OnMousePress( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWindow* ); virtual bool OnMouseMove( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWindow* ); + virtual bool OnMouseRelease( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWindow* ); virtual bool OnKeyPress( QKeyEvent* pe, SUIT_Desktop* parent, SUIT_ViewWindow* ); virtual void activate( SUIT_Desktop* parent ); diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index a060413a9..1514f2e9a 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -4598,9 +4598,13 @@ Number of sketch points too small GEOM_DETECT_ZONE Select a detection zone (default is whole picture) + + GEOM_PICTURE + Picture + GEOM_COLOR_FILTER - Select the color of the zone you want to find the frontier of + Filtering sample GEOM_VIEW diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 5e1a99796..8dc5b71e9 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -597,6 +597,18 @@ void GeometryGUI::OnMouseMove( SUIT_ViewWindow* w, QMouseEvent* e ) lib->OnMouseMove( e, application()->desktop(), w ); } +//================================================================================= +// function : GeometryGUI::OnMouseRelease() +// purpose : Manages mouse release events [static] +//================================================================================= +void GeometryGUI::OnMouseRelease( SUIT_ViewWindow* w, QMouseEvent* e ) +{ + if ( !application() ) + return; + foreach ( GEOMGUI* lib, myGUIMap ) + lib->OnMouseRelease( e, application()->desktop(), w ); +} + //================================================================================= // function : GeometryGUI::OnMousePress() // purpose : Manage mouse press events [static] @@ -1441,7 +1453,9 @@ void GeometryGUI::onViewManagerAdded( SUIT_ViewManager* vm ) this, SLOT( OnMousePress( SUIT_ViewWindow*, QMouseEvent* ) ) ); connect( vm, SIGNAL( mouseMove ( SUIT_ViewWindow*, QMouseEvent* ) ), this, SLOT( OnMouseMove( SUIT_ViewWindow*, QMouseEvent* ) ) ); - + connect( vm, SIGNAL( mouseRelease ( SUIT_ViewWindow*, QMouseEvent* ) ), + this, SLOT( OnMouseRelease( SUIT_ViewWindow*, QMouseEvent* ) ) ); + LightApp_SelectionMgr* sm = getApp()->selectionMgr(); myOCCSelectors.append( new GEOMGUI_OCCSelector( ((OCCViewer_ViewManager*)vm)->getOCCViewer(), sm ) ); diff --git a/src/GEOMGUI/GeometryGUI.h b/src/GEOMGUI/GeometryGUI.h index 1f0bff2bc..e523da284 100644 --- a/src/GEOMGUI/GeometryGUI.h +++ b/src/GEOMGUI/GeometryGUI.h @@ -154,6 +154,7 @@ public slots: virtual void OnKeyPress ( SUIT_ViewWindow*, QKeyEvent* ); virtual void OnMousePress( SUIT_ViewWindow*, QMouseEvent* ); virtual void OnMouseMove ( SUIT_ViewWindow*, QMouseEvent* ); + virtual void OnMouseRelease ( SUIT_ViewWindow*, QMouseEvent* ); protected slots: virtual void onViewManagerAdded( SUIT_ViewManager* ); -- 2.39.2