1 // Created on: 2017-06-16
2 // Created by: Natalia ERMOLAEVA
3 // Copyright (c) 2017 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef VInspector_ToolBar_H
17 #define VInspector_ToolBar_H
19 #include <Standard.hxx>
20 #include <Standard_Macro.hxx>
21 #include <inspector/VInspector_ToolActionType.hxx>
23 #include <Standard_WarningsDisable.hxx>
26 #include <Standard_WarningsRestore.hxx>
31 //! \class VInspector_ToolBar
32 //! Container of View tool bar actions
33 class VInspector_ToolBar : public QObject
40 Standard_EXPORT VInspector_ToolBar (QWidget* theParent);
43 virtual ~VInspector_ToolBar() Standard_OVERRIDE {}
45 //! Returns main control
46 QWidget* GetControl() const { return myMainWindow; }
48 //! Returns tool button by action index
49 //! \param theActionId index of action
50 Standard_EXPORT QPushButton* GetToolButton (const VInspector_ToolActionType& theActionId) const;
54 //! Signal about action click
55 //! \param theActionId an action index
56 void actionClicked (int theActionId);
60 //! Provides switch for action. Emits signal about action click
61 void onActionClicked();
65 QWidget* myMainWindow; //!< the main control
66 QMap<VInspector_ToolActionType, QPushButton*> myActionsMap; //!< container of type into button