VirtualBox

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

Last change on this file since 76532 was 76532, checked in by vboxsync, 6 years ago

Frontends: scm --fix-header-guards. bugref:9344

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/* $Id: UIMachineWindowScale.h 76532 2018-12-30 06:08:06Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIMachineWindowScale class declaration.
4 */
5
6/*
7 * Copyright (C) 2010-2017 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ___UIMachineWindowScale_h___
19#define ___UIMachineWindowScale_h___
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* GUI includes: */
25#include "UIMachineWindow.h"
26
27/** UIMachineWindow reimplementation,
28 * providing GUI with machine-window for the scale mode. */
29class UIMachineWindowScale : public UIMachineWindow
30{
31 Q_OBJECT;
32
33protected:
34
35 /** Constructor, passes @a pMachineLogic and @a uScreenId to the UIMachineWindow constructor. */
36 UIMachineWindowScale(UIMachineLogic *pMachineLogic, ulong uScreenId);
37
38private:
39
40 /** Prepare main-layout routine. */
41 void prepareMainLayout();
42#ifdef VBOX_WS_MAC
43 /** Prepare visual-state routine. */
44 void prepareVisualState();
45#endif /* VBOX_WS_MAC */
46 /** Load settings routine. */
47 void loadSettings();
48
49 /** Save settings routine. */
50 void saveSettings();
51#ifdef VBOX_WS_MAC
52 /** Cleanup visual-state routine. */
53 void cleanupVisualState();
54#endif /* VBOX_WS_MAC */
55
56 /** Updates visibility according to visual-state. */
57 void showInNecessaryMode();
58
59 /** Restores cached window geometry. */
60 virtual void restoreCachedGeometry() /* override */;
61
62 /** Performs window geometry normalization according to guest-size and host's available geometry.
63 * @param fAdjustPosition Determines whether is it necessary to adjust position as well. */
64 virtual void normalizeGeometry(bool fAdjustPosition) /* override */;
65
66 /** Common @a pEvent handler. */
67 bool event(QEvent *pEvent);
68
69 /** Returns whether this window is maximized. */
70 bool isMaximizedChecked();
71
72 /** Holds the current window geometry. */
73 QRect m_normalGeometry;
74
75 /** Factory support. */
76 friend class UIMachineWindow;
77};
78
79#endif /* !___UIMachineWindowScale_h___ */
80
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