VirtualBox

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

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

FE/Qt4: new core: fix debugger GUI

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 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 /* Public members: */
60 virtual void reshow() {}
61 virtual void setMask(const QRegion &region) { machineWindow()->setMask(region); }
62
63protected:
64
65 /* Machine window constructor/destructor: */
66 UIMachineWindow(UIMachineLogic *pMachineLogic, ulong uScreenId);
67 virtual ~UIMachineWindow();
68
69 /* Protected getters: */
70 const QString& defaultWindowTitle() const { return m_strWindowTitlePrefix; }
71
72 /* Translate routine: */
73 virtual void retranslateUi();
74
75 /* Common machine window event handlers: */
76 void closeEvent(QCloseEvent *pEvent);
77
78 /* Prepare helpers: */
79 virtual void prepareWindowIcon();
80 virtual void prepareConsoleConnections();
81 virtual void prepareMachineViewContainer();
82 //virtual void loadWindowSettings() {}
83
84 /* Cleanup helpers: */
85 //virtual void saveWindowSettings() {}
86 //virtual void cleanupMachineViewContainer() {}
87 //virtual void cleanupConsoleConnections() {}
88 //virtual void cleanupWindowIcon() {}
89
90 /* Update routines: */
91 virtual void updateAppearanceOf(int iElement);
92#ifdef VBOX_WITH_DEBUGGER_GUI
93 virtual void updateDbgWindows();
94#endif /* VBOX_WITH_DEBUGGER_GUI */
95
96 /* Protected slots: */
97 virtual void sltMachineStateChanged();
98
99 /* Protected variables: */
100 UIMachineLogic *m_pMachineLogic;
101 QWidget *m_pMachineWindow;
102
103 /* Virtual screen number: */
104 ulong m_uScreenId;
105
106 QGridLayout *m_pMachineViewContainer;
107 QSpacerItem *m_pTopSpacer;
108 QSpacerItem *m_pBottomSpacer;
109 QSpacerItem *m_pLeftSpacer;
110 QSpacerItem *m_pRightSpacer;
111
112 UIMachineView *m_pMachineView;
113 QString m_strWindowTitlePrefix;
114
115 friend class UIMachineLogic;
116};
117
118#endif // __UIMachineWindow_h__
119
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