1 // Copyright (C) 2014-2015 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 RepairGUI_InspectObjectDlg_H
21 #define RepairGUI_InspectObjectDlg_H
24 #include <GEOMBase_Helper.h>
32 class SalomeApp_DoubleSpinBox;
42 class QTreeWidgetItem;
44 class TopTools_IndexedMapOfShape;
46 class RepairGUI_InspectObjectDlg : public QDialog, public GEOMBase_Helper
54 RepairGUI_InspectObjectDlg(GeometryGUI*, SUIT_Desktop* );
55 ~RepairGUI_InspectObjectDlg();
58 void onEditMainShape();
60 void onItemClicked( QTreeWidgetItem*, int );
61 void onItemChanged( QTreeWidgetItem*, int );
62 void onItemSelectionChanged();
63 void onItemExpanded( QTreeWidgetItem* );
64 void onHeaderClicked( int );
66 void onViewSelectionChanged();
68 void onWindowActivated( SUIT_ViewWindow* );
69 void onCloseView( SUIT_ViewWindow* );
72 void clickOnShowOnly();
74 void clickOnPublish();
76 void clickOnResetToMin();
77 void clickOnResetToMax();
78 void clickOnShowAll();
79 void clickOnHideAll();
80 void DeactivateActiveDialog();
81 void ActivateThisDialog();
82 void onFilterToggled(bool);
83 void onInitFilteredData();
87 void createTreeWidget(QTreeWidget *&theTreeObjects);
89 void initSpinBox(SalomeApp_DoubleSpinBox* spinBox,
90 double min, double max,
91 double step, const char* quantity);
92 void initTreeWidget(QTreeWidget *theTopLevelItem);
93 void enterEvent( QEvent* );
94 void checkVisibleIcon();
95 void addSubObjects( TreeWidgetItem*, const TopTools_IndexedMapOfShape &);
97 void displayItem( TreeWidgetItem* );
98 void setItemDisplayStatus( TreeWidgetItem* theItem, bool theIsVisible );
99 void setMainObjectTransparency( double );
101 void updateViewer(const bool theIsHideOtherTree);
103 QPointer<SUIT_ViewWindow> myViewWindow;
104 GeometryGUI* myGeomGUI;
109 QTreeWidget *myTreeObjects;
110 QTreeWidget *myFilteredTreeObjects;
111 QTreeWidget *myCurrentTreeObjects;
112 QLineEdit *myEditMainShape;
113 QGroupBox *myTolFilterGrp;
114 QButtonGroup *myShapeTypeBtnGrp;
115 QComboBox *myComparisonCompo;
116 SalomeApp_DoubleSpinBox *myTolEdit;
117 QLabel *myMinTolValLabel;
118 QLabel *myMaxTolValLabel;
119 QStackedLayout *myTreesLayout;
120 QPushButton *myMinTolResetBtn;
121 QPushButton *myMaxTolResetBtn;
125 double myTransparency;