~ubuntu-branches/ubuntu/gutsy/virtualbox-ose/gutsy

« back to all changes in this revision

Viewing changes to src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-09-08 16:44:58 UTC
  • Revision ID: james.westby@ubuntu.com-20070908164458-wao29470vqtr8ksy
Tags: upstream-1.5.0-dfsg2
ImportĀ upstreamĀ versionĀ 1.5.0-dfsg2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 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
 
 
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 <qmainwindow.h>
 
28
#include <qgroupbox.h>
 
29
#include <qaction.h>
 
30
 
 
31
#include <qvaluelist.h>
 
32
 
 
33
class VBoxVMListBox;
 
34
class VBoxSnapshotsWgt;
 
35
class VBoxVMDetailsView;
 
36
class VBoxVMDescriptionPage;
 
37
class VBoxVMLogViewer;
 
38
 
 
39
class QLabel;
 
40
class QTextBrowser;
 
41
class QTabWidget;
 
42
struct QUuid;
 
43
 
 
44
class VBoxSelectorWnd : public QMainWindow
 
45
{
 
46
    Q_OBJECT
 
47
 
 
48
public:
 
49
 
 
50
    VBoxSelectorWnd (VBoxSelectorWnd **aSelf,
 
51
                     QWidget* aParent = 0, const char* aName = 0,
 
52
                     WFlags aFlags = WType_TopLevel);
 
53
    virtual ~VBoxSelectorWnd();
 
54
 
 
55
    bool startMachine (const QUuid &id);
 
56
 
 
57
public slots:
 
58
 
 
59
    void fileDiskMgr();
 
60
    void fileSettings();
 
61
    void fileExit();
 
62
 
 
63
    void vmNew();
 
64
    void vmSettings (const QString &aCategory = QString::null,
 
65
                     const QString &aControl = QString::null);
 
66
    void vmDelete();
 
67
    void vmStart();
 
68
    void vmDiscard();
 
69
    void vmRefresh();
 
70
    void vmShowLogs();
 
71
 
 
72
    void refreshVMList();
 
73
    void refreshVMItem (const QUuid &aID, bool aDetails,
 
74
                                          bool aSnapshots,
 
75
                                          bool aDescription);
 
76
 
 
77
    void showHelpContents();
 
78
 
 
79
protected:
 
80
 
 
81
    /* events */
 
82
    bool event (QEvent *e);
 
83
 
 
84
protected slots:
 
85
 
 
86
private:
 
87
 
 
88
    void languageChange();
 
89
 
 
90
private slots:
 
91
 
 
92
    void vmListBoxCurrentChanged (bool aRefreshDetails = true,
 
93
                                  bool aRefreshSnapshots = true,
 
94
                                  bool aRefreshDescription = true);
 
95
 
 
96
    void mediaEnumStarted();
 
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 *vmShowLogsAction;
 
120
    QAction *helpContentsAction;
 
121
    QAction *helpWebAction;
 
122
    QAction *helpAboutAction;
 
123
    QAction *helpResetMessagesAction;
 
124
 
 
125
    /* widgets */
 
126
    VBoxVMListBox *vmListBox;
 
127
    QTabWidget *vmTabWidget;
 
128
    VBoxVMDetailsView *vmDetailsView;
 
129
    VBoxSnapshotsWgt *vmSnapshotsWgt;
 
130
    VBoxVMDescriptionPage *vmDescriptionPage;
 
131
 
 
132
    QValueList <CSession> sessions;
 
133
 
 
134
    QPoint normal_pos;
 
135
    QSize normal_size;
 
136
 
 
137
    bool doneInaccessibleWarningOnce : 1;
 
138
};
 
139
 
 
140
#endif // __VBoxSelectorWnd_h__