mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-11 16:19:17 +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})
|
||||
LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
|
||||
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})
|
||||
INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
|
||||
ELSE(EXISTS ${GUI_ROOT_DIR})
|
||||
@ -125,12 +127,6 @@ IF(SALOME_BUILD_GUI)
|
||||
|
||||
# Qt4
|
||||
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)
|
||||
|
||||
##
|
||||
@ -231,9 +227,12 @@ IF(SALOME_BUILD_GUI)
|
||||
LIST(APPEND _${PROJECT_NAME}_exposed_targets
|
||||
AdvancedGUI BasicGUI BlocksGUI BooleanGUI BuildGUI DisplayGUI DlgRef CurveCreator EntityGUI GEOMBase
|
||||
GEOMFiltersSelection GEOM GEOMToolsGUI GenerationGUI GroupGUI Material MeasureGUI GEOMObject
|
||||
OperationGUI PrimitiveGUI RepairGUI TransformationGUI DependencyTree
|
||||
OperationGUI PrimitiveGUI RepairGUI TransformationGUI
|
||||
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)
|
||||
|
||||
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".
|
||||
|
||||
\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>
|
||||
\anchor dependency_tree_nodes_anchor <h2>Nodes</h2>
|
||||
|
||||
|
@ -25,4 +25,6 @@ In this dialog:
|
||||
|
||||
- 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)
|
||||
SET(SUBDIRS_GUI
|
||||
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
|
||||
RepairGUI GroupGUI BlocksGUI AdvancedGUI
|
||||
GEOM_SWIG_WITHIHM
|
||||
)
|
||||
IF(SALOME_USE_GRAPHICSVIEW)
|
||||
LIST(APPEND SUBDIRS_GUI DependencyTree)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET(SUBDIRS
|
||||
|
@ -30,7 +30,9 @@
|
||||
#include <GeometryGUI.h>
|
||||
#include <GEOMBase.h>
|
||||
#include <GEOMUtils.hxx>
|
||||
#include <MeasureGUI_ShapeStatisticsDlg.h>
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
#include <MeasureGUI_ShapeStatisticsDlg.h>
|
||||
#endif
|
||||
|
||||
#include <OCCViewer_ViewModel.h>
|
||||
#include <SVTK_ViewModel.h>
|
||||
@ -166,7 +168,9 @@ EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(GeometryGUI* theGeometryGUI, QWidge
|
||||
myLessFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
|
||||
myGreaterFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
|
||||
myApplyFilterButton = new QPushButton(tr("GEOM_BUT_APPLY"), myFilterGrp);
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
myPlotDistributionButton = new QPushButton(tr("GEOM_PLOT_DISTRIBUTION"), myFilterGrp);
|
||||
#endif
|
||||
|
||||
QGridLayout* filterLayout = new QGridLayout(myFilterGrp);
|
||||
filterLayout->addWidget(myLessFilterCheck, 0, 0);
|
||||
@ -176,7 +180,9 @@ EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(GeometryGUI* theGeometryGUI, QWidge
|
||||
filterLayout->addWidget(myGreaterFilterCombo, 1, 1);
|
||||
filterLayout->addWidget(myGreaterFilterSpin, 1, 2);
|
||||
filterLayout->addWidget(myApplyFilterButton, 0, 3);
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
filterLayout->addWidget(myPlotDistributionButton, 1, 3);
|
||||
#endif
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout(centralWidget());
|
||||
layout->setMargin(0); layout->setSpacing(6);
|
||||
@ -253,7 +259,9 @@ void EntityGUI_SubShapeDlg::Init()
|
||||
connect(GroupPoints->PushButton4, SIGNAL(clicked()), this, SLOT(showOnlySelected()));
|
||||
|
||||
connect(myApplyFilterButton, SIGNAL(clicked()), this, SLOT(ClickOnOkFilter()));
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
connect(myPlotDistributionButton, SIGNAL(clicked()), this, SLOT(ClickOnPlot()));
|
||||
#endif
|
||||
connect(myLessFilterCheck, 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() &&
|
||||
shapeType() < GEOM::VERTEX);
|
||||
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
myPlotDistributionButton->setEnabled( myFilterGrp->isEnabled() &&
|
||||
( shapeType() == TopAbs_EDGE ||
|
||||
shapeType() == TopAbs_FACE ||
|
||||
shapeType() == TopAbs_SOLID ) );
|
||||
#endif
|
||||
|
||||
activateSelection();
|
||||
}
|
||||
@ -945,6 +955,7 @@ void EntityGUI_SubShapeDlg::ClickOnOkFilter()
|
||||
updateButtonState();
|
||||
}
|
||||
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
//=================================================================================
|
||||
// function : ClickOnPlot()
|
||||
// purpose : opens "Shape Statistics" dialog box in order to plot sub-shapes distribution.
|
||||
@ -956,6 +967,7 @@ void EntityGUI_SubShapeDlg::ClickOnPlot()
|
||||
dlg->show();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//=================================================================================
|
||||
// function : MeasureToggled()
|
||||
|
@ -73,7 +73,9 @@ private slots:
|
||||
|
||||
void showOnlySelected();
|
||||
void ClickOnOkFilter();
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
void ClickOnPlot();
|
||||
#endif
|
||||
void MeasureToggled();
|
||||
|
||||
private:
|
||||
|
@ -51,8 +51,6 @@
|
||||
#include <SUIT_Session.h>
|
||||
#include <SUIT_ViewManager.h>
|
||||
|
||||
#include <PyInterp_Interp.h>
|
||||
|
||||
#include <OCCViewer_ViewWindow.h>
|
||||
#include <OCCViewer_ViewPort3d.h>
|
||||
#include <OCCViewer_ViewModel.h>
|
||||
@ -66,7 +64,9 @@
|
||||
#include <SVTK_InteractorStyle.h>
|
||||
#include <SVTK_ViewModel.h>
|
||||
|
||||
#ifndef DISABLE_GRAPHICSVIEW
|
||||
#include <GraphicsView_Viewer.h>
|
||||
#endif
|
||||
|
||||
#include <SalomeApp_Application.h>
|
||||
#include <SalomeApp_DataObject.h>
|
||||
@ -438,7 +438,11 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
|
||||
SUIT_ViewWindow* window = desk->activeWindow();
|
||||
bool ViewOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
|
||||
bool ViewVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
|
||||
#ifndef DISABLE_GRAPHICSVIEW
|
||||
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
|
||||
// fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example)
|
||||
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::OpSelectAll: // POPUP MENU - SELECT ONLY - SELECT ALL
|
||||
case GEOMOp::OpDelete: // MENU EDIT - DELETE
|
||||
#ifndef DISABLE_PYCONSOLE
|
||||
case GEOMOp::OpCheckGeom: // MENU TOOLS - CHECK GEOMETRY
|
||||
#endif
|
||||
case GEOMOp::OpMaterialsLibrary: // MENU TOOLS - MATERIALS LIBRARY
|
||||
case GEOMOp::OpDeflection: // POPUP MENU - DEFLECTION COEFFICIENT
|
||||
case GEOMOp::OpColor: // POPUP MENU - COLOR
|
||||
@ -506,7 +512,9 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
|
||||
case GEOMOp::OpClsBringToFront: //
|
||||
case GEOMOp::OpCreateFolder: // POPUP MENU - CREATE FOLDER
|
||||
case GEOMOp::OpSortChildren: // POPUP MENU - SORT CHILD ITEMS
|
||||
#ifndef DISABLE_GRAPHICSVIEW
|
||||
case GEOMOp::OpShowDependencyTree: // POPUP MENU - SHOW DEPENDENCY TREE
|
||||
#endif
|
||||
case GEOMOp::OpReduceStudy: // POPUP MENU - REDUCE STUDY
|
||||
libName = "GEOMToolsGUI";
|
||||
break;
|
||||
@ -653,7 +661,9 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
|
||||
case GEOMOp::OpCheckSelfInters: // MENU MEASURE - CHECK SELF INTERSECTIONS
|
||||
case GEOMOp::OpFastCheckInters: // MENU MEASURE - FAST CHECK INTERSECTIONS
|
||||
case GEOMOp::OpManageDimensions: // MENU MEASURE - MANAGE DIMENSIONS
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
case GEOMOp::OpShapeStatistics: // MENU MEASURE - SHAPE STATISTICS
|
||||
#endif
|
||||
case GEOMOp::OpShowAllDimensions: // POPUP MENU - SHOW ALL DIMENSIONS
|
||||
case GEOMOp::OpHideAllDimensions: // POPUP MENU - HIDE ALL DIMENSIONS
|
||||
libName = "MeasureGUI";
|
||||
@ -1035,10 +1045,14 @@ void GeometryGUI::initialize( CAM_Application* app )
|
||||
createGeomAction( GEOMOp::OpGetNonBlocks, "GET_NON_BLOCKS" );
|
||||
createGeomAction( GEOMOp::OpCheckSelfInters, "CHECK_SELF_INTERSECTIONS" );
|
||||
createGeomAction( GEOMOp::OpFastCheckInters, "FAST_CHECK_INTERSECTIONS" );
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
createGeomAction( GEOMOp::OpShapeStatistics, "SHAPE_STATISTICS" );
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_PYCONSOLE
|
||||
#ifdef _DEBUG_ // PAL16821
|
||||
createGeomAction( GEOMOp::OpCheckGeom, "CHECK_GEOMETRY" );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
createGeomAction( GEOMOp::OpMaterialsLibrary, "MATERIALS_LIBRARY" );
|
||||
@ -1093,7 +1107,9 @@ void GeometryGUI::initialize( CAM_Application* app )
|
||||
createGeomAction( GEOMOp::OpPredefMaterCustom, "POP_PREDEF_MATER_CUSTOM" );
|
||||
createGeomAction( GEOMOp::OpCreateFolder, "POP_CREATE_FOLDER" );
|
||||
createGeomAction( GEOMOp::OpSortChildren, "POP_SORT_CHILD_ITEMS" );
|
||||
#ifndef DISABLE_GRAPHICSVIEW
|
||||
createGeomAction( GEOMOp::OpShowDependencyTree, "POP_SHOW_DEPENDENCY_TREE" );
|
||||
#endif
|
||||
createGeomAction( GEOMOp::OpReduceStudy, "POP_REDUCE_STUDY" );
|
||||
createGeomAction( GEOMOp::OpShowAllDimensions, "POP_SHOW_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::OpFastCheckInters, measurId, -1 );
|
||||
createMenu( GEOMOp::OpInspectObj, measurId, -1 );
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
createMenu( GEOMOp::OpShapeStatistics, measurId, -1 );
|
||||
#endif
|
||||
|
||||
int toolsId = createMenu( tr( "MEN_TOOLS" ), -1, -1, 50 );
|
||||
#ifndef DISABLE_PYCONSOLE
|
||||
#if defined(_DEBUG_) || defined(_DEBUG) // PAL16821
|
||||
createMenu( separator(), toolsId, -1 );
|
||||
createMenu( GEOMOp::OpCheckGeom, toolsId, -1 );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
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->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( 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 );
|
||||
#endif
|
||||
|
||||
mgr->insert( separator(), -1, -1 ); // -----------
|
||||
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)
|
||||
PyGILState_STATE gstate = PyGILState_Ensure();
|
||||
PyObjWrapper pluginsmanager = PyImport_ImportModuleNoBlock((char*)"salome_pluginsmanager");
|
||||
PyObject* pluginsmanager = PyImport_ImportModuleNoBlock((char*)"salome_pluginsmanager");
|
||||
if ( !pluginsmanager ) {
|
||||
PyErr_Print();
|
||||
}
|
||||
else {
|
||||
PyObjWrapper result =
|
||||
PyObject* result =
|
||||
PyObject_CallMethod(pluginsmanager, (char*)"initialize", (char*)"isss", 1, "geom",
|
||||
tr("MEN_NEW_ENTITY").toUtf8().data(),
|
||||
tr("GEOM_PLUGINS_OTHER").toUtf8().data());
|
||||
if ( !result )
|
||||
PyErr_Print();
|
||||
Py_XDECREF(result);
|
||||
}
|
||||
PyGILState_Release(gstate);
|
||||
// end of GEOM plugins loading
|
||||
@ -1835,6 +1858,7 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
|
||||
}
|
||||
}
|
||||
|
||||
Py_XDECREF(pluginsmanager);
|
||||
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_NoteBook, Qt::LeftDockWidgetArea );
|
||||
#ifndef DISABLE_PYCONSOLE
|
||||
mappa.insert( SalomeApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea );
|
||||
#endif
|
||||
if ( myCreationInfoWdg )
|
||||
mappa.insert( myCreationInfoWdg->getWinID(), Qt::LeftDockWidgetArea );
|
||||
if ( myTextTreeWdg )
|
||||
|
@ -26,7 +26,9 @@ namespace GEOMOp {
|
||||
enum {
|
||||
// ToolsGUI --------------------//--------------------------------
|
||||
OpDelete = 1020, // MENU EDIT - DELETE
|
||||
#ifndef DISABLE_PYCONSOLE
|
||||
OpCheckGeom = 1030, // MENU TOOLS - CHECK GEOMETRY
|
||||
#endif
|
||||
OpMaterialsLibrary = 1040, // MENU TOOLS - MATERIALS LIBRARY
|
||||
OpSelectVertex = 1100, // POPUP MENU - SELECT ONLY - VERTEX
|
||||
OpSelectEdge = 1101, // POPUP MENU - SELECT ONLY - EDGE
|
||||
@ -59,7 +61,9 @@ namespace GEOMOp {
|
||||
OpIsosWidth = 1261, // POPUP MENU - LINE WIDTH - ISOS WIDTH
|
||||
OpCreateFolder = 1262, // POPUP MENU - CREATE FOLDER
|
||||
OpSortChildren = 1263, // POPUP MENU - SORT CHILD ITEMS
|
||||
#ifndef DISABLE_GRAPHICSVIEW
|
||||
OpShowDependencyTree = 1264, // POPUP MENU - SHOW DEPENDENCY TREE
|
||||
#endif
|
||||
OpReduceStudy = 1265, // POPUP MENU - REDUCE STUDY
|
||||
// DisplayGUI ------------------//--------------------------------
|
||||
OpSwitchVectors = 2001, // MENU VIEW - DISPLAY MODE - SHOW/HIDE EDGE DIRECTION
|
||||
@ -199,8 +203,10 @@ namespace GEOMOp {
|
||||
OpShowAllDimensions = 5015, // POPUP MENU - SHOW ALL DIMENSIONS
|
||||
OpHideAllDimensions = 5016, // POPUP MENU - HIDE ALL DIMENSIONS
|
||||
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
|
||||
#endif
|
||||
// GroupGUI --------------------//--------------------------------
|
||||
OpGroupCreate = 6000, // MENU GROUP - CREATE
|
||||
OpGroupEdit = 6001, // MENU GROUP - EDIT
|
||||
|
@ -58,8 +58,13 @@ SET(_link_LIBRARIES
|
||||
GEOM
|
||||
GEOMBase
|
||||
Material
|
||||
DependencyTree
|
||||
)
|
||||
|
||||
IF(SALOME_USE_GRAPHICSVIEW)
|
||||
LIST(APPEND _link_LIBRARIES
|
||||
DependencyTree
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
# --- headers ---
|
||||
|
||||
|
@ -206,9 +206,11 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
|
||||
case GEOMOp::OpDelete: // EDIT - DELETE
|
||||
OnEditDelete();
|
||||
break;
|
||||
#ifndef DISABLE_PYCONSOLE
|
||||
case GEOMOp::OpCheckGeom: // TOOLS - CHECK GEOMETRY
|
||||
OnCheckGeometry();
|
||||
break;
|
||||
#endif
|
||||
case GEOMOp::OpSelectVertex: // POPUP - SELECT ONLY - VERTEX
|
||||
OnSelectOnly( GEOM_POINT );
|
||||
break;
|
||||
@ -306,9 +308,11 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
|
||||
case GEOMOp::OpSortChildren:
|
||||
OnSortChildren();
|
||||
break;
|
||||
#ifndef DISABLE_GRAPHICSVIEW
|
||||
case GEOMOp::OpShowDependencyTree:
|
||||
OnShowDependencyTree();
|
||||
break;
|
||||
#endif
|
||||
case GEOMOp::OpReduceStudy:
|
||||
OnReduceStudy();
|
||||
break;
|
||||
|
@ -87,7 +87,9 @@ private:
|
||||
void OnClsBringToFront();
|
||||
void OnCreateFolder();
|
||||
void OnSortChildren();
|
||||
#ifndef DISABLE_GRAPHICSVIEW
|
||||
void OnShowDependencyTree();
|
||||
#endif
|
||||
void OnReduceStudy();
|
||||
|
||||
// Shortcut commands
|
||||
|
@ -24,7 +24,9 @@
|
||||
// File : GEOMToolsGUI_1.cxx
|
||||
// Author : Sergey ANIKIN, Open CASCADE S.A.S. (sergey.anikin@opencascade.com)
|
||||
|
||||
#ifndef DISABLE_PYCONSOLE
|
||||
#include <PyConsole_Console.h>
|
||||
#endif
|
||||
|
||||
#include "GEOMToolsGUI.h"
|
||||
#include "GEOMToolsGUI_TransparencyDlg.h"
|
||||
@ -47,9 +49,11 @@
|
||||
#include <GEOMBase.h>
|
||||
#include <GEOM_Actor.h>
|
||||
|
||||
#ifndef DISABLE_GRAPHICSVIEW
|
||||
#include <DependencyTree_ViewModel.h>
|
||||
#include <DependencyTree_View.h>
|
||||
#include <DependencyTree_Selector.h>
|
||||
#endif
|
||||
|
||||
#include <Basics_OCCTVersion.hxx>
|
||||
|
||||
@ -126,6 +130,7 @@
|
||||
// on Show Dependencies operation
|
||||
#define LAYOUT_DEPVIEW
|
||||
|
||||
#ifndef DISABLE_PYCONSOLE
|
||||
void GEOMToolsGUI::OnCheckGeometry()
|
||||
{
|
||||
SalomeApp_Application* app =
|
||||
@ -135,6 +140,7 @@ void GEOMToolsGUI::OnCheckGeometry()
|
||||
if (pyConsole)
|
||||
pyConsole->exec("from GEOM_usinggeom import *");
|
||||
}
|
||||
#endif
|
||||
|
||||
void GEOMToolsGUI::OnAutoColor()
|
||||
{
|
||||
@ -882,6 +888,7 @@ void GEOMToolsGUI::OnSortChildren()
|
||||
app->updateObjectBrowser( true );
|
||||
}
|
||||
|
||||
#ifndef DISABLE_GRAPHICSVIEW
|
||||
void GEOMToolsGUI::OnShowDependencyTree()
|
||||
{
|
||||
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
||||
@ -932,6 +939,7 @@ void GEOMToolsGUI::OnShowDependencyTree()
|
||||
#endif
|
||||
depVw->setFocus();
|
||||
}
|
||||
#endif
|
||||
|
||||
void GEOMToolsGUI::OnReduceStudy()
|
||||
{
|
||||
|
@ -31,7 +31,9 @@
|
||||
#include <GeometryGUI.h>
|
||||
#include <GEOM_Displayer.h>
|
||||
#include <GEOMUtils.hxx>
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
#include <MeasureGUI_ShapeStatisticsDlg.h>
|
||||
#endif
|
||||
|
||||
#include <SalomeApp_Application.h>
|
||||
#include <SalomeApp_Study.h>
|
||||
@ -201,7 +203,9 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
|
||||
myLessFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
|
||||
myGreaterFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
|
||||
myApplyFilterButton = new QPushButton(tr("GEOM_BUT_APPLY"), myFilterGrp);
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
myPlotDistributionButton = new QPushButton(tr("GEOM_PLOT_DISTRIBUTION"), myFilterGrp);
|
||||
#endif
|
||||
|
||||
QGridLayout* filterLayout = new QGridLayout(myFilterGrp);
|
||||
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(myGreaterFilterSpin, 1, 2);
|
||||
filterLayout->addWidget(myApplyFilterButton, 0, 3);
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
filterLayout->addWidget(myPlotDistributionButton, 1, 3);
|
||||
#endif
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout(centralWidget());
|
||||
layout->setMargin(0); layout->setSpacing(6);
|
||||
@ -329,7 +335,9 @@ void GroupGUI_GroupDlg::Init()
|
||||
connect(myIdList, SIGNAL(itemSelectionChanged()), this, SLOT(selectionChanged()));
|
||||
|
||||
connect(myApplyFilterButton, SIGNAL(clicked()), this, SLOT(ClickOnOkFilter()));
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
connect(myPlotDistributionButton, SIGNAL(clicked()), this, SLOT(ClickOnPlot()));
|
||||
#endif
|
||||
connect(myLessFilterCheck, 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::ListOfLong_var aSubShapes = aShOp->SubShapeAllIDs( myMainObj, getShapeType(), false );
|
||||
bool hasCurrentEntities = aSubShapes->length() > 0;
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
myPlotDistributionButton->setEnabled( myFilterGrp->isEnabled() &&
|
||||
myIsShapeType &&
|
||||
( getShapeType() == TopAbs_EDGE ||
|
||||
getShapeType() == TopAbs_FACE ||
|
||||
getShapeType() == TopAbs_SOLID ) &&
|
||||
hasCurrentEntities );
|
||||
#endif
|
||||
if (subSelectionWay() == ALL_SUBSHAPES)
|
||||
setInPlaceObj(GEOM::GEOM_Object::_nil());
|
||||
}
|
||||
@ -1451,6 +1461,7 @@ void GroupGUI_GroupDlg::ClickOnOkFilter()
|
||||
updateState(true);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
//=================================================================================
|
||||
// function : ClickOnPlot()
|
||||
// purpose : opens "Shape Statistics" dialog box in order to plot sub-shapes distribution.
|
||||
@ -1463,6 +1474,7 @@ void GroupGUI_GroupDlg::ClickOnPlot()
|
||||
dlg->show();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void GroupGUI_GroupDlg::MeasureToggled()
|
||||
{
|
||||
|
@ -83,7 +83,9 @@ private slots:
|
||||
void showOnlySelected();
|
||||
void selectionChanged();
|
||||
void ClickOnOkFilter();
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
void ClickOnPlot();
|
||||
#endif
|
||||
void MeasureToggled();
|
||||
|
||||
private:
|
||||
|
@ -129,8 +129,13 @@ SET(_moc_HEADERS
|
||||
MeasureGUI_ManageDimensionsDlg.h
|
||||
MeasureGUI_CreateDimensionDlg.h
|
||||
MeasureGUI_DimensionInteractor.h
|
||||
MeasureGUI_ShapeStatisticsDlg.h
|
||||
)
|
||||
|
||||
IF(SALOME_USE_PLOT2DVIEWER)
|
||||
LIST(APPEND _moc_HEADERS
|
||||
MeasureGUI_ShapeStatisticsDlg.h
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
# header files / uic wrappings
|
||||
QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
|
||||
@ -164,11 +169,16 @@ SET(MeasureGUI_SOURCES
|
||||
MeasureGUI_DimensionCreateTool.cxx
|
||||
MeasureGUI_DimensionInteractor.cxx
|
||||
MeasureGUI_DimensionFilter.cxx
|
||||
MeasureGUI_ShapeStatisticsDlg.cxx
|
||||
${_moc_SOURCES}
|
||||
${_uic_files}
|
||||
)
|
||||
|
||||
IF(SALOME_USE_PLOT2DVIEWER)
|
||||
LIST(APPEND MeasureGUI_SOURCES
|
||||
MeasureGUI_ShapeStatisticsDlg.cxx
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(MeasureGUI ${MeasureGUI_SOURCES})
|
||||
|
@ -53,7 +53,9 @@
|
||||
#include "MeasureGUI_FastCheckIntersectionsDlg.h" // Method FAST CHECK INTERSCTIONS
|
||||
#include "MeasureGUI_PointDlg.h" // Method POINTCOORDINATES
|
||||
#include "MeasureGUI_ManageDimensionsDlg.h" // Method MANAGEDIMENSIONS
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
#include "MeasureGUI_ShapeStatisticsDlg.h" // Method SHAPE STATISTICS
|
||||
#endif
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
@ -130,9 +132,11 @@ bool MeasureGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
|
||||
case GEOMOp::OpFastCheckInters:
|
||||
dlg = new MeasureGUI_FastCheckIntersectionsDlg( getGeometryGUI(), parent );
|
||||
break; // FAST CHECK INTERSCTIONS
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
case GEOMOp::OpShapeStatistics:
|
||||
dlg = new MeasureGUI_ShapeStatisticsDlg( parent );
|
||||
break; // FAST CHECK INTERSCTIONS
|
||||
break; // SHAPE STATISTICS
|
||||
#endif
|
||||
case GEOMOp::OpPointCoordinates:
|
||||
dlg = new MeasureGUI_PointDlg( getGeometryGUI(), parent );
|
||||
break; // POINT COORDINATES
|
||||
|
Loading…
Reference in New Issue
Block a user