</ul>
</ul>
+Also you can set preferences for visualisation of <b>Dependency Tree</b> in 2D Viewer.
+
+\image html pref_dep_tree.png
+
+<ul>
+<li><b>General</b></li>
+<ul>
+<li><b>Hierarchy type</b> - allows to choose between display only ascendants tree,
+display only descendants tree or display both ascendants and descendants trees.</li>
+<li><b>Possibility to move nodes</b> - allows to customize the moving nodes by default.</li>
+</ul>
+</ul>
+
+<ul>
+<li><b>Color</b></li>
+<ul>
+<li><b>Background color</b> - allows to select default background color.</li>
+<li><b>Default node color</b> - allows to select default node color.</li>
+<li><b>Main node color</b> - allows to select default main node color.</li>
+<li><b>Unpublished node color</b> - allows to select default node color
+for unpublished objects.</li>
+<li><b>Selected node color</b> - allows to select default selected node color.</li>
+<li><b>Default arrow color</b> - allows to select default arrow color.</li>
+<li><b>Highlighted arrow color</b> - allows to select default highlighted
+arrow color.</li>
+<li><b>Selected arrow color</b> - allows to select default selected
+arrow color.</li>
+</ul>
+</ul>
*/
<parameter name="measures_line_width" value="1" />
<parameter name="iso_number_u" value="0" />
<parameter name="iso_number_v" value="0" />
- <parameter name="dependency_tree_hierarchy_type" value="0" />
- <parameter name="dependency_tree_move_nodes" value="true" />
- <parameter name="dependency_tree_background_color" value="255, 255, 255" />
- <parameter name="dependency_tree_node_color" value="62, 180, 238" />
- <parameter name="dependency_tree_main_node_color" value="238, 90, 125" />
- <parameter name="dependency_tree_select_node_color" value="237, 243, 58" />
- <parameter name="dependency_tree_arrow_color" value="0, 0, 130" />
+ <parameter name="dependency_tree_hierarchy_type" value="0" />
+ <parameter name="dependency_tree_move_nodes" value="true" />
+ <parameter name="dependency_tree_background_color" value="255, 255, 255" />
+ <parameter name="dependency_tree_node_color" value="62, 180, 238" />
+ <parameter name="dependency_tree_main_node_color" value="238, 90, 125" />
+ <parameter name="dependency_tree_unpublish_node_color" value="255, 255, 255" />
+ <parameter name="dependency_tree_select_node_color" value="237, 243, 58" />
+ <parameter name="dependency_tree_arrow_color" value="0, 0, 130" />
<parameter name="dependency_tree_highlight_arrow_color" value="0, 0, 255" />
- <parameter name="dependency_tree_select_arrow_color" value="255, 0, 0" />
+ <parameter name="dependency_tree_select_arrow_color" value="255, 0, 0" />
<!-- Dimension presentation properties -->
<parameter name="dimensions_color" value="#ffffff" />
##
IF(SALOME_BUILD_GUI)
SET(SUBDIRS_GUI
- DependencyTree OBJECT DlgRef GEOMFiltersSelection Material GEOMGUI
- GEOMBase GEOMToolsGUI DisplayGUI BasicGUI PrimitiveGUI GenerationGUI
+ OBJECT DlgRef GEOMFiltersSelection Material GEOMGUI
+ GEOMBase DependencyTree GEOMToolsGUI DisplayGUI BasicGUI PrimitiveGUI GenerationGUI
EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI
RepairGUI MeasureGUI GroupGUI BlocksGUI AdvancedGUI ImportExportGUI
GEOM_SWIG_WITHIHM
#
INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
# --- options ---
INCLUDE_DIRECTORIES(
${QT_INCLUDES}
${GUI_INCLUDE_DIRS}
- ${CAS_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/src/GEOMGUI
${PROJECT_SOURCE_DIR}/src/GEOMBase
- ${PROJECT_SOURCE_DIR}/src/GEOM
- ${PROJECT_SOURCE_DIR}/src/GEOMUtils
-
-
- ${PROJECT_BINARY_DIR}/idl
- ${PROJECT_BINARY_DIR}
+ ${PROJECT_SOURCE_DIR}/src/GEOM
${PROJECT_SOURCE_DIR}/src/OBJECT
- ${PROJECT_SOURCE_DIR}/src/GEOMClient
- ${PROJECT_SOURCE_DIR}/src/GEOMImpl
${PROJECT_SOURCE_DIR}/src/GEOMUtils
- ${PROJECT_SOURCE_DIR}/src/DlgRef
- ${PROJECT_BINARY_DIR}/src/DlgRef
-
+ ${PROJECT_SOURCE_DIR}/src/GEOMClient
+ ${PROJECT_BINARY_DIR}/idl
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
${QT_DEFINITIONS}
${GUI_DEFINITIONS}
- ${CAS_DEFINITIONS}
- ${OMNIORB_DEFINITIONS}
+ ${CAS_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
${QT_LIBRARIES}
${GUI_SalomeApp}
- ${GUI_suit}
- ${GUI_qtx}
- ${GUI_QxScene}
${GUI_GraphicsView}
- ${GUI_SalomeObject}
- GEOMUtils
- ${KERNEL_SalomeDS}
-)
+ GEOM
+ GEOMBase
+ )
# --- headers ---
SET(_moc_HEADERS
DependencyTree_View.h
DependencyTree_ViewModel.h
-)
+ )
# --- sources ---
QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
SET(DependencyTree_SOURCES
- DependencyTree_View.cxx
- DependencyTree_Object.cxx
DependencyTree_Arrow.cxx
+ DependencyTree_Object.cxx
DependencyTree_Selector.cxx
+ DependencyTree_View.cxx
DependencyTree_ViewModel.cxx
${_moc_SOURCES}
-)
+ )
# --- resources ---
resources/DependencyTree_msg_en.ts
resources/DependencyTree_msg_fr.ts
resources/DependencyTree_msg_ja.ts
-)
+ )
# --- rules ---
// GEOM includes
#include <GeometryGUI.h>
-#include <GEOM_BaseObject.hxx>
// GUI includes
#include <SUIT_Session.h>
myColor = resMgr->colorValue( "Geometry", "dependency_tree_node_color", QColor( 62, 180, 238 ) );
mySelectColor = resMgr->colorValue( "Geometry", "dependency_tree_select_node_color", QColor( 237, 243, 58 ) );
myMainObjectColor = resMgr->colorValue( "Geometry", "dependency_tree_main_node_color", QColor( 238, 90, 125 ) );
+ myUnpublishObjectColor = resMgr->colorValue( "Geometry", "dependency_tree_unpublish_node_color", QColor( 255, 255, 255 ) );
myPolygonItem = new QGraphicsPolygonItem();
QPolygonF myPolygon;
<< QPointF( -itemW, itemH ) << QPointF( -itemW, -itemH );
myPolygonItem->setPolygon( myPolygon );
- myPolygonItem->setBrush( myColor );
- myPolygonItem->setPen( getPen( myColor ) );
myTextItem = new QGraphicsSimpleTextItem();
QFont textFont;
if( studyEntry.isEmpty() ) {
if( name.isEmpty() )
name = "unpublished";
- myColor = QColor( 255, 255, 255 );
- myPolygonItem->setBrush( myColor );
- myPolygonItem->setPen( getPen( myColor ) );
+ myColor = myUnpublishObjectColor;
}
+ myPolygonItem->setBrush( myColor );
+ myPolygonItem->setPen( getPen( myColor ) );
+
setName( name );
myTextItem->setText( name );
//=================================================================================
void DependencyTree_Object::setColor( const QColor& theColor )
{
- myColor = theColor;
+ QString studyEntry = myGeomObject->GetStudyEntry();
+ if( studyEntry.isEmpty() )
+ myColor = myUnpublishObjectColor;
+ else
+ myColor = theColor;
+
}
//=================================================================================
myMainObjectColor = theColor;
}
+//=================================================================================
+// function : setUnpublishObjectColor()
+// purpose : set color if current item is unpublished object
+//=================================================================================
+void DependencyTree_Object::setUnpublishObjectColor( const QColor& theColor )
+{
+ myUnpublishObjectColor = theColor;
+ QString studyEntry = myGeomObject->GetStudyEntry();
+ if( studyEntry.isEmpty() )
+ myColor = myUnpublishObjectColor;
+}
+
//=================================================================================
// function : setIsMainObject()
// purpose : set true if current item is main object of dependency tree
#include <GraphicsView_Object.h>
// GEOM includes
-#include <GeometryGUI.h>
-#include <GEOM_BaseObject.hxx>
+#include <SALOMEconfig.h>
+#include CORBA_CLIENT_HEADER(GEOM_Gen)
#include <QPen>
void updateName();
- void setColor(const QColor& );
- void setSelectColor(const QColor& );
- void setMainObjectColor(const QColor& );
+ void setColor( const QColor& );
+ void setSelectColor( const QColor& );
+ void setMainObjectColor( const QColor& );
+ void setUnpublishObjectColor( const QColor& );
void setIsMainObject( bool );
QColor myColor;
QColor mySelectColor;
QColor myMainObjectColor;
+ QColor myUnpublishObjectColor;
QGraphicsPolygonItem* myPolygonItem;
QGraphicsSimpleTextItem* myTextItem;
//GEOM includes
#include <GEOMBase.h>
+#include <GeometryGUI.h>
DependencyTree_Selector::DependencyTree_Selector( DependencyTree_ViewModel* theModel, SUIT_SelectionMgr* theSelMgr )
:LightApp_GVSelector( (GraphicsView_Viewer*)theModel, theSelMgr )
connect( myDisplayDescendants, SIGNAL( toggled( bool ) ), this, SLOT( onHierarchyType() ) );
connect( updateButton, SIGNAL( clicked() ), this, SLOT( onUpdateModel() ) );
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+ GeometryGUI* aGeomGUI = dynamic_cast<GeometryGUI*>( app->module( "Geometry" ) );
+ if ( aGeomGUI ) {
+ connect( aGeomGUI, SIGNAL( SignalDependencyTreeParamChanged( const QString&, const QString& ) ),
+ this, SLOT( onPreferenceChanged( const QString&, const QString& ) ) );
+ connect( aGeomGUI, SIGNAL( SignalDependencyTreeRenameObject( const QString& ) ),
+ this, SLOT( onRenameObject( const QString& ) ) );
+ }
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
setPrefBackgroundColor( resMgr->colorValue( "Geometry", "dependency_tree_background_color", QColor( 255, 255, 255 ) ) );
setNodesMovable( resMgr->booleanValue( "Geometry", "dependency_tree_move_nodes", true ) );
setHierarchyType( resMgr->integerValue( "Geometry", "dependency_tree_hierarchy_type", 0 ) );
return myTreeMap[ theEntry ];
}
-//=================================================================================
-// function : updateObjectName()
-// purpose : update object name, having edited it in Object Browser
-//=================================================================================
-bool DependencyTree_View::updateObjectName( const std::string& theEntry )
-{
- bool res = false;
- for( initSelected(); moreSelected(); nextSelected() ) {
- if( DependencyTree_Object* aDepObject = dynamic_cast<DependencyTree_Object*>( selectedObject() ) ) {
- aDepObject->updateName();
- res = true;
- }
- }
- return res;
-}
-
//=================================================================================
// function : setHierarchyType()
// purpose : set hierarchy type of dependency tree
}
}
+//=================================================================================
+// function : setUnpublishNodeColor()
+// purpose : set unpublished node color from preferences
+//=================================================================================
+void DependencyTree_View::setUnpublishNodeColor( const QColor& theColor )
+{
+ EntryObjectMap::const_iterator i;
+ for( i = myTreeMap.begin(); i != myTreeMap.end(); i++ ) {
+ DependencyTree_Object* object = myTreeMap[ i->first ];
+ object->setUnpublishObjectColor( theColor );
+ }
+}
+
//=================================================================================
// function : setSelectNodeColor()
// purpose : set selected node color from preferences
updateView();
}
+//=================================================================================
+// function : onPreferencesChanged()
+// purpose : slot for changing tree parameters from preferences
+//=================================================================================
+void DependencyTree_View::onPreferenceChanged( const QString& section, const QString& param )
+{
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+
+ if( param == QString("dependency_tree_hierarchy_type") ) {
+ int hierarchyType = resMgr->integerValue( section, param, 0);
+ setHierarchyType( hierarchyType );
+ }
+ else if( param == QString("dependency_tree_move_nodes") ) {
+ bool isNodesMovable = resMgr->booleanValue( section, param, true);
+ setNodesMovable( isNodesMovable );
+ }
+ else if( param == QString("dependency_tree_background_color") ) {
+ QColor c = resMgr->colorValue( section, param, QColor( 255, 255, 255 ) );
+ setPrefBackgroundColor( c );
+ }
+ else if( param == QString("dependency_tree_node_color") ) {
+ QColor c = resMgr->colorValue( section, param, QColor( 62, 180, 238 ) );
+ setNodeColor( c );
+ }
+ else if( param == QString("dependency_tree_main_node_color") ) {
+ QColor c = resMgr->colorValue( section, param, QColor( 238, 90, 125 ) );
+ setMainNodeColor( c );
+ }
+ else if( param == QString("dependency_tree_unpublish_node_color") ) {
+ QColor c = resMgr->colorValue( section, param, QColor( 255, 255, 255 ) );
+ setUnpublishNodeColor( c );
+ }
+ else if( param == QString("dependency_tree_select_node_color") ) {
+ QColor c = resMgr->colorValue( section, param, QColor( 237, 243, 58 ) );
+ setSelectNodeColor( c );
+ }
+ else if( param == QString("dependency_tree_arrow_color") ) {
+ QColor c = resMgr->colorValue( section, param, QColor( 0, 0, 130 ) );
+ setArrowColor( c );
+ }
+ else if( param == QString("dependency_tree_highlight_arrow_color") ) {
+ QColor c = resMgr->colorValue( section, param, QColor( 0, 0, 255 ) );
+ setHighlightArrowColor( c );
+ }
+ else if( param == QString("dependency_tree_select_arrow_color") ) {
+ QColor c = resMgr->colorValue( section, param, QColor( 255, 0, 0 ) );
+ setSelectArrowColor( c );
+ }
+}
+
+//=================================================================================
+// function : onRenameObject()
+// purpose : update object name, having edited it in Object Browser
+//=================================================================================
+void DependencyTree_View::onRenameObject( const QString& theEntry )
+{
+ DependencyTree_Object* object = getObjectByEntry( theEntry.toStdString() );
+ object->updateName();
+}
+
//=================================================================================
// function : parseTree()
// purpose : parse created model to initialize all nodes and arrows
int getStudyId() const;
DependencyTree_Object* getObjectByEntry( const std::string& );
- bool updateObjectName( const std::string& theEntry );
-
- void setHierarchyType( const int );
- void setNodesMovable( const bool );
- void setPrefBackgroundColor( const QColor& );
- void setNodeColor( const QColor& );
- void setMainNodeColor( const QColor& );
- void setSelectNodeColor( const QColor& );
- void setArrowColor( const QColor& );
- void setHighlightArrowColor( const QColor& );
- void setSelectArrowColor( const QColor& );
public slots:
void onUpdateModel();
void onMoveNodes( bool );
void onHierarchyType();
+ void onPreferenceChanged( const QString&, const QString& );
+ void onRenameObject( const QString& theEntry );
private:
void updateView();
void clearView( bool );
+ int checkMaxLevelsNumber();
+
void getNewTreeModel( bool = true, bool = true );
- int checkMaxLevelsNumber();
+ void setHierarchyType( const int );
+ void setNodesMovable( const bool );
+ void setPrefBackgroundColor( const QColor& );
+ void setNodeColor( const QColor& );
+ void setMainNodeColor( const QColor& );
+ void setUnpublishNodeColor( const QColor& );
+ void setSelectNodeColor( const QColor& );
+ void setArrowColor( const QColor& );
+ void setHighlightArrowColor( const QColor& );
+ void setSelectArrowColor( const QColor& );
GEOMUtils::TreeModel myTreeModel;
#include <SalomeApp_Study.h>
#include <LightApp_SelectionMgr.h>
#include <SALOME_ListIteratorOfListIO.hxx>
+#include <SALOME_ListIO.hxx>
#include <OCCViewer_ViewManager.h>
// GEOM includes
${PROJECT_SOURCE_DIR}/src/GEOMClient
${PROJECT_SOURCE_DIR}/src/GEOMImpl
${PROJECT_SOURCE_DIR}/src/GEOMUtils
- ${PROJECT_SOURCE_DIR}/src/DependencyTree
${CMAKE_CURRENT_SOURCE_DIR}
)
Material
GEOMImpl
GEOMUtils
- DependencyTree
${KERNEL_SALOMELocalTrace}
${KERNEL_SalomeDS}
${KERNEL_SalomeDSClient}
<source>PREF_DEPENDENCY_VIEW_MAIN_NODE_COLOR</source>
<translation>Main node color</translation>
</message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_UNPUBLISH_NODE_COLOR</source>
+ <translation>Unpublished node color</translation>
+ </message>
<message>
<source>PREF_DEPENDENCY_VIEW_SELECT_NODE_COLOR</source>
<translation>Selected node color</translation>
</message>
<message>
<source>PREF_DEPENDENCY_VIEW_ARROW_COLOR</source>
- <translation>Arrow color</translation>
+ <translation>Default arrow color</translation>
</message>
<message>
<source>PREF_DEPENDENCY_VIEW_HIGHLIGHT_ARROW_COLOR</source>
<source>GEOM_PREVIEW</source>
<translation>Prévisualiser</translation>
</message>
+ <message>
+ <source>PREF_TAB_DEPENDENCY_VIEW</source>
+ <translation type="unfinished">Dependency Tree</translation>
+ </message>
+ <message>
+ <source>PREF_HIERARCHY_TYPE</source>
+ <translation type="unfinished">Hierarchy type</translation>
+ </message>
+ <message>
+ <source>MEN_ONLY_ASCENDANTS</source>
+ <translation type="unfinished">Display only ascendants tree</translation>
+ </message>
+ <message>
+ <source>MEN_ONLY_DESCENDANTS</source>
+ <translation type="unfinished">Display only descendants tree</translation>
+ </message>
+ <message>
+ <source>MEN_BOTH_ASCENDANTS_DESCENDANTS</source>
+ <translation type="unfinished">Display both ascendants and descendants trees</translation>
+ </message>
+ <message>
+ <source>GEOM_MOVE_POSSIBILITY</source>
+ <translation type="unfinished">Possibility to move nodes</translation>
+ </message>
+ <message>
+ <source>PREF_GROUP_DEPENDENCY_VIEW_COLOR</source>
+ <translation type="unfinished">Color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_BACKGROUND_COLOR</source>
+ <translation type="unfinished">Background color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_NODE_COLOR</source>
+ <translation type="unfinished">Default node color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_MAIN_NODE_COLOR</source>
+ <translation type="unfinished">Main node color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_UNPUBLISH_NODE_COLOR</source>
+ <translation type="unfinished">Unpublished node color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_SELECT_NODE_COLOR</source>
+ <translation type="unfinished">Selected node color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_ARROW_COLOR</source>
+ <translation type="unfinished">Arrow color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_HIGHLIGHT_ARROW_COLOR</source>
+ <translation type="unfinished">Highlighted arrow color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_SELECT_ARROW_COLOR</source>
+ <translation type="unfinished">Selected arrow color</translation>
+ </message>
<message>
<source>GEOM_ALL_IMPORT_FILES</source>
<translation>Tous les formats supportés ( %1 )</translation>
<source>GEOM_PREVIEW</source>
<translation>プレビュー</translation>
</message>
+ <message>
+ <source>PREF_TAB_DEPENDENCY_VIEW</source>
+ <translation type="unfinished">Dependency Tree</translation>
+ </message>
+ <message>
+ <source>PREF_HIERARCHY_TYPE</source>
+ <translation type="unfinished">Hierarchy type</translation>
+ </message>
+ <message>
+ <source>MEN_ONLY_ASCENDANTS</source>
+ <translation type="unfinished">Display only ascendants tree</translation>
+ </message>
+ <message>
+ <source>MEN_ONLY_DESCENDANTS</source>
+ <translation type="unfinished">Display only descendants tree</translation>
+ </message>
+ <message>
+ <source>MEN_BOTH_ASCENDANTS_DESCENDANTS</source>
+ <translation type="unfinished">Display both ascendants and descendants trees</translation>
+ </message>
+ <message>
+ <source>GEOM_MOVE_POSSIBILITY</source>
+ <translation type="unfinished">Possibility to move nodes</translation>
+ </message>
+ <message>
+ <source>PREF_GROUP_DEPENDENCY_VIEW_COLOR</source>
+ <translation type="unfinished">Color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_BACKGROUND_COLOR</source>
+ <translation type="unfinished">Background color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_NODE_COLOR</source>
+ <translation type="unfinished">Default node color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_MAIN_NODE_COLOR</source>
+ <translation type="unfinished">Main node color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_UNPUBLISH_NODE_COLOR</source>
+ <translation type="unfinished">Unpublished node color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_SELECT_NODE_COLOR</source>
+ <translation type="unfinished">Selected node color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_ARROW_COLOR</source>
+ <translation type="unfinished">Arrow color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_HIGHLIGHT_ARROW_COLOR</source>
+ <translation type="unfinished">Highlighted arrow color</translation>
+ </message>
+ <message>
+ <source>PREF_DEPENDENCY_VIEW_SELECT_ARROW_COLOR</source>
+ <translation type="unfinished">Selected arrow color</translation>
+ </message>
<message>
<source>GEOM_ALL_IMPORT_FILES</source>
<translation>サポートされているすべての形式 (%1)</translation>
#include <LightApp_DataObject.h>
#include <LightApp_Preferences.h>
-#include <GraphicsView_Viewer.h>
-#include <DependencyTree_View.h>
-#include <DependencyTree_ViewModel.h>
-
#include <SALOME_LifeCycleCORBA.hxx>
// #include <SALOME_ListIO.hxx>
#include <SALOME_ListIteratorOfListIO.hxx>
int DependencyViewId = addPreference( tr( "PREF_TAB_DEPENDENCY_VIEW" ) );
- int hierarchy_type = addPreference( tr( "PREF_HIERARCHY_TYPE" ), DependencyViewId,
+ int treeGeneralGroup = addPreference( tr( "PREF_GROUP_GENERAL" ), DependencyViewId );
+
+ int hierarchy_type = addPreference( tr( "PREF_HIERARCHY_TYPE" ), treeGeneralGroup,
LightApp_Preferences::Selector, "Geometry", "dependency_tree_hierarchy_type" );
QStringList aHierarchyTypeList;
setPreferenceProperty( hierarchy_type, "strings", aHierarchyTypeList );
setPreferenceProperty( hierarchy_type, "indexes", aHierarchyTypeIndexesList );
- addPreference( tr( "GEOM_MOVE_POSSIBILITY" ), DependencyViewId,
+ addPreference( tr( "GEOM_MOVE_POSSIBILITY" ), treeGeneralGroup,
LightApp_Preferences::Bool, "Geometry", "dependency_tree_move_nodes" );
int treeColorGroup = addPreference( tr( "PREF_GROUP_DEPENDENCY_VIEW_COLOR" ), DependencyViewId );
LightApp_Preferences::Color, "Geometry", "dependency_tree_node_color" );
addPreference( tr( "PREF_DEPENDENCY_VIEW_MAIN_NODE_COLOR"), treeColorGroup,
LightApp_Preferences::Color, "Geometry", "dependency_tree_main_node_color" );
+ addPreference( tr( "PREF_DEPENDENCY_VIEW_UNPUBLISH_NODE_COLOR"), treeColorGroup,
+ LightApp_Preferences::Color, "Geometry", "dependency_tree_unpublish_node_color" );
addPreference( tr( "PREF_DEPENDENCY_VIEW_SELECT_NODE_COLOR"), treeColorGroup,
LightApp_Preferences::Color, "Geometry", "dependency_tree_select_node_color" );
aDisplayer.UpdateViewer();
}
else if ( param.startsWith( "dependency_tree") )
- {
- SalomeApp_Application* app = getApp();
- if ( !app ) return;
-
- SUIT_ViewManager *svm = app->getViewManager( GraphicsView_Viewer::Type(), false );
- if( !svm ) return;
-
- if( DependencyTree_ViewModel* viewModel = dynamic_cast<DependencyTree_ViewModel*>( svm->getViewModel() ) )
- if( DependencyTree_View* view = dynamic_cast<DependencyTree_View*>( viewModel->getActiveViewPort() ) ) {
- if( param == QString("dependency_tree_hierarchy_type") ) {
- int hierarchyType = aResourceMgr->integerValue( section, param, 0);
- view->setHierarchyType( hierarchyType );
- }
- else if( param == QString("dependency_tree_move_nodes") ) {
- bool isNodesMovable = aResourceMgr->booleanValue( section, param, true);
- view->setNodesMovable( isNodesMovable );
- }
- else if( param == QString("dependency_tree_background_color") ) {
- QColor c = aResourceMgr->colorValue( section, param, QColor( 255, 255, 255 ) );
- view->setPrefBackgroundColor( c );
- }
- else if( param == QString("dependency_tree_node_color") ) {
- QColor c = aResourceMgr->colorValue( section, param, QColor( 62, 180, 238 ) );
- view->setNodeColor( c );
- }
- else if( param == QString("dependency_tree_main_node_color") ) {
- QColor c = aResourceMgr->colorValue( section, param, QColor( 238, 90, 125 ) );
- view->setMainNodeColor( c );
- }
- else if( param == QString("dependency_tree_select_node_color") ) {
- QColor c = aResourceMgr->colorValue( section, param, QColor( 237, 243, 58 ) );
- view->setSelectNodeColor( c );
- }
- else if( param == QString("dependency_tree_arrow_color") ) {
- QColor c = aResourceMgr->colorValue( section, param, QColor( 0, 0, 130 ) );
- view->setArrowColor( c );
- }
- else if( param == QString("dependency_tree_highlight_arrow_color") ) {
- QColor c = aResourceMgr->colorValue( section, param, QColor( 0, 0, 255 ) );
- view->setHighlightArrowColor( c );
- }
- else if( param == QString("dependency_tree_select_arrow_color") ) {
- QColor c = aResourceMgr->colorValue( section, param, QColor( 255, 0, 0 ) );
- view->setSelectArrowColor( c );
- }
-
- }
- }
+ emit SignalDependencyTreeParamChanged( section, param );
}
}
GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(obj));
if (!CORBA::is_nil(anObj)) {
anObj->SetName( name.toLatin1().data() ); // Rename the corresponding GEOM_Object
- // rename the given object in the dependency tree
- if ( SUIT_ViewManager *svm = app->getViewManager( GraphicsView_Viewer::Type(), false ) )
- if ( DependencyTree_ViewModel* viewModel = dynamic_cast<DependencyTree_ViewModel*>( svm->getViewModel() ) )
- if ( DependencyTree_View* view = dynamic_cast<DependencyTree_View*>( viewModel->getActiveViewPort() ) )
- view->updateObjectName( anObj->GetEntry() );
+ emit SignalDependencyTreeRenameObject( anObj->GetEntry() );
}
result = true;
}
void SignalDeactivateActiveDialog();
void SignalCloseAllDialogs();
void SignalDefaultStepValueChanged( double newVal );
+ void SignalDependencyTreeParamChanged( const QString&, const QString& );
+ void SignalDependencyTreeRenameObject( const QString& );
protected:
virtual LightApp_Selection* createSelection() const;