From: asl Date: Tue, 8 Nov 2005 09:01:51 +0000 (+0000) Subject: PAL10019 - preferences for SUPERVGraph X-Git-Tag: V3_1_0a3~56 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c6792ae4f751edaf9cc3d1aa1daa2abbc55567cd;p=modules%2Fgui.git PAL10019 - preferences for SUPERVGraph --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 2a7cce67f..d6c503e68 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -57,6 +57,10 @@ #include #include +#include +#include +#include + #include #include #include @@ -1020,17 +1024,32 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType SUIT_ResourceMgr* resMgr = resourceMgr(); SUIT_ViewManager* viewMgr = 0; - if ( vmType == GLViewer_Viewer::Type() ) + if( vmType == GLViewer_Viewer::Type() ) { viewMgr = new GLViewer_ViewManager( activeStudy(), desktop() ); new LightApp_GLSelector( (GLViewer_Viewer2d*)viewMgr->getViewModel(), mySelMgr ); } - else if ( vmType == Plot2d_Viewer::Type() ) + else if( vmType == Plot2d_Viewer::Type() ) { viewMgr = new Plot2d_ViewManager( activeStudy(), desktop() ); - viewMgr->setViewModel( new SPlot2d_Viewer() );// custom view model, which extends SALOME_View interface + SPlot2d_Viewer* vm = new SPlot2d_Viewer(); + viewMgr->setViewModel( vm );// custom view model, which extends SALOME_View interface + Plot2d_ViewWindow* wnd = dynamic_cast( viewMgr->getActiveView() ); + if( wnd ) + { + Plot2d_ViewFrame* frame = wnd->getViewFrame(); + frame->setBackgroundColor( resMgr->colorValue( "Plot2d", "Background", frame->backgroundColor() ) ); + } } - else if ( vmType == OCCViewer_Viewer::Type() ) + else if( vmType == SUPERVGraph_Viewer::Type() ) + { + viewMgr = new SUPERVGraph_ViewManager( activeStudy(), desktop() ); + SUPERVGraph_Viewer* vm = new SUPERVGraph_Viewer(); + SUPERVGraph_ViewFrame* view = dynamic_cast( vm->getViewManager()->getActiveView() ); + if( view ) + view->setBackgroundColor( resMgr->colorValue( "SUPERVGraph", "Background", view->backgroundColor() ) ); + } + else if( vmType == OCCViewer_Viewer::Type() ) { viewMgr = new OCCViewer_ViewManager( activeStudy(), desktop() ); SOCC_Viewer* vm = new SOCC_Viewer(); @@ -1425,6 +1444,8 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) int plot2dGroup = pref->addPreference( tr( "PREF_GROUP_PLOT2DVIEWER" ), viewTab ); + int supervGroup = pref->addPreference( tr( "PREF_GROUP_SUPERV" ), viewTab ); + pref->setItemProperty( occGroup, "columns", 1 ); pref->setItemProperty( vtkGroup, "columns", 1 ); pref->setItemProperty( plot2dGroup, "columns", 1 ); @@ -1525,6 +1546,13 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) pref->setItemProperty( dirGroup, "columns", 1 ); pref->addPreference( tr( "" ), dirGroup, LightApp_Preferences::DirList, "FileDlg", "QuickDirList" ); + + pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), supervGroup, + LightApp_Preferences::Color, "SUPERVGraph", "Background" ); + pref->addPreference( tr( "PREF_SUPERV_TITLE_COLOR" ), supervGroup, + LightApp_Preferences::Color, "SUPERVGraph", "Title" ); +// pref->addPreference( tr( "PREF_SUPERV_CTRL_COLOR" ), supervGroup, +// LightApp_Preferences::Color, "SUPERVGraph", "Ctrl" ); } /*!Changed preferences */ diff --git a/src/LightApp/Makefile.in b/src/LightApp/Makefile.in index dc1d74cda..2c0a57df8 100755 --- a/src/LightApp/Makefile.in +++ b/src/LightApp/Makefile.in @@ -109,6 +109,6 @@ RESOURCES_FILES = icon_about.png \ CPPFLAGS+=$(PYTHON_INCLUDES) $(QT_INCLUDES) $(QWT_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) LDFLAGS+=$(PYTHON_LIBS) $(QT_MT_LIBS) -LIBS+= -lsuit -lstd -lCAM -lObjBrowser -lLogWindow $(CAS_KERNEL) -lPlot2d -lGLViewer -lOCCViewer -lVTKViewer -lSalomeObject -lSOCC -lSVTK -lPyInterp -lPythonConsole +LIBS+= -lsuit -lstd -lCAM -lObjBrowser -lLogWindow $(CAS_KERNEL) -lGLViewer -lOCCViewer -lVTKViewer -lSalomeObject -lSOCC -lSVTK -lSPlot2d -lSUPERVGraph -lPyInterp -lPythonConsole @CONCLUDE@ diff --git a/src/LightApp/resources/LightApp.xml b/src/LightApp/resources/LightApp.xml index b5884f858..2e18989f4 100644 --- a/src/LightApp/resources/LightApp.xml +++ b/src/LightApp/resources/LightApp.xml @@ -62,6 +62,10 @@ +
+ + +
diff --git a/src/LightApp/resources/LightApp_msg_en.po b/src/LightApp/resources/LightApp_msg_en.po index f5c4a8f89..6aa610229 100644 --- a/src/LightApp/resources/LightApp_msg_en.po +++ b/src/LightApp/resources/LightApp_msg_en.po @@ -195,6 +195,18 @@ msgstr "Quick directory list" msgid "LightApp_Application::MEN_REFRESH" msgstr "Refresh" +msgid "LightApp_Application::PREF_GROUP_SUPERV" +msgstr "Graph Supervisor" + +msgid "LightApp_Application::PREF_GROUP_SUPERV" +msgstr "Graph Supervisor" + +msgid "LightApp_Application::PREF_SUPERV_TITLE_COLOR" +msgstr "Title color" + +msgid "LightApp_Application::PREF_SUPERV_CTRL_COLOR" +msgstr "Ctrl color" + //======================================================================================= msgid "LightApp_PreferencesDlg::CAPTION" @@ -249,4 +261,3 @@ msgstr "&Cancel" msgid "LightApp_ModuleDlg::ActivateComponent_DESCRIPTION" msgstr "Create, open or load study." - diff --git a/src/SalomeApp/resources/SalomeApp.xml b/src/SalomeApp/resources/SalomeApp.xml index c88091e48..6d9862512 100644 --- a/src/SalomeApp/resources/SalomeApp.xml +++ b/src/SalomeApp/resources/SalomeApp.xml @@ -111,6 +111,10 @@
+
+ + +