1 | /* $Id: UIApplianceImportEditorWidget.h 76553 2019-01-01 01:45:53Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIApplianceImportEditorWidget class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2009-2019 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 __UIApplianceImportEditorWidget_h__
|
---|
19 | #define __UIApplianceImportEditorWidget_h__
|
---|
20 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
21 | # pragma once
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | /* GUI includes: */
|
---|
25 | #include "UIApplianceEditorWidget.h"
|
---|
26 |
|
---|
27 | /* Forward declarations: */
|
---|
28 | class UIFilePathSelector;
|
---|
29 | class QIRichTextLabel;
|
---|
30 | class QComboBox;
|
---|
31 | class QGridLayout;
|
---|
32 |
|
---|
33 | /** MAC address policies. */
|
---|
34 | enum MACAddressImportPolicy
|
---|
35 | {
|
---|
36 | MACAddressImportPolicy_KeepAllMACs,
|
---|
37 | MACAddressImportPolicy_KeepNATMACs,
|
---|
38 | MACAddressImportPolicy_StripAllMACs,
|
---|
39 | MACAddressImportPolicy_MAX
|
---|
40 | };
|
---|
41 |
|
---|
42 | class UIApplianceImportEditorWidget: public UIApplianceEditorWidget
|
---|
43 | {
|
---|
44 | Q_OBJECT;
|
---|
45 |
|
---|
46 | public:
|
---|
47 | UIApplianceImportEditorWidget(QWidget *pParent);
|
---|
48 |
|
---|
49 | bool setFile(const QString &strFile);
|
---|
50 | void prepareImport();
|
---|
51 | bool import();
|
---|
52 |
|
---|
53 | QList<QPair<QString, QString> > licenseAgreements() const;
|
---|
54 |
|
---|
55 | protected:
|
---|
56 | /** Handles translation event. */
|
---|
57 | virtual void retranslateUi() /* override */;
|
---|
58 |
|
---|
59 | private slots:
|
---|
60 |
|
---|
61 | void sltHandlePathChanged(const QString &newPath);
|
---|
62 |
|
---|
63 | private:
|
---|
64 |
|
---|
65 | void prepareWidgets();
|
---|
66 | /** Populates MAC address policies. */
|
---|
67 | void populateMACAddressImportPolicies();
|
---|
68 | void setMACAddressImportPolicy(MACAddressImportPolicy enmMACAddressImportPolicy);
|
---|
69 | void sltHandleMACAddressImportPolicyComboChange();
|
---|
70 | void updateMACAddressImportPolicyComboToolTip();
|
---|
71 |
|
---|
72 | QIRichTextLabel *m_pPathSelectorLabel;
|
---|
73 | UIFilePathSelector *m_pPathSelector;
|
---|
74 | /** Holds the checkbox that controls 'import HDs as VDI' behaviour. */
|
---|
75 | QCheckBox *m_pImportHDsAsVDI;
|
---|
76 | QLabel *m_pMACComboBoxLabel;
|
---|
77 | QComboBox *m_pMACComboBox;
|
---|
78 | QGridLayout *m_pOptionsLayout;
|
---|
79 | QLabel *m_pAdditionalOptionsLabel;
|
---|
80 | };
|
---|
81 |
|
---|
82 | #endif /* __UIApplianceImportEditorWidget_h__ */
|
---|