Salome HOME
0022768: [EDF] Model inspector
[modules/geom.git] / src / RepairGUI / RepairGUI_InspectObjectDlg.h
1 // Copyright (C) 2014  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 <QTreeWidget>
29 #include <QLabel>
30 #include <QLineEdit>
31 #include <QPointer>
32
33 class RepairGUI_InspectObjectDlg : public QDialog, public GEOMBase_Helper
34
35   Q_OBJECT
36
37   class TreeWidgetItem;
38   class Delegate;
39
40 public:
41   RepairGUI_InspectObjectDlg( SUIT_Desktop* );
42   ~RepairGUI_InspectObjectDlg();
43
44 private slots:
45   void                    onEditMainShape();
46
47   void                    onItemClicked( QTreeWidgetItem*, int );
48   void                    onItemChanged( QTreeWidgetItem*, int );
49   void                    onItemSelectionChanged();
50   void                    onItemExpanded( QTreeWidgetItem* );
51   void                    onHeaderClicked( int );
52   void                    onItemDoubleClicked( QTreeWidgetItem*, int );
53
54   void                    onViewSelectionChanged();
55
56   void                    onWindowActivated( SUIT_ViewWindow* );
57   void                    onCloseView( SUIT_ViewWindow* );
58
59   void                    clickOnShow();
60   void                    clickOnShowOnly();
61   void                    clickOnHide();
62   void                    clickOnPublish();
63   void                    clickOnHelp();
64
65 private:
66   void                    init();
67   void                    checkVisibleIcon();
68   void                    addSubObjects( TreeWidgetItem* );
69   void                    displayItem( TreeWidgetItem* );
70   void                    setItemDisplayStatus( TreeWidgetItem* theItem, bool theIsVisible );
71   void                    setMainObjectTransparency( double );
72   void                    restoreParam();
73
74   SalomeApp_Application*     myApp;
75   QPointer<SUIT_ViewWindow>  myViewWindow;
76
77   QIcon                      myVisible;
78   QIcon                      myInvisible;
79
80   QTreeWidget*               myTreeObjects;
81   QLineEdit*                 myEditMainShape;
82
83   bool                       myIsSelectAll;
84   double                     myTransparency;
85
86 };
87
88 #endif