1 // Copyright (C) 2014 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef GEOMTOOLSGUI_REDUCESTUDYDLG_H
21 #define GEOMTOOLSGUI_REDUCESTUDYDLG_H
23 #include "GEOM_ToolsGUI.hxx"
25 #include <QTreeWidget>
28 #include <GEOMUtils.hxx>
29 #include <GeometryGUI.h>
30 #include <GEOM_Displayer.h>
34 class GEOMToolsGUI_TreeWidgetItem : public QTreeWidgetItem
37 GEOMToolsGUI_TreeWidgetItem( QTreeWidget*, const QStringList&, char*, bool, int = Type );
38 GEOMToolsGUI_TreeWidgetItem( QTreeWidgetItem*, const QStringList&, char*, bool, int = Type );
39 ~GEOMToolsGUI_TreeWidgetItem();
42 void setVisible( bool, QIcon& );
44 char* getStudyEntry() const;
51 class GEOMTOOLSGUI_EXPORT GEOMToolsGUI_ReduceStudyDlg : public QDialog
56 GEOMToolsGUI_ReduceStudyDlg( const GEOM::string_array&, QWidget* );
57 ~GEOMToolsGUI_ReduceStudyDlg();
61 void onUnpublishIntermediate( bool );
62 void onRemoveIntermediate( bool );
63 void onKeepSubObjects( bool );
64 void onRemoveEmptyFolder( bool );
65 void onSoftRemoval( bool );
71 void onSelectionChanged();
72 void onItemClicked(QTreeWidgetItem*, int );
73 void onHeaderClicked( int );
79 void onShowOnlySelected();
80 void checkVisibleIcon( QTreeWidget* );
81 void sortObjects( QTreeWidget*, std::set<std::string>& );
82 GEOMToolsGUI_TreeWidgetItem* addSubObject( QTreeWidget*, std::set<std::string>&, GEOM::GEOM_Object_var );
83 GEOMToolsGUI_TreeWidgetItem* findObjectInTree( QTreeWidget*, GEOM::GEOM_Object_var );
85 QTreeWidget* myTreeKeptObjects;
86 QTreeWidget* myTreeRemoveObjects;
88 QCheckBox* myCBUnpublishIntermediate;
89 QCheckBox* myCBRemoveIntermediate;
90 QCheckBox* myCBKeepSubObjects;
91 QCheckBox* myCBRemoveEmptyFolder;
92 QCheckBox* myCBSoftRemoval;
94 std::set<std::string> myMainEntries;
101 GEOM_Displayer myDisplayer;
103 std::set<std::string> myParents;
104 std::set<std::string> mySubObjects;
105 std::set<std::string> myOthers;
107 std::map<QTreeWidget*,bool> myMapTreeSelectAll;