VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h@ 27374

Last change on this file since 27374 was 27374, checked in by vboxsync, 15 years ago

FE/Qt4: new core: additions downloader works in the mm case now

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * UIMachineWindow class declaration
5 */
6
7/*
8 * Copyright (C) 2010 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef __UIMachineWindow_h__
24#define __UIMachineWindow_h__
25
26/* Local includes */
27#include "UIMachineDefs.h"
28
29/* Global forwards */
30class QWidget;
31class QGridLayout;
32class QSpacerItem;
33class QCloseEvent;
34
35/* Local forwards */
36class CSession;
37class UISession;
38class UIMachineLogic;
39class UIMachineView;
40
41class UIMachineWindow
42{
43public:
44
45 /* Factory function to create required machine window child: */
46 static UIMachineWindow* create(UIMachineLogic *pMachineLogic, UIVisualStateType visualStateType, ulong uScreenId = 0);
47 static void destroy(UIMachineWindow *pWhichWindow);
48
49 /* Abstract slot to close machine window: */
50 virtual void sltTryClose();
51
52 /* Public getters: */
53 virtual UIMachineLogic* machineLogic() const { return m_pMachineLogic; }
54 virtual QWidget* machineWindow() const { return m_pMachineWindow; }
55 virtual UIMachineView* machineView() const { return m_pMachineView; }
56 UISession* uisession() const;
57 CSession& session() const;
58
59 virtual void reshow() {}
60
61protected:
62
63 /* Machine window constructor/destructor: */
64 UIMachineWindow(UIMachineLogic *pMachineLogic, ulong uScreenId);
65 virtual ~UIMachineWindow();
66
67 /* Protected getters: */
68 const QString& defaultWindowTitle() const { return m_strWindowTitlePrefix; }
69
70 /* Translate routine: */
71 virtual void retranslateUi();
72
73 /* Common machine window event handlers: */
74 void closeEvent(QCloseEvent *pEvent);
75
76 /* Prepare helpers: */
77 virtual void prepareWindowIcon();
78 virtual void prepareConsoleConnections();
79 virtual void prepareAdditionsDownloader();
80 virtual void prepareMachineViewContainer();
81 //virtual void loadWindowSettings() {}
82
83 /* Cleanup helpers: */
84 //virtual void saveWindowSettings() {}
85 //virtual void cleanupMachineViewContainer() {}
86 //virtual void cleanupConsoleConnections() {}
87 //virtual void cleanupWindowIcon() {}
88
89 /* Update routines: */
90 virtual void updateAppearanceOf(int iElement);
91
92 /* Protected slots: */
93 virtual void sltMachineStateChanged();
94
95 /* Protected variables: */
96 UIMachineLogic *m_pMachineLogic;
97 QWidget *m_pMachineWindow;
98
99 /* Virtual screen number: */
100 ulong m_uScreenId;
101
102 QGridLayout *m_pMachineViewContainer;
103 QSpacerItem *m_pTopSpacer;
104 QSpacerItem *m_pBottomSpacer;
105 QSpacerItem *m_pLeftSpacer;
106 QSpacerItem *m_pRightSpacer;
107
108 UIMachineView *m_pMachineView;
109 QString m_strWindowTitlePrefix;
110
111 friend class UIMachineLogic;
112};
113
114#endif // __UIMachineWindow_h__
115
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette