VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.h@ 105266

Last change on this file since 105266 was 104251, checked in by vboxsync, 12 months ago

FE/Qt. bugref:10622. Using new UITranslationEventListener in the manager UI classes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/* $Id: UIToolsView.h 104251 2024-04-09 12:36:47Z 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
37/* Forward declarations: */
38class UITools;
39
40/** QIGraphicsView extension used as VM Tools-pane view. */
41class UIToolsView : public QIGraphicsView
42{
43 Q_OBJECT;
44
45signals:
46
47 /** Notifies listeners about resize. */
48 void sigResized();
49
50public:
51
52 /** Constructs a Tools-view passing @a pParent to the base-class.
53 * @param pParent Brings the Tools-container to embed into. */
54 UIToolsView(UITools *pParent);
55
56 /** @name General stuff.
57 * @{ */
58 /** Returns the Tools reference. */
59 UITools *tools() const { return m_pTools; }
60 /** @} */
61
62public slots:
63
64 /** @name General stuff.
65 * @{ */
66 /** Handles focus change to @a pFocusItem. */
67 void sltFocusChanged();
68 /** @} */
69
70 /** @name Layout stuff.
71 * @{ */
72 /** Handles minimum width @a iHint change. */
73 void sltMinimumWidthHintChanged(int iHint);
74 /** Handles minimum height @a iHint change. */
75 void sltMinimumHeightHintChanged(int iHint);
76 /** @} */
77
78protected:
79
80 /** @name Event handling stuff.
81 * @{ */
82 /** Handles resize @a pEvent. */
83 virtual void resizeEvent(QResizeEvent *pEvent) RT_OVERRIDE;
84 /** @} */
85
86private slots:
87
88 /** @name Event handling stuff.
89 * @{ */
90 /** Handles translation event. */
91 void sltRetranslateUI();
92 /** @} */
93
94private:
95
96 /** @name Prepare/Cleanup cascade.
97 * @{ */
98 /** Prepares all. */
99 void prepare();
100 /** Prepares palette. */
101 void preparePalette();
102 /** @} */
103
104 /** @name General stuff.
105 * @{ */
106 /** Updates scene rectangle. */
107 void updateSceneRect();
108 /** @} */
109
110 /** @name General stuff.
111 * @{ */
112 /** Holds the Tools-pane reference. */
113 UITools *m_pTools;
114 /** @} */
115
116 /** @name Layout stuff.
117 * @{ */
118 /** Holds the minimum width hint. */
119 int m_iMinimumWidthHint;
120 /** Holds the minimum height hint. */
121 int m_iMinimumHeightHint;
122 /** @} */
123};
124
125#endif /* !FEQT_INCLUDED_SRC_manager_tools_UIToolsView_h */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette