mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 17:30:35 +05:00
CMake improvement: usage of SALOME_GUI_MODE() macro
This commit is contained in:
parent
1839b501d4
commit
0a9a0010a0
@ -108,7 +108,9 @@ IF(SALOME_BUILD_GUI)
|
|||||||
IF(EXISTS ${GUI_ROOT_DIR})
|
IF(EXISTS ${GUI_ROOT_DIR})
|
||||||
LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
|
LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
|
||||||
FIND_PACKAGE(SalomeGUI)
|
FIND_PACKAGE(SalomeGUI)
|
||||||
FULL_GUI(TRUE) #check whether GUI builded in full mode and with CORBA
|
SALOME_GUI_WITH_CORBA() #check whether GUI builded with CORBA
|
||||||
|
SALOME_GUI_MODE(SALOME_USE_OCCVIEWER SALOME_USE_VTKVIEWER SALOME_USE_SALOMEOBJECT
|
||||||
|
OPTIONAL SALOME_USE_PLOT2DVIEWER SALOME_USE_GRAPHICSVIEW SALOME_USE_PYCONSOLE)
|
||||||
ADD_DEFINITIONS(${GUI_DEFINITIONS})
|
ADD_DEFINITIONS(${GUI_DEFINITIONS})
|
||||||
INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
|
INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
|
||||||
ELSE(EXISTS ${GUI_ROOT_DIR})
|
ELSE(EXISTS ${GUI_ROOT_DIR})
|
||||||
@ -125,12 +127,6 @@ IF(SALOME_BUILD_GUI)
|
|||||||
|
|
||||||
# Qt4
|
# Qt4
|
||||||
FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml)
|
FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml)
|
||||||
|
|
||||||
# Optional prerequisites for GUI
|
|
||||||
IF(SALOME_USE_GLVIEWER)
|
|
||||||
FIND_PACKAGE(SalomeOpenGL)
|
|
||||||
SALOME_LOG_OPTIONAL_PACKAGE(OpenGL SALOME_USE_GLVIEWER)
|
|
||||||
ENDIF()
|
|
||||||
ENDIF(SALOME_BUILD_GUI)
|
ENDIF(SALOME_BUILD_GUI)
|
||||||
|
|
||||||
##
|
##
|
||||||
@ -231,9 +227,12 @@ IF(SALOME_BUILD_GUI)
|
|||||||
LIST(APPEND _${PROJECT_NAME}_exposed_targets
|
LIST(APPEND _${PROJECT_NAME}_exposed_targets
|
||||||
AdvancedGUI BasicGUI BlocksGUI BooleanGUI BuildGUI DisplayGUI DlgRef CurveCreator EntityGUI GEOMBase
|
AdvancedGUI BasicGUI BlocksGUI BooleanGUI BuildGUI DisplayGUI DlgRef CurveCreator EntityGUI GEOMBase
|
||||||
GEOMFiltersSelection GEOM GEOMToolsGUI GenerationGUI GroupGUI Material MeasureGUI GEOMObject
|
GEOMFiltersSelection GEOM GEOMToolsGUI GenerationGUI GroupGUI Material MeasureGUI GEOMObject
|
||||||
OperationGUI PrimitiveGUI RepairGUI TransformationGUI DependencyTree
|
OperationGUI PrimitiveGUI RepairGUI TransformationGUI
|
||||||
STLPluginGUI BREPPluginGUI STEPPluginGUI IGESPluginGUI XAOPluginGUI VTKPluginGUI
|
STLPluginGUI BREPPluginGUI STEPPluginGUI IGESPluginGUI XAOPluginGUI VTKPluginGUI
|
||||||
)
|
)
|
||||||
|
IF(SALOME_USE_GRAPHICSVIEW)
|
||||||
|
LIST(APPEND _${PROJECT_NAME}_exposed_targets DependencyTree)
|
||||||
|
ENDIF(SALOME_USE_GRAPHICSVIEW)
|
||||||
ENDIF(SALOME_BUILD_GUI)
|
ENDIF(SALOME_BUILD_GUI)
|
||||||
|
|
||||||
IF(SALOME_GEOM_USE_OPENCV)
|
IF(SALOME_GEOM_USE_OPENCV)
|
||||||
|
@ -28,6 +28,8 @@ It is also possible to select an object(s) directly in the "Dependency Tree" vie
|
|||||||
|
|
||||||
All necessary parameters of Dependency Tree Viewer can be edited in the \ref pref_dependency_tree "Preferences".
|
All necessary parameters of Dependency Tree Viewer can be edited in the \ref pref_dependency_tree "Preferences".
|
||||||
|
|
||||||
|
\note This functionality is available only if GUI module is builded with Graphics view (set option SALOME_USE_GRAPHICSVIEW to ON when building GUI module).
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
\anchor dependency_tree_nodes_anchor <h2>Nodes</h2>
|
\anchor dependency_tree_nodes_anchor <h2>Nodes</h2>
|
||||||
|
|
||||||
|
@ -25,4 +25,6 @@ In this dialog:
|
|||||||
|
|
||||||
- Close dialog box, by pressing <b>Close</b> button.
|
- Close dialog box, by pressing <b>Close</b> button.
|
||||||
|
|
||||||
|
\note This functionality is available only if GUI module is builded with Plot 2D Viewer (set option SALOME_USE_PLOT2DVIEWER to ON when building GUI module).
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -42,11 +42,14 @@ ENDIF()
|
|||||||
IF(SALOME_BUILD_GUI)
|
IF(SALOME_BUILD_GUI)
|
||||||
SET(SUBDIRS_GUI
|
SET(SUBDIRS_GUI
|
||||||
OBJECT DlgRef GEOMFiltersSelection Material GEOMGUI
|
OBJECT DlgRef GEOMFiltersSelection Material GEOMGUI
|
||||||
GEOMBase DependencyTree GEOMToolsGUI DisplayGUI BasicGUI PrimitiveGUI GenerationGUI
|
GEOMBase GEOMToolsGUI DisplayGUI BasicGUI PrimitiveGUI GenerationGUI
|
||||||
CurveCreator MeasureGUI EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI
|
CurveCreator MeasureGUI EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI
|
||||||
RepairGUI GroupGUI BlocksGUI AdvancedGUI
|
RepairGUI GroupGUI BlocksGUI AdvancedGUI
|
||||||
GEOM_SWIG_WITHIHM
|
GEOM_SWIG_WITHIHM
|
||||||
)
|
)
|
||||||
|
IF(SALOME_USE_GRAPHICSVIEW)
|
||||||
|
LIST(APPEND SUBDIRS_GUI DependencyTree)
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
SET(SUBDIRS
|
SET(SUBDIRS
|
||||||
|
@ -30,7 +30,9 @@
|
|||||||
#include <GeometryGUI.h>
|
#include <GeometryGUI.h>
|
||||||
#include <GEOMBase.h>
|
#include <GEOMBase.h>
|
||||||
#include <GEOMUtils.hxx>
|
#include <GEOMUtils.hxx>
|
||||||
#include <MeasureGUI_ShapeStatisticsDlg.h>
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
|
#include <MeasureGUI_ShapeStatisticsDlg.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <OCCViewer_ViewModel.h>
|
#include <OCCViewer_ViewModel.h>
|
||||||
#include <SVTK_ViewModel.h>
|
#include <SVTK_ViewModel.h>
|
||||||
@ -166,7 +168,9 @@ EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(GeometryGUI* theGeometryGUI, QWidge
|
|||||||
myLessFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
|
myLessFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
|
||||||
myGreaterFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
|
myGreaterFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
|
||||||
myApplyFilterButton = new QPushButton(tr("GEOM_BUT_APPLY"), myFilterGrp);
|
myApplyFilterButton = new QPushButton(tr("GEOM_BUT_APPLY"), myFilterGrp);
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
myPlotDistributionButton = new QPushButton(tr("GEOM_PLOT_DISTRIBUTION"), myFilterGrp);
|
myPlotDistributionButton = new QPushButton(tr("GEOM_PLOT_DISTRIBUTION"), myFilterGrp);
|
||||||
|
#endif
|
||||||
|
|
||||||
QGridLayout* filterLayout = new QGridLayout(myFilterGrp);
|
QGridLayout* filterLayout = new QGridLayout(myFilterGrp);
|
||||||
filterLayout->addWidget(myLessFilterCheck, 0, 0);
|
filterLayout->addWidget(myLessFilterCheck, 0, 0);
|
||||||
@ -176,7 +180,9 @@ EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(GeometryGUI* theGeometryGUI, QWidge
|
|||||||
filterLayout->addWidget(myGreaterFilterCombo, 1, 1);
|
filterLayout->addWidget(myGreaterFilterCombo, 1, 1);
|
||||||
filterLayout->addWidget(myGreaterFilterSpin, 1, 2);
|
filterLayout->addWidget(myGreaterFilterSpin, 1, 2);
|
||||||
filterLayout->addWidget(myApplyFilterButton, 0, 3);
|
filterLayout->addWidget(myApplyFilterButton, 0, 3);
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
filterLayout->addWidget(myPlotDistributionButton, 1, 3);
|
filterLayout->addWidget(myPlotDistributionButton, 1, 3);
|
||||||
|
#endif
|
||||||
|
|
||||||
QVBoxLayout* layout = new QVBoxLayout(centralWidget());
|
QVBoxLayout* layout = new QVBoxLayout(centralWidget());
|
||||||
layout->setMargin(0); layout->setSpacing(6);
|
layout->setMargin(0); layout->setSpacing(6);
|
||||||
@ -253,7 +259,9 @@ void EntityGUI_SubShapeDlg::Init()
|
|||||||
connect(GroupPoints->PushButton4, SIGNAL(clicked()), this, SLOT(showOnlySelected()));
|
connect(GroupPoints->PushButton4, SIGNAL(clicked()), this, SLOT(showOnlySelected()));
|
||||||
|
|
||||||
connect(myApplyFilterButton, SIGNAL(clicked()), this, SLOT(ClickOnOkFilter()));
|
connect(myApplyFilterButton, SIGNAL(clicked()), this, SLOT(ClickOnOkFilter()));
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
connect(myPlotDistributionButton, SIGNAL(clicked()), this, SLOT(ClickOnPlot()));
|
connect(myPlotDistributionButton, SIGNAL(clicked()), this, SLOT(ClickOnPlot()));
|
||||||
|
#endif
|
||||||
connect(myLessFilterCheck, SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
|
connect(myLessFilterCheck, SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
|
||||||
connect(myGreaterFilterCheck, SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
|
connect(myGreaterFilterCheck, SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
|
||||||
|
|
||||||
@ -495,10 +503,12 @@ void EntityGUI_SubShapeDlg::SubShapeToggled()
|
|||||||
GroupPoints->CheckButton1->isChecked() &&
|
GroupPoints->CheckButton1->isChecked() &&
|
||||||
shapeType() < GEOM::VERTEX);
|
shapeType() < GEOM::VERTEX);
|
||||||
|
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
myPlotDistributionButton->setEnabled( myFilterGrp->isEnabled() &&
|
myPlotDistributionButton->setEnabled( myFilterGrp->isEnabled() &&
|
||||||
( shapeType() == TopAbs_EDGE ||
|
( shapeType() == TopAbs_EDGE ||
|
||||||
shapeType() == TopAbs_FACE ||
|
shapeType() == TopAbs_FACE ||
|
||||||
shapeType() == TopAbs_SOLID ) );
|
shapeType() == TopAbs_SOLID ) );
|
||||||
|
#endif
|
||||||
|
|
||||||
activateSelection();
|
activateSelection();
|
||||||
}
|
}
|
||||||
@ -945,6 +955,7 @@ void EntityGUI_SubShapeDlg::ClickOnOkFilter()
|
|||||||
updateButtonState();
|
updateButtonState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : ClickOnPlot()
|
// function : ClickOnPlot()
|
||||||
// purpose : opens "Shape Statistics" dialog box in order to plot sub-shapes distribution.
|
// purpose : opens "Shape Statistics" dialog box in order to plot sub-shapes distribution.
|
||||||
@ -956,6 +967,7 @@ void EntityGUI_SubShapeDlg::ClickOnPlot()
|
|||||||
dlg->show();
|
dlg->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : MeasureToggled()
|
// function : MeasureToggled()
|
||||||
|
@ -73,7 +73,9 @@ private slots:
|
|||||||
|
|
||||||
void showOnlySelected();
|
void showOnlySelected();
|
||||||
void ClickOnOkFilter();
|
void ClickOnOkFilter();
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
void ClickOnPlot();
|
void ClickOnPlot();
|
||||||
|
#endif
|
||||||
void MeasureToggled();
|
void MeasureToggled();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -51,8 +51,6 @@
|
|||||||
#include <SUIT_Session.h>
|
#include <SUIT_Session.h>
|
||||||
#include <SUIT_ViewManager.h>
|
#include <SUIT_ViewManager.h>
|
||||||
|
|
||||||
#include <PyInterp_Interp.h>
|
|
||||||
|
|
||||||
#include <OCCViewer_ViewWindow.h>
|
#include <OCCViewer_ViewWindow.h>
|
||||||
#include <OCCViewer_ViewPort3d.h>
|
#include <OCCViewer_ViewPort3d.h>
|
||||||
#include <OCCViewer_ViewModel.h>
|
#include <OCCViewer_ViewModel.h>
|
||||||
@ -66,7 +64,9 @@
|
|||||||
#include <SVTK_InteractorStyle.h>
|
#include <SVTK_InteractorStyle.h>
|
||||||
#include <SVTK_ViewModel.h>
|
#include <SVTK_ViewModel.h>
|
||||||
|
|
||||||
|
#ifndef DISABLE_GRAPHICSVIEW
|
||||||
#include <GraphicsView_Viewer.h>
|
#include <GraphicsView_Viewer.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <SalomeApp_Application.h>
|
#include <SalomeApp_Application.h>
|
||||||
#include <SalomeApp_DataObject.h>
|
#include <SalomeApp_DataObject.h>
|
||||||
@ -438,7 +438,11 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
|
|||||||
SUIT_ViewWindow* window = desk->activeWindow();
|
SUIT_ViewWindow* window = desk->activeWindow();
|
||||||
bool ViewOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
|
bool ViewOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
|
||||||
bool ViewVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
|
bool ViewVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
|
||||||
|
#ifndef DISABLE_GRAPHICSVIEW
|
||||||
bool ViewDep = ( window && window->getViewManager()->getType() == GraphicsView_Viewer::Type() );
|
bool ViewDep = ( window && window->getViewManager()->getType() == GraphicsView_Viewer::Type() );
|
||||||
|
#else
|
||||||
|
bool ViewDep = 0;
|
||||||
|
#endif
|
||||||
// if current viewframe is not of OCC and not of VTK type - return immediately
|
// if current viewframe is not of OCC and not of VTK type - return immediately
|
||||||
// fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example)
|
// fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example)
|
||||||
QList<int> NotViewerDependentCommands;
|
QList<int> NotViewerDependentCommands;
|
||||||
@ -479,7 +483,9 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
|
|||||||
case GEOMOp::OpSelectCompound: // POPUP MENU - SELECT ONLY - COMPOUND
|
case GEOMOp::OpSelectCompound: // POPUP MENU - SELECT ONLY - COMPOUND
|
||||||
case GEOMOp::OpSelectAll: // POPUP MENU - SELECT ONLY - SELECT ALL
|
case GEOMOp::OpSelectAll: // POPUP MENU - SELECT ONLY - SELECT ALL
|
||||||
case GEOMOp::OpDelete: // MENU EDIT - DELETE
|
case GEOMOp::OpDelete: // MENU EDIT - DELETE
|
||||||
|
#ifndef DISABLE_PYCONSOLE
|
||||||
case GEOMOp::OpCheckGeom: // MENU TOOLS - CHECK GEOMETRY
|
case GEOMOp::OpCheckGeom: // MENU TOOLS - CHECK GEOMETRY
|
||||||
|
#endif
|
||||||
case GEOMOp::OpMaterialsLibrary: // MENU TOOLS - MATERIALS LIBRARY
|
case GEOMOp::OpMaterialsLibrary: // MENU TOOLS - MATERIALS LIBRARY
|
||||||
case GEOMOp::OpDeflection: // POPUP MENU - DEFLECTION COEFFICIENT
|
case GEOMOp::OpDeflection: // POPUP MENU - DEFLECTION COEFFICIENT
|
||||||
case GEOMOp::OpColor: // POPUP MENU - COLOR
|
case GEOMOp::OpColor: // POPUP MENU - COLOR
|
||||||
@ -506,7 +512,9 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
|
|||||||
case GEOMOp::OpClsBringToFront: //
|
case GEOMOp::OpClsBringToFront: //
|
||||||
case GEOMOp::OpCreateFolder: // POPUP MENU - CREATE FOLDER
|
case GEOMOp::OpCreateFolder: // POPUP MENU - CREATE FOLDER
|
||||||
case GEOMOp::OpSortChildren: // POPUP MENU - SORT CHILD ITEMS
|
case GEOMOp::OpSortChildren: // POPUP MENU - SORT CHILD ITEMS
|
||||||
|
#ifndef DISABLE_GRAPHICSVIEW
|
||||||
case GEOMOp::OpShowDependencyTree: // POPUP MENU - SHOW DEPENDENCY TREE
|
case GEOMOp::OpShowDependencyTree: // POPUP MENU - SHOW DEPENDENCY TREE
|
||||||
|
#endif
|
||||||
case GEOMOp::OpReduceStudy: // POPUP MENU - REDUCE STUDY
|
case GEOMOp::OpReduceStudy: // POPUP MENU - REDUCE STUDY
|
||||||
libName = "GEOMToolsGUI";
|
libName = "GEOMToolsGUI";
|
||||||
break;
|
break;
|
||||||
@ -653,7 +661,9 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
|
|||||||
case GEOMOp::OpCheckSelfInters: // MENU MEASURE - CHECK SELF INTERSECTIONS
|
case GEOMOp::OpCheckSelfInters: // MENU MEASURE - CHECK SELF INTERSECTIONS
|
||||||
case GEOMOp::OpFastCheckInters: // MENU MEASURE - FAST CHECK INTERSECTIONS
|
case GEOMOp::OpFastCheckInters: // MENU MEASURE - FAST CHECK INTERSECTIONS
|
||||||
case GEOMOp::OpManageDimensions: // MENU MEASURE - MANAGE DIMENSIONS
|
case GEOMOp::OpManageDimensions: // MENU MEASURE - MANAGE DIMENSIONS
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
case GEOMOp::OpShapeStatistics: // MENU MEASURE - SHAPE STATISTICS
|
case GEOMOp::OpShapeStatistics: // MENU MEASURE - SHAPE STATISTICS
|
||||||
|
#endif
|
||||||
case GEOMOp::OpShowAllDimensions: // POPUP MENU - SHOW ALL DIMENSIONS
|
case GEOMOp::OpShowAllDimensions: // POPUP MENU - SHOW ALL DIMENSIONS
|
||||||
case GEOMOp::OpHideAllDimensions: // POPUP MENU - HIDE ALL DIMENSIONS
|
case GEOMOp::OpHideAllDimensions: // POPUP MENU - HIDE ALL DIMENSIONS
|
||||||
libName = "MeasureGUI";
|
libName = "MeasureGUI";
|
||||||
@ -1035,10 +1045,14 @@ void GeometryGUI::initialize( CAM_Application* app )
|
|||||||
createGeomAction( GEOMOp::OpGetNonBlocks, "GET_NON_BLOCKS" );
|
createGeomAction( GEOMOp::OpGetNonBlocks, "GET_NON_BLOCKS" );
|
||||||
createGeomAction( GEOMOp::OpCheckSelfInters, "CHECK_SELF_INTERSECTIONS" );
|
createGeomAction( GEOMOp::OpCheckSelfInters, "CHECK_SELF_INTERSECTIONS" );
|
||||||
createGeomAction( GEOMOp::OpFastCheckInters, "FAST_CHECK_INTERSECTIONS" );
|
createGeomAction( GEOMOp::OpFastCheckInters, "FAST_CHECK_INTERSECTIONS" );
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
createGeomAction( GEOMOp::OpShapeStatistics, "SHAPE_STATISTICS" );
|
createGeomAction( GEOMOp::OpShapeStatistics, "SHAPE_STATISTICS" );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DISABLE_PYCONSOLE
|
||||||
#ifdef _DEBUG_ // PAL16821
|
#ifdef _DEBUG_ // PAL16821
|
||||||
createGeomAction( GEOMOp::OpCheckGeom, "CHECK_GEOMETRY" );
|
createGeomAction( GEOMOp::OpCheckGeom, "CHECK_GEOMETRY" );
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
createGeomAction( GEOMOp::OpMaterialsLibrary, "MATERIALS_LIBRARY" );
|
createGeomAction( GEOMOp::OpMaterialsLibrary, "MATERIALS_LIBRARY" );
|
||||||
@ -1093,7 +1107,9 @@ void GeometryGUI::initialize( CAM_Application* app )
|
|||||||
createGeomAction( GEOMOp::OpPredefMaterCustom, "POP_PREDEF_MATER_CUSTOM" );
|
createGeomAction( GEOMOp::OpPredefMaterCustom, "POP_PREDEF_MATER_CUSTOM" );
|
||||||
createGeomAction( GEOMOp::OpCreateFolder, "POP_CREATE_FOLDER" );
|
createGeomAction( GEOMOp::OpCreateFolder, "POP_CREATE_FOLDER" );
|
||||||
createGeomAction( GEOMOp::OpSortChildren, "POP_SORT_CHILD_ITEMS" );
|
createGeomAction( GEOMOp::OpSortChildren, "POP_SORT_CHILD_ITEMS" );
|
||||||
|
#ifndef DISABLE_GRAPHICSVIEW
|
||||||
createGeomAction( GEOMOp::OpShowDependencyTree, "POP_SHOW_DEPENDENCY_TREE" );
|
createGeomAction( GEOMOp::OpShowDependencyTree, "POP_SHOW_DEPENDENCY_TREE" );
|
||||||
|
#endif
|
||||||
createGeomAction( GEOMOp::OpReduceStudy, "POP_REDUCE_STUDY" );
|
createGeomAction( GEOMOp::OpReduceStudy, "POP_REDUCE_STUDY" );
|
||||||
createGeomAction( GEOMOp::OpShowAllDimensions, "POP_SHOW_ALL_DIMENSIONS" );
|
createGeomAction( GEOMOp::OpShowAllDimensions, "POP_SHOW_ALL_DIMENSIONS" );
|
||||||
createGeomAction( GEOMOp::OpHideAllDimensions, "POP_HIDE_ALL_DIMENSIONS" );
|
createGeomAction( GEOMOp::OpHideAllDimensions, "POP_HIDE_ALL_DIMENSIONS" );
|
||||||
@ -1299,12 +1315,16 @@ void GeometryGUI::initialize( CAM_Application* app )
|
|||||||
createMenu( GEOMOp::OpCheckSelfInters, measurId, -1 );
|
createMenu( GEOMOp::OpCheckSelfInters, measurId, -1 );
|
||||||
createMenu( GEOMOp::OpFastCheckInters, measurId, -1 );
|
createMenu( GEOMOp::OpFastCheckInters, measurId, -1 );
|
||||||
createMenu( GEOMOp::OpInspectObj, measurId, -1 );
|
createMenu( GEOMOp::OpInspectObj, measurId, -1 );
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
createMenu( GEOMOp::OpShapeStatistics, measurId, -1 );
|
createMenu( GEOMOp::OpShapeStatistics, measurId, -1 );
|
||||||
|
#endif
|
||||||
|
|
||||||
int toolsId = createMenu( tr( "MEN_TOOLS" ), -1, -1, 50 );
|
int toolsId = createMenu( tr( "MEN_TOOLS" ), -1, -1, 50 );
|
||||||
|
#ifndef DISABLE_PYCONSOLE
|
||||||
#if defined(_DEBUG_) || defined(_DEBUG) // PAL16821
|
#if defined(_DEBUG_) || defined(_DEBUG) // PAL16821
|
||||||
createMenu( separator(), toolsId, -1 );
|
createMenu( separator(), toolsId, -1 );
|
||||||
createMenu( GEOMOp::OpCheckGeom, toolsId, -1 );
|
createMenu( GEOMOp::OpCheckGeom, toolsId, -1 );
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
createMenu( separator(), toolsId, -1 );
|
createMenu( separator(), toolsId, -1 );
|
||||||
@ -1633,9 +1653,11 @@ void GeometryGUI::initialize( CAM_Application* app )
|
|||||||
mgr->insert( action( GEOMOp::OpSortChildren ), -1, -1 ); // Sort child items
|
mgr->insert( action( GEOMOp::OpSortChildren ), -1, -1 ); // Sort child items
|
||||||
mgr->setRule( action( GEOMOp::OpSortChildren ), QString("client='ObjectBrowser' and $component={'GEOM'} and nbChildren>1"), QtxPopupMgr::VisibleRule );
|
mgr->setRule( action( GEOMOp::OpSortChildren ), QString("client='ObjectBrowser' and $component={'GEOM'} and nbChildren>1"), QtxPopupMgr::VisibleRule );
|
||||||
|
|
||||||
|
#ifndef DISABLE_GRAPHICSVIEW
|
||||||
mgr->insert( separator(), -1, -1 ); // -----------
|
mgr->insert( separator(), -1, -1 ); // -----------
|
||||||
mgr->insert( action( GEOMOp::OpShowDependencyTree ), -1, -1 ); // Show dependency tree
|
mgr->insert( action( GEOMOp::OpShowDependencyTree ), -1, -1 ); // Show dependency tree
|
||||||
mgr->setRule( action( GEOMOp::OpShowDependencyTree ), clientOCCorVTKorOB + " and selcount>0 and ($component={'GEOM'}) and type='Shape'", QtxPopupMgr::VisibleRule );
|
mgr->setRule( action( GEOMOp::OpShowDependencyTree ), clientOCCorVTKorOB + " and selcount>0 and ($component={'GEOM'}) and type='Shape'", QtxPopupMgr::VisibleRule );
|
||||||
|
#endif
|
||||||
|
|
||||||
mgr->insert( separator(), -1, -1 ); // -----------
|
mgr->insert( separator(), -1, -1 ); // -----------
|
||||||
mgr->insert( action( GEOMOp::OpReduceStudy ), -1, -1 ); // Reduce Study
|
mgr->insert( action( GEOMOp::OpReduceStudy ), -1, -1 ); // Reduce Study
|
||||||
@ -1756,17 +1778,18 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
|
|||||||
|
|
||||||
// import Python module that manages GEOM plugins (need to be here because SalomePyQt API uses active module)
|
// import Python module that manages GEOM plugins (need to be here because SalomePyQt API uses active module)
|
||||||
PyGILState_STATE gstate = PyGILState_Ensure();
|
PyGILState_STATE gstate = PyGILState_Ensure();
|
||||||
PyObjWrapper pluginsmanager = PyImport_ImportModuleNoBlock((char*)"salome_pluginsmanager");
|
PyObject* pluginsmanager = PyImport_ImportModuleNoBlock((char*)"salome_pluginsmanager");
|
||||||
if ( !pluginsmanager ) {
|
if ( !pluginsmanager ) {
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
PyObjWrapper result =
|
PyObject* result =
|
||||||
PyObject_CallMethod(pluginsmanager, (char*)"initialize", (char*)"isss", 1, "geom",
|
PyObject_CallMethod(pluginsmanager, (char*)"initialize", (char*)"isss", 1, "geom",
|
||||||
tr("MEN_NEW_ENTITY").toUtf8().data(),
|
tr("MEN_NEW_ENTITY").toUtf8().data(),
|
||||||
tr("GEOM_PLUGINS_OTHER").toUtf8().data());
|
tr("GEOM_PLUGINS_OTHER").toUtf8().data());
|
||||||
if ( !result )
|
if ( !result )
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
|
Py_XDECREF(result);
|
||||||
}
|
}
|
||||||
PyGILState_Release(gstate);
|
PyGILState_Release(gstate);
|
||||||
// end of GEOM plugins loading
|
// end of GEOM plugins loading
|
||||||
@ -1835,6 +1858,7 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Py_XDECREF(pluginsmanager);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1921,7 +1945,9 @@ void GeometryGUI::windows( QMap<int, int>& mappa ) const
|
|||||||
{
|
{
|
||||||
mappa.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
|
mappa.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
|
||||||
mappa.insert( SalomeApp_Application::WT_NoteBook, Qt::LeftDockWidgetArea );
|
mappa.insert( SalomeApp_Application::WT_NoteBook, Qt::LeftDockWidgetArea );
|
||||||
|
#ifndef DISABLE_PYCONSOLE
|
||||||
mappa.insert( SalomeApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea );
|
mappa.insert( SalomeApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea );
|
||||||
|
#endif
|
||||||
if ( myCreationInfoWdg )
|
if ( myCreationInfoWdg )
|
||||||
mappa.insert( myCreationInfoWdg->getWinID(), Qt::LeftDockWidgetArea );
|
mappa.insert( myCreationInfoWdg->getWinID(), Qt::LeftDockWidgetArea );
|
||||||
if ( myTextTreeWdg )
|
if ( myTextTreeWdg )
|
||||||
|
@ -26,7 +26,9 @@ namespace GEOMOp {
|
|||||||
enum {
|
enum {
|
||||||
// ToolsGUI --------------------//--------------------------------
|
// ToolsGUI --------------------//--------------------------------
|
||||||
OpDelete = 1020, // MENU EDIT - DELETE
|
OpDelete = 1020, // MENU EDIT - DELETE
|
||||||
|
#ifndef DISABLE_PYCONSOLE
|
||||||
OpCheckGeom = 1030, // MENU TOOLS - CHECK GEOMETRY
|
OpCheckGeom = 1030, // MENU TOOLS - CHECK GEOMETRY
|
||||||
|
#endif
|
||||||
OpMaterialsLibrary = 1040, // MENU TOOLS - MATERIALS LIBRARY
|
OpMaterialsLibrary = 1040, // MENU TOOLS - MATERIALS LIBRARY
|
||||||
OpSelectVertex = 1100, // POPUP MENU - SELECT ONLY - VERTEX
|
OpSelectVertex = 1100, // POPUP MENU - SELECT ONLY - VERTEX
|
||||||
OpSelectEdge = 1101, // POPUP MENU - SELECT ONLY - EDGE
|
OpSelectEdge = 1101, // POPUP MENU - SELECT ONLY - EDGE
|
||||||
@ -59,7 +61,9 @@ namespace GEOMOp {
|
|||||||
OpIsosWidth = 1261, // POPUP MENU - LINE WIDTH - ISOS WIDTH
|
OpIsosWidth = 1261, // POPUP MENU - LINE WIDTH - ISOS WIDTH
|
||||||
OpCreateFolder = 1262, // POPUP MENU - CREATE FOLDER
|
OpCreateFolder = 1262, // POPUP MENU - CREATE FOLDER
|
||||||
OpSortChildren = 1263, // POPUP MENU - SORT CHILD ITEMS
|
OpSortChildren = 1263, // POPUP MENU - SORT CHILD ITEMS
|
||||||
|
#ifndef DISABLE_GRAPHICSVIEW
|
||||||
OpShowDependencyTree = 1264, // POPUP MENU - SHOW DEPENDENCY TREE
|
OpShowDependencyTree = 1264, // POPUP MENU - SHOW DEPENDENCY TREE
|
||||||
|
#endif
|
||||||
OpReduceStudy = 1265, // POPUP MENU - REDUCE STUDY
|
OpReduceStudy = 1265, // POPUP MENU - REDUCE STUDY
|
||||||
// DisplayGUI ------------------//--------------------------------
|
// DisplayGUI ------------------//--------------------------------
|
||||||
OpSwitchVectors = 2001, // MENU VIEW - DISPLAY MODE - SHOW/HIDE EDGE DIRECTION
|
OpSwitchVectors = 2001, // MENU VIEW - DISPLAY MODE - SHOW/HIDE EDGE DIRECTION
|
||||||
@ -200,7 +204,9 @@ namespace GEOMOp {
|
|||||||
OpHideAllDimensions = 5016, // POPUP MENU - HIDE ALL DIMENSIONS
|
OpHideAllDimensions = 5016, // POPUP MENU - HIDE ALL DIMENSIONS
|
||||||
OpFastCheckInters = 5017, // MENU MEASURES - FAST CHECK INTERSECTIONS
|
OpFastCheckInters = 5017, // MENU MEASURES - FAST CHECK INTERSECTIONS
|
||||||
OpInspectObj = 5018, // MENU MEASURES - INSPECT OBJECT
|
OpInspectObj = 5018, // MENU MEASURES - INSPECT OBJECT
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
OpShapeStatistics = 5019, // MENU MEASURES - SHAPE STATISTICS
|
OpShapeStatistics = 5019, // MENU MEASURES - SHAPE STATISTICS
|
||||||
|
#endif
|
||||||
// GroupGUI --------------------//--------------------------------
|
// GroupGUI --------------------//--------------------------------
|
||||||
OpGroupCreate = 6000, // MENU GROUP - CREATE
|
OpGroupCreate = 6000, // MENU GROUP - CREATE
|
||||||
OpGroupEdit = 6001, // MENU GROUP - EDIT
|
OpGroupEdit = 6001, // MENU GROUP - EDIT
|
||||||
|
@ -58,8 +58,13 @@ SET(_link_LIBRARIES
|
|||||||
GEOM
|
GEOM
|
||||||
GEOMBase
|
GEOMBase
|
||||||
Material
|
Material
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(SALOME_USE_GRAPHICSVIEW)
|
||||||
|
LIST(APPEND _link_LIBRARIES
|
||||||
DependencyTree
|
DependencyTree
|
||||||
)
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# --- headers ---
|
# --- headers ---
|
||||||
|
|
||||||
|
@ -206,9 +206,11 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
|
|||||||
case GEOMOp::OpDelete: // EDIT - DELETE
|
case GEOMOp::OpDelete: // EDIT - DELETE
|
||||||
OnEditDelete();
|
OnEditDelete();
|
||||||
break;
|
break;
|
||||||
|
#ifndef DISABLE_PYCONSOLE
|
||||||
case GEOMOp::OpCheckGeom: // TOOLS - CHECK GEOMETRY
|
case GEOMOp::OpCheckGeom: // TOOLS - CHECK GEOMETRY
|
||||||
OnCheckGeometry();
|
OnCheckGeometry();
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case GEOMOp::OpSelectVertex: // POPUP - SELECT ONLY - VERTEX
|
case GEOMOp::OpSelectVertex: // POPUP - SELECT ONLY - VERTEX
|
||||||
OnSelectOnly( GEOM_POINT );
|
OnSelectOnly( GEOM_POINT );
|
||||||
break;
|
break;
|
||||||
@ -306,9 +308,11 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
|
|||||||
case GEOMOp::OpSortChildren:
|
case GEOMOp::OpSortChildren:
|
||||||
OnSortChildren();
|
OnSortChildren();
|
||||||
break;
|
break;
|
||||||
|
#ifndef DISABLE_GRAPHICSVIEW
|
||||||
case GEOMOp::OpShowDependencyTree:
|
case GEOMOp::OpShowDependencyTree:
|
||||||
OnShowDependencyTree();
|
OnShowDependencyTree();
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case GEOMOp::OpReduceStudy:
|
case GEOMOp::OpReduceStudy:
|
||||||
OnReduceStudy();
|
OnReduceStudy();
|
||||||
break;
|
break;
|
||||||
|
@ -87,7 +87,9 @@ private:
|
|||||||
void OnClsBringToFront();
|
void OnClsBringToFront();
|
||||||
void OnCreateFolder();
|
void OnCreateFolder();
|
||||||
void OnSortChildren();
|
void OnSortChildren();
|
||||||
|
#ifndef DISABLE_GRAPHICSVIEW
|
||||||
void OnShowDependencyTree();
|
void OnShowDependencyTree();
|
||||||
|
#endif
|
||||||
void OnReduceStudy();
|
void OnReduceStudy();
|
||||||
|
|
||||||
// Shortcut commands
|
// Shortcut commands
|
||||||
|
@ -24,7 +24,9 @@
|
|||||||
// File : GEOMToolsGUI_1.cxx
|
// File : GEOMToolsGUI_1.cxx
|
||||||
// Author : Sergey ANIKIN, Open CASCADE S.A.S. (sergey.anikin@opencascade.com)
|
// Author : Sergey ANIKIN, Open CASCADE S.A.S. (sergey.anikin@opencascade.com)
|
||||||
|
|
||||||
|
#ifndef DISABLE_PYCONSOLE
|
||||||
#include <PyConsole_Console.h>
|
#include <PyConsole_Console.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "GEOMToolsGUI.h"
|
#include "GEOMToolsGUI.h"
|
||||||
#include "GEOMToolsGUI_TransparencyDlg.h"
|
#include "GEOMToolsGUI_TransparencyDlg.h"
|
||||||
@ -47,9 +49,11 @@
|
|||||||
#include <GEOMBase.h>
|
#include <GEOMBase.h>
|
||||||
#include <GEOM_Actor.h>
|
#include <GEOM_Actor.h>
|
||||||
|
|
||||||
|
#ifndef DISABLE_GRAPHICSVIEW
|
||||||
#include <DependencyTree_ViewModel.h>
|
#include <DependencyTree_ViewModel.h>
|
||||||
#include <DependencyTree_View.h>
|
#include <DependencyTree_View.h>
|
||||||
#include <DependencyTree_Selector.h>
|
#include <DependencyTree_Selector.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
#include <Basics_OCCTVersion.hxx>
|
||||||
|
|
||||||
@ -126,6 +130,7 @@
|
|||||||
// on Show Dependencies operation
|
// on Show Dependencies operation
|
||||||
#define LAYOUT_DEPVIEW
|
#define LAYOUT_DEPVIEW
|
||||||
|
|
||||||
|
#ifndef DISABLE_PYCONSOLE
|
||||||
void GEOMToolsGUI::OnCheckGeometry()
|
void GEOMToolsGUI::OnCheckGeometry()
|
||||||
{
|
{
|
||||||
SalomeApp_Application* app =
|
SalomeApp_Application* app =
|
||||||
@ -135,6 +140,7 @@ void GEOMToolsGUI::OnCheckGeometry()
|
|||||||
if (pyConsole)
|
if (pyConsole)
|
||||||
pyConsole->exec("from GEOM_usinggeom import *");
|
pyConsole->exec("from GEOM_usinggeom import *");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void GEOMToolsGUI::OnAutoColor()
|
void GEOMToolsGUI::OnAutoColor()
|
||||||
{
|
{
|
||||||
@ -882,6 +888,7 @@ void GEOMToolsGUI::OnSortChildren()
|
|||||||
app->updateObjectBrowser( true );
|
app->updateObjectBrowser( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_GRAPHICSVIEW
|
||||||
void GEOMToolsGUI::OnShowDependencyTree()
|
void GEOMToolsGUI::OnShowDependencyTree()
|
||||||
{
|
{
|
||||||
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
||||||
@ -932,6 +939,7 @@ void GEOMToolsGUI::OnShowDependencyTree()
|
|||||||
#endif
|
#endif
|
||||||
depVw->setFocus();
|
depVw->setFocus();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void GEOMToolsGUI::OnReduceStudy()
|
void GEOMToolsGUI::OnReduceStudy()
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,9 @@
|
|||||||
#include <GeometryGUI.h>
|
#include <GeometryGUI.h>
|
||||||
#include <GEOM_Displayer.h>
|
#include <GEOM_Displayer.h>
|
||||||
#include <GEOMUtils.hxx>
|
#include <GEOMUtils.hxx>
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
#include <MeasureGUI_ShapeStatisticsDlg.h>
|
#include <MeasureGUI_ShapeStatisticsDlg.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <SalomeApp_Application.h>
|
#include <SalomeApp_Application.h>
|
||||||
#include <SalomeApp_Study.h>
|
#include <SalomeApp_Study.h>
|
||||||
@ -201,7 +203,9 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
|
|||||||
myLessFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
|
myLessFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
|
||||||
myGreaterFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
|
myGreaterFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
|
||||||
myApplyFilterButton = new QPushButton(tr("GEOM_BUT_APPLY"), myFilterGrp);
|
myApplyFilterButton = new QPushButton(tr("GEOM_BUT_APPLY"), myFilterGrp);
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
myPlotDistributionButton = new QPushButton(tr("GEOM_PLOT_DISTRIBUTION"), myFilterGrp);
|
myPlotDistributionButton = new QPushButton(tr("GEOM_PLOT_DISTRIBUTION"), myFilterGrp);
|
||||||
|
#endif
|
||||||
|
|
||||||
QGridLayout* filterLayout = new QGridLayout(myFilterGrp);
|
QGridLayout* filterLayout = new QGridLayout(myFilterGrp);
|
||||||
filterLayout->addWidget(myLessFilterCheck, 0, 0);
|
filterLayout->addWidget(myLessFilterCheck, 0, 0);
|
||||||
@ -211,7 +215,9 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
|
|||||||
filterLayout->addWidget(myGreaterFilterCombo, 1, 1);
|
filterLayout->addWidget(myGreaterFilterCombo, 1, 1);
|
||||||
filterLayout->addWidget(myGreaterFilterSpin, 1, 2);
|
filterLayout->addWidget(myGreaterFilterSpin, 1, 2);
|
||||||
filterLayout->addWidget(myApplyFilterButton, 0, 3);
|
filterLayout->addWidget(myApplyFilterButton, 0, 3);
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
filterLayout->addWidget(myPlotDistributionButton, 1, 3);
|
filterLayout->addWidget(myPlotDistributionButton, 1, 3);
|
||||||
|
#endif
|
||||||
|
|
||||||
QVBoxLayout* layout = new QVBoxLayout(centralWidget());
|
QVBoxLayout* layout = new QVBoxLayout(centralWidget());
|
||||||
layout->setMargin(0); layout->setSpacing(6);
|
layout->setMargin(0); layout->setSpacing(6);
|
||||||
@ -329,7 +335,9 @@ void GroupGUI_GroupDlg::Init()
|
|||||||
connect(myIdList, SIGNAL(itemSelectionChanged()), this, SLOT(selectionChanged()));
|
connect(myIdList, SIGNAL(itemSelectionChanged()), this, SLOT(selectionChanged()));
|
||||||
|
|
||||||
connect(myApplyFilterButton, SIGNAL(clicked()), this, SLOT(ClickOnOkFilter()));
|
connect(myApplyFilterButton, SIGNAL(clicked()), this, SLOT(ClickOnOkFilter()));
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
connect(myPlotDistributionButton, SIGNAL(clicked()), this, SLOT(ClickOnPlot()));
|
connect(myPlotDistributionButton, SIGNAL(clicked()), this, SLOT(ClickOnPlot()));
|
||||||
|
#endif
|
||||||
connect(myLessFilterCheck, SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
|
connect(myLessFilterCheck, SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
|
||||||
connect(myGreaterFilterCheck, SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
|
connect(myGreaterFilterCheck, SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
|
||||||
|
|
||||||
@ -1157,12 +1165,14 @@ void GroupGUI_GroupDlg::updateState (bool isAdd)
|
|||||||
GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||||
GEOM::ListOfLong_var aSubShapes = aShOp->SubShapeAllIDs( myMainObj, getShapeType(), false );
|
GEOM::ListOfLong_var aSubShapes = aShOp->SubShapeAllIDs( myMainObj, getShapeType(), false );
|
||||||
bool hasCurrentEntities = aSubShapes->length() > 0;
|
bool hasCurrentEntities = aSubShapes->length() > 0;
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
myPlotDistributionButton->setEnabled( myFilterGrp->isEnabled() &&
|
myPlotDistributionButton->setEnabled( myFilterGrp->isEnabled() &&
|
||||||
myIsShapeType &&
|
myIsShapeType &&
|
||||||
( getShapeType() == TopAbs_EDGE ||
|
( getShapeType() == TopAbs_EDGE ||
|
||||||
getShapeType() == TopAbs_FACE ||
|
getShapeType() == TopAbs_FACE ||
|
||||||
getShapeType() == TopAbs_SOLID ) &&
|
getShapeType() == TopAbs_SOLID ) &&
|
||||||
hasCurrentEntities );
|
hasCurrentEntities );
|
||||||
|
#endif
|
||||||
if (subSelectionWay() == ALL_SUBSHAPES)
|
if (subSelectionWay() == ALL_SUBSHAPES)
|
||||||
setInPlaceObj(GEOM::GEOM_Object::_nil());
|
setInPlaceObj(GEOM::GEOM_Object::_nil());
|
||||||
}
|
}
|
||||||
@ -1451,6 +1461,7 @@ void GroupGUI_GroupDlg::ClickOnOkFilter()
|
|||||||
updateState(true);
|
updateState(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : ClickOnPlot()
|
// function : ClickOnPlot()
|
||||||
// purpose : opens "Shape Statistics" dialog box in order to plot sub-shapes distribution.
|
// purpose : opens "Shape Statistics" dialog box in order to plot sub-shapes distribution.
|
||||||
@ -1463,6 +1474,7 @@ void GroupGUI_GroupDlg::ClickOnPlot()
|
|||||||
dlg->show();
|
dlg->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void GroupGUI_GroupDlg::MeasureToggled()
|
void GroupGUI_GroupDlg::MeasureToggled()
|
||||||
{
|
{
|
||||||
|
@ -83,7 +83,9 @@ private slots:
|
|||||||
void showOnlySelected();
|
void showOnlySelected();
|
||||||
void selectionChanged();
|
void selectionChanged();
|
||||||
void ClickOnOkFilter();
|
void ClickOnOkFilter();
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
void ClickOnPlot();
|
void ClickOnPlot();
|
||||||
|
#endif
|
||||||
void MeasureToggled();
|
void MeasureToggled();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -129,8 +129,13 @@ SET(_moc_HEADERS
|
|||||||
MeasureGUI_ManageDimensionsDlg.h
|
MeasureGUI_ManageDimensionsDlg.h
|
||||||
MeasureGUI_CreateDimensionDlg.h
|
MeasureGUI_CreateDimensionDlg.h
|
||||||
MeasureGUI_DimensionInteractor.h
|
MeasureGUI_DimensionInteractor.h
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(SALOME_USE_PLOT2DVIEWER)
|
||||||
|
LIST(APPEND _moc_HEADERS
|
||||||
MeasureGUI_ShapeStatisticsDlg.h
|
MeasureGUI_ShapeStatisticsDlg.h
|
||||||
)
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# header files / uic wrappings
|
# header files / uic wrappings
|
||||||
QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
|
QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
|
||||||
@ -164,11 +169,16 @@ SET(MeasureGUI_SOURCES
|
|||||||
MeasureGUI_DimensionCreateTool.cxx
|
MeasureGUI_DimensionCreateTool.cxx
|
||||||
MeasureGUI_DimensionInteractor.cxx
|
MeasureGUI_DimensionInteractor.cxx
|
||||||
MeasureGUI_DimensionFilter.cxx
|
MeasureGUI_DimensionFilter.cxx
|
||||||
MeasureGUI_ShapeStatisticsDlg.cxx
|
|
||||||
${_moc_SOURCES}
|
${_moc_SOURCES}
|
||||||
${_uic_files}
|
${_uic_files}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF(SALOME_USE_PLOT2DVIEWER)
|
||||||
|
LIST(APPEND MeasureGUI_SOURCES
|
||||||
|
MeasureGUI_ShapeStatisticsDlg.cxx
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# --- rules ---
|
# --- rules ---
|
||||||
|
|
||||||
ADD_LIBRARY(MeasureGUI ${MeasureGUI_SOURCES})
|
ADD_LIBRARY(MeasureGUI ${MeasureGUI_SOURCES})
|
||||||
|
@ -53,7 +53,9 @@
|
|||||||
#include "MeasureGUI_FastCheckIntersectionsDlg.h" // Method FAST CHECK INTERSCTIONS
|
#include "MeasureGUI_FastCheckIntersectionsDlg.h" // Method FAST CHECK INTERSCTIONS
|
||||||
#include "MeasureGUI_PointDlg.h" // Method POINTCOORDINATES
|
#include "MeasureGUI_PointDlg.h" // Method POINTCOORDINATES
|
||||||
#include "MeasureGUI_ManageDimensionsDlg.h" // Method MANAGEDIMENSIONS
|
#include "MeasureGUI_ManageDimensionsDlg.h" // Method MANAGEDIMENSIONS
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
#include "MeasureGUI_ShapeStatisticsDlg.h" // Method SHAPE STATISTICS
|
#include "MeasureGUI_ShapeStatisticsDlg.h" // Method SHAPE STATISTICS
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
@ -130,9 +132,11 @@ bool MeasureGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
|
|||||||
case GEOMOp::OpFastCheckInters:
|
case GEOMOp::OpFastCheckInters:
|
||||||
dlg = new MeasureGUI_FastCheckIntersectionsDlg( getGeometryGUI(), parent );
|
dlg = new MeasureGUI_FastCheckIntersectionsDlg( getGeometryGUI(), parent );
|
||||||
break; // FAST CHECK INTERSCTIONS
|
break; // FAST CHECK INTERSCTIONS
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
case GEOMOp::OpShapeStatistics:
|
case GEOMOp::OpShapeStatistics:
|
||||||
dlg = new MeasureGUI_ShapeStatisticsDlg( parent );
|
dlg = new MeasureGUI_ShapeStatisticsDlg( parent );
|
||||||
break; // FAST CHECK INTERSCTIONS
|
break; // SHAPE STATISTICS
|
||||||
|
#endif
|
||||||
case GEOMOp::OpPointCoordinates:
|
case GEOMOp::OpPointCoordinates:
|
||||||
dlg = new MeasureGUI_PointDlg( getGeometryGUI(), parent );
|
dlg = new MeasureGUI_PointDlg( getGeometryGUI(), parent );
|
||||||
break; // POINT COORDINATES
|
break; // POINT COORDINATES
|
||||||
|
Loading…
Reference in New Issue
Block a user