1 | /* $Id: UIWizardNewVMDiskPage.h 103982 2024-03-21 11:43:53Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIWizardNewVMDiskPage class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.virtualbox.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMDiskPage_h
|
---|
29 | #define FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMDiskPage_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* Qt includes: */
|
---|
35 | #include <QSet>
|
---|
36 |
|
---|
37 | /* GUI includes: */
|
---|
38 | #include "QIFileDialog.h"
|
---|
39 | #include "UINativeWizardPage.h"
|
---|
40 |
|
---|
41 | /* COM includes: */
|
---|
42 | #include "CMedium.h"
|
---|
43 |
|
---|
44 | /* Forward declarations: */
|
---|
45 | class QButtonGroup;
|
---|
46 | class QCheckBox;
|
---|
47 | class QRadioButton;
|
---|
48 | class QLabel;
|
---|
49 | class QIRichTextLabel;
|
---|
50 | class QIToolButton;
|
---|
51 | class UIActionPool;
|
---|
52 | class UIMediaComboBox;
|
---|
53 | class UIMediumSizeEditor;
|
---|
54 |
|
---|
55 | namespace UIWizardNewVMDiskCommon
|
---|
56 | {
|
---|
57 | QUuid getWithFileOpenDialog(const QString &strOSTypeID,
|
---|
58 | const QString &strMachineFolder,
|
---|
59 | QWidget *pCaller, UIActionPool *pActionPool);
|
---|
60 | }
|
---|
61 |
|
---|
62 |
|
---|
63 | class UIWizardNewVMDiskPage : public UINativeWizardPage
|
---|
64 | {
|
---|
65 | Q_OBJECT;
|
---|
66 |
|
---|
67 | public:
|
---|
68 |
|
---|
69 | UIWizardNewVMDiskPage(UIActionPool *pActionPool);
|
---|
70 |
|
---|
71 | protected:
|
---|
72 |
|
---|
73 |
|
---|
74 | private slots:
|
---|
75 |
|
---|
76 | void sltSelectedDiskSourceChanged();
|
---|
77 | void sltMediaComboBoxIndexChanged();
|
---|
78 | void sltGetWithFileOpenDialog();
|
---|
79 | void sltHandleSizeEditorChange(qulonglong uSize);
|
---|
80 | void sltFixedCheckBoxToggled(bool fChecked);
|
---|
81 | virtual void sltRetranslateUI() RT_OVERRIDE RT_FINAL;
|
---|
82 |
|
---|
83 | private:
|
---|
84 |
|
---|
85 | void prepare();
|
---|
86 | void createConnections();
|
---|
87 | QWidget *createNewDiskWidgets();
|
---|
88 | void setEnableNewDiskWidgets(bool fEnable);
|
---|
89 | QWidget *createDiskWidgets();
|
---|
90 | QWidget *createMediumVariantWidgets(bool fWithLabels);
|
---|
91 |
|
---|
92 | virtual void initializePage() RT_OVERRIDE RT_FINAL;
|
---|
93 | virtual bool isComplete() const RT_OVERRIDE RT_FINAL;
|
---|
94 |
|
---|
95 | void setEnableDiskSelectionWidgets(bool fEnabled);
|
---|
96 | void setWidgetVisibility(const CMediumFormat &mediumFormat);
|
---|
97 |
|
---|
98 | /** @name Widgets
|
---|
99 | * @{ */
|
---|
100 | QButtonGroup *m_pDiskSourceButtonGroup;
|
---|
101 | QRadioButton *m_pDiskEmpty;
|
---|
102 | QRadioButton *m_pDiskNew;
|
---|
103 | QRadioButton *m_pDiskExisting;
|
---|
104 | UIMediaComboBox *m_pDiskSelector;
|
---|
105 | QIToolButton *m_pDiskSelectionButton;
|
---|
106 | QIRichTextLabel *m_pLabel;
|
---|
107 | QLabel *m_pMediumSizeEditorLabel;
|
---|
108 | UIMediumSizeEditor *m_pMediumSizeEditor;
|
---|
109 | QIRichTextLabel *m_pDescriptionLabel;
|
---|
110 | QIRichTextLabel *m_pDynamicLabel;
|
---|
111 | QIRichTextLabel *m_pFixedLabel;
|
---|
112 | QCheckBox *m_pFixedCheckBox;
|
---|
113 | /** @} */
|
---|
114 |
|
---|
115 | /** @name Variables
|
---|
116 | * @{ */
|
---|
117 | QSet<QString> m_userModifiedParameters;
|
---|
118 | bool m_fVDIFormatFound;
|
---|
119 | qulonglong m_uMediumSizeMin;
|
---|
120 | qulonglong m_uMediumSizeMax;
|
---|
121 | /** @} */
|
---|
122 | UIActionPool *m_pActionPool;
|
---|
123 | };
|
---|
124 |
|
---|
125 | #endif /* !FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMDiskPage_h */
|
---|