1 | /* $Id: UIMachineWindowScale.h 57027 2015-07-20 16:41:01Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIMachineWindowScale class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-2015 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 |
|
---|
21 | /* GUI includes: */
|
---|
22 | #include "UIMachineWindow.h"
|
---|
23 |
|
---|
24 | /** UIMachineWindow reimplementation,
|
---|
25 | * providing GUI with machine-window for the scale mode. */
|
---|
26 | class UIMachineWindowScale : public UIMachineWindow
|
---|
27 | {
|
---|
28 | Q_OBJECT;
|
---|
29 |
|
---|
30 | protected:
|
---|
31 |
|
---|
32 | /** Constructor, passes @a pMachineLogic and @a uScreenId to the UIMachineWindow constructor. */
|
---|
33 | UIMachineWindowScale(UIMachineLogic *pMachineLogic, ulong uScreenId);
|
---|
34 |
|
---|
35 | private:
|
---|
36 |
|
---|
37 | /** Prepare main-layout routine. */
|
---|
38 | void prepareMainLayout();
|
---|
39 | #ifdef Q_WS_MAC
|
---|
40 | /** Prepare visual-state routine. */
|
---|
41 | void prepareVisualState();
|
---|
42 | #endif /* Q_WS_MAC */
|
---|
43 | /** Load settings routine. */
|
---|
44 | void loadSettings();
|
---|
45 |
|
---|
46 | /** Save settings routine. */
|
---|
47 | void saveSettings();
|
---|
48 |
|
---|
49 | /** Updates visibility according to visual-state. */
|
---|
50 | void showInNecessaryMode();
|
---|
51 |
|
---|
52 | /** Common @a pEvent handler. */
|
---|
53 | bool event(QEvent *pEvent);
|
---|
54 | #ifdef Q_WS_WIN
|
---|
55 | /** Windows: Common native @a pEvent handler. */
|
---|
56 | bool winEvent(MSG *pMessage, long *pResult);
|
---|
57 | #endif /* Q_WS_WIN */
|
---|
58 |
|
---|
59 | /** Returns whether this window is maximized. */
|
---|
60 | bool isMaximizedChecked();
|
---|
61 |
|
---|
62 | /** Holds the current window geometry. */
|
---|
63 | QRect m_normalGeometry;
|
---|
64 |
|
---|
65 | /** Factory support. */
|
---|
66 | friend class UIMachineWindow;
|
---|
67 | };
|
---|
68 |
|
---|
69 | #endif /* !___UIMachineWindowScale_h___ */
|
---|
70 |
|
---|