VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h@ 35740

Last change on this file since 35740 was 30708, checked in by vboxsync, 14 years ago

FE/Qt: New running VM core: Little include cleanup.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * UIMachineWindowNormal 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 __UIMachineWindowNormal_h__
20#define __UIMachineWindowNormal_h__
21
22/* Global includes */
23#include <QMainWindow>
24#include <QLabel>
25
26/* Local includes */
27#include "QIWithRetranslateUI.h"
28#include "UIMachineWindow.h"
29
30/* Local forwards */
31class CMediumAttachment;
32class UIIndicatorsPool;
33class QIStateIndicator;
34
35class UIMachineWindowNormal : public QIWithRetranslateUI2<QMainWindow>, public UIMachineWindow
36{
37 Q_OBJECT;
38
39protected:
40
41 /* Normal machine window constructor/destructor: */
42 UIMachineWindowNormal(UIMachineLogic *pMachineLogic, ulong uScreenId);
43 virtual ~UIMachineWindowNormal();
44
45private slots:
46
47 /* Console callback handlers: */
48 void sltMachineStateChanged();
49 void sltMediumChange(const CMediumAttachment &attachment);
50 void sltUSBControllerChange();
51 void sltUSBDeviceStateChange();
52 void sltNetworkAdapterChange();
53 void sltSharedFolderChange();
54
55 /* LED connections: */
56 void sltUpdateIndicators();
57 void sltShowIndicatorsContextMenu(QIStateIndicator *pIndicator, QContextMenuEvent *pEvent);
58 void sltProcessGlobalSettingChange(const char *aPublicName, const char *aName);
59
60 /* Close window reimplementation: */
61 void sltTryClose();
62
63 /* Downloader listeners: */
64 void sltDownloaderAdditionsEmbed();
65 void sltDownloaderUserManualEmbed();
66
67private:
68
69 /* Translate routine: */
70 void retranslateUi();
71
72 /* Update routines: */
73 void updateAppearanceOf(int aElement);
74
75 /* Event handlers: */
76 bool event(QEvent *pEvent);
77#ifdef Q_WS_X11
78 bool x11Event(XEvent *pEvent);
79#endif
80 void closeEvent(QCloseEvent *pEvent);
81
82 /* Private getters: */
83 UIIndicatorsPool* indicatorsPool() { return m_pIndicatorsPool; }
84
85 /* Prepare helpers: */
86 void prepareConsoleConnections();
87 void prepareMenu();
88 void prepareStatusBar();
89 void prepareConnections();
90 void prepareMachineView();
91 void loadWindowSettings();
92
93 /* Cleanup helpers: */
94 void saveWindowSettings();
95 void cleanupMachineView();
96 //void cleanupConnections() {}
97 void cleanupStatusBar();
98 //void cleanupMenu() {}
99 //void cleanupConsoleConnections() {}
100
101 /* Other members: */
102 void showSimple();
103 bool isMaximizedChecked();
104
105 /* Indicators pool: */
106 UIIndicatorsPool *m_pIndicatorsPool;
107 /* Other QWidgets: */
108 QWidget *m_pCntHostkey;
109 QLabel *m_pNameHostkey;
110 /* Other QObjects: */
111 QTimer *m_pIdleTimer;
112 /* Other members: */
113 QRect m_normalGeometry;
114
115 /* Factory support: */
116 friend class UIMachineWindow;
117};
118
119#endif // __UIMachineWindowNormal_h__
120
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use