Revert "0029369: ShapeFix_Face algorithm does not heal properly the face lying on...
[occt.git] / tools / TreeModel / TreeModel_ContextMenu.hxx
1 // Created on: 2017-06-16
2 // Created by: Natalia ERMOLAEVA
3 // Copyright (c) 2017 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement. 
15
16 #ifndef TreeModel_ContextMenu_H
17 #define TreeModel_ContextMenu_H
18
19 #include <Standard.hxx>
20 #include <Standard_Macro.hxx>
21
22 #include <Standard_WarningsDisable.hxx>
23 #include <QObject>
24 #include <QPoint>
25 #include <Standard_WarningsRestore.hxx>
26
27 class QTreeView;
28
29 //! \class TreeModel_ContextMenu
30 //! \brief Creates actions to show/hide tree view columns
31 class TreeModel_ContextMenu : public QObject
32 {
33   Q_OBJECT
34 public:
35   //! Constructor
36   Standard_EXPORT TreeModel_ContextMenu (QTreeView* theTreeView);
37
38   //! Destructor
39   ~TreeModel_ContextMenu() {}
40
41 protected slots:
42   //! Shows context menu for tree view header. It contains actions to change columns visibility.
43   //! \param thePosition a clicked point
44   void onTreeViewHeaderContextMenuRequested (const QPoint& thePosition);
45
46   //! Changes clicked column visiblity
47   void onColumnVisibilityChanged();
48
49 private:
50   QTreeView* myTreeView;
51 };
52
53 #endif