Version: 9.16.0
OperationGUI_ExtractionDlg.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
6// This library is free software; you can redistribute it and/or
7// modify it under the terms of the GNU Lesser General Public
8// License as published by the Free Software Foundation; either
9// version 2.1 of the License, or (at your option) any later version.
10//
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public
17// License along with this library; if not, write to the Free Software
18// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23#ifndef OPERATIONGUI_EXTRACTIONDLG_H
24#define OPERATIONGUI_EXTRACTIONDLG_H
25
26#include <GEOMBase_Skeleton.h>
27
28#include <TopTools_IndexedMapOfShape.hxx>
29#include <TColStd_MapOfInteger.hxx>
30
31class QComboBox;
32class QListWidget;
33class QTreeWidget;
34class QTreeWidgetItem;
35
36
37//=================================================================================
38// class : OperationGUI_ExtractionDlg
39// purpose :
40//=================================================================================
42{
43
44 Q_OBJECT
45
46public:
47
50
51protected:
52
53 // redefined from GEOMBase_Helper and MeasureGUI_Skeleton
54 virtual GEOM::GEOM_IOperations_ptr createOperation();
55 virtual bool execute(ObjectList &);
56 virtual void activateSelection();
57 virtual bool isValid( QString& );
58
59private slots:
60
62 void ClickOnOk();
63 bool ClickOnApply();
64 void onShapeTypeChanged();
65 void onAddExtracted();
66 void onRemoveExtracted();
68 void showOnlySelected();
69 void hideSelected();
70 void showAllSelected();
71 void onRebuild();
72 void ActivateThisDialog();
74
75private:
76
77 void Init();
79 void updateFilteredList();
80 void resetBuildData(const bool isEnableBuild);
81 bool isEmptyExtracted();
82 void selectMainShape();
83 void selectSubShapes();
84 void enterEvent(QEvent *);
85 bool getResult
86 (GEOM::GEOM_Object_ptr &theResult,
88 QString getSubShapeEntry(const int theId);
89 Handle_SALOME_InteractiveObject createIO(const char *theEntry);
90 void displaySubShape(const int theId);
91 void eraseSubShape(const int theId);
92 void eraseAll();
93 void restoreViewer();
94
95private:
96
97 GEOM::GEOM_Object_var myObj;
98 QPushButton *mySelBtn;
99 QLineEdit *myMainShapeEdit;
107 QPushButton *myRebuildBtn;
108 TColStd_MapOfInteger myMapExtractedIDs;
110 TColStd_MapOfInteger myMapDisplayedIDs;
111 TopTools_IndexedMapOfShape myIndices;
112
113};
114
115#endif // OPERATIONGUI_EXTRACTIONDLG_H
std::list< GEOM::GEOM_Object_ptr > ObjectList
Definition: GEOMBase_Helper.h:46
Definition: GEOMBase_Skeleton.h:53
Definition: GeometryGUI.h:74
Definition: OperationGUI_ExtractionDlg.h:42
bool isEmptyExtracted()
Definition: OperationGUI_ExtractionDlg.cxx:479
virtual bool execute(ObjectList &)
Definition: OperationGUI_ExtractionDlg.cxx:1210
bool myIsHiddenMain
Definition: OperationGUI_ExtractionDlg.h:109
QListWidget * myFilteredList
Definition: OperationGUI_ExtractionDlg.h:101
TColStd_MapOfInteger myMapExtractedIDs
Definition: OperationGUI_ExtractionDlg.h:108
QPushButton * mySelBtn
Definition: OperationGUI_ExtractionDlg.h:98
Handle_SALOME_InteractiveObject createIO(const char *theEntry)
Definition: OperationGUI_ExtractionDlg.cxx:1244
QTreeWidgetItem * myTopItems[8]
Definition: OperationGUI_ExtractionDlg.h:106
OperationGUI_ExtractionDlg(GeometryGUI *, QWidget *)
Definition: OperationGUI_ExtractionDlg.cxx:203
GEOM::GEOM_Object_var myObj
Definition: OperationGUI_ExtractionDlg.h:97
QComboBox * mySubShTypeCompo
Definition: OperationGUI_ExtractionDlg.h:100
QLineEdit * myMainShapeEdit
Definition: OperationGUI_ExtractionDlg.h:99
void displaySubShape(const int theId)
Definition: OperationGUI_ExtractionDlg.cxx:1256
QTreeWidget * myExtractedTree
Definition: OperationGUI_ExtractionDlg.h:102
TColStd_MapOfInteger myMapDisplayedIDs
Definition: OperationGUI_ExtractionDlg.h:110
bool getResult(GEOM::GEOM_Object_ptr &theResult, GEOM::GEOM_IShapesOperations::ExtractionStats &theStats)
Definition: OperationGUI_ExtractionDlg.cxx:1128
virtual void activateSelection()
Definition: OperationGUI_ExtractionDlg.cxx:1107
void hideSelected()
Definition: OperationGUI_ExtractionDlg.cxx:907
void onShapeTypeChanged()
Definition: OperationGUI_ExtractionDlg.cxx:654
~OperationGUI_ExtractionDlg()
Definition: OperationGUI_ExtractionDlg.cxx:333
void updateFilteredList()
Definition: OperationGUI_ExtractionDlg.cxx:432
void resetBuildData(const bool isEnableBuild)
Definition: OperationGUI_ExtractionDlg.cxx:466
QString getSubShapeEntry(const int theId)
Definition: OperationGUI_ExtractionDlg.cxx:1230
bool updateSubShTypeCompo()
Definition: OperationGUI_ExtractionDlg.cxx:394
bool ClickOnApply()
Definition: OperationGUI_ExtractionDlg.cxx:639
void Init()
Definition: OperationGUI_ExtractionDlg.cxx:342
void showOnlySelected()
Definition: OperationGUI_ExtractionDlg.cxx:835
QListWidget * myModifiedList
Definition: OperationGUI_ExtractionDlg.h:104
void ClickOnOk()
Definition: OperationGUI_ExtractionDlg.cxx:628
void eraseAll()
Definition: OperationGUI_ExtractionDlg.cxx:1299
QPushButton * myRebuildBtn
Definition: OperationGUI_ExtractionDlg.h:107
void onRebuild()
Definition: OperationGUI_ExtractionDlg.cxx:944
QListWidget * myRemovedList
Definition: OperationGUI_ExtractionDlg.h:103
virtual bool isValid(QString &)
Definition: OperationGUI_ExtractionDlg.cxx:1190
QListWidget * myAddedList
Definition: OperationGUI_ExtractionDlg.h:105
void eraseSubShape(const int theId)
Definition: OperationGUI_ExtractionDlg.cxx:1285
void selectMainShape()
Definition: OperationGUI_ExtractionDlg.cxx:500
void enterEvent(QEvent *)
Definition: OperationGUI_ExtractionDlg.cxx:1116
void restoreViewer()
Definition: OperationGUI_ExtractionDlg.cxx:1321
void ActivateThisDialog()
Definition: OperationGUI_ExtractionDlg.cxx:1089
void showAllSelected()
Definition: OperationGUI_ExtractionDlg.cxx:924
void onListSelectionChanged()
Definition: OperationGUI_ExtractionDlg.cxx:788
void SetEditCurrentArgument()
Definition: OperationGUI_ExtractionDlg.cxx:1045
TopTools_IndexedMapOfShape myIndices
Definition: OperationGUI_ExtractionDlg.h:111
void SelectionIntoArgument()
Definition: OperationGUI_ExtractionDlg.cxx:1030
void selectSubShapes()
Definition: OperationGUI_ExtractionDlg.cxx:556
virtual GEOM::GEOM_IOperations_ptr createOperation()
Definition: OperationGUI_ExtractionDlg.cxx:1201
void onRemoveExtracted()
Definition: OperationGUI_ExtractionDlg.cxx:704
void onAddExtracted()
Definition: OperationGUI_ExtractionDlg.cxx:664
sequence< ExtractionStat > ExtractionStats
Definition: GEOM_Gen.idl:2893