VirtualBox

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

Last change on this file since 10971 was 10439, checked in by vboxsync, 16 years ago

Fe/Qt4: VirtualBox New Version Notifier dialog implemented.

  • 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 &id);
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 *e);
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 /* Main menus */
108 QMenu *mFileMenu;
109 QMenu *mVMMenu;
110 QMenu *mHelpMenu;
111
112 /* VM list context menu */
113 QMenu *mVMCtxtMenu;
114
115 /* actions */
116 QAction *fileDiskMgrAction;
117 QAction *fileSettingsAction;
118 QAction *fileExitAction;
119 QAction *vmNewAction;
120 QAction *vmConfigAction;
121 QAction *vmDeleteAction;
122 QAction *vmStartAction;
123 QAction *vmDiscardAction;
124 QAction *vmPauseAction;
125 QAction *vmRefreshAction;
126 QAction *vmShowLogsAction;
127 QAction *helpContentsAction;
128 QAction *helpWebAction;
129 QAction *helpRegisterAction;
130 QAction *helpUpdateAction;
131 QAction *helpAboutAction;
132 QAction *helpResetMessagesAction;
133
134 /* The vm list view/model */
135 VBoxVMListView *mVMListView;
136 VBoxVMModel *mVMModel;
137
138 /* The right information widgets */
139 QTabWidget *vmTabWidget;
140 VBoxVMDetailsView *vmDetailsView;
141 VBoxSnapshotsWgt *vmSnapshotsWgt;
142 VBoxVMDescriptionPage *vmDescriptionPage;
143
144 QPoint normal_pos;
145 QSize normal_size;
146
147 bool doneInaccessibleWarningOnce : 1;
148};
149
150#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