VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.h

Last change on this file was 106061, checked in by vboxsync, 2 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: UIMachineWindowScale.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIMachineWindowScale class declaration.
4 */
5
6/*
7 * Copyright (C) 2010-2024 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_runtime_scale_UIMachineWindowScale_h
29#define FEQT_INCLUDED_SRC_runtime_scale_UIMachineWindowScale_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* GUI includes: */
35#include "UIMachineWindow.h"
36
37/** UIMachineWindow subclass used as scaled machine window implementation. */
38class UIMachineWindowScale : public UIMachineWindow
39{
40 Q_OBJECT;
41
42public:
43
44 /** Constructor, passes @a pMachineLogic and @a uScreenId to the UIMachineWindow constructor. */
45 UIMachineWindowScale(UIMachineLogic *pMachineLogic, ulong uScreenId);
46
47private:
48
49 /** Prepare main-layout routine. */
50 void prepareMainLayout() RT_OVERRIDE;
51 /** Prepare notification-center routine. */
52 void prepareNotificationCenter() RT_OVERRIDE;
53#ifdef VBOX_WS_MAC
54 /** Prepare visual-state routine. */
55 void prepareVisualState() RT_OVERRIDE;
56#endif /* VBOX_WS_MAC */
57 /** Load settings routine. */
58 void loadSettings() RT_OVERRIDE;
59
60#ifdef VBOX_WS_MAC
61 /** Cleanup visual-state routine. */
62 void cleanupVisualState() RT_OVERRIDE;
63#endif /* VBOX_WS_MAC */
64 /** Cleanup notification-center routine. */
65 void cleanupNotificationCenter() RT_OVERRIDE;
66
67 /** Updates visibility according to visual-state. */
68 void showInNecessaryMode() RT_OVERRIDE;
69
70 /** Restores cached window geometry. */
71 virtual void restoreCachedGeometry() RT_OVERRIDE;
72
73 /** Performs window geometry normalization according to guest-size and host's available geometry.
74 * @param fAdjustPosition Determines whether is it necessary to adjust position as well.
75 * @param fResizeToGuestDisplay Determines whether is it necessary to resize the window to fit to guest display size. */
76 virtual void normalizeGeometry(bool fAdjustPosition, bool fResizeToGuestDisplay) RT_OVERRIDE;
77
78 /** Common @a pEvent handler. */
79 bool event(QEvent *pEvent) RT_OVERRIDE;
80
81 /** Returns whether this window is maximized. */
82 bool isMaximizedChecked();
83
84 /** Holds the current window geometry. */
85 QRect m_geometry;
86 /** Holds the geometry save timer ID. */
87 int m_iGeometrySaveTimerId;
88};
89
90#endif /* !FEQT_INCLUDED_SRC_runtime_scale_UIMachineWindowScale_h */
Note: See TracBrowser for help on using the repository browser.

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