1 // Copyright (C) 2014-2020 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 #include <TopTools_IndexedMapOfShape.hxx>
35 class SalomeApp_DoubleSpinBox;
45 class QTreeWidgetItem;
47 class RepairGUI_InspectObjectDlg : public QDialog, public GEOMBase_Helper
55 RepairGUI_InspectObjectDlg(GeometryGUI*, SUIT_Desktop* );
56 ~RepairGUI_InspectObjectDlg();
59 void onEditMainShape();
61 void onItemClicked( QTreeWidgetItem*, int );
62 void onItemChanged( QTreeWidgetItem*, int );
63 void onItemSelectionChanged();
64 void onItemExpanded( QTreeWidgetItem* );
65 void onHeaderClicked( int );
67 void onViewSelectionChanged();
69 void onWindowActivated( SUIT_ViewWindow* );
70 void onCloseView( SUIT_ViewWindow* );
73 void clickOnShowOnly();
75 void clickOnPublish();
77 void clickOnResetToMin();
78 void clickOnResetToMax();
79 void clickOnShowAll();
80 void clickOnHideAll();
81 void DeactivateActiveDialog();
82 void ActivateThisDialog();
83 void onFilterToggled(bool);
84 void onInitFilteredData();
88 void createTreeWidget(QTreeWidget *&theTreeObjects);
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 &);
98 void displayItem( TreeWidgetItem* );
99 void setItemDisplayStatus( TreeWidgetItem* theItem, bool theIsVisible );
100 void setMainObjectTransparency( double );
102 void updateViewer(const bool theIsHideOtherTree);
104 QPointer<SUIT_ViewWindow> myViewWindow;
105 GeometryGUI* myGeomGUI;
110 QTreeWidget *myTreeObjects;
111 QTreeWidget *myFilteredTreeObjects;
112 QTreeWidget *myCurrentTreeObjects;
113 QLineEdit *myEditMainShape;
114 QGroupBox *myTolFilterGrp;
115 QButtonGroup *myShapeTypeBtnGrp;
116 QComboBox *myComparisonCompo;
117 SalomeApp_DoubleSpinBox *myTolEdit;
118 QLabel *myMinTolValLabel;
119 QLabel *myMaxTolValLabel;
120 QStackedLayout *myTreesLayout;
121 QPushButton *myMinTolResetBtn;
122 QPushButton *myMaxTolResetBtn;
126 double myTransparency;