1 | /* $Id: UIWizardCloneVM.h 103982 2024-03-21 11:43:53Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIWizardCloneVM class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2011-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_clonevm_UIWizardCloneVM_h
|
---|
29 | #define FEQT_INCLUDED_SRC_wizards_clonevm_UIWizardCloneVM_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* GUI includes: */
|
---|
35 | #include "UINativeWizard.h"
|
---|
36 | #include "UIWizardCloneVMEditors.h"
|
---|
37 |
|
---|
38 | /* COM includes: */
|
---|
39 | #include "CMachine.h"
|
---|
40 | #include "CSnapshot.h"
|
---|
41 |
|
---|
42 | /** Clone Virtual Machine wizard: */
|
---|
43 | class UIWizardCloneVM : public UINativeWizard
|
---|
44 | {
|
---|
45 | Q_OBJECT;
|
---|
46 |
|
---|
47 | public:
|
---|
48 |
|
---|
49 | UIWizardCloneVM(QWidget *pParent, const CMachine &machine,
|
---|
50 | const QString &strGroup, CSnapshot snapshot = CSnapshot());
|
---|
51 | void setCloneModePageVisible(bool fIsFullClone);
|
---|
52 | bool isCloneModePageVisible() const;
|
---|
53 | /** Clone VM stuff. */
|
---|
54 | bool cloneVM();
|
---|
55 | bool machineHasSnapshot() const;
|
---|
56 |
|
---|
57 | /** @name Parameter setter/getters
|
---|
58 | * @{ */
|
---|
59 | void setCloneName(const QString &strCloneName);
|
---|
60 | const QString &cloneName() const;
|
---|
61 |
|
---|
62 | void setCloneFilePath(const QString &strCloneFilePath);
|
---|
63 | const QString &cloneFilePath() const;
|
---|
64 |
|
---|
65 | MACAddressClonePolicy macAddressClonePolicy() const;
|
---|
66 | void setMacAddressPolicy(MACAddressClonePolicy enmMACAddressClonePolicy);
|
---|
67 |
|
---|
68 | bool keepDiskNames() const;
|
---|
69 | void setKeepDiskNames(bool fKeepDiskNames);
|
---|
70 |
|
---|
71 | bool keepHardwareUUIDs() const;
|
---|
72 | void setKeepHardwareUUIDs(bool fKeepHardwareUUIDs);
|
---|
73 |
|
---|
74 | bool linkedClone() const;
|
---|
75 | void setLinkedClone(bool fLinkedClone);
|
---|
76 |
|
---|
77 | KCloneMode cloneMode() const;
|
---|
78 | void setCloneMode(KCloneMode enmCloneMode);
|
---|
79 | /** @} */
|
---|
80 |
|
---|
81 | protected:
|
---|
82 |
|
---|
83 | virtual void populatePages() RT_OVERRIDE RT_FINAL;
|
---|
84 |
|
---|
85 | private slots:
|
---|
86 |
|
---|
87 | virtual void sltRetranslateUI() RT_OVERRIDE RT_FINAL;
|
---|
88 |
|
---|
89 | private:
|
---|
90 |
|
---|
91 | void prepare();
|
---|
92 |
|
---|
93 | CMachine m_machine;
|
---|
94 | CSnapshot m_snapshot;
|
---|
95 | QString m_strGroup;
|
---|
96 | int m_iCloneModePageIndex;
|
---|
97 |
|
---|
98 | /** @name Parameters needed during machine cloning
|
---|
99 | * @{ */
|
---|
100 | QString m_strCloneName;
|
---|
101 | QString m_strCloneFilePath;
|
---|
102 | MACAddressClonePolicy m_enmMACAddressClonePolicy;
|
---|
103 | bool m_fKeepDiskNames;
|
---|
104 | bool m_fKeepHardwareUUIDs;
|
---|
105 | bool m_fLinkedClone;
|
---|
106 | KCloneMode m_enmCloneMode;
|
---|
107 | /** @} */
|
---|
108 | };
|
---|
109 |
|
---|
110 | #endif /* !FEQT_INCLUDED_SRC_wizards_clonevm_UIWizardCloneVM_h */
|
---|