Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RepairGUI_InspectObjectDlg.h
Go to the documentation of this file.
1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D, 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 RepairGUI_InspectObjectDlg_H
21 #define RepairGUI_InspectObjectDlg_H
22 
23 // GEOM includes
24 #include <GEOMBase_Helper.h>
25 
26 // Qt includes
27 #include <QDialog>
28 #include <QPointer>
29 #include <QIcon>
30 
31 // OCCT includes
32 #include <TopTools_IndexedMapOfShape.hxx>
33 
34 class GeometryGUI;
35 class SalomeApp_DoubleSpinBox;
36 
37 class QButtonGroup;
38 class QComboBox;
39 class QGroupBox;
40 class QLabel;
41 class QLineEdit;
42 class QPushButton;
43 class QStackedLayout;
44 class QTreeWidget;
45 class QTreeWidgetItem;
46 
48 {
49  Q_OBJECT
50 
51  class TreeWidgetItem;
52  class Delegate;
53 
54 public:
55  RepairGUI_InspectObjectDlg(GeometryGUI*, SUIT_Desktop* );
57 
58 private slots:
59  void onEditMainShape();
60 
61  void onItemClicked( QTreeWidgetItem*, int );
62  void onItemChanged( QTreeWidgetItem*, int );
65  void onHeaderClicked( int );
66 
68 
69  void onWindowActivated( SUIT_ViewWindow* );
70  void onCloseView( SUIT_ViewWindow* );
71 
72  void clickOnShow();
73  void clickOnShowOnly();
74  void clickOnHide();
75  void clickOnPublish();
76  void clickOnHelp();
77  void clickOnResetToMin();
78  void clickOnResetToMax();
79  void clickOnShowAll();
80  void clickOnHideAll();
82  void ActivateThisDialog();
83  void onFilterToggled(bool);
84  void onInitFilteredData();
85  void onFilterData();
86 
87 private:
88  void createTreeWidget(QTreeWidget *&theTreeObjects);
89  void init();
90  void initSpinBox(SalomeApp_DoubleSpinBox* spinBox,
91  double min, double max,
92  double step, const char* quantity);
93  void initTreeWidget(QTreeWidget *theTopLevelItem);
94  void enterEvent( QEvent* );
95  void checkVisibleIcon();
96  void addSubObjects( TreeWidgetItem*, const TopTools_IndexedMapOfShape &);
97 
98  void displayItem( TreeWidgetItem* );
99  void setItemDisplayStatus( TreeWidgetItem* theItem, bool theIsVisible );
100  void setMainObjectTransparency( double );
101  void restoreParam();
102  void updateViewer(const bool theIsHideOtherTree);
103 
104  QPointer<SUIT_ViewWindow> myViewWindow;
106 
107  QIcon myVisible;
108  QIcon myInvisible;
109 
113  QLineEdit *myEditMainShape;
115  QButtonGroup *myShapeTypeBtnGrp;
116  QComboBox *myComparisonCompo;
117  SalomeApp_DoubleSpinBox *myTolEdit;
120  QStackedLayout *myTreesLayout;
121  QPushButton *myMinTolResetBtn;
122  QPushButton *myMaxTolResetBtn;
123  double myMaxTol;
124  double myMinTol;
127 
128 };
129 
130 #endif