VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSettings.h@ 104158

Last change on this file since 104158 was 103982, checked in by vboxsync, 10 months ago

FE/Qt: bugref:10624. Replacing override and final keywords with RT_OVERRIDE and RT_FINAL defines.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.9 KB
Line 
1/* $Id: UIWizardImportAppPageSettings.h 103982 2024-03-21 11:43:53Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIWizardImportAppPageSettings class declaration.
4 */
5
6/*
7 * Copyright (C) 2009-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_importappliance_UIWizardImportAppPageSettings_h
29#define FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageSettings_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* GUI includes: */
35#include "UINativeWizardPage.h"
36#include "UIWizardImportApp.h"
37
38/* Forward declarations: */
39class QCheckBox;
40class QIComboBox;
41class QLabel;
42class QStackedWidget;
43class QIRichTextLabel;
44class UIApplianceImportEditorWidget;
45class UIFilePathSelector;
46class UIFormEditorWidget;
47
48/** Certificate text template types. */
49enum kCertText
50{
51 kCertText_Uninitialized = 0,
52 kCertText_Unsigned,
53 kCertText_IssuedTrusted,
54 kCertText_IssuedExpired,
55 kCertText_IssuedUnverified,
56 kCertText_SelfSignedTrusted,
57 kCertText_SelfSignedExpired,
58 kCertText_SelfSignedUnverified
59};
60
61/** Namespace for Settings page of the Import Appliance wizard. */
62namespace UIWizardImportAppSettings
63{
64 /** Refresh stacked widget. */
65 void refreshStackedWidget(QStackedWidget *pStackedWidget,
66 bool fIsSourceCloudOne);
67
68 /** Refreshes appliance widget. */
69 void refreshApplianceWidget(UIApplianceImportEditorWidget *pApplianceWidget,
70 const CAppliance &comAppliance,
71 bool fIsSourceCloudOne);
72 /** Refresh MAC address import policies. */
73 void refreshMACAddressImportPolicies(QIComboBox *pCombo,
74 bool fIsSourceCloudOne);
75
76 /** Refreshes form properties table. */
77 void refreshFormPropertiesTable(UIFormEditorWidget *pFormEditor,
78 const CVirtualSystemDescriptionForm &comForm,
79 bool fIsSourceCloudOne);
80
81 /** Returns MAC address import policy. */
82 MACAddressImportPolicy macAddressImportPolicy(QIComboBox *pCombo);
83 /** Returns whether hard disks should be imported as VDIs. */
84 bool isImportHDsAsVDI(QCheckBox *pCheckBox);
85
86 /** Translates MAC import policy combo. */
87 void retranslateMACImportPolicyCombo(QIComboBox *pCombo);
88 /** Translates certificate label. */
89 void retranslateCertificateLabel(QLabel *pLabel, const kCertText &enmType, const QString &strSignedBy);
90
91 /** Updates MAC import policy combo tool-tips. */
92 void updateMACImportPolicyComboToolTip(QIComboBox *pCombo);
93}
94
95/** UINativeWizardPage extension for Settings page of the Import Appliance wizard,
96 * based on UIWizardImportAppSettings namespace functions. */
97class UIWizardImportAppPageSettings : public UINativeWizardPage
98{
99 Q_OBJECT;
100
101public:
102
103 /** Constructs Settings page.
104 * @param strFileName Brings appliance file name. */
105 UIWizardImportAppPageSettings(const QString &strFileName);
106
107protected:
108
109 /** Returns wizard this page belongs to. */
110 UIWizardImportApp *wizard() const;
111
112 /** Performs page initialization. */
113 virtual void initializePage() RT_OVERRIDE RT_FINAL;
114
115 /** Performs page validation. */
116 virtual bool validatePage() RT_OVERRIDE RT_FINAL;
117
118private slots:
119
120 /** Inits page async way. */
121 void sltAsyncInit();
122
123 /** Handles import path editor change. */
124 void sltHandleImportPathEditorChange();
125 /** Handles MAC address import policy combo change. */
126 void sltHandleMACImportPolicyComboChange();
127 /** Handles import HDs as VDI check-box change. */
128 void sltHandleImportHDsAsVDICheckBoxChange();
129 /** Handles translation event. */
130 virtual void sltRetranslateUI() RT_OVERRIDE RT_FINAL;
131
132private:
133
134 /** Handles appliance certificate. */
135 void handleApplianceCertificate();
136
137 /** Handles the appliance file name. */
138 QString m_strFileName;
139
140 /** Holds the description label instance. */
141 QIRichTextLabel *m_pLabelDescription;
142
143 /** Holds the settings widget 2 instance. */
144 QStackedWidget *m_pSettingsWidget2;
145
146 /** Holds the appliance widget instance. */
147 UIApplianceImportEditorWidget *m_pApplianceWidget;
148 /** Holds the import file-path label instance. */
149 QLabel *m_pLabelImportFilePath;
150 /** Holds the import file-path editor instance. */
151 UIFilePathSelector *m_pEditorImportFilePath;
152 /** Holds the MAC address label instance. */
153 QLabel *m_pLabelMACImportPolicy;
154 /** Holds the MAC address combo instance. */
155 QIComboBox *m_pComboMACImportPolicy;
156 /** Holds the additional options label instance. */
157 QLabel *m_pLabelAdditionalOptions;
158 /** Holds the 'import HDs as VDI' checkbox instance. */
159 QCheckBox *m_pCheckboxImportHDsAsVDI;
160 /** Holds the signature/certificate info label instance. */
161 QLabel *m_pCertLabel;
162
163 /** Holds the certificate text template type. */
164 kCertText m_enmCertText;
165
166 /** Holds the "signed by" information. */
167 QString m_strSignedBy;
168
169 /** Holds the Form Editor widget instance. */
170 UIFormEditorWidget *m_pFormEditor;
171};
172
173#endif /* !FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageSettings_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