1 | /* $Id: UIToolsView.h 98103 2023-01-17 14:15:46Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIToolsView class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2012-2023 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.virtualbox.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef FEQT_INCLUDED_SRC_manager_tools_UIToolsView_h
|
---|
29 | #define FEQT_INCLUDED_SRC_manager_tools_UIToolsView_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* GUI includes: */
|
---|
35 | #include "QIGraphicsView.h"
|
---|
36 | #include "QIWithRetranslateUI.h"
|
---|
37 |
|
---|
38 | /* Forward declarations: */
|
---|
39 | class UITools;
|
---|
40 |
|
---|
41 | /** QIGraphicsView extension used as VM Tools-pane view. */
|
---|
42 | class UIToolsView : public QIWithRetranslateUI<QIGraphicsView>
|
---|
43 | {
|
---|
44 | Q_OBJECT;
|
---|
45 |
|
---|
46 | signals:
|
---|
47 |
|
---|
48 | /** Notifies listeners about resize. */
|
---|
49 | void sigResized();
|
---|
50 |
|
---|
51 | public:
|
---|
52 |
|
---|
53 | /** Constructs a Tools-view passing @a pParent to the base-class.
|
---|
54 | * @param pParent Brings the Tools-container to embed into. */
|
---|
55 | UIToolsView(UITools *pParent);
|
---|
56 |
|
---|
57 | /** @name General stuff.
|
---|
58 | * @{ */
|
---|
59 | /** Returns the Tools reference. */
|
---|
60 | UITools *tools() const { return m_pTools; }
|
---|
61 | /** @} */
|
---|
62 |
|
---|
63 | public slots:
|
---|
64 |
|
---|
65 | /** @name General stuff.
|
---|
66 | * @{ */
|
---|
67 | /** Handles focus change to @a pFocusItem. */
|
---|
68 | void sltFocusChanged();
|
---|
69 | /** @} */
|
---|
70 |
|
---|
71 | /** @name Layout stuff.
|
---|
72 | * @{ */
|
---|
73 | /** Handles minimum width @a iHint change. */
|
---|
74 | void sltMinimumWidthHintChanged(int iHint);
|
---|
75 | /** Handles minimum height @a iHint change. */
|
---|
76 | void sltMinimumHeightHintChanged(int iHint);
|
---|
77 | /** @} */
|
---|
78 |
|
---|
79 | protected:
|
---|
80 |
|
---|
81 | /** @name Event handling stuff.
|
---|
82 | * @{ */
|
---|
83 | /** Handles translation event. */
|
---|
84 | virtual void retranslateUi() RT_OVERRIDE;
|
---|
85 |
|
---|
86 | /** Handles resize @a pEvent. */
|
---|
87 | virtual void resizeEvent(QResizeEvent *pEvent) RT_OVERRIDE;
|
---|
88 | /** @} */
|
---|
89 |
|
---|
90 | private:
|
---|
91 |
|
---|
92 | /** @name Prepare/Cleanup cascade.
|
---|
93 | * @{ */
|
---|
94 | /** Prepares all. */
|
---|
95 | void prepare();
|
---|
96 | /** Prepares palette. */
|
---|
97 | void preparePalette();
|
---|
98 | /** @} */
|
---|
99 |
|
---|
100 | /** @name General stuff.
|
---|
101 | * @{ */
|
---|
102 | /** Updates scene rectangle. */
|
---|
103 | void updateSceneRect();
|
---|
104 | /** @} */
|
---|
105 |
|
---|
106 | /** @name General stuff.
|
---|
107 | * @{ */
|
---|
108 | /** Holds the Tools-pane reference. */
|
---|
109 | UITools *m_pTools;
|
---|
110 | /** @} */
|
---|
111 |
|
---|
112 | /** @name Layout stuff.
|
---|
113 | * @{ */
|
---|
114 | /** Holds the minimum width hint. */
|
---|
115 | int m_iMinimumWidthHint;
|
---|
116 | /** Holds the minimum height hint. */
|
---|
117 | int m_iMinimumHeightHint;
|
---|
118 | /** @} */
|
---|
119 | };
|
---|
120 |
|
---|
121 | #endif /* !FEQT_INCLUDED_SRC_manager_tools_UIToolsView_h */
|
---|