1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox frontends: Qt GUI ("VirtualBox"):
|
---|
4 | * VBoxSelectorWnd class declaration
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2006 InnoTek Systemberatung GmbH
|
---|
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 as published by the Free Software Foundation,
|
---|
14 | * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
15 | * distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
16 | * be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | *
|
---|
18 | * If you received this file as part of a commercial VirtualBox
|
---|
19 | * distribution, then only the terms of your commercial VirtualBox
|
---|
20 | * license agreement apply instead of the previous paragraph.
|
---|
21 | */
|
---|
22 |
|
---|
23 | #ifndef __VBoxSelectorWnd_h__
|
---|
24 | #define __VBoxSelectorWnd_h__
|
---|
25 |
|
---|
26 | #include "COMDefs.h"
|
---|
27 |
|
---|
28 | #include "VBoxGlobal.h"
|
---|
29 |
|
---|
30 | #include <qapplication.h>
|
---|
31 | #include <qmainwindow.h>
|
---|
32 | #include <qgroupbox.h>
|
---|
33 | #include <qaction.h>
|
---|
34 |
|
---|
35 | #include <qvaluelist.h>
|
---|
36 |
|
---|
37 | class VBoxVMListBox;
|
---|
38 | class VBoxSnapshotsWgt;
|
---|
39 | class VBoxVMDetailsView;
|
---|
40 | class VBoxVMDescriptionPage;
|
---|
41 |
|
---|
42 | class QLabel;
|
---|
43 | class QTextBrowser;
|
---|
44 | class QTabWidget;
|
---|
45 | struct QUuid;
|
---|
46 |
|
---|
47 | class VBoxSelectorWnd : public QMainWindow
|
---|
48 | {
|
---|
49 | Q_OBJECT
|
---|
50 |
|
---|
51 | public:
|
---|
52 |
|
---|
53 | VBoxSelectorWnd (VBoxSelectorWnd **aSelf,
|
---|
54 | QWidget* aParent = 0, const char* aName = 0,
|
---|
55 | WFlags aFlags = WType_TopLevel);
|
---|
56 | virtual ~VBoxSelectorWnd();
|
---|
57 |
|
---|
58 | bool startMachine (const QUuid &id);
|
---|
59 |
|
---|
60 | public slots:
|
---|
61 |
|
---|
62 | void fileDiskMgr();
|
---|
63 | void fileSettings();
|
---|
64 | void fileExit();
|
---|
65 |
|
---|
66 | void vmNew();
|
---|
67 | void vmSettings (const QString &aCategory = QString::null,
|
---|
68 | const QString &aControl = QString::null);
|
---|
69 | void vmDelete();
|
---|
70 | void vmStart();
|
---|
71 | void vmDiscard();
|
---|
72 | void vmRefresh();
|
---|
73 |
|
---|
74 | void refreshVMList();
|
---|
75 | void refreshVMItem (const QUuid &aID, bool aDetails,
|
---|
76 | bool aSnapshots,
|
---|
77 | bool aDescription);
|
---|
78 |
|
---|
79 | void showHelpContents();
|
---|
80 |
|
---|
81 | protected:
|
---|
82 |
|
---|
83 | /* events */
|
---|
84 | bool event (QEvent *e);
|
---|
85 |
|
---|
86 | protected slots:
|
---|
87 |
|
---|
88 | private:
|
---|
89 |
|
---|
90 | void languageChange();
|
---|
91 |
|
---|
92 | private slots:
|
---|
93 |
|
---|
94 | void vmListBoxCurrentChanged (bool aRefreshDetails = true,
|
---|
95 | bool aRefreshSnapshots = true,
|
---|
96 | bool aRefreshDescription = true);
|
---|
97 | void mediaEnumFinished (const VBoxMediaList &);
|
---|
98 |
|
---|
99 | /* VirtualBox callback events we're interested in */
|
---|
100 |
|
---|
101 | void machineStateChanged (const VBoxMachineStateChangeEvent &e);
|
---|
102 | void machineDataChanged (const VBoxMachineDataChangeEvent &e);
|
---|
103 | void machineRegistered (const VBoxMachineRegisteredEvent &e);
|
---|
104 | void sessionStateChanged (const VBoxSessionStateChangeEvent &e);
|
---|
105 | void snapshotChanged (const VBoxSnapshotEvent &e);
|
---|
106 |
|
---|
107 | private:
|
---|
108 |
|
---|
109 | /* actions */
|
---|
110 | QAction *fileDiskMgrAction;
|
---|
111 | QAction *fileSettingsAction;
|
---|
112 | QAction *fileExitAction;
|
---|
113 | QAction *vmNewAction;
|
---|
114 | QAction *vmConfigAction;
|
---|
115 | QAction *vmDeleteAction;
|
---|
116 | QAction *vmStartAction;
|
---|
117 | QAction *vmDiscardAction;
|
---|
118 | QAction *vmRefreshAction;
|
---|
119 | QAction *helpContentsAction;
|
---|
120 | QAction *helpWebAction;
|
---|
121 | QAction *helpAboutAction;
|
---|
122 | QAction *helpResetMessagesAction;
|
---|
123 |
|
---|
124 | /* widgets */
|
---|
125 | VBoxVMListBox *vmListBox;
|
---|
126 | QTabWidget *vmTabWidget;
|
---|
127 | VBoxVMDetailsView *vmDetailsView;
|
---|
128 | VBoxSnapshotsWgt *vmSnapshotsWgt;
|
---|
129 | VBoxVMDescriptionPage *vmDescriptionPage;
|
---|
130 |
|
---|
131 | QValueList <CSession> sessions;
|
---|
132 |
|
---|
133 | QPoint normal_pos;
|
---|
134 | QSize normal_size;
|
---|
135 | };
|
---|
136 |
|
---|
137 | #endif // __VBoxSelectorWnd_h__
|
---|