VirtualBox

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

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

FE/Qt: Added protection against crashes in situations when some of message-box was opened during machine power-off procedure.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * UIMachine 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 __UIMachine_h__
20#define __UIMachine_h__
21
22/* Global includes */
23#include <QObject>
24
25/* Local includes */
26#include "COMDefs.h"
27#include "UIMachineDefs.h"
28
29/* Global forwards: */
30class QWidget;
31
32/* Local forwards */
33class UISession;
34class UIActionsPool;
35class UIVisualState;
36class UIMachineLogic;
37
38class UIMachine : public QObject
39{
40 Q_OBJECT;
41
42public:
43
44 /* Virtual Machine constructor/destructor: */
45 UIMachine(UIMachine **ppSelf, const CSession &session);
46 virtual ~UIMachine();
47
48 /* Public getters: */
49 QWidget* mainWindow() const;
50 UISession *uisession() const { return m_pSession; }
51
52private slots:
53
54 /* Visual state-change handler: */
55 void sltChangeVisualState(UIVisualStateType visualStateType);
56
57 /* Close VM slot: */
58 void sltCloseVirtualMachine();
59
60private:
61
62 /* Move VM to default (normal) state: */
63 void enterInitialVisualState();
64
65 /* Private getters: */
66 UIMachineLogic* machineLogic() const;
67 UIActionsPool* actionsPool() const { return m_pActionsPool; }
68
69 /* Prepare helpers: */
70 void loadMachineSettings();
71
72 /* Cleanup helpers: */
73 void saveMachineSettings();
74
75 /* Private variables: */
76 UIMachine **m_ppThis;
77 UIVisualStateType initialStateType;
78 CSession m_session;
79 UIActionsPool *m_pActionsPool;
80 UISession *m_pSession;
81 UIVisualState *m_pVisualState;
82
83 /* Friend classes: */
84 friend class UISession;
85};
86
87#endif // __UIMachine_h__
88
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use