Changeset 72916 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jul 5, 2018 12:21:25 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp
r72696 r72916 5 5 6 6 /* 7 * Copyright (C) 2009-201 7Oracle Corporation7 * Copyright (C) 2009-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 40 40 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 41 41 42 /* COM includes: */ 42 43 #include "CVFSExplorer.h" 43 44 … … 50 51 /* Assign watermark: */ 51 52 assignWatermark(":/wizard_ovf_export.png"); 52 #else /* VBOX_WS_MAC */53 #else 53 54 /* Assign background image: */ 54 55 assignBackground(":/wizard_ovf_export_bg.png"); 55 #endif /* VBOX_WS_MAC */56 #endif 56 57 } 57 58 58 59 bool UIWizardExportApp::exportAppliance() 59 60 { 60 /* Get export appliance widget: */ 61 /* We need to know every filename which will be created, so that we can ask the user for confirmation of overwriting. 62 * For that we iterating over all virtual systems & fetch all descriptions of the type HardDiskImage. Also add the 63 * manifest file to the check. In the .ova case only the target file itself get checked. */ 64 65 /* Get export appliance widget & fetch all settings from the appliance editor: */ 61 66 UIApplianceExportEditorWidget *pExportApplianceWidget = field("applianceWidget").value<ExportAppliancePointer>(); 62 /* Fetch all settings from the appliance editor. */63 67 pExportApplianceWidget->prepareExport(); 64 /* Get the appliance. */ 68 69 /* Get the appliance: */ 65 70 CAppliance *pAppliance = pExportApplianceWidget->appliance(); 66 /* We need to know every filename which will be created, so that we can 67 * ask the user for confirmation of overwriting. For that we iterating 68 * over all virtual systems & fetch all descriptions of the type 69 * HardDiskImage. Also add the manifest file to the check. In the ova 70 * case only the target file itself get checked. */ 71 72 /* Compose a list of all required files: */ 71 73 QFileInfo fi(field("path").toString()); 72 74 QVector<QString> files; 75 76 /* Add arhive itself: */ 73 77 files << fi.fileName(); 78 79 /* If archive is of .ovf type: */ 74 80 if (fi.suffix().toLower() == "ovf") 75 81 { 82 /* Add manifest file if requested: */ 76 83 if (field("manifestSelected").toBool()) 77 84 files << fi.baseName() + ".mf"; 85 86 /* Add all hard disk images: */ 78 87 CVirtualSystemDescriptionVector vsds = pAppliance->GetVirtualSystemDescriptions(); 79 88 for (int i = 0; i < vsds.size(); ++ i) … … 87 96 } 88 97 } 98 99 /* Initialize VFS explorer: */ 89 100 CVFSExplorer explorer = pAppliance->CreateVFSExplorer(uri(false /* fWithFile */)); 90 101 CProgress progress = explorer.Update(); … … 92 103 if (fResult) 93 104 { 94 /* Show some progress, so the user know whats going on: */95 105 msgCenter().showModalProgressDialog(progress, QApplication::translate("UIWizardExportApp", "Checking files ..."), 96 106 ":/progress_refresh_90px.png", this); … … 103 113 } 104 114 } 115 116 /* Confirm overwriting for existing files: */ 105 117 QVector<QString> exists = explorer.Exists(files); 106 /* Check if the file exists already, if yes get confirmation for overwriting from the user. */107 118 if (!msgCenter().confirmOverridingFiles(exists, this)) 108 119 return false; 109 /* Ok all is confirmed so delete all the files which exists: */ 120 121 /* DELETE all the files which exists after everything is confirmed: */ 110 122 if (!exists.isEmpty()) 111 123 { … … 114 126 if (fResult) 115 127 { 116 /* Show some progress, so the user know whats going on: */117 128 msgCenter().showModalProgressDialog(progress1, QApplication::translate("UIWizardExportApp", "Removing files ..."), 118 129 ":/progress_delete_90px.png", this); … … 142 153 if (!encryptedMediums.isEmpty()) 143 154 { 144 /* Create corresponding dialog: */ 155 /* Modal dialog can be destroyed in own event-loop as a part of application 156 * termination procedure. We have to make sure that the dialog pointer is 157 * always up to date. So we are wrapping created dialog with QPointer. */ 145 158 QPointer<UIAddDiskEncryptionPasswordDialog> pDlg = 146 159 new UIAddDiskEncryptionPasswordDialog(this, … … 173 186 else 174 187 { 175 /* Any modal dialog can be destroyed in own event-loop176 * as a part of application termination procedure..177 * We have to check if the dialog still valid. */178 188 if (pDlg) 179 189 { … … 194 204 if (fResult) 195 205 { 196 /* Show some progress, so the user know whats going on: */197 206 msgCenter().showModalProgressDialog(progress, QApplication::translate("UIWizardExportApp", "Exporting Appliance ..."), 198 207 ":/progress_export_90px.png", this); … … 216 225 StorageType type = field("storageType").value<StorageType>(); 217 226 227 /* Prepare stirage path: */ 218 228 QString path = field("path").toString(); 219 229 if (!fWithFile) … … 222 232 path = fi.path(); 223 233 } 234 235 /* For known storage types: */ 224 236 switch (type) 225 237 { … … 253 265 } 254 266 } 267 268 /* Return nothing by default: */ 255 269 return QString(); 256 270 } … … 260 274 /* Call to base-class: */ 261 275 UIWizard::sltCurrentIdChanged(iId); 276 262 277 /* Enable 2nd button (Reset to Defaults) for 4th and Expert pages only! */ 263 278 setOption(QWizard::HaveCustomButton2, (mode() == WizardMode_Basic && iId == Page4) || … … 273 288 if (iId == CustomButton2) 274 289 { 275 /* Get appliance widget : */290 /* Get appliance widget and make sure it's valid: */ 276 291 ExportAppliancePointer pApplianceWidget = field("applianceWidget").value<ExportAppliancePointer>(); 277 292 AssertMsg(!pApplianceWidget.isNull(), ("Appliance Widget is not set!\n")); … … 319 334 UIWizard::prepare(); 320 335 } 321 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.h
r69500 r72916 5 5 6 6 /* 7 * Copyright (C) 2009-201 7Oracle Corporation7 * Copyright (C) 2009-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIWizardExportApp_h__19 #define __ UIWizardExportApp_h__18 #ifndef ___UIWizardExportApp_h___ 19 #define ___UIWizardExportApp_h___ 20 20 21 /* Localincludes: */21 /* GUI includes: */ 22 22 #include "UIWizard.h" 23 23 … … 25 25 class CAppliance; 26 26 27 /* Export Appliance wizard:*/27 /** Export Appliance wizard. */ 28 28 class UIWizardExportApp : public UIWizard 29 29 { … … 32 32 public: 33 33 34 /* Page IDs:*/34 /** Basic page IDs. */ 35 35 enum 36 36 { … … 41 41 }; 42 42 43 /* Page IDs:*/43 /** Expert page IDs. */ 44 44 enum 45 45 { … … 47 47 }; 48 48 49 /* Constructor: */ 49 /** Constructs export appliance wizard passing @a pParent to the base-class. 50 * @param selectedVMNames Brings the names of VMs to be exported. */ 50 51 UIWizardExportApp(QWidget *pParent, const QStringList &selectedVMNames = QStringList()); 51 52 52 53 protected: 53 54 54 /* Export appliance stuff:*/55 /** Exports full appliance. */ 55 56 bool exportAppliance(); 57 /** Exports @a appliance VMs. */ 56 58 bool exportVMs(CAppliance &appliance); 59 /** Composes universal resource identifier. 60 * @param fWithFile Brings whether uri should include file name as well. */ 57 61 QString uri(bool fWithFile = true) const; 58 62 63 /** @todo remove it */ 59 64 /* Who will be able to export appliance: */ 60 65 friend class UIWizardExportAppPage4; … … 64 69 private slots: 65 70 66 /* Page change handler:*/71 /** Handles page change to @a iId. */ 67 72 void sltCurrentIdChanged(int iId); 68 /* Custom button 2 click handler:*/73 /** Handles custom button @a iId click. */ 69 74 void sltCustomButtonClicked(int iId); 70 75 71 76 private: 72 77 73 /* Translation stuff:*/78 /** Handles translation event. */ 74 79 void retranslateUi(); 75 80 76 /* Pages related stuff:*/81 /** Prepares all. */ 77 82 void prepare(); 78 83 79 /* Variables:*/84 /** Holds the names of VMs to be exported. */ 80 85 QStringList m_selectedVMNames; 81 86 }; 82 87 83 #endif /* __UIWizardExportApp_h__ */ 84 88 #endif /* !___UIWizardExportApp_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppDefs.h
r69500 r72916 5 5 6 6 /* 7 * Copyright (C) 2009-201 7Oracle Corporation7 * Copyright (C) 2009-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIWizardExportAppDefs_h__19 #define __ UIWizardExportAppDefs_h__18 #ifndef ___UIWizardExportAppDefs_h___ 19 #define ___UIWizardExportAppDefs_h___ 20 20 21 /* Globalincludes: */21 /* Qt includes: */ 22 22 #include <QMetaType> 23 23 #include <QPointer> 24 24 #include <QListWidget> 25 25 26 /* Localincludes: */26 /* GUI includes: */ 27 27 #include "UIApplianceExportEditorWidget.h" 28 28 29 /* Typedefs:*/29 /** Storage types. */ 30 30 enum StorageType { Filesystem, SunCloud, S3 }; 31 31 Q_DECLARE_METATYPE(StorageType); … … 35 35 Q_DECLARE_METATYPE(ExportAppliancePointer); 36 36 37 /** QListWidgetItem subclass for Export Appliance wizard VM list. */ 37 38 class VMListWidgetItem : public QListWidgetItem 38 39 { 39 40 public: 40 41 42 /** Constructs VM list item passing @a pixIcon, @a strText and @a pParent to the base-class. 43 * @param strUuid Brings the machine ID. 44 * @param fInSaveState Brings whether machine is in Saved state. */ 41 45 VMListWidgetItem(QPixmap &pixIcon, QString &strText, QString strUuid, bool fInSaveState, QListWidget *pParent) 42 46 : QListWidgetItem(pixIcon, strText, pParent) 43 47 , m_strUuid(strUuid) 44 48 , m_fInSaveState(fInSaveState) 45 { 46 } 49 {} 47 50 51 /** Returns whether this item is less than @a other. */ 48 52 bool operator<(const QListWidgetItem &other) const 49 53 { … … 51 55 } 52 56 57 /** Returns the machine ID. */ 53 58 QString uuid() { return m_strUuid; } 59 /** Returns whether machine is in Saved state. */ 54 60 bool isInSaveState() { return m_fInSaveState; } 55 61 56 62 private: 57 63 58 QString m_strUuid; 59 bool m_fInSaveState; 64 /** Holds the machine ID. */ 65 QString m_strUuid; 66 /** Holds whether machine is in Saved state. */ 67 bool m_fInSaveState; 60 68 }; 61 69 62 #endif /* __UIWizardExportAppDefs_h__ */ 63 70 #endif /* !___UIWizardExportAppDefs_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp
r70805 r72916 5 5 6 6 /* 7 * Copyright (C) 2009-201 7Oracle Corporation7 * Copyright (C) 2009-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 23 23 # include <QVBoxLayout> 24 24 25 /* Localincludes: */25 /* GUI includes: */ 26 26 # include "UIWizardExportAppPageBasic1.h" 27 27 # include "UIWizardExportApp.h" … … 38 38 39 39 40 /********************************************************************************************************************************* 41 * Class UIWizardExportAppPage1 implementation. * 42 *********************************************************************************************************************************/ 43 40 44 UIWizardExportAppPage1::UIWizardExportAppPage1() 41 45 { … … 44 48 void UIWizardExportAppPage1::populateVMSelectorItems(const QStringList &selectedVMNames) 45 49 { 46 /* Add all VM items into 'VM Selector': */50 /* Add all VM items into VM selector: */ 47 51 foreach (const CMachine &machine, vboxGlobal().virtualBox().GetMachines()) 48 52 { … … 114 118 } 115 119 120 121 /********************************************************************************************************************************* 122 * Class UIWizardExportAppPageBasic1 implementation. * 123 *********************************************************************************************************************************/ 124 116 125 UIWizardExportAppPageBasic1::UIWizardExportAppPageBasic1(const QStringList &selectedVMNames) 117 126 { 118 /* Create widgets: */127 /* Create main layout: */ 119 128 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 120 129 { 130 /* Create label: */ 121 131 m_pLabel = new QIRichTextLabel(this); 132 133 /* Create VM selector: */ 122 134 m_pVMSelector = new QListWidget(this); 123 135 { … … 125 137 m_pVMSelector->setSelectionMode(QAbstractItemView::ExtendedSelection); 126 138 } 139 140 /* Add into layout: */ 127 141 pMainLayout->addWidget(m_pLabel); 128 142 pMainLayout->addWidget(m_pVMSelector); 143 144 /* Populate VM selector items: */ 129 145 populateVMSelectorItems(selectedVMNames); 130 146 } … … 157 173 bool UIWizardExportAppPageBasic1::isComplete() const 158 174 { 159 /* There should be at least one vmselected: */175 /* There should be at least one VM selected: */ 160 176 return m_pVMSelector->selectedItems().size() > 0; 161 177 } … … 166 182 bool fResult = true; 167 183 168 /* Ask user about machines which are in savestate currently: */184 /* Ask user about machines which are in Saved state currently: */ 169 185 QStringList savedMachines; 170 186 QList<QListWidgetItem*> pItems = m_pVMSelector->selectedItems(); … … 186 202 return UIWizardExportApp::Page3; 187 203 } 188 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.h
r69500 r72916 5 5 6 6 /* 7 * Copyright (C) 2009-201 7Oracle Corporation7 * Copyright (C) 2009-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIWizardExportAppPageBasic1_h__19 #define __ UIWizardExportAppPageBasic1_h__18 #ifndef ___UIWizardExportAppPageBasic1_h___ 19 #define ___UIWizardExportAppPageBasic1_h___ 20 20 21 /* Localincludes: */21 /* GUI includes: */ 22 22 #include "UIWizardPage.h" 23 23 … … 26 26 class QIRichTextLabel; 27 27 28 /* 1st page of the Export Appliance wizard (base part): */ 28 29 /** UIWizardPageBase extension for 1st page of the Export Appliance wizard. */ 29 30 class UIWizardExportAppPage1 : public UIWizardPageBase 30 31 { 31 32 protected: 32 33 33 /* Constructor:*/34 /** Constructs 1st page base. */ 34 35 UIWizardExportAppPage1(); 35 36 36 /* Helping stuff:*/37 /** Populates VM selector items on the basis of passed @a selectedVMNames. */ 37 38 void populateVMSelectorItems(const QStringList &selectedVMNames); 38 39 39 /* Stuff for 'machineNames' field:*/40 /** Returns a list of selected machine names. */ 40 41 QStringList machineNames() const; 41 42 42 /* Stuff for 'machineIDs' field:*/43 /** Returns a list of selected machine IDs. */ 43 44 QStringList machineIDs() const; 44 45 45 /* Widgets:*/46 /** Holds the VM selector instance. */ 46 47 QListWidget *m_pVMSelector; 47 48 }; 48 49 49 /* 1st page of the Export Appliance wizard (basic extension): */ 50 51 /** UIWizardPage extension for 1st page of the Export Appliance wizard, extends UIWizardExportAppPage1 as well. */ 50 52 class UIWizardExportAppPageBasic1 : public UIWizardPage, public UIWizardExportAppPage1 51 53 { … … 56 58 public: 57 59 58 /* Constructor: */ 60 /** Constructs 1st basic page. 61 * @param selectedVMNames Brings the list of selected VM names. */ 59 62 UIWizardExportAppPageBasic1(const QStringList &selectedVMNames); 60 63 61 64 private: 62 65 63 /* Translate stuff:*/66 /** Handles translation event. */ 64 67 void retranslateUi(); 65 68 66 /* Prepare stuff:*/69 /** Performs page initialization. */ 67 70 void initializePage(); 68 71 69 /* Validation stuff:*/72 /** Returns whether page is complete. */ 70 73 bool isComplete() const; 74 /** Performs page validation. */ 71 75 bool validatePage(); 72 76 73 /* Navigation stuff:*/77 /** Returns next page ID. */ 74 78 int nextId() const; 75 79 76 /* Widgets:*/80 /** Holds the label instance. */ 77 81 QIRichTextLabel *m_pLabel; 78 82 }; 79 83 80 #endif /* __UIWizardExportAppPageBasic1_h__ */ 81 84 #endif /* !___UIWizardExportAppPageBasic1_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp
r70805 r72916 5 5 6 6 /* 7 * Copyright (C) 2009-201 7Oracle Corporation7 * Copyright (C) 2009-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 #else /* !VBOX_WITH_PRECOMPILED_HEADERS */ 21 21 22 /* Globalincludes: */22 /* Qt includes: */ 23 23 # include <QVBoxLayout> 24 24 # include <QGroupBox> 25 25 # include <QRadioButton> 26 26 27 /* Localincludes: */27 /* GUI includes: */ 28 28 # include "UIWizardExportAppPageBasic2.h" 29 29 # include "UIWizardExportApp.h" … … 33 33 34 34 35 /********************************************************************************************************************************* 36 * Class UIWizardExportAppPage2 implementation. * 37 *********************************************************************************************************************************/ 38 35 39 UIWizardExportAppPage2::UIWizardExportAppPage2() 36 40 { … … 39 43 void UIWizardExportAppPage2::chooseDefaultStorageType() 40 44 { 41 /* Just select first of types: */45 /* Choose Filesystem by default: */ 42 46 setStorageType(Filesystem); 43 47 } … … 45 49 StorageType UIWizardExportAppPage2::storageType() const 46 50 { 51 /* Check SunCloud and S3: */ 47 52 if (m_pTypeSunCloud->isChecked()) 48 53 return SunCloud; 49 54 else if (m_pTypeSimpleStorageSystem->isChecked()) 50 55 return S3; 56 57 /* Return Filesystem by default: */ 51 58 return Filesystem; 52 59 } … … 54 61 void UIWizardExportAppPage2::setStorageType(StorageType storageType) 55 62 { 63 /* Check and focus the requested type: */ 56 64 switch (storageType) 57 65 { … … 71 79 } 72 80 81 82 /********************************************************************************************************************************* 83 * Class UIWizardExportAppPageBasic2 implementation. * 84 *********************************************************************************************************************************/ 85 73 86 UIWizardExportAppPageBasic2::UIWizardExportAppPageBasic2() 74 87 { 75 /* Create widgets: */88 /* Create main layout: */ 76 89 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 77 90 { 91 /* Create label: */ 78 92 m_pLabel = new QIRichTextLabel(this); 93 94 /* Create storage type container: */ 79 95 m_pTypeCnt = new QGroupBox(this); 80 96 { 97 /* Create storage type container layout: */ 81 98 QVBoxLayout *pTypeCntLayout = new QVBoxLayout(m_pTypeCnt); 82 99 { 100 /* Create Local Filesystem radio-button: */ 83 101 m_pTypeLocalFilesystem = new QRadioButton(m_pTypeCnt); 102 /* Create SunCloud radio-button: */ 84 103 m_pTypeSunCloud = new QRadioButton(m_pTypeCnt); 104 /* Create Simple Storage System radio-button: */ 85 105 m_pTypeSimpleStorageSystem = new QRadioButton(m_pTypeCnt); 106 107 /* Add into layout: */ 86 108 pTypeCntLayout->addWidget(m_pTypeLocalFilesystem); 87 109 pTypeCntLayout->addWidget(m_pTypeSunCloud); … … 89 111 } 90 112 } 113 114 /* Add into layout: */ 91 115 pMainLayout->addWidget(m_pLabel); 92 116 pMainLayout->addWidget(m_pTypeCnt); 93 117 pMainLayout->addStretch(); 118 119 /* Choose default storage type: */ 94 120 chooseDefaultStorageType(); 95 121 } … … 102 128 /* Register classes: */ 103 129 qRegisterMetaType<StorageType>(); 130 104 131 /* Register fields: */ 105 132 registerField("storageType", this, "storageType"); … … 126 153 retranslateUi(); 127 154 } 128 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.h
r69500 r72916 5 5 6 6 /* 7 * Copyright (C) 2009-201 7Oracle Corporation7 * Copyright (C) 2009-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIWizardExportAppPageBasic2_h__19 #define __ UIWizardExportAppPageBasic2_h__18 #ifndef ___UIWizardExportAppPageBasic2_h___ 19 #define ___UIWizardExportAppPageBasic2_h___ 20 20 21 /* Localincludes: */21 /* GUI includes: */ 22 22 #include "UIWizardPage.h" 23 23 #include "UIWizardExportAppDefs.h" … … 28 28 class QIRichTextLabel; 29 29 30 /* 2nd page of the Export Appliance wizard (base part): */ 30 31 /** UIWizardPageBase extension for 2nd page of the Export Appliance wizard. */ 31 32 class UIWizardExportAppPage2 : public UIWizardPageBase 32 33 { 33 34 protected: 34 35 35 /* Constructor:*/36 /** Constructs 2nd page base. */ 36 37 UIWizardExportAppPage2(); 37 38 38 /* Helpers:*/39 /** Chooses default storage type. */ 39 40 void chooseDefaultStorageType(); 40 41 41 /* Stuff for 'storageType' field:*/42 /** Returns current storage type. */ 42 43 StorageType storageType() const; 44 /** Defines current @a storageType. */ 43 45 void setStorageType(StorageType storageType); 44 46 45 /* Widgets:*/47 /** Holds the storage type container instance. */ 46 48 QGroupBox *m_pTypeCnt; 49 /** Holds the Local Filesystem radio-button. */ 47 50 QRadioButton *m_pTypeLocalFilesystem; 51 /** Holds the Sun Cloud radio-button. */ 48 52 QRadioButton *m_pTypeSunCloud; 53 /** Holds the Simple Storage System radio-button. */ 49 54 QRadioButton *m_pTypeSimpleStorageSystem; 50 55 }; 51 56 52 /* 2nd page of the Export Appliance wizard (basic extension): */ 57 58 /** UIWizardPage extension for 2nd page of the Export Appliance wizard, extends UIWizardExportAppPage2 as well. */ 53 59 class UIWizardExportAppPageBasic2 : public UIWizardPage, public UIWizardExportAppPage2 54 60 { … … 58 64 public: 59 65 60 /* Constructor:*/66 /** Constructs 2nd basic page. */ 61 67 UIWizardExportAppPageBasic2(); 62 68 63 69 private: 64 70 65 /* Translate stuff:*/71 /** Handles translation event. */ 66 72 void retranslateUi(); 67 73 68 /* Prepare stuff:*/74 /** Performs page initialization. */ 69 75 void initializePage(); 70 76 71 /* Widgets:*/77 /** Holds the label instance. */ 72 78 QIRichTextLabel *m_pLabel; 73 79 }; 74 80 75 #endif /* __UIWizardExportAppPageBasic2_h__ */ 76 81 #endif /* !___UIWizardExportAppPageBasic2_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp
r70805 r72916 5 5 6 6 /* 7 * Copyright (C) 2009-201 7Oracle Corporation7 * Copyright (C) 2009-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 #else /* !VBOX_WITH_PRECOMPILED_HEADERS */ 21 21 22 /* Globalincludes: */22 /* Qt includes: */ 23 23 # include <QDir> 24 24 # include <QVBoxLayout> … … 29 29 # include <QCheckBox> 30 30 31 /* Localincludes: */31 /* GUI includes: */ 32 32 # include "UIWizardExportAppPageBasic3.h" 33 33 # include "UIWizardExportApp.h" … … 40 40 41 41 42 /********************************************************************************************************************************* 43 * Class UIWizardExportAppPage3 implementation. * 44 *********************************************************************************************************************************/ 45 42 46 UIWizardExportAppPage3::UIWizardExportAppPage3() 43 47 { … … 46 50 void UIWizardExportAppPage3::chooseDefaultSettings() 47 51 { 48 /* Choose default format: */52 /* Choose ovf-1.0 by default: */ 49 53 setFormat("ovf-1.0"); 50 54 } … … 225 229 } 226 230 231 232 /********************************************************************************************************************************* 233 * Class UIWizardExportAppPageBasic3 implementation. * 234 *********************************************************************************************************************************/ 235 227 236 UIWizardExportAppPageBasic3::UIWizardExportAppPageBasic3() 228 237 { 229 /* Create widgets: */238 /* Create main layout: */ 230 239 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 231 240 { 241 /* Create label: */ 232 242 m_pLabel = new QIRichTextLabel(this); 243 244 /* Create settings layout: */ 233 245 QGridLayout *pSettingsLayout = new QGridLayout; 234 246 { 247 /* Create username editor: */ 235 248 m_pUsernameEditor = new QLineEdit(this); 249 /* Create username label: */ 236 250 m_pUsernameLabel = new QLabel(this); 237 251 { … … 239 253 m_pUsernameLabel->setBuddy(m_pUsernameEditor); 240 254 } 255 256 /* Create password editor: */ 241 257 m_pPasswordEditor = new QLineEdit(this); 242 258 { 243 259 m_pPasswordEditor->setEchoMode(QLineEdit::Password); 244 260 } 261 /* Create password label: */ 245 262 m_pPasswordLabel = new QLabel(this); 246 263 { … … 248 265 m_pPasswordLabel->setBuddy(m_pPasswordEditor); 249 266 } 267 268 /* Create hostname editor: */ 250 269 m_pHostnameEditor = new QLineEdit(this); 270 /* Create hostname label: */ 251 271 m_pHostnameLabel = new QLabel(this); 252 272 { … … 254 274 m_pHostnameLabel->setBuddy(m_pHostnameEditor); 255 275 } 276 277 /* Create bucket editor: */ 256 278 m_pBucketEditor = new QLineEdit(this); 279 /* Create bucket label: */ 257 280 m_pBucketLabel = new QLabel(this); 258 281 { … … 260 283 m_pBucketLabel->setBuddy(m_pBucketEditor); 261 284 } 285 286 /* Create file selector: */ 262 287 m_pFileSelector = new UIEmptyFilePathSelector(this); 263 288 { … … 267 292 m_pFileSelector->setDefaultSaveExt("ova"); 268 293 } 294 /* Create file selector label: */ 269 295 m_pFileSelectorLabel = new QLabel(this); 270 296 { … … 272 298 m_pFileSelectorLabel->setBuddy(m_pFileSelector); 273 299 } 300 301 /* Create format combo-box: */ 274 302 m_pFormatComboBox = new QComboBox(this); 275 303 { … … 285 313 this, &UIWizardExportAppPageBasic3::sltHandleFormatComboChange); 286 314 } 315 /* Create format combo-box label: */ 287 316 m_pFormatComboBoxLabel = new QLabel(this); 288 317 { … … 290 319 m_pFormatComboBoxLabel->setBuddy(m_pFormatComboBox); 291 320 } 321 322 /* Add into layout: */ 292 323 pSettingsLayout->addWidget(m_pUsernameLabel, 0, 0); 293 324 pSettingsLayout->addWidget(m_pUsernameEditor, 0, 1); … … 303 334 pSettingsLayout->addWidget(m_pFormatComboBox, 5, 1); 304 335 } 336 337 /* Create manifest check-box: */ 305 338 m_pManifestCheckbox = new QCheckBox(this); 339 340 /* Add into layout: */ 306 341 pMainLayout->addWidget(m_pLabel); 307 342 pMainLayout->addLayout(pSettingsLayout); 308 343 pMainLayout->addWidget(m_pManifestCheckbox); 309 344 pMainLayout->addStretch(); 345 346 /* Choose default settings: */ 310 347 chooseDefaultSettings(); 311 348 } … … 455 492 } 456 493 } 457 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.h
r69500 r72916 5 5 6 6 /* 7 * Copyright (C) 2009-201 7Oracle Corporation7 * Copyright (C) 2009-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIWizardExportAppPageBasic3_h__19 #define __ UIWizardExportAppPageBasic3_h__18 #ifndef ___UIWizardExportAppPageBasic3_h___ 19 #define ___UIWizardExportAppPageBasic3_h___ 20 20 21 /* Globalincludes: */21 /* Qt includes: */ 22 22 #include <QVariant> 23 23 24 /* Localincludes: */24 /* GUI includes: */ 25 25 #include "UIWizardPage.h" 26 26 … … 33 33 class QIRichTextLabel; 34 34 35 /* 3rd page of the Export Appliance wizard (base part): */ 35 36 /** UIWizardPageBase extension for 3rd page of the Export Appliance wizard. */ 36 37 class UIWizardExportAppPage3 : public UIWizardPageBase 37 38 { 38 39 protected: 39 40 40 /* Constructor:*/41 /** Constructs 3rd page base. */ 41 42 UIWizardExportAppPage3(); 42 43 43 /* Helpers:*/44 /** Chooses default settings. */ 44 45 void chooseDefaultSettings(); 46 /** Refreshes current settings. */ 45 47 virtual void refreshCurrentSettings(); 48 /** Updates format combo tool-tips. */ 46 49 virtual void updateFormatComboToolTip(); 47 50 48 /* Stuff for 'format' field:*/51 /** Returns format. */ 49 52 QString format() const; 53 /** Defines @a strFormat. */ 50 54 void setFormat(const QString &strFormat); 51 /* Stuff for 'manifestSelected' field: */ 55 56 /** Returns whether manifest selected. */ 52 57 bool isManifestSelected() const; 58 /** Defines whether manifest @a fSelected. */ 53 59 void setManifestSelected(bool fChecked); 54 /* Stuff for 'username' field: */ 60 61 /** Returns user name. */ 55 62 QString username() const; 63 /** Defines @a strUserName. */ 56 64 void setUserName(const QString &strUserName); 57 /* Stuff for 'password' field: */ 65 66 /** Returns password. */ 58 67 QString password() const; 68 /** Defines @a strPassword. */ 59 69 void setPassword(const QString &strPassword); 60 /* Stuff for 'hostname' field: */ 70 71 /** Returns hostname. */ 61 72 QString hostname() const; 73 /** Defines @a strHostname. */ 62 74 void setHostname(const QString &strHostname); 63 /* Stuff for 'bucket' field: */ 75 76 /** Returns bucket. */ 64 77 QString bucket() const; 78 /** Defines @a strBucket. */ 65 79 void setBucket(const QString &strBucket); 66 /* Stuff for 'path' field: */ 80 81 /** Returns path. */ 67 82 QString path() const; 83 /** Defines @a strPath. */ 68 84 void setPath(const QString &strPath); 69 85 70 /* Variables:*/86 /** Holds the default appliance name. */ 71 87 QString m_strDefaultApplianceName; 72 88 73 /* Widgets:*/89 /** Holds the username label instance. */ 74 90 QLabel *m_pUsernameLabel; 91 /** Holds the username editor instance. */ 75 92 QLineEdit *m_pUsernameEditor; 93 94 /** Holds the password label instance. */ 76 95 QLabel *m_pPasswordLabel; 96 /** Holds the password editor instance. */ 77 97 QLineEdit *m_pPasswordEditor; 98 99 /** Holds the hostname label instance. */ 78 100 QLabel *m_pHostnameLabel; 101 /** Holds the hostname editor instance. */ 79 102 QLineEdit *m_pHostnameEditor; 103 104 /** Holds the bucket label instance. */ 80 105 QLabel *m_pBucketLabel; 106 /** Holds the bucket editor instance. */ 81 107 QLineEdit *m_pBucketEditor; 108 109 /** Holds the file selector label instance. */ 82 110 QLabel *m_pFileSelectorLabel; 111 /** Holds the file selector instance. */ 83 112 UIEmptyFilePathSelector *m_pFileSelector; 113 114 /** Holds the format combo-box label instance. */ 84 115 QLabel *m_pFormatComboBoxLabel; 116 /** Holds the format combo-box instance. */ 85 117 QComboBox *m_pFormatComboBox; 118 119 /** Holds the manifest check-box instance. */ 86 120 QCheckBox *m_pManifestCheckbox; 87 121 }; 88 122 89 /* 3rd page of the Export Appliance wizard (basic extension): */ 123 124 /** UIWizardPage extension for 3rd page of the Export Appliance wizard, extends UIWizardExportAppPage3 as well. */ 90 125 class UIWizardExportAppPageBasic3 : public UIWizardPage, public UIWizardExportAppPage3 91 126 { … … 101 136 public: 102 137 103 /* Constructor:*/138 /** Constructs 3rd basic page. */ 104 139 UIWizardExportAppPageBasic3(); 105 140 106 141 protected: 107 142 108 /* Wrapper to access 'wizard-field' from base part:*/143 /** Allows access wizard-field from base part. */ 109 144 QVariant fieldImp(const QString &strFieldName) const { return UIWizardPage::field(strFieldName); } 110 145 111 146 private slots: 112 147 113 /* Format combo change handler:*/148 /** Handles change in format combo-box. */ 114 149 void sltHandleFormatComboChange(); 115 150 116 151 private: 117 152 118 /* Translate stuff:*/153 /** Handles translation event. */ 119 154 void retranslateUi(); 120 155 121 /* Prepare stuff:*/156 /** Performs page initialization. */ 122 157 void initializePage(); 123 158 124 /* Validation stuff:*/159 /** Returns whether page is complete. */ 125 160 bool isComplete() const; 126 161 127 /* Helpers:*/162 /** Refreshes current settings. */ 128 163 void refreshCurrentSettings(); 129 164 130 /* Widgets:*/165 /** Holds the label instance. */ 131 166 QIRichTextLabel *m_pLabel; 132 167 }; 133 168 134 #endif /* __UIWizardExportAppPageBasic3_h__ */ 135 169 #endif /* !___UIWizardExportAppPageBasic3_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.cpp
r69500 r72916 5 5 6 6 /* 7 * Copyright (C) 2009-201 7Oracle Corporation7 * Copyright (C) 2009-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 37 37 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 38 38 39 40 /********************************************************************************************************************************* 41 * Class UIWizardExportAppPage4 implementation. * 42 *********************************************************************************************************************************/ 39 43 40 44 UIWizardExportAppPage4::UIWizardExportAppPage4() … … 85 89 } 86 90 91 92 /********************************************************************************************************************************* 93 * Class UIWizardExportAppPageBasic4 implementation. * 94 *********************************************************************************************************************************/ 95 87 96 UIWizardExportAppPageBasic4::UIWizardExportAppPageBasic4() 88 97 { 89 /* Create widgets: */98 /* Create main layout: */ 90 99 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 91 100 { 101 /* Create label: */ 92 102 m_pLabel = new QIRichTextLabel(this); 103 104 /* Create appliance widget: */ 93 105 m_pApplianceWidget = new UIApplianceExportEditorWidget(this); 94 106 { 95 107 m_pApplianceWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); 96 108 } 109 110 /* Add into layout: */ 97 111 pMainLayout->addWidget(m_pLabel); 98 112 pMainLayout->addWidget(m_pApplianceWidget); … … 101 115 /* Register classes: */ 102 116 qRegisterMetaType<ExportAppliancePointer>(); 117 103 118 /* Register fields: */ 104 119 registerField("applianceWidget", this, "applianceWidget"); … … 143 158 return fResult; 144 159 } 145 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.h
r69500 r72916 5 5 6 6 /* 7 * Copyright (C) 2009-201 7Oracle Corporation7 * Copyright (C) 2009-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIWizardExportAppPageBasic4_h__19 #define __ UIWizardExportAppPageBasic4_h__18 #ifndef ___UIWizardExportAppPageBasic4_h___ 19 #define ___UIWizardExportAppPageBasic4_h___ 20 20 21 /* Globalincludes: */21 /* Qt includes: */ 22 22 #include <QVariant> 23 23 24 /* Localincludes: */24 /* GUI includes: */ 25 25 #include "UIWizardPage.h" 26 26 #include "UIWizardExportAppDefs.h" … … 30 30 class QIRichTextLabel; 31 31 32 /* 4th page of the Export Appliance wizard (base part): */ 32 33 /** UIWizardPageBase extension for 4th page of the Export Appliance wizard. */ 33 34 class UIWizardExportAppPage4 : public UIWizardPageBase 34 35 { 35 36 protected: 36 37 37 /* Constructor:*/38 /** Constructs 4th page base. */ 38 39 UIWizardExportAppPage4(); 39 40 40 /* Helpers:*/41 void refreshApplianceSettingsWidget( 41 /** Refreshes appliance settings widget. */ 42 void refreshApplianceSettingsWidget(); 42 43 43 /* Stuff for 'applianceWidget' field:*/44 /** Returns the appliance widget reference. */ 44 45 ExportAppliancePointer applianceWidget() const { return m_pApplianceWidget; } 45 46 46 /* Widgets:*/47 /** Holds the appliance widget reference. */ 47 48 UIApplianceExportEditorWidget *m_pApplianceWidget; 48 49 }; 49 50 50 /* 4th page of the Export Appliance wizard (basic extension): */ 51 52 /** UIWizardPage extension for 4th page of the Export Appliance wizard, extends UIWizardExportAppPage4 as well. */ 51 53 class UIWizardExportAppPageBasic4 : public UIWizardPage, public UIWizardExportAppPage4 52 54 { … … 56 58 public: 57 59 58 /* Constructor:*/60 /** Constructs 4th basic page. */ 59 61 UIWizardExportAppPageBasic4(); 60 62 61 63 protected: 62 64 63 /* Wrapper to access 'wizard' from base part:*/65 /** Allows access wizard from base part. */ 64 66 UIWizard* wizardImp() { return UIWizardPage::wizard(); } 65 /* Wrapper to access 'this' from base part:*/67 /** Allows access page from base part. */ 66 68 UIWizardPage* thisImp() { return this; } 67 /* Wrapper to access 'wizard-field' from base part:*/69 /** Allows access wizard-field from base part. */ 68 70 QVariant fieldImp(const QString &strFieldName) const { return UIWizardPage::field(strFieldName); } 69 71 70 72 private: 71 73 72 /* Translate stuff:*/74 /** Handles translation event. */ 73 75 void retranslateUi(); 74 76 75 /* Prepare stuff:*/77 /** Performs page initialization. */ 76 78 void initializePage(); 77 79 78 /* Validation stuff:*/80 /** Performs page validation. */ 79 81 bool validatePage(); 80 82 81 /* Widgets:*/83 /** Holds the label instance. */ 82 84 QIRichTextLabel *m_pLabel; 83 85 }; 84 86 85 #endif /* __UIWizardExportAppPageBasic4_h__ */ 86 87 #endif /* !___UIWizardExportAppPageBasic4_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
r70805 r72916 5 5 6 6 /* 7 * Copyright (C) 2009-201 7Oracle Corporation7 * Copyright (C) 2009-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 #else /* !VBOX_WITH_PRECOMPILED_HEADERS */ 21 21 22 /* Globalincludes: */22 /* Qt includes: */ 23 23 # include <QVBoxLayout> 24 24 # include <QGridLayout> … … 31 31 # include <QGroupBox> 32 32 33 /* Localincludes: */33 /* GUI includes: */ 34 34 # include "UIWizardExportAppPageExpert.h" 35 35 # include "UIWizardExportApp.h" … … 42 42 43 43 44 /********************************************************************************************************************************* 45 * Class UIWizardExportAppPageExpert implementation. * 46 *********************************************************************************************************************************/ 47 44 48 UIWizardExportAppPageExpert::UIWizardExportAppPageExpert(const QStringList &selectedVMNames) 45 49 { … … 47 51 QGridLayout *pMainLayout = new QGridLayout(this); 48 52 { 53 /* Create VM selector container: */ 49 54 m_pSelectorCnt = new QGroupBox(this); 50 55 { 56 /* Create VM selector container layout: */ 51 57 QVBoxLayout *pSelectorCntLayout = new QVBoxLayout(m_pSelectorCnt); 52 58 { 59 /* Create VM selector: */ 53 60 m_pVMSelector = new QListWidget(m_pSelectorCnt); 54 61 { … … 56 63 m_pVMSelector->setSelectionMode(QAbstractItemView::ExtendedSelection); 57 64 } 65 66 /* Add into layout: */ 58 67 pSelectorCntLayout->addWidget(m_pVMSelector); 59 68 } 60 69 } 70 71 /* Create appliance widget container: */ 61 72 m_pApplianceCnt = new QGroupBox(this); 62 73 { 74 /* Create appliance widget container layout: */ 63 75 QVBoxLayout *pApplianceCntLayout = new QVBoxLayout(m_pApplianceCnt); 64 76 { 77 /* Create appliance widget: */ 65 78 m_pApplianceWidget = new UIApplianceExportEditorWidget(m_pApplianceCnt); 66 79 { … … 68 81 m_pApplianceWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); 69 82 } 83 84 /* Add into layout: */ 70 85 pApplianceCntLayout->addWidget(m_pApplianceWidget); 71 86 } 72 87 } 88 89 /* Create storage type container: */ 73 90 m_pTypeCnt = new QGroupBox(this); 74 91 { 92 /* Hide it for now: */ 75 93 m_pTypeCnt->hide(); 94 95 /* Create storage type container layout: */ 76 96 QVBoxLayout *pTypeCntLayout = new QVBoxLayout(m_pTypeCnt); 77 97 { 98 /* Create Local Filesystem radio-button: */ 78 99 m_pTypeLocalFilesystem = new QRadioButton(m_pTypeCnt); 100 /* Create SunCloud radio-button: */ 79 101 m_pTypeSunCloud = new QRadioButton(m_pTypeCnt); 102 /* Create Simple Storage System radio-button: */ 80 103 m_pTypeSimpleStorageSystem = new QRadioButton(m_pTypeCnt); 104 105 /* Add into layout: */ 81 106 pTypeCntLayout->addWidget(m_pTypeLocalFilesystem); 82 107 pTypeCntLayout->addWidget(m_pTypeSunCloud); … … 84 109 } 85 110 } 111 112 /* Create settings widget container: */ 86 113 m_pSettingsCnt = new QGroupBox(this); 87 114 { 115 /* Create settings widget container layout: */ 88 116 QGridLayout *pSettingsLayout = new QGridLayout(m_pSettingsCnt); 89 117 { 118 /* Create username editor: */ 90 119 m_pUsernameEditor = new QLineEdit(m_pSettingsCnt); 120 /* Create username label: */ 91 121 m_pUsernameLabel = new QLabel(m_pSettingsCnt); 92 122 { … … 94 124 m_pUsernameLabel->setBuddy(m_pUsernameEditor); 95 125 } 126 127 /* Create password editor: */ 96 128 m_pPasswordEditor = new QLineEdit(m_pSettingsCnt); 97 129 { 98 130 m_pPasswordEditor->setEchoMode(QLineEdit::Password); 99 131 } 132 /* Create password label: */ 100 133 m_pPasswordLabel = new QLabel(m_pSettingsCnt); 101 134 { … … 103 136 m_pPasswordLabel->setBuddy(m_pPasswordEditor); 104 137 } 138 139 /* Create hostname editor: */ 105 140 m_pHostnameEditor = new QLineEdit(m_pSettingsCnt); 141 /* Create hostname label: */ 106 142 m_pHostnameLabel = new QLabel(m_pSettingsCnt); 107 143 { … … 109 145 m_pHostnameLabel->setBuddy(m_pHostnameEditor); 110 146 } 147 148 /* Create bucket editor: */ 111 149 m_pBucketEditor = new QLineEdit(m_pSettingsCnt); 150 /* Create bucket label: */ 112 151 m_pBucketLabel = new QLabel(m_pSettingsCnt); 113 152 { … … 115 154 m_pBucketLabel->setBuddy(m_pBucketEditor); 116 155 } 156 157 /* Create file selector: */ 117 158 m_pFileSelector = new UIEmptyFilePathSelector(m_pSettingsCnt); 118 159 { … … 122 163 m_pFileSelector->setDefaultSaveExt("ova"); 123 164 } 165 /* Create file selector label: */ 124 166 m_pFileSelectorLabel = new QLabel(m_pSettingsCnt); 125 167 { … … 127 169 m_pFileSelectorLabel->setBuddy(m_pFileSelector); 128 170 } 171 172 /* Create format combo-box editor: */ 129 173 m_pFormatComboBox = new QComboBox(m_pSettingsCnt); 130 174 { … … 140 184 this, &UIWizardExportAppPageExpert::sltHandleFormatComboChange); 141 185 } 186 /* Create format combo-box label: */ 142 187 m_pFormatComboBoxLabel = new QLabel(m_pSettingsCnt); 143 188 { … … 145 190 m_pFormatComboBoxLabel->setBuddy(m_pFormatComboBox); 146 191 } 192 193 /* Create manifest check-box editor: */ 147 194 m_pManifestCheckbox = new QCheckBox(m_pSettingsCnt); 195 196 /* Add into layout: */ 148 197 pSettingsLayout->addWidget(m_pUsernameLabel, 0, 0); 149 198 pSettingsLayout->addWidget(m_pUsernameEditor, 0, 1); … … 161 210 } 162 211 } 212 213 /* Add into layout: */ 163 214 pMainLayout->addWidget(m_pSelectorCnt, 0, 0); 164 215 pMainLayout->addWidget(m_pApplianceCnt, 0, 1); 165 216 pMainLayout->addWidget(m_pTypeCnt, 1, 0, 1, 2); 166 217 pMainLayout->addWidget(m_pSettingsCnt, 2, 0, 1, 2); 218 219 /* Populate VM selector items: */ 167 220 populateVMSelectorItems(selectedVMNames); 221 /* Choose default storage type: */ 168 222 chooseDefaultStorageType(); 223 /* Choose default settings: */ 169 224 chooseDefaultSettings(); 170 225 } … … 184 239 qRegisterMetaType<StorageType>(); 185 240 qRegisterMetaType<ExportAppliancePointer>(); 241 186 242 /* Register fields: */ 187 243 registerField("machineNames", this, "machineNames"); … … 227 283 /* Translate objects: */ 228 284 m_strDefaultApplianceName = UIWizardExportApp::tr("Appliance"); 285 229 286 /* Translate widgets: */ 230 287 m_pSelectorCnt->setTitle(UIWizardExportApp::tr("Virtual &machines to export")); … … 334 391 return fResult; 335 392 } 336 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
r69500 r72916 5 5 6 6 /* 7 * Copyright (C) 2009-201 7Oracle Corporation7 * Copyright (C) 2009-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIWizardExportAppPageExpert_h__19 #define __ UIWizardExportAppPageExpert_h__18 #ifndef ___UIWizardExportAppPageExpert_h___ 19 #define ___UIWizardExportAppPageExpert_h___ 20 20 21 /* Localincludes: */21 /* GUI includes: */ 22 22 #include "UIWizardExportAppPageBasic1.h" 23 23 #include "UIWizardExportAppPageBasic2.h" … … 28 28 class QGroupBox; 29 29 30 /* Expert page of the Export Appliance wizard: */ 30 /** UIWizardPage extension for 4th page of the Export Appliance wizard, 31 * extends UIWizardExportAppPage1, UIWizardExportAppPage2, 32 * UIWizardExportAppPage3, UIWizardExportAppPage4 as well. */ 31 33 class UIWizardExportAppPageExpert : public UIWizardPage, 32 34 public UIWizardExportAppPage1, … … 50 52 public: 51 53 52 /* Constructor: */ 54 /** Constructs expert basic page. 55 * @param selectedVMNames Brings the list of selected VM names. */ 53 56 UIWizardExportAppPageExpert(const QStringList &selectedVMNames); 54 57 55 58 protected: 56 59 57 /* Wrapper to access 'wizard' from base part:*/60 /** Allows access wizard from base part. */ 58 61 UIWizard* wizardImp() { return UIWizardPage::wizard(); } 59 /* Wrapper to access 'this' from base part:*/62 /** Allows access page from base part. */ 60 63 UIWizardPage* thisImp() { return this; } 61 /* Wrapper to access 'wizard-field' from base part:*/64 /** Allows access wizard-field from base part. */ 62 65 QVariant fieldImp(const QString &strFieldName) const { return UIWizardPage::field(strFieldName); } 63 66 64 67 private slots: 65 68 66 /* VM Selector selection change handler:*/69 /** Handles VM selector index change. */ 67 70 void sltVMSelectionChangeHandler(); 68 71 69 /* Storage-type change handler:*/72 /** Handles storage type change. */ 70 73 void sltStorageTypeChangeHandler(); 71 74 72 /* Format combo change handler:*/75 /** Handles format combo change. */ 73 76 void sltHandleFormatComboChange(); 74 77 75 78 private: 76 79 77 /* Field API:*/80 /** Wraps wizard field API, calling it with certain @a strFieldName argument. */ 78 81 QVariant field(const QString &strFieldName) const { return UIWizardPage::field(strFieldName); } 79 82 80 /* Translate stuff:*/83 /** Handles translation event. */ 81 84 void retranslateUi(); 82 85 83 /* Prepare stuff:*/86 /** Performs page initialization. */ 84 87 void initializePage(); 85 88 86 /* Validation stuff:*/89 /** Returns whether page is complete. */ 87 90 bool isComplete() const; 91 /** Performs page validation. */ 88 92 bool validatePage(); 89 93 90 /* Widgets:*/94 /** Holds the VM selector container instance. */ 91 95 QGroupBox *m_pSelectorCnt; 96 /** Holds the appliance widget container reference. */ 92 97 QGroupBox *m_pApplianceCnt; 98 /** Holds the settings widget container reference. */ 93 99 QGroupBox *m_pSettingsCnt; 94 100 }; 95 101 96 #endif /* __UIWizardExportAppPageExpert_h__ */ 97 102 #endif /* !___UIWizardExportAppPageExpert_h___ */
Note:
See TracChangeset
for help on using the changeset viewer.