VirtualBox

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

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

FE/Qt4: new core: help menu

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 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 QCloseEvent;
32
33/* Local forwards */
34class CSession;
35class UISession;
36class UIMachineLogic;
37class UIMachineView;
38
39class UIMachineWindow
40{
41public:
42
43 /* Factory function to create required machine window child: */
44 static UIMachineWindow* create(UIMachineLogic *pMachineLogic, UIVisualStateType visualStateType);
45 static void destroy(UIMachineWindow *pWhichWindow);
46
47 /* Abstract slot to close machine window: */
48 virtual void sltTryClose();
49
50 /* Public getters: */
51 virtual UIMachineLogic* machineLogic() { return m_pMachineLogic; }
52 virtual QWidget* machineWindow() { return m_pMachineWindow; }
53 virtual UIMachineView* machineView() { return m_pMachineView; }
54
55protected:
56
57 /* Machine window constructor/destructor: */
58 UIMachineWindow(UIMachineLogic *pMachineLogic);
59 virtual ~UIMachineWindow();
60
61 /* Protected wrappers: */
62 UISession* uisession();
63 CSession& session();
64
65 /* Protected getters: */
66 const QString& defaultWindowTitle() const { return m_strWindowTitlePrefix; }
67
68 /* Translate routine: */
69 virtual void retranslateUi();
70
71 /* Common machine window event handlers: */
72 void closeEvent(QCloseEvent *pEvent);
73
74 /* Prepare helpers: */
75 virtual void prepareWindowIcon();
76 virtual void prepareConsoleConnections();
77 virtual void prepareMenuMachine();
78 virtual void prepareMenuDevices();
79#ifdef VBOX_WITH_DEBUGGER_GUI
80 virtual void prepareMenuDebug();
81#endif
82 virtual void prepareMenuHelp();
83 //virtual void loadWindowSettings() {}
84
85 /* Cleanup helpers: */
86 //virtual void saveWindowSettings() {}
87#ifdef VBOX_WITH_DEBUGGER_GUI
88 //virtual void prepareMenuDebug() {}
89#endif
90 //virtual void prepareMenuDevices() {}
91 //virtual void prepareMenuMachine() {}
92 //virtual void cleanupConsoleConnections() {}
93 //virtual void cleanupWindowIcon() {}
94
95 /* Update routines: */
96 virtual void updateAppearanceOf(int iElement);
97
98 /* Protected slots: */
99 virtual void sltMachineStateChanged();
100
101 /* Protected variables: */
102 UIMachineLogic *m_pMachineLogic;
103 QWidget *m_pMachineWindow;
104 UIMachineView *m_pMachineView;
105 QString m_strWindowTitlePrefix;
106
107 friend class UIMachineLogic;
108};
109
110#endif // __UIMachineWindow_h__
111
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