VirtualBox

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

Last change on this file since 7220 was 7220, checked in by vboxsync, 17 years ago

Compile VirtualBox with qt4 on linux.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * VBoxSelectorWnd class declaration
5 */
6
7/*
8 * Copyright (C) 2006-2007 innotek 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 (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 __VBoxSelectorWnd_h__
20#define __VBoxSelectorWnd_h__
21
22#include "COMDefs.h"
23
24#include "VBoxGlobal.h"
25
26#include <qapplication.h>
27#include <q3mainwindow.h>
28#include <q3listbox.h>
29#include <q3groupbox.h>
30#include <qaction.h>
31
32#include <q3valuelist.h>
33//Added by qt3to4:
34#include <QEvent>
35#include <QLabel>
36#include <Q3PopupMenu>
37
38class VBoxVMListBox;
39class VBoxSnapshotsWgt;
40class VBoxVMDetailsView;
41class VBoxVMDescriptionPage;
42class VBoxVMLogViewer;
43
44class QLabel;
45class Q3TextBrowser;
46class QTabWidget;
47struct QUuid;
48
49class VBoxSelectorWnd : public Q3MainWindow
50{
51 Q_OBJECT
52
53public:
54
55 VBoxSelectorWnd (VBoxSelectorWnd **aSelf,
56 QWidget* aParent = 0, const char* aName = 0,
57 Qt::WFlags aFlags = Qt::WType_TopLevel);
58 virtual ~VBoxSelectorWnd();
59
60 bool startMachine (const QUuid &id);
61
62public slots:
63
64 void fileDiskMgr();
65 void fileSettings();
66 void fileExit();
67
68 void vmNew();
69 void vmSettings (const QString &aCategory = QString::null,
70 const QString &aControl = QString::null);
71 void vmDelete();
72 void vmStart();
73 void vmDiscard();
74 void vmPause (bool);
75 void vmRefresh();
76 void vmShowLogs();
77
78 void refreshVMList();
79 void refreshVMItem (const QUuid &aID, bool aDetails,
80 bool aSnapshots,
81 bool aDescription);
82
83 void showContextMenu (Q3ListBoxItem *, const QPoint &);
84
85protected:
86
87 /* events */
88 bool event (QEvent *e);
89
90protected slots:
91
92private:
93
94 void languageChange();
95
96private slots:
97
98 void vmListBoxCurrentChanged (bool aRefreshDetails = true,
99 bool aRefreshSnapshots = true,
100 bool aRefreshDescription = true);
101
102 void mediaEnumStarted();
103 void mediaEnumFinished (const VBoxMediaList &);
104
105 /* VirtualBox callback events we're interested in */
106
107 void machineStateChanged (const VBoxMachineStateChangeEvent &e);
108 void machineDataChanged (const VBoxMachineDataChangeEvent &e);
109 void machineRegistered (const VBoxMachineRegisteredEvent &e);
110 void sessionStateChanged (const VBoxSessionStateChangeEvent &e);
111 void snapshotChanged (const VBoxSnapshotEvent &e);
112
113private:
114
115 /** VM list context menu */
116 Q3PopupMenu *mVMCtxtMenu;
117
118 /* actions */
119 QAction *fileDiskMgrAction;
120 QAction *fileSettingsAction;
121 QAction *fileExitAction;
122 QAction *vmNewAction;
123 QAction *vmConfigAction;
124 QAction *vmDeleteAction;
125 QAction *vmStartAction;
126 QAction *vmDiscardAction;
127 QAction *vmPauseAction;
128 QAction *vmRefreshAction;
129 QAction *vmShowLogsAction;
130 QAction *helpContentsAction;
131 QAction *helpWebAction;
132 QAction *helpRegisterAction;
133 QAction *helpAboutAction;
134 QAction *helpResetMessagesAction;
135
136 /* widgets */
137 VBoxVMListBox *vmListBox;
138 QTabWidget *vmTabWidget;
139 VBoxVMDetailsView *vmDetailsView;
140 VBoxSnapshotsWgt *vmSnapshotsWgt;
141 VBoxVMDescriptionPage *vmDescriptionPage;
142
143 Q3ValueList <CSession> sessions;
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