From 5f18f8efcd391b34929a077a96009990028b896f Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 12 Feb 2016 14:20:23 +0300 Subject: [PATCH] Merge relevant changes from V8_0_0_BR branch --- SalomeHEXABLOCKConfig.cmake.in | 48 ++++++++++--------- doc/conf.py.in | 2 +- src/HEXABLOCKGUI/HEXABLOCKGUI.cxx | 4 +- src/HEXABLOCKGUI/HEXABLOCKGUI.hxx | 1 + .../HEXABLOCKGUI_DocumentItem.cxx | 2 +- .../HEXABLOCKGUI_DocumentPanel.cxx | 3 +- .../HEXABLOCKGUI_DocumentSelectionModel.cxx | 16 +++---- src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.cxx | 12 ++--- src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.hxx | 39 ++++++++------- .../HEXABLOCKGUI_VtkDocumentGraphicView.cxx | 2 + src/HEXABLOCKGUI/MyBasicGUI_PointDlg.cxx | 11 +++-- src/HEXABLOCKGUI/klinkitemselectionmodel.cxx | 2 +- src/HEXABLOCKGUI/klinkitemselectionmodel.hxx | 6 +-- src/HEXABLOCKGUI/kmodelindexproxymapper.cxx | 8 ++-- 14 files changed, 82 insertions(+), 74 deletions(-) diff --git a/SalomeHEXABLOCKConfig.cmake.in b/SalomeHEXABLOCKConfig.cmake.in index cf0d9a7..9e04c28 100644 --- a/SalomeHEXABLOCKConfig.cmake.in +++ b/SalomeHEXABLOCKConfig.cmake.in @@ -56,32 +56,34 @@ SET(SALOME_HEXABLOCK_BUILD_GUI @SALOME_BUILD_GUI@) # Level 1 prerequisites: SET_AND_CHECK(GEOM_ROOT_DIR_EXP "@PACKAGE_GEOM_ROOT_DIR@") -# For all prerequisites, load the corresponding targets if the package was used +# For all prerequisites, load the corresponding targets if the package was used # in CONFIG mode. This ensures dependent projects link correctly # without having to set LD_LIBRARY_PATH: -SET(_PREREQ @_PREREQ_LIST@) -SET(_PREREQ_CONFIG_DIR @_PREREQ_DIR_LIST@) -SET(_PREREQ_COMPONENTS "@_PREREQ_COMPO_LIST@") -LIST(LENGTH _PREREQ_CONFIG_DIR _list_len) -IF(NOT _list_len EQUAL 0) +SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@) +SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@) +SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@") +LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@) +IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0) # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ... - MATH(EXPR _range "${_list_len}-1") - FOREACH(_p RANGE ${_range}) - LIST(GET _PREREQ ${_p} _pkg ) - LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir) - LIST(GET _PREREQ_COMPONENTS ${_p} _pkg_compo) - MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...") - IF(NOT _pkg_compo) - FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE - PATHS "${_pkg_dir}" - NO_DEFAULT_PATH) - ELSE() - STRING(REPLACE "," ";" _compo_lst "${_pkg_compo}") - MESSAGE(STATUS "===> (components: ${_pkg_compo})") - FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE - COMPONENTS ${_compo_lst} - PATHS "${_pkg_dir}" - NO_DEFAULT_PATH) + MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1") + FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@}) + LIST(GET _PREREQ_@PROJECT_NAME@ ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@ ) + LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@) + LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@) + IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@}) + MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...") + IF(NOT _pkg_compo_@PROJECT_NAME@) + FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE + PATHS "${_pkg_dir_@PROJECT_NAME@}" + NO_DEFAULT_PATH) + ELSE() + STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}") + MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})") + FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE + COMPONENTS ${_compo_lst_@PROJECT_NAME@} + PATHS "${_pkg_dir_@PROJECT_NAME@}" + NO_DEFAULT_PATH) + ENDIF() ENDIF() ENDFOREACH() ENDIF() diff --git a/doc/conf.py.in b/doc/conf.py.in index f4564a2..d142090 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -105,7 +105,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = 'default' +html_theme = '@SPHINX_THEME@' # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx index 63692c5..f7f508b 100755 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx @@ -21,10 +21,12 @@ #include - +#include #include #include #include +#include +#include #include #include diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI.hxx index e0c6e37..13f9617 100755 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI.hxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI.hxx @@ -45,6 +45,7 @@ #include "HEXABLOCKGUI_OCCSelector.h" #include "hexa_base.hxx" +class QDir; // #include CORBA_CLIENT_HEADER(HEXABLOCK_Gen) // Abu Juin 2013 diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentItem.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentItem.cxx index 4cd0be4..9e95e85 100755 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentItem.cxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentItem.cxx @@ -42,7 +42,7 @@ QStandardItem() { setText(m_DocElt->getName()); if ( m_DocElt->isAssociated() ) - setData(Qt::darkGreen, Qt::ForegroundRole); + setData(QColor(Qt::darkGreen), Qt::ForegroundRole); } setData( treeRole, HEXA_TREE_ROLE ); setData( entry, HEXA_DOC_ENTRY_ROLE); diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx index 76cfb96..9ec2dd2 100755 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx @@ -25,8 +25,9 @@ #include "Hex.hxx" #include -#include #include +#include +#include #include #include diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.cxx index c8958c6..0b9a14c 100755 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.cxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.cxx @@ -326,8 +326,8 @@ void PatternDataSelectionModel::highlightTreeItems(QModelIndexList& indexes, { if (anItemIndex.isValid()) { - theModel->setData(anItemIndex, fgColor, Qt::ForegroundRole); - theModel->setData(anItemIndex, bgColor, Qt::BackgroundRole); + theModel->setData(anItemIndex, QColor(fgColor), Qt::ForegroundRole); + theModel->setData(anItemIndex, QColor(bgColor), Qt::BackgroundRole); currentHighlightedItems << anItemIndex; } } @@ -350,8 +350,8 @@ void PatternDataSelectionModel::unhighlightTreeItems(bool clearSelected) { if (anItemIndex.isValid()) { - theModel->setData(anItemIndex, Qt::darkGreen, Qt::ForegroundRole); - theModel->setData(anItemIndex, Qt::white, Qt::BackgroundRole); + theModel->setData(anItemIndex, QColor(Qt::darkGreen), Qt::ForegroundRole); + theModel->setData(anItemIndex, QColor(Qt::white), Qt::BackgroundRole); } } currentHighlightedItems.clear(); @@ -591,8 +591,8 @@ void PatternGeomSelectionModel::highlightTreeItems(QModelIndexList& indexes, { if (anItemIndex.isValid()) { - theModel->setData(anItemIndex, fgColor, Qt::ForegroundRole); - theModel->setData(anItemIndex, bgColor, Qt::BackgroundRole); + theModel->setData(anItemIndex, QColor(fgColor), Qt::ForegroundRole); + theModel->setData(anItemIndex, QColor(bgColor), Qt::BackgroundRole); currentHighlightedItems << anItemIndex; } } @@ -614,8 +614,8 @@ void PatternGeomSelectionModel::unhighlightTreeItems(bool clearSelected) { if (anItemIndex.isValid()) { - theModel->setData(anItemIndex, Qt::darkGreen, Qt::ForegroundRole); - theModel->setData(anItemIndex, Qt::white, Qt::BackgroundRole); + theModel->setData(anItemIndex, QColor(Qt::darkGreen), Qt::ForegroundRole); + theModel->setData(anItemIndex, QColor(Qt::white), Qt::BackgroundRole); } } currentHighlightedItems.clear(); diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.cxx index 36629d1..7a62602 100755 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.cxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.cxx @@ -55,11 +55,11 @@ bool HEXABLOCKGUI_Resource::booleanValue(const QString& name, const bool def) co return _resource->booleanValue(RESOURCE_HEXABLOCK, name, def); } -QFont HEXABLOCKGUI_Resource::fontValue(const QString& name, const QFont def) const { +QFont HEXABLOCKGUI_Resource::fontValue(const QString& name, const QFont& def) const { return _resource->fontValue(RESOURCE_HEXABLOCK, name, def); } -QColor HEXABLOCKGUI_Resource::colorValue(const QString& name, const QColor def) const { +QColor HEXABLOCKGUI_Resource::colorValue(const QString& name, const QColor& def) const { return _resource->colorValue(RESOURCE_HEXABLOCK, name, def); } @@ -74,7 +74,7 @@ QColor HEXABLOCKGUI_Resource::colorValue(const QString& name, const int h, const return colorValue(name, col); } -QString HEXABLOCKGUI_Resource::stringValue(const QString& name, const QString def) const { +QString HEXABLOCKGUI_Resource::stringValue(const QString& name, const QString& def) const { return _resource->stringValue(RESOURCE_HEXABLOCK, name, def); } @@ -93,15 +93,15 @@ void HEXABLOCKGUI_Resource::setValue( const QString& name, const bool val ) { _resource->setValue(RESOURCE_HEXABLOCK, name, val); } -void HEXABLOCKGUI_Resource::setValue( const QString& name, const QFont val ) { +void HEXABLOCKGUI_Resource::setValue( const QString& name, const QFont& val ) { _resource->setValue(RESOURCE_HEXABLOCK, name, val); } -void HEXABLOCKGUI_Resource::setValue( const QString& name, const QColor val ) { +void HEXABLOCKGUI_Resource::setValue( const QString& name, const QColor& val ) { _resource->setValue(RESOURCE_HEXABLOCK, name, val); } -void HEXABLOCKGUI_Resource::setValue( const QString& name, const QString val ) { +void HEXABLOCKGUI_Resource::setValue( const QString& name, const QString& val ) { _resource->setValue(RESOURCE_HEXABLOCK, name, val); } diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.hxx index 5f790da..79f8e33 100755 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.hxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.hxx @@ -20,15 +20,15 @@ #ifndef _HEXABLOCKGUI_RESOURCE_HXX_ #define _HEXABLOCKGUI_RESOURCE_HXX_ -#include "HEXABLOCKGUI_Export.hxx" +#include +#include +#include -#include +#include "HEXABLOCKGUI_Export.hxx" class HEXABLOCKGUI; class SUIT_ResourceMgr; - - class HEXABLOCK_EXPORT HEXABLOCKGUI_Resource { public: @@ -38,25 +38,24 @@ class HEXABLOCK_EXPORT HEXABLOCKGUI_Resource virtual void preferencesChanged(); protected: - int integerValue( const QString& name, const int def = 0 ) const; - double doubleValue ( const QString& name, const double def = 0 ) const; - bool booleanValue( const QString& name, const bool def = false ) const; - QFont fontValue ( const QString& name, const QFont def = QFont() ) const; - QColor colorValue ( const QString& name, const QColor def = QColor() ) const; - QColor colorValue ( const QString& name, const Qt::GlobalColor c ) const; - QColor colorValue ( const QString& name, const int h, const int s, const int v) const; - QString stringValue ( const QString& name, const QString def = QString() ) const; - - void setValue( const QString& name, const int val ); - void setValue( const QString& name, const double val ); - void setValue( const QString& name, const bool val ); - void setValue( const QString& name, const QFont val ); - void setValue( const QString& name, const QColor val ); - void setValue( const QString& name, const QString val ); + int integerValue( const QString& name, const int def = 0 ) const; + double doubleValue ( const QString& name, const double def = 0 ) const; + bool booleanValue( const QString& name, const bool def = false ) const; + QFont fontValue ( const QString& name, const QFont& def = QFont() ) const; + QColor colorValue ( const QString& name, const QColor& def = QColor() ) const; + QColor colorValue ( const QString& name, const Qt::GlobalColor c ) const; + QColor colorValue ( const QString& name, const int h, const int s, const int v ) const; + QString stringValue ( const QString& name, const QString& def = QString() ) const; + + void setValue( const QString& name, const int val ); + void setValue( const QString& name, const double val ); + void setValue( const QString& name, const bool val ); + void setValue( const QString& name, const QFont& val ); + void setValue( const QString& name, const QColor& val ); + void setValue( const QString& name, const QString& val ); protected: SUIT_ResourceMgr* _resource; - }; diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_VtkDocumentGraphicView.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_VtkDocumentGraphicView.cxx index 4882a13..66be6ed 100755 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI_VtkDocumentGraphicView.cxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI_VtkDocumentGraphicView.cxx @@ -33,6 +33,8 @@ #include "HEXABLOCKGUI_VtkDocumentGraphicView.hxx" #include "HEXABLOCKGUI.hxx" +#include + #ifndef M_PI #define M_PI 3.1415927 #endif diff --git a/src/HEXABLOCKGUI/MyBasicGUI_PointDlg.cxx b/src/HEXABLOCKGUI/MyBasicGUI_PointDlg.cxx index eb1e5db..0ab5dc2 100644 --- a/src/HEXABLOCKGUI/MyBasicGUI_PointDlg.cxx +++ b/src/HEXABLOCKGUI/MyBasicGUI_PointDlg.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -968,13 +969,13 @@ void MyBasicGUI_PointDlg::updateParamCoord(bool theIsUpdate) } } else if (id == GEOM_POINT_SURF) { - GroupOnSurface->TextLabel2->setShown(isParam); - GroupOnSurface->TextLabel3->setShown(isParam); - GroupOnSurface->SpinBox_DX->setShown(isParam); - GroupOnSurface->SpinBox_DY->setShown(isParam); + GroupOnSurface->TextLabel2->setVisible(isParam); + GroupOnSurface->TextLabel3->setVisible(isParam); + GroupOnSurface->SpinBox_DX->setVisible(isParam); + GroupOnSurface->SpinBox_DY->setVisible(isParam); } - GroupXYZ->setShown(!isParam && !isLength); + GroupXYZ->setVisible(!isParam && !isLength); } //================================================================================= diff --git a/src/HEXABLOCKGUI/klinkitemselectionmodel.cxx b/src/HEXABLOCKGUI/klinkitemselectionmodel.cxx index 8304b3d..6b3e774 100644 --- a/src/HEXABLOCKGUI/klinkitemselectionmodel.cxx +++ b/src/HEXABLOCKGUI/klinkitemselectionmodel.cxx @@ -19,7 +19,7 @@ 02110-1301, USA. */ -#include +#include #include "klinkitemselectionmodel.hxx" // #include "klinkitemselectionmodel_p.hxx" diff --git a/src/HEXABLOCKGUI/klinkitemselectionmodel.hxx b/src/HEXABLOCKGUI/klinkitemselectionmodel.hxx index 6172392..97f775b 100644 --- a/src/HEXABLOCKGUI/klinkitemselectionmodel.hxx +++ b/src/HEXABLOCKGUI/klinkitemselectionmodel.hxx @@ -24,9 +24,9 @@ #include "HEXABLOCKGUI_Export.hxx" -#include -#include -#include +#include +#include +#include #include diff --git a/src/HEXABLOCKGUI/kmodelindexproxymapper.cxx b/src/HEXABLOCKGUI/kmodelindexproxymapper.cxx index a215ae0..750d1fc 100644 --- a/src/HEXABLOCKGUI/kmodelindexproxymapper.cxx +++ b/src/HEXABLOCKGUI/kmodelindexproxymapper.cxx @@ -21,10 +21,10 @@ #include "kmodelindexproxymapper.hxx" -#include -#include -#include -#include +#include +#include +#include +#include // #include "kdebug.h" -- 2.39.2