1 | /* $Id: UIWizardNewVMPageBasic1.h 60837 2016-05-04 15:29:56Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIWizardNewVMPageBasic1 class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2012 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef __UIWizardNewVMPageBasic1_h__
|
---|
19 | #define __UIWizardNewVMPageBasic1_h__
|
---|
20 |
|
---|
21 | /* Local includes: */
|
---|
22 | #include "UIWizardPage.h"
|
---|
23 |
|
---|
24 | /* Forward declarations: */
|
---|
25 | class UINameAndSystemEditor;
|
---|
26 | class QIRichTextLabel;
|
---|
27 |
|
---|
28 | /* 1st page of the New Virtual Machine wizard (base part): */
|
---|
29 | class UIWizardNewVMPage1 : public UIWizardPageBase
|
---|
30 | {
|
---|
31 | protected:
|
---|
32 |
|
---|
33 | /* Constructor: */
|
---|
34 | UIWizardNewVMPage1(const QString &strGroup);
|
---|
35 |
|
---|
36 | /* Handlers: */
|
---|
37 | void onNameChanged(QString strNewName);
|
---|
38 | void onOsTypeChanged();
|
---|
39 |
|
---|
40 | /* Helping stuff: */
|
---|
41 | bool machineFolderCreated();
|
---|
42 | bool createMachineFolder();
|
---|
43 | bool cleanupMachineFolder();
|
---|
44 |
|
---|
45 | /** Returns the machine folder value. */
|
---|
46 | QString machineFolder() const { return m_strMachineFolder; }
|
---|
47 | /** Defines the @a strMachineFolder value. */
|
---|
48 | void setMachineFolder(const QString &strMachineFolder) { m_strMachineFolder = strMachineFolder; }
|
---|
49 |
|
---|
50 | /** Returns the machine base-name value. */
|
---|
51 | QString machineBaseName() const { return m_strMachineBaseName; }
|
---|
52 | /** Defines the @a strMachineBaseName value. */
|
---|
53 | void setMachineBaseName(const QString &strMachineBaseName) { m_strMachineBaseName = strMachineBaseName; }
|
---|
54 |
|
---|
55 | /** Holds the machine folder value. */
|
---|
56 | QString m_strMachineFolder;
|
---|
57 | /** Holds the machine base-name value. */
|
---|
58 | QString m_strMachineBaseName;
|
---|
59 |
|
---|
60 | /* Widgets: */
|
---|
61 | UINameAndSystemEditor *m_pNameAndSystemEditor;
|
---|
62 |
|
---|
63 | /* Variables: */
|
---|
64 | QString m_strGroup;
|
---|
65 | bool m_fSupportsHWVirtEx;
|
---|
66 | bool m_fSupportsLongMode;
|
---|
67 | };
|
---|
68 |
|
---|
69 | /* 1st page of the New Virtual Machine wizard (basic extension): */
|
---|
70 | class UIWizardNewVMPageBasic1 : public UIWizardPage, public UIWizardNewVMPage1
|
---|
71 | {
|
---|
72 | Q_OBJECT;
|
---|
73 | Q_PROPERTY(QString machineFolder READ machineFolder WRITE setMachineFolder);
|
---|
74 | Q_PROPERTY(QString machineBaseName READ machineBaseName WRITE setMachineBaseName);
|
---|
75 |
|
---|
76 | public:
|
---|
77 |
|
---|
78 | /* Constructor: */
|
---|
79 | UIWizardNewVMPageBasic1(const QString &strGroup);
|
---|
80 |
|
---|
81 | protected:
|
---|
82 |
|
---|
83 | /* Wrapper to access 'this' from base part: */
|
---|
84 | UIWizardPage* thisImp() { return this; }
|
---|
85 |
|
---|
86 | private slots:
|
---|
87 |
|
---|
88 | /* Handlers: */
|
---|
89 | void sltNameChanged(const QString &strNewText);
|
---|
90 | void sltOsTypeChanged();
|
---|
91 |
|
---|
92 | private:
|
---|
93 |
|
---|
94 | /* Translation stuff: */
|
---|
95 | void retranslateUi();
|
---|
96 |
|
---|
97 | /* Prepare stuff: */
|
---|
98 | void initializePage();
|
---|
99 | void cleanupPage();
|
---|
100 |
|
---|
101 | /* Validation stuff: */
|
---|
102 | bool validatePage();
|
---|
103 |
|
---|
104 | /* Widgets: */
|
---|
105 | QIRichTextLabel *m_pLabel;
|
---|
106 | };
|
---|
107 |
|
---|
108 | #endif // __UIWizardNewVMPageBasic1_h__
|
---|
109 |
|
---|