1 | /* $Id: UIMachineWindowScale.h 55401 2015-04-23 10:03:17Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIMachineWindowScale class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-2012 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 | /* Local includes: */
|
---|
22 | #include "UIMachineWindow.h"
|
---|
23 |
|
---|
24 | /* Scale machine-window implementation: */
|
---|
25 | class UIMachineWindowScale : public UIMachineWindow
|
---|
26 | {
|
---|
27 | Q_OBJECT;
|
---|
28 |
|
---|
29 | protected:
|
---|
30 |
|
---|
31 | /* Constructor: */
|
---|
32 | UIMachineWindowScale(UIMachineLogic *pMachineLogic, ulong uScreenId);
|
---|
33 |
|
---|
34 | private:
|
---|
35 |
|
---|
36 | /* Prepare helpers: */
|
---|
37 | void prepareMainLayout();
|
---|
38 | #ifdef Q_WS_MAC
|
---|
39 | void prepareVisualState();
|
---|
40 | #endif /* Q_WS_MAC */
|
---|
41 | void loadSettings();
|
---|
42 |
|
---|
43 | /* Cleanup helpers: */
|
---|
44 | void saveSettings();
|
---|
45 | #ifdef Q_WS_MAC
|
---|
46 | //void cleanupVisualState() {}
|
---|
47 | #endif /* Q_WS_MAC */
|
---|
48 | //void cleanupMainLayout() {}
|
---|
49 |
|
---|
50 | /* Show stuff: */
|
---|
51 | void showInNecessaryMode();
|
---|
52 |
|
---|
53 | /* Event handlers: */
|
---|
54 | bool event(QEvent *pEvent);
|
---|
55 | #ifdef Q_WS_WIN
|
---|
56 | bool winEvent(MSG *pMessage, long *pResult);
|
---|
57 | #endif /* Q_WS_WIN */
|
---|
58 |
|
---|
59 | /* Helpers: */
|
---|
60 | bool isMaximizedChecked();
|
---|
61 |
|
---|
62 | /* Variables: */
|
---|
63 | QRect m_normalGeometry;
|
---|
64 |
|
---|
65 | /* Factory support: */
|
---|
66 | friend class UIMachineWindow;
|
---|
67 | };
|
---|
68 |
|
---|
69 | #endif // __UIMachineWindowScale_h__
|
---|
70 |
|
---|