1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox frontends: Qt4 GUI ("VirtualBox"):
|
---|
4 | * UIFirstRunWzd class declaration
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2008-2010 Oracle Corporation
|
---|
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 __UIFirstRunWzd_h__
|
---|
20 | #define __UIFirstRunWzd_h__
|
---|
21 |
|
---|
22 | /* Local includes */
|
---|
23 | #include "QIWizard.h"
|
---|
24 | #include "COMDefs.h"
|
---|
25 |
|
---|
26 | /* Generated includes */
|
---|
27 | #include "UIFirstRunWzdPage1.gen.h"
|
---|
28 | #include "UIFirstRunWzdPage2.gen.h"
|
---|
29 | #include "UIFirstRunWzdPage3.gen.h"
|
---|
30 |
|
---|
31 | class UIFirstRunWzd : public QIWizard
|
---|
32 | {
|
---|
33 | Q_OBJECT;
|
---|
34 |
|
---|
35 | public:
|
---|
36 |
|
---|
37 | UIFirstRunWzd(QWidget *pParent, const CMachine &machine);
|
---|
38 |
|
---|
39 | static bool isDefaultHardDiskAttached(const CMachine &machine);
|
---|
40 |
|
---|
41 | protected:
|
---|
42 |
|
---|
43 | void retranslateUi();
|
---|
44 | };
|
---|
45 |
|
---|
46 | class UIFirstRunWzdPage1 : public QIWizardPage, public Ui::UIFirstRunWzdPage1
|
---|
47 | {
|
---|
48 | Q_OBJECT;
|
---|
49 |
|
---|
50 | public:
|
---|
51 |
|
---|
52 | UIFirstRunWzdPage1();
|
---|
53 |
|
---|
54 | void init();
|
---|
55 |
|
---|
56 | protected:
|
---|
57 |
|
---|
58 | void retranslateUi();
|
---|
59 |
|
---|
60 | void initializePage();
|
---|
61 | };
|
---|
62 |
|
---|
63 | class UIFirstRunWzdPage2 : public QIWizardPage, public Ui::UIFirstRunWzdPage2
|
---|
64 | {
|
---|
65 | Q_OBJECT;
|
---|
66 | Q_PROPERTY(QString source READ source WRITE setSource);
|
---|
67 | Q_PROPERTY(QString id READ id WRITE setId);
|
---|
68 |
|
---|
69 | public:
|
---|
70 |
|
---|
71 | UIFirstRunWzdPage2();
|
---|
72 |
|
---|
73 | void init();
|
---|
74 |
|
---|
75 | protected:
|
---|
76 |
|
---|
77 | void retranslateUi();
|
---|
78 |
|
---|
79 | void initializePage();
|
---|
80 |
|
---|
81 | bool isComplete() const;
|
---|
82 |
|
---|
83 | private slots:
|
---|
84 |
|
---|
85 | void sltMediumChanged();
|
---|
86 | void sltOpenVirtualMediaManager();
|
---|
87 |
|
---|
88 | private:
|
---|
89 |
|
---|
90 | QString source() const { return m_strSource; }
|
---|
91 | void setSource(const QString &strSource) { m_strSource = strSource; }
|
---|
92 | QString m_strSource;
|
---|
93 |
|
---|
94 | QString id() const { return m_strId; }
|
---|
95 | void setId(const QString &strId) { m_strId = strId; }
|
---|
96 | QString m_strId;
|
---|
97 | };
|
---|
98 |
|
---|
99 | class UIFirstRunWzdPage3 : public QIWizardPage, public Ui::UIFirstRunWzdPage3
|
---|
100 | {
|
---|
101 | Q_OBJECT;
|
---|
102 | Q_PROPERTY(CMachine machine READ machine WRITE setMachine);
|
---|
103 |
|
---|
104 | public:
|
---|
105 |
|
---|
106 | UIFirstRunWzdPage3();
|
---|
107 |
|
---|
108 | void init();
|
---|
109 |
|
---|
110 | protected:
|
---|
111 |
|
---|
112 | void retranslateUi();
|
---|
113 |
|
---|
114 | void initializePage();
|
---|
115 | void cleanupPage();
|
---|
116 |
|
---|
117 | bool validatePage();
|
---|
118 |
|
---|
119 | private:
|
---|
120 |
|
---|
121 | bool insertDevice();
|
---|
122 |
|
---|
123 | CMachine machine() const { return m_Machine; }
|
---|
124 | void setMachine(CMachine &machine) { m_Machine = machine; }
|
---|
125 | CMachine m_Machine;
|
---|
126 | };
|
---|
127 |
|
---|
128 | Q_DECLARE_METATYPE(CMachine);
|
---|
129 |
|
---|
130 | #endif // __UIFirstRunWzd_h__
|
---|
131 |
|
---|