VirtualBox

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

Last change on this file since 41051 was 41051, checked in by vboxsync, 13 years ago

FE/Qt: 5820: Show/hide VM windows when the count changes within the guest.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * UIMachineWindowScale class declaration
5 */
6
7/*
8 * Copyright (C) 2010 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#ifndef __UIMachineWindowScale_h__
20#define __UIMachineWindowScale_h__
21
22/* Global includes */
23#include <QMainWindow>
24
25/* Local includes */
26#include "QIWithRetranslateUI.h"
27#include "UIMachineWindow.h"
28
29class UIMachineWindowScale : public QIWithRetranslateUI2<QMainWindow>, public UIMachineWindow
30{
31 Q_OBJECT;
32
33protected:
34
35 /* Scale machine window constructor/destructor: */
36 UIMachineWindowScale(UIMachineLogic *pMachineLogic, ulong uScreenId);
37 virtual ~UIMachineWindowScale();
38
39private slots:
40
41 /* Console callback handlers: */
42 void sltMachineStateChanged();
43 void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
44
45 /* Popup main menu: */
46 void sltPopupMainMenu();
47
48 /* Close window reimplementation: */
49 void sltTryClose();
50
51private:
52
53 /* Translate routine: */
54 void retranslateUi();
55
56 /* Event handlers: */
57 bool event(QEvent *pEvent);
58#ifdef Q_WS_WIN
59 bool winEvent(MSG *pMessage, long *pResult);
60#endif
61#ifdef Q_WS_X11
62 bool x11Event(XEvent *pEvent);
63#endif
64 void closeEvent(QCloseEvent *pEvent);
65
66 /* Prepare helpers: */
67 void prepareMenu();
68 void prepareMachineViewContainer();
69 void prepareMachineView();
70 void loadWindowSettings();
71
72 /* Cleanup helpers: */
73 void saveWindowSettings();
74 void cleanupMachineView();
75 //void cleanupMachineViewContainer() {}
76 void cleanupMenu();
77
78 /* Other members: */
79 void showInNecessaryMode();
80 bool isMaximizedChecked();
81
82 /* Other members: */
83 QMenu *m_pMainMenu;
84 QRect m_normalGeometry;
85
86 /* Factory support: */
87 friend class UIMachineWindow;
88};
89
90#endif // __UIMachineWindowScale_h__
91
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