Version: 9.16.0
GEOMToolsGUI_ReduceStudyDlg.h
Go to the documentation of this file.
1// Copyright (C) 2014-2026 CEA, EDF, OPEN CASCADE
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef GEOMTOOLSGUI_REDUCESTUDYDLG_H
21#define GEOMTOOLSGUI_REDUCESTUDYDLG_H
22
23// internal includes
24#include "GEOM_ToolsGUI.hxx"
25
26// GEOM includes
27#include <GEOMUtils.hxx>
28#include <GeometryGUI.h>
29#include <GEOM_Displayer.h>
30
31// Qt includes
32#include <QDialog>
33#include <QTreeWidget>
34#include <QCheckBox>
35#include <QButtonGroup>
36#include <QGroupBox>
37
38// Cpp includes
39#include <set>
40
42{
43
44public:
45 GEOMToolsGUI_TreeWidgetItem( QTreeWidget*, const QStringList&, char*, int = Type );
46 GEOMToolsGUI_TreeWidgetItem( QTreeWidgetItem*, const QStringList&, char*, int = Type );
48
49 bool isVisible();
50 void setVisible( bool, QIcon& );
51
52 char* getStudyEntry() const;
53
54private:
57
58};
59
61{
62 Q_OBJECT
63
64public:
67
68private slots:
69 void onItemClicked(QTreeWidgetItem*, int );
70 void onHeaderClicked( int );
71
72 void selectionChanged();
73
74 void update();
75
76 void clickOnOk();
77 void clickOnHelp();
78
79private:
80 void init( const std::set<std::string>& theObjectEntries );
81 std::set<std::string> getSelectedObjects() const;
82
83 void createTreeWidget( QTreeWidget* );
84 QGroupBox* createButtonGroup( QButtonGroup* );
85
86 void addObjectsToTree( QTreeWidget*, std::set<std::string>& );
87 GEOMToolsGUI_TreeWidgetItem* addSubObject( QTreeWidget*, std::set<std::string>&, GEOM::GEOM_Object_var );
88 GEOMToolsGUI_TreeWidgetItem* findObjectInTree( QTreeWidget*, GEOM::GEOM_Object_var );
89
90 void checkVisibleIcon( QTreeWidget* );
91 bool isObjectDrawable( std::string );
92
93 void unpublishObjects( std::set<std::string>& );
94
95 void removeObjects( std::set<std::string>& );
96 void removeObject( std::string& );
97
98 void removeEmptyFolders();
99 void getEmptyFolders( _PTR(SObject), std::set<std::string>& );
100
103 std::map<QTreeWidget*,bool> myMapTreeSelectAll;
104
105 QButtonGroup* myGroupIntermediates;
106 QButtonGroup* myGroupSubObjects;
107
109 QCheckBox* myCBSoftRemoval;
110
111 std::set<std::string> myMainEntries;
112
113 std::set<std::string> myKeptObjects;
114 std::set<std::string> myRemovedObjects;
115 std::set<std::string> myListParents;
116 std::set<std::string> myListSubObjects;
117
120
122 SalomeApp_Application* myApp;
123
124};
125
126#endif
#define GEOMTOOLSGUI_EXPORT
Definition: GEOM_ToolsGUI.hxx:37
Definition: GEOMToolsGUI_ReduceStudyDlg.h:61
QTreeWidget * myTreeRemoveObjects
Definition: GEOMToolsGUI_ReduceStudyDlg.h:102
QTreeWidget * myTreeKeptObjects
Definition: GEOMToolsGUI_ReduceStudyDlg.h:101
QButtonGroup * myGroupIntermediates
Definition: GEOMToolsGUI_ReduceStudyDlg.h:105
std::set< std::string > myListParents
Definition: GEOMToolsGUI_ReduceStudyDlg.h:115
std::set< std::string > myRemovedObjects
Definition: GEOMToolsGUI_ReduceStudyDlg.h:114
std::set< std::string > myMainEntries
Definition: GEOMToolsGUI_ReduceStudyDlg.h:111
GEOM_Displayer myDisplayer
Definition: GEOMToolsGUI_ReduceStudyDlg.h:121
QCheckBox * myCBRemoveEmptyFolder
Definition: GEOMToolsGUI_ReduceStudyDlg.h:108
QIcon myInvisible
Definition: GEOMToolsGUI_ReduceStudyDlg.h:119
QIcon myVisible
Definition: GEOMToolsGUI_ReduceStudyDlg.h:118
SalomeApp_Application * myApp
Definition: GEOMToolsGUI_ReduceStudyDlg.h:122
std::map< QTreeWidget *, bool > myMapTreeSelectAll
Definition: GEOMToolsGUI_ReduceStudyDlg.h:103
QCheckBox * myCBSoftRemoval
Definition: GEOMToolsGUI_ReduceStudyDlg.h:109
QButtonGroup * myGroupSubObjects
Definition: GEOMToolsGUI_ReduceStudyDlg.h:106
std::set< std::string > myKeptObjects
Definition: GEOMToolsGUI_ReduceStudyDlg.h:113
std::set< std::string > myListSubObjects
Definition: GEOMToolsGUI_ReduceStudyDlg.h:116
Definition: GEOMToolsGUI_ReduceStudyDlg.h:42
~GEOMToolsGUI_TreeWidgetItem()
Definition: GEOMToolsGUI_ReduceStudyDlg.cxx:719
GEOMToolsGUI_TreeWidgetItem(QTreeWidget *, const QStringList &, char *, int=Type)
Definition: GEOMToolsGUI_ReduceStudyDlg.cxx:703
bool isVisible()
Definition: GEOMToolsGUI_ReduceStudyDlg.cxx:723
char * myStudyEntry
Definition: GEOMToolsGUI_ReduceStudyDlg.h:56
char * getStudyEntry() const
Definition: GEOMToolsGUI_ReduceStudyDlg.cxx:734
bool myVisible
Definition: GEOMToolsGUI_ReduceStudyDlg.h:55
void setVisible(bool, QIcon &)
Definition: GEOMToolsGUI_ReduceStudyDlg.cxx:728
Definition: GEOM_Displayer.h:72
Type
Definition: XAO_XaoUtils.hxx:62