6822a3be |
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 ViewControl_Tools_H |
17 | #define ViewControl_Tools_H |
18 | |
19 | #include <Standard.hxx> |
20 | #include <Standard_Macro.hxx> |
21 | |
22 | #include <Standard_WarningsDisable.hxx> |
23 | #include <QString> |
24 | #include <Standard_WarningsRestore.hxx> |
25 | |
26 | class QAction; |
27 | class QObject; |
28 | class QWidget; |
29 | |
30 | //! \class ViewControl_Tools |
31 | //! \brief The tool that gives auxiliary methods for qt elements manipulation |
32 | class ViewControl_Tools |
33 | { |
34 | public: |
35 | |
36 | //! Creates an action with the given text connected to the slot |
37 | //! \param theText an action text value |
38 | //! \param theSlot a listener of triggered signal of the new action |
39 | //! \param theParent a parent object |
40 | //! \param theContext listener of the action toggle |
41 | //! \return a new action |
42 | Standard_EXPORT static QAction* CreateAction (const QString& theText, const char* theSlot, |
43 | QObject* theParent, QObject* theContext); |
44 | |
45 | //! Change palette of the widget to have white foreground |
46 | //! \param theControl a widget to be modified |
47 | Standard_EXPORT static void SetWhiteBackground (QWidget* theControl); |
48 | |
49 | }; |
50 | |
51 | #endif |