Changeset 91465 in vbox for trunk/src/VBox
- Timestamp:
- Sep 29, 2021 4:34:16 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
r91464 r91465 40 40 #include "UIIconPool.h" 41 41 #include "UIMessageCenter.h" 42 #include "UIToolBox.h" 42 43 #include "UIVirtualBoxEventHandler.h" 43 44 #include "UIVirtualBoxManager.h" … … 61 62 : m_selectedVMNames(selectedVMNames) 62 63 , m_fExportToOCIByDefault(fExportToOCIByDefault) 63 , m_p SelectorCnt(0)64 , m_pToolBox(0) 64 65 , m_pVMSelector(0) 65 , m_pSettingsCnt(0)66 66 , m_pFormatLayout(0) 67 67 , m_pFormatComboBoxLabel(0) … … 82 82 , m_pExportModeLabel(0) 83 83 , m_pExportModeButtonGroup(0) 84 , m_pApplianceCnt(0)85 84 , m_pSettingsWidget2(0) 86 85 , m_pApplianceWidget(0) … … 88 87 { 89 88 /* Create widgets: */ 90 Q GridLayout *pMainLayout = new QGridLayout(this);89 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 91 90 if (pMainLayout) 92 91 { 93 pMainLayout->setRowStretch(0, 1); 94 95 /* Create VM selector container: */ 96 m_pSelectorCnt = new QGroupBox(this); 97 if (m_pSelectorCnt) 92 /* Create tool-box: */ 93 m_pToolBox = new UIToolBox(this); 94 if (m_pToolBox) 98 95 { 99 /* Create VM selector container layout: */100 QVBoxLayout *pSelectorCntLayout = new QVBoxLayout(m_pSelectorCnt);101 if ( pSelectorCntLayout)96 /* Create VM selector: */ 97 m_pVMSelector = new QListWidget(m_pToolBox); 98 if (m_pVMSelector) 102 99 { 103 /* Create VM selector: */ 104 m_pVMSelector = new QListWidget(m_pSelectorCnt); 105 if (m_pVMSelector) 100 m_pVMSelector->setAlternatingRowColors(true); 101 m_pVMSelector->setSelectionMode(QAbstractItemView::ExtendedSelection); 102 103 /* Add into tool-box: */ 104 m_pToolBox->insertPage(0, m_pVMSelector, QString()); 105 } 106 107 /* Create settings widget container: */ 108 QWidget *pWidgetSettings = new QWidget(m_pToolBox); 109 if (pWidgetSettings) 110 { 111 /* Create settings widget container layout: */ 112 QVBoxLayout *pSettingsCntLayout = new QVBoxLayout(pWidgetSettings); 113 if (pSettingsCntLayout) 106 114 { 107 m_pVMSelector->setAlternatingRowColors(true); 108 m_pVMSelector->setSelectionMode(QAbstractItemView::ExtendedSelection); 109 pSelectorCntLayout->addWidget(m_pVMSelector); 115 pSettingsCntLayout->setContentsMargins(0, 0, 0, 0); 116 #ifdef VBOX_WS_MAC 117 pSettingsCntLayout->setSpacing(5); 118 #endif 119 120 /* Create format layout: */ 121 m_pFormatLayout = new QGridLayout; 122 if (m_pFormatLayout) 123 { 124 m_pFormatLayout->setContentsMargins(0, 0, 0, 0); 125 #ifdef VBOX_WS_MAC 126 m_pFormatLayout->setSpacing(10); 127 #endif 128 m_pFormatLayout->setColumnStretch(0, 0); 129 m_pFormatLayout->setColumnStretch(1, 1); 130 131 /* Create format combo-box label: */ 132 m_pFormatComboBoxLabel = new QLabel(pWidgetSettings); 133 if (m_pFormatComboBoxLabel) 134 { 135 m_pFormatComboBoxLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 136 m_pFormatLayout->addWidget(m_pFormatComboBoxLabel, 0, 0); 137 } 138 /* Create format combo-box: */ 139 m_pFormatComboBox = new QIComboBox(pWidgetSettings); 140 if (m_pFormatComboBox) 141 { 142 m_pFormatComboBoxLabel->setBuddy(m_pFormatComboBox); 143 m_pFormatLayout->addWidget(m_pFormatComboBox, 0, 1); 144 } 145 146 /* Add into layout: */ 147 pSettingsCntLayout->addLayout(m_pFormatLayout); 148 } 149 150 /* Create 1st settings widget: */ 151 m_pSettingsWidget1 = new QStackedWidget(pWidgetSettings); 152 if (m_pSettingsWidget1) 153 { 154 /* Create settings pane 1: */ 155 QWidget *pSettingsPane1 = new QWidget(m_pSettingsWidget1); 156 if (pSettingsPane1) 157 { 158 /* Create settings layout 1: */ 159 m_pSettingsLayout1 = new QGridLayout(pSettingsPane1); 160 if (m_pSettingsLayout1) 161 { 162 #ifdef VBOX_WS_MAC 163 m_pSettingsLayout1->setSpacing(10); 164 #endif 165 m_pSettingsLayout1->setContentsMargins(0, 0, 0, 0); 166 m_pSettingsLayout1->setColumnStretch(0, 0); 167 m_pSettingsLayout1->setColumnStretch(1, 1); 168 169 /* Create file selector label: */ 170 m_pFileSelectorLabel = new QLabel(pSettingsPane1); 171 if (m_pFileSelectorLabel) 172 { 173 m_pFileSelectorLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 174 m_pSettingsLayout1->addWidget(m_pFileSelectorLabel, 0, 0); 175 } 176 /* Create file selector: */ 177 m_pFileSelector = new UIEmptyFilePathSelector(pSettingsPane1); 178 if (m_pFileSelector) 179 { 180 m_pFileSelectorLabel->setBuddy(m_pFileSelector); 181 m_pFileSelector->setMode(UIEmptyFilePathSelector::Mode_File_Save); 182 m_pFileSelector->setEditable(true); 183 m_pFileSelector->setButtonPosition(UIEmptyFilePathSelector::RightPosition); 184 m_pFileSelector->setDefaultSaveExt("ova"); 185 m_pSettingsLayout1->addWidget(m_pFileSelector, 0, 1, 1, 2); 186 } 187 188 /* Create MAC policy combo-box label: */ 189 m_pMACComboBoxLabel = new QLabel(pSettingsPane1); 190 if (m_pMACComboBoxLabel) 191 { 192 m_pMACComboBoxLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 193 m_pSettingsLayout1->addWidget(m_pMACComboBoxLabel, 1, 0); 194 } 195 /* Create MAC policy combo-box: */ 196 m_pMACComboBox = new QIComboBox(pSettingsPane1); 197 if (m_pMACComboBox) 198 { 199 m_pMACComboBoxLabel->setBuddy(m_pMACComboBox); 200 m_pSettingsLayout1->addWidget(m_pMACComboBox, 1, 1, 1, 2); 201 } 202 203 /* Create advanced label: */ 204 m_pAdditionalLabel = new QLabel(pSettingsPane1); 205 if (m_pAdditionalLabel) 206 { 207 m_pAdditionalLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 208 m_pSettingsLayout1->addWidget(m_pAdditionalLabel, 2, 0); 209 } 210 /* Create manifest check-box editor: */ 211 m_pManifestCheckbox = new QCheckBox(pSettingsPane1); 212 if (m_pManifestCheckbox) 213 m_pSettingsLayout1->addWidget(m_pManifestCheckbox, 2, 1); 214 /* Create include ISOs check-box: */ 215 m_pIncludeISOsCheckbox = new QCheckBox(pSettingsPane1); 216 if (m_pIncludeISOsCheckbox) 217 m_pSettingsLayout1->addWidget(m_pIncludeISOsCheckbox, 3, 1); 218 219 /* Create placeholder: */ 220 QWidget *pPlaceholder = new QWidget(pSettingsPane1); 221 if (pPlaceholder) 222 m_pSettingsLayout1->addWidget(pPlaceholder, 4, 0, 1, 3); 223 } 224 225 /* Add into layout: */ 226 m_pSettingsWidget1->addWidget(pSettingsPane1); 227 } 228 229 /* Create settings pane 2: */ 230 QWidget *pSettingsPane2 = new QWidget(m_pSettingsWidget1); 231 if (pSettingsPane2) 232 { 233 /* Create settings layout 2: */ 234 m_pSettingsLayout2 = new QGridLayout(pSettingsPane2); 235 if (m_pSettingsLayout2) 236 { 237 #ifdef VBOX_WS_MAC 238 m_pSettingsLayout2->setSpacing(10); 239 #endif 240 m_pSettingsLayout2->setContentsMargins(0, 0, 0, 0); 241 m_pSettingsLayout2->setColumnStretch(0, 0); 242 m_pSettingsLayout2->setColumnStretch(1, 1); 243 244 /* Create profile label: */ 245 m_pProfileLabel = new QLabel(pSettingsPane2); 246 if (m_pProfileLabel) 247 { 248 m_pProfileLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 249 m_pSettingsLayout2->addWidget(m_pProfileLabel, 0, 0); 250 } 251 /* Create sub-layout: */ 252 QHBoxLayout *pSubLayout = new QHBoxLayout; 253 if (pSubLayout) 254 { 255 pSubLayout->setContentsMargins(0, 0, 0, 0); 256 pSubLayout->setSpacing(1); 257 258 /* Create profile combo-box: */ 259 m_pProfileComboBox = new QIComboBox(pSettingsPane2); 260 if (m_pProfileComboBox) 261 { 262 m_pProfileLabel->setBuddy(m_pProfileComboBox); 263 pSubLayout->addWidget(m_pProfileComboBox); 264 } 265 /* Create profile tool-button: */ 266 m_pProfileToolButton = new QIToolButton(pSettingsPane2); 267 if (m_pProfileToolButton) 268 { 269 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 270 ":/cloud_profile_manager_disabled_16px.png")); 271 pSubLayout->addWidget(m_pProfileToolButton); 272 } 273 274 /* Add into layout: */ 275 m_pSettingsLayout2->addLayout(pSubLayout, 0, 1); 276 } 277 278 /* Create profile label: */ 279 m_pExportModeLabel = new QLabel(pSettingsPane2); 280 if (m_pExportModeLabel) 281 { 282 m_pExportModeLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 283 m_pSettingsLayout2->addWidget(m_pExportModeLabel, 1, 0); 284 } 285 /* Create button-group: */ 286 m_pExportModeButtonGroup = new QButtonGroup(pSettingsPane2); 287 if (m_pExportModeButtonGroup) 288 { 289 /* Create Do Not Ask button: */ 290 m_exportModeButtons[CloudExportMode_DoNotAsk] = new QRadioButton(pSettingsPane2); 291 if (m_exportModeButtons.value(CloudExportMode_DoNotAsk)) 292 { 293 m_pExportModeButtonGroup->addButton(m_exportModeButtons.value(CloudExportMode_DoNotAsk)); 294 m_pSettingsLayout2->addWidget(m_exportModeButtons.value(CloudExportMode_DoNotAsk), 1, 1); 295 } 296 /* Create Ask Then Export button: */ 297 m_exportModeButtons[CloudExportMode_AskThenExport] = new QRadioButton(pSettingsPane2); 298 if (m_exportModeButtons.value(CloudExportMode_AskThenExport)) 299 { 300 m_pExportModeButtonGroup->addButton(m_exportModeButtons.value(CloudExportMode_AskThenExport)); 301 m_pSettingsLayout2->addWidget(m_exportModeButtons.value(CloudExportMode_AskThenExport), 2, 1); 302 } 303 /* Create Export Then Ask button: */ 304 m_exportModeButtons[CloudExportMode_ExportThenAsk] = new QRadioButton(pSettingsPane2); 305 if (m_exportModeButtons.value(CloudExportMode_ExportThenAsk)) 306 { 307 m_pExportModeButtonGroup->addButton(m_exportModeButtons.value(CloudExportMode_ExportThenAsk)); 308 m_pSettingsLayout2->addWidget(m_exportModeButtons.value(CloudExportMode_ExportThenAsk), 3, 1); 309 } 310 } 311 312 /* Create placeholder: */ 313 QWidget *pPlaceholder = new QWidget(pSettingsPane2); 314 if (pPlaceholder) 315 m_pSettingsLayout2->addWidget(pPlaceholder, 4, 0, 1, 3); 316 } 317 318 /* Add into layout: */ 319 m_pSettingsWidget1->addWidget(pSettingsPane2); 320 } 321 322 /* Add into layout: */ 323 pSettingsCntLayout->addWidget(m_pSettingsWidget1); 324 } 110 325 } 326 327 /* Add into tool-box: */ 328 m_pToolBox->insertPage(1, pWidgetSettings, QString()); 111 329 } 112 330 331 /* Create 2nd settings widget: */ 332 m_pSettingsWidget2 = new QStackedWidget(m_pToolBox); 333 if (m_pSettingsWidget2) 334 { 335 /* Create appliance widget container: */ 336 QWidget *pApplianceWidgetCnt = new QWidget(this); 337 if (pApplianceWidgetCnt) 338 { 339 /* Create appliance widget layout: */ 340 QVBoxLayout *pApplianceWidgetLayout = new QVBoxLayout(pApplianceWidgetCnt); 341 if (pApplianceWidgetLayout) 342 { 343 pApplianceWidgetLayout->setContentsMargins(0, 0, 0, 0); 344 345 /* Create appliance widget: */ 346 m_pApplianceWidget = new UIApplianceExportEditorWidget(pApplianceWidgetCnt); 347 if (m_pApplianceWidget) 348 { 349 m_pApplianceWidget->setMinimumHeight(250); 350 m_pApplianceWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); 351 pApplianceWidgetLayout->addWidget(m_pApplianceWidget); 352 } 353 } 354 355 /* Add into layout: */ 356 m_pSettingsWidget2->addWidget(pApplianceWidgetCnt); 357 } 358 359 /* Create form editor container: */ 360 QWidget *pFormEditorCnt = new QWidget(this); 361 if (pFormEditorCnt) 362 { 363 /* Create form editor layout: */ 364 QVBoxLayout *pFormEditorLayout = new QVBoxLayout(pFormEditorCnt); 365 if (pFormEditorLayout) 366 { 367 pFormEditorLayout->setContentsMargins(0, 0, 0, 0); 368 369 /* Create form editor widget: */ 370 m_pFormEditor = new UIFormEditorWidget(pFormEditorCnt); 371 if (m_pFormEditor) 372 pFormEditorLayout->addWidget(m_pFormEditor); 373 } 374 375 /* Add into layout: */ 376 m_pSettingsWidget2->addWidget(pFormEditorCnt); 377 } 378 379 /* Add into tool-box: */ 380 m_pToolBox->insertPage(2, m_pSettingsWidget2, QString()); 381 } 382 113 383 /* Add into layout: */ 114 pMainLayout->addWidget(m_p SelectorCnt, 0, 0);384 pMainLayout->addWidget(m_pToolBox); 115 385 } 116 386 117 /* Create settings widget container: */ 118 m_pSettingsCnt = new QGroupBox(this); 119 if (m_pSettingsCnt) 120 { 121 /* Create settings widget container layout: */ 122 QVBoxLayout *pSettingsCntLayout = new QVBoxLayout(m_pSettingsCnt); 123 if (pSettingsCntLayout) 124 { 125 #ifdef VBOX_WS_MAC 126 pSettingsCntLayout->setSpacing(5); 127 #endif 128 129 /* Create format layout: */ 130 m_pFormatLayout = new QGridLayout; 131 if (m_pFormatLayout) 132 { 133 m_pFormatLayout->setContentsMargins(0, 0, 0, 0); 134 #ifdef VBOX_WS_MAC 135 m_pFormatLayout->setSpacing(10); 136 #endif 137 m_pFormatLayout->setColumnStretch(0, 0); 138 m_pFormatLayout->setColumnStretch(1, 1); 139 140 /* Create format combo-box label: */ 141 m_pFormatComboBoxLabel = new QLabel(m_pSettingsCnt); 142 if (m_pFormatComboBoxLabel) 143 { 144 m_pFormatComboBoxLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 145 m_pFormatLayout->addWidget(m_pFormatComboBoxLabel, 0, 0); 146 } 147 /* Create format combo-box: */ 148 m_pFormatComboBox = new QIComboBox(m_pSettingsCnt); 149 if (m_pFormatComboBox) 150 { 151 m_pFormatComboBoxLabel->setBuddy(m_pFormatComboBox); 152 m_pFormatLayout->addWidget(m_pFormatComboBox, 0, 1); 153 } 154 155 /* Add into layout: */ 156 pSettingsCntLayout->addLayout(m_pFormatLayout); 157 } 158 159 /* Create 1st settings widget: */ 160 m_pSettingsWidget1 = new QStackedWidget(m_pSettingsCnt); 161 if (m_pSettingsWidget1) 162 { 163 /* Create settings pane 1: */ 164 QWidget *pSettingsPane1 = new QWidget(m_pSettingsWidget1); 165 if (pSettingsPane1) 166 { 167 /* Create settings layout 1: */ 168 m_pSettingsLayout1 = new QGridLayout(pSettingsPane1); 169 if (m_pSettingsLayout1) 170 { 171 #ifdef VBOX_WS_MAC 172 m_pSettingsLayout1->setSpacing(10); 173 #endif 174 m_pSettingsLayout1->setContentsMargins(0, 0, 0, 0); 175 m_pSettingsLayout1->setColumnStretch(0, 0); 176 m_pSettingsLayout1->setColumnStretch(1, 1); 177 178 /* Create file selector label: */ 179 m_pFileSelectorLabel = new QLabel(pSettingsPane1); 180 if (m_pFileSelectorLabel) 181 { 182 m_pFileSelectorLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 183 m_pSettingsLayout1->addWidget(m_pFileSelectorLabel, 0, 0); 184 } 185 /* Create file selector: */ 186 m_pFileSelector = new UIEmptyFilePathSelector(pSettingsPane1); 187 if (m_pFileSelector) 188 { 189 m_pFileSelectorLabel->setBuddy(m_pFileSelector); 190 m_pFileSelector->setMode(UIEmptyFilePathSelector::Mode_File_Save); 191 m_pFileSelector->setEditable(true); 192 m_pFileSelector->setButtonPosition(UIEmptyFilePathSelector::RightPosition); 193 m_pFileSelector->setDefaultSaveExt("ova"); 194 m_pSettingsLayout1->addWidget(m_pFileSelector, 0, 1, 1, 2); 195 } 196 197 /* Create MAC policy combo-box label: */ 198 m_pMACComboBoxLabel = new QLabel(pSettingsPane1); 199 if (m_pMACComboBoxLabel) 200 { 201 m_pMACComboBoxLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 202 m_pSettingsLayout1->addWidget(m_pMACComboBoxLabel, 1, 0); 203 } 204 /* Create MAC policy combo-box: */ 205 m_pMACComboBox = new QIComboBox(pSettingsPane1); 206 if (m_pMACComboBox) 207 { 208 m_pMACComboBoxLabel->setBuddy(m_pMACComboBox); 209 m_pSettingsLayout1->addWidget(m_pMACComboBox, 1, 1, 1, 2); 210 } 211 212 /* Create advanced label: */ 213 m_pAdditionalLabel = new QLabel(pSettingsPane1); 214 if (m_pAdditionalLabel) 215 { 216 m_pAdditionalLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 217 m_pSettingsLayout1->addWidget(m_pAdditionalLabel, 2, 0); 218 } 219 /* Create manifest check-box editor: */ 220 m_pManifestCheckbox = new QCheckBox(pSettingsPane1); 221 if (m_pManifestCheckbox) 222 m_pSettingsLayout1->addWidget(m_pManifestCheckbox, 2, 1); 223 /* Create include ISOs check-box: */ 224 m_pIncludeISOsCheckbox = new QCheckBox(pSettingsPane1); 225 if (m_pIncludeISOsCheckbox) 226 m_pSettingsLayout1->addWidget(m_pIncludeISOsCheckbox, 3, 1); 227 228 /* Create placeholder: */ 229 QWidget *pPlaceholder = new QWidget(pSettingsPane1); 230 if (pPlaceholder) 231 m_pSettingsLayout1->addWidget(pPlaceholder, 4, 0, 1, 3); 232 } 233 234 /* Add into layout: */ 235 m_pSettingsWidget1->addWidget(pSettingsPane1); 236 } 237 238 /* Create settings pane 2: */ 239 QWidget *pSettingsPane2 = new QWidget(m_pSettingsWidget1); 240 if (pSettingsPane2) 241 { 242 /* Create settings layout 2: */ 243 m_pSettingsLayout2 = new QGridLayout(pSettingsPane2); 244 if (m_pSettingsLayout2) 245 { 246 #ifdef VBOX_WS_MAC 247 m_pSettingsLayout2->setSpacing(10); 248 #endif 249 m_pSettingsLayout2->setContentsMargins(0, 0, 0, 0); 250 m_pSettingsLayout2->setColumnStretch(0, 0); 251 m_pSettingsLayout2->setColumnStretch(1, 1); 252 253 /* Create profile label: */ 254 m_pProfileLabel = new QLabel(pSettingsPane2); 255 if (m_pProfileLabel) 256 { 257 m_pProfileLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 258 m_pSettingsLayout2->addWidget(m_pProfileLabel, 0, 0); 259 } 260 /* Create sub-layout: */ 261 QHBoxLayout *pSubLayout = new QHBoxLayout; 262 if (pSubLayout) 263 { 264 pSubLayout->setContentsMargins(0, 0, 0, 0); 265 pSubLayout->setSpacing(1); 266 267 /* Create profile combo-box: */ 268 m_pProfileComboBox = new QIComboBox(pSettingsPane2); 269 if (m_pProfileComboBox) 270 { 271 m_pProfileLabel->setBuddy(m_pProfileComboBox); 272 pSubLayout->addWidget(m_pProfileComboBox); 273 } 274 /* Create profile tool-button: */ 275 m_pProfileToolButton = new QIToolButton(pSettingsPane2); 276 if (m_pProfileToolButton) 277 { 278 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 279 ":/cloud_profile_manager_disabled_16px.png")); 280 pSubLayout->addWidget(m_pProfileToolButton); 281 } 282 283 /* Add into layout: */ 284 m_pSettingsLayout2->addLayout(pSubLayout, 0, 1); 285 } 286 287 /* Create profile label: */ 288 m_pExportModeLabel = new QLabel(pSettingsPane2); 289 if (m_pExportModeLabel) 290 { 291 m_pExportModeLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 292 m_pSettingsLayout2->addWidget(m_pExportModeLabel, 1, 0); 293 } 294 /* Create button-group: */ 295 m_pExportModeButtonGroup = new QButtonGroup(pSettingsPane2); 296 if (m_pExportModeButtonGroup) 297 { 298 /* Create Do Not Ask button: */ 299 m_exportModeButtons[CloudExportMode_DoNotAsk] = new QRadioButton(pSettingsPane2); 300 if (m_exportModeButtons.value(CloudExportMode_DoNotAsk)) 301 { 302 m_pExportModeButtonGroup->addButton(m_exportModeButtons.value(CloudExportMode_DoNotAsk)); 303 m_pSettingsLayout2->addWidget(m_exportModeButtons.value(CloudExportMode_DoNotAsk), 1, 1); 304 } 305 /* Create Ask Then Export button: */ 306 m_exportModeButtons[CloudExportMode_AskThenExport] = new QRadioButton(pSettingsPane2); 307 if (m_exportModeButtons.value(CloudExportMode_AskThenExport)) 308 { 309 m_pExportModeButtonGroup->addButton(m_exportModeButtons.value(CloudExportMode_AskThenExport)); 310 m_pSettingsLayout2->addWidget(m_exportModeButtons.value(CloudExportMode_AskThenExport), 2, 1); 311 } 312 /* Create Export Then Ask button: */ 313 m_exportModeButtons[CloudExportMode_ExportThenAsk] = new QRadioButton(pSettingsPane2); 314 if (m_exportModeButtons.value(CloudExportMode_ExportThenAsk)) 315 { 316 m_pExportModeButtonGroup->addButton(m_exportModeButtons.value(CloudExportMode_ExportThenAsk)); 317 m_pSettingsLayout2->addWidget(m_exportModeButtons.value(CloudExportMode_ExportThenAsk), 3, 1); 318 } 319 } 320 321 /* Create placeholder: */ 322 QWidget *pPlaceholder = new QWidget(pSettingsPane2); 323 if (pPlaceholder) 324 m_pSettingsLayout2->addWidget(pPlaceholder, 4, 0, 1, 3); 325 } 326 327 /* Add into layout: */ 328 m_pSettingsWidget1->addWidget(pSettingsPane2); 329 } 330 331 /* Add into layout: */ 332 pSettingsCntLayout->addWidget(m_pSettingsWidget1); 333 } 334 } 335 336 /* Add into layout: */ 337 pMainLayout->addWidget(m_pSettingsCnt, 1, 0, 1, 2); 338 } 339 340 /* Create appliance widget container: */ 341 m_pApplianceCnt = new QGroupBox(this); 342 if (m_pApplianceCnt) 343 { 344 /* Create appliance widget container layout: */ 345 QVBoxLayout *pApplianceCntLayout = new QVBoxLayout(m_pApplianceCnt); 346 if (pApplianceCntLayout) 347 { 348 /* Create settings widget 2: */ 349 m_pSettingsWidget2 = new QStackedWidget; 350 if (m_pSettingsWidget2) 351 { 352 /* Create appliance widget container: */ 353 QWidget *pApplianceWidgetCnt = new QWidget(this); 354 if (pApplianceWidgetCnt) 355 { 356 /* Create appliance widget layout: */ 357 QVBoxLayout *pApplianceWidgetLayout = new QVBoxLayout(pApplianceWidgetCnt); 358 if (pApplianceWidgetLayout) 359 { 360 pApplianceWidgetLayout->setContentsMargins(0, 0, 0, 0); 361 362 /* Create appliance widget: */ 363 m_pApplianceWidget = new UIApplianceExportEditorWidget(pApplianceWidgetCnt); 364 if (m_pApplianceWidget) 365 { 366 m_pApplianceWidget->setMinimumHeight(250); 367 m_pApplianceWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); 368 pApplianceWidgetLayout->addWidget(m_pApplianceWidget); 369 } 370 } 371 372 /* Add into layout: */ 373 m_pSettingsWidget2->addWidget(pApplianceWidgetCnt); 374 } 375 376 /* Create form editor container: */ 377 QWidget *pFormEditorCnt = new QWidget(this); 378 if (pFormEditorCnt) 379 { 380 /* Create form editor layout: */ 381 QVBoxLayout *pFormEditorLayout = new QVBoxLayout(pFormEditorCnt); 382 if (pFormEditorLayout) 383 { 384 pFormEditorLayout->setContentsMargins(0, 0, 0, 0); 385 386 /* Create form editor widget: */ 387 m_pFormEditor = new UIFormEditorWidget(pFormEditorCnt); 388 if (m_pFormEditor) 389 pFormEditorLayout->addWidget(m_pFormEditor); 390 } 391 392 /* Add into layout: */ 393 m_pSettingsWidget2->addWidget(pFormEditorCnt); 394 } 395 396 /* Add into layout: */ 397 pApplianceCntLayout->addWidget(m_pSettingsWidget2); 398 } 399 } 400 401 /* Add into layout: */ 402 pMainLayout->addWidget(m_pApplianceCnt, 0, 1); 403 } 387 /* Add stretch: */ 388 pMainLayout->addStretch(); 404 389 } 405 390 … … 441 426 refreshFileSelectorPath(m_pFileSelector, m_strFileSelectorName, m_strFileSelectorExt, wizard()->isFormatCloudOne()); 442 427 443 /* Translate group-boxes: */444 m_p SelectorCnt->setTitle(UIWizardExportApp::tr("Virtual &machines to export"));445 m_p ApplianceCnt->setTitle(UIWizardExportApp::tr("Virtual &system settings"));446 m_p SettingsCnt->setTitle(UIWizardExportApp::tr("Appliance settings"));428 /* Translate tool-box: */ 429 m_pToolBox->setPageTitle(0, UIWizardExportApp::tr("Virtual &machines to export")); 430 m_pToolBox->setPageTitle(1, UIWizardExportApp::tr("Virtual &system settings")); 431 m_pToolBox->setPageTitle(2, UIWizardExportApp::tr("Appliance settings")); 447 432 448 433 /* Translate File selector: */ … … 541 526 void UIWizardExportAppPageExpert::initializePage() 542 527 { 528 /* Choose 1st tool to be chosen initially: */ 529 m_pToolBox->setCurrentPage(0); 543 530 /* Populate VM items: */ 544 531 populateVMItems(m_pVMSelector, m_selectedVMNames); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
r91463 r91465 48 48 class UIEmptyFilePathSelector; 49 49 class UIFormEditorWidget; 50 class UIToolBox; 50 51 class UIWizardExportApp; 51 52 … … 134 135 135 136 136 /** Holds the VM selector container instance. */ 137 QGroupBox *m_pSelectorCnt; 137 /** Holds the tool-box instance. */ 138 UIToolBox *m_pToolBox; 139 138 140 139 141 /** Holds the VM selector instance. */ 140 142 QListWidget *m_pVMSelector; 141 143 142 143 /** Holds the settings widget container reference. */144 QGroupBox *m_pSettingsCnt;145 144 146 145 /** Holds the format layout. */ … … 188 187 189 188 190 /** Holds the appliance widget container reference. */191 QGroupBox *m_pApplianceCnt;192 193 189 /** Holds the settings widget 2 instance. */ 194 190 QStackedWidget *m_pSettingsWidget2;
Note:
See TracChangeset
for help on using the changeset viewer.