VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSelectorWnd.h@ 11497

Last change on this file since 11497 was 11107, checked in by vboxsync, 16 years ago

Fe/Qt4: VBoxSelectorWnd.h - coding-style cosmetics.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * VBoxSelectorWnd class declaration
5 */
6
7/*
8 * Copyright (C) 2006-2008 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 __VBoxSelectorWnd_h__
24#define __VBoxSelectorWnd_h__
25
26#include "COMDefs.h"
27
28#include "QIWithRetranslateUI.h"
29#include "VBoxGlobal.h"
30
31/* Qt includes */
32#include <QMainWindow>
33
34class VBoxSnapshotsWgt;
35class VBoxVMDetailsView;
36class VBoxVMDescriptionPage;
37class VBoxVMLogViewer;
38class VBoxVMListView;
39class VBoxVMModel;
40class VBoxVMItem;
41
42class QTabWidget;
43class QListView;
44class QEvent;
45
46class VBoxSelectorWnd: public QIWithRetranslateUI2<QMainWindow>
47{
48 Q_OBJECT;
49
50public:
51
52 VBoxSelectorWnd (VBoxSelectorWnd **aSelf,
53 QWidget* aParent = 0,
54 Qt::WindowFlags aFlags = Qt::Window);
55 virtual ~VBoxSelectorWnd();
56
57 bool startMachine (const QUuid &aId);
58
59public slots:
60
61 void fileDiskMgr();
62 void fileSettings();
63 void fileExit();
64
65 void vmNew();
66 void vmSettings (const QString &aCategory = QString::null,
67 const QString &aControl = QString::null);
68 void vmDelete();
69 void vmStart();
70 void vmDiscard();
71 void vmPause (bool);
72 void vmRefresh();
73 void vmShowLogs();
74
75 void refreshVMList();
76 void refreshVMItem (const QUuid &aID, bool aDetails,
77 bool aSnapshots,
78 bool aDescription);
79
80 void showContextMenu (VBoxVMItem *aItem, const QPoint &aPoint);
81
82protected:
83
84 /* Events */
85 bool event (QEvent *aEvent);
86
87 void retranslateUi();
88
89private slots:
90
91 void vmListViewCurrentChanged (bool aRefreshDetails = true,
92 bool aRefreshSnapshots = true,
93 bool aRefreshDescription = true);
94
95 void mediaEnumStarted();
96 void mediaEnumFinished (const VBoxMediaList &);
97
98 /* VirtualBox callback events we're interested in */
99
100 void machineStateChanged (const VBoxMachineStateChangeEvent &e);
101 void machineDataChanged (const VBoxMachineDataChangeEvent &e);
102 void machineRegistered (const VBoxMachineRegisteredEvent &e);
103 void sessionStateChanged (const VBoxSessionStateChangeEvent &e);
104 void snapshotChanged (const VBoxSnapshotEvent &e);
105
106private:
107
108 /* Main menus */
109 QMenu *mFileMenu;
110 QMenu *mVMMenu;
111 QMenu *mHelpMenu;
112
113 /* VM list context menu */
114 QMenu *mVMCtxtMenu;
115
116 /* Actions */
117 QAction *fileDiskMgrAction;
118 QAction *fileSettingsAction;
119 QAction *fileExitAction;
120 QAction *vmNewAction;
121 QAction *vmConfigAction;
122 QAction *vmDeleteAction;
123 QAction *vmStartAction;
124 QAction *vmDiscardAction;
125 QAction *vmPauseAction;
126 QAction *vmRefreshAction;
127 QAction *vmShowLogsAction;
128 QAction *helpContentsAction;
129 QAction *helpWebAction;
130 QAction *helpRegisterAction;
131 QAction *helpUpdateAction;
132 QAction *helpAboutAction;
133 QAction *helpResetMessagesAction;
134
135 /* The vm list view/model */
136 VBoxVMListView *mVMListView;
137 VBoxVMModel *mVMModel;
138
139 /* The right information widgets */
140 QTabWidget *vmTabWidget;
141 VBoxVMDetailsView *vmDetailsView;
142 VBoxSnapshotsWgt *vmSnapshotsWgt;
143 VBoxVMDescriptionPage *vmDescriptionPage;
144
145 QPoint normal_pos;
146 QSize normal_size;
147
148 bool doneInaccessibleWarningOnce : 1;
149};
150
151#endif // __VBoxSelectorWnd_h__
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