Changeset 91463 in vbox for trunk/src/VBox
- Timestamp:
- Sep 29, 2021 3:42:59 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
r91461 r91463 63 63 , m_pSelectorCnt(0) 64 64 , m_pVMSelector(0) 65 , m_pApplianceCnt(0)66 , m_pSettingsWidget2(0)67 , m_pApplianceWidget(0)68 , m_pFormEditor(0)69 65 , m_pSettingsCnt(0) 70 66 , m_pFormatLayout(0) … … 86 82 , m_pExportModeLabel(0) 87 83 , m_pExportModeButtonGroup(0) 84 , m_pApplianceCnt(0) 85 , m_pSettingsWidget2(0) 86 , m_pApplianceWidget(0) 87 , m_pFormEditor(0) 88 88 { 89 89 /* Create widgets: */ … … 113 113 /* Add into layout: */ 114 114 pMainLayout->addWidget(m_pSelectorCnt, 0, 0); 115 } 116 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: */ 141 m_pFormatComboBox = new QIComboBox(m_pSettingsCnt); 142 if (m_pFormatComboBox) 143 m_pFormatLayout->addWidget(m_pFormatComboBox, 0, 1); 144 /* Create format combo-box label: */ 145 m_pFormatComboBoxLabel = new QLabel(m_pSettingsCnt); 146 if (m_pFormatComboBoxLabel) 147 { 148 m_pFormatComboBoxLabel->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter); 149 m_pFormatComboBoxLabel->setBuddy(m_pFormatComboBox); 150 m_pFormatLayout->addWidget(m_pFormatComboBoxLabel, 0, 0); 151 } 152 153 /* Add into layout: */ 154 pSettingsCntLayout->addLayout(m_pFormatLayout); 155 } 156 157 /* Create settings widget: */ 158 m_pSettingsWidget1 = new QStackedWidget; 159 if (m_pSettingsWidget1) 160 { 161 /* Create settings pane 1: */ 162 QWidget *pSettingsPane1 = new QWidget(m_pSettingsWidget1); 163 if (pSettingsPane1) 164 { 165 /* Create settings layout 1: */ 166 m_pSettingsLayout1 = new QGridLayout(pSettingsPane1); 167 if (m_pSettingsLayout1) 168 { 169 #ifdef VBOX_WS_MAC 170 m_pSettingsLayout1->setSpacing(10); 171 #endif 172 m_pSettingsLayout1->setContentsMargins(0, 0, 0, 0); 173 m_pSettingsLayout1->setColumnStretch(0, 0); 174 m_pSettingsLayout1->setColumnStretch(1, 1); 175 176 /* Create file selector: */ 177 m_pFileSelector = new UIEmptyFilePathSelector; 178 if (m_pFileSelector) 179 { 180 m_pFileSelector->setMode(UIEmptyFilePathSelector::Mode_File_Save); 181 m_pFileSelector->setEditable(true); 182 m_pFileSelector->setButtonPosition(UIEmptyFilePathSelector::RightPosition); 183 m_pFileSelector->setDefaultSaveExt("ova"); 184 185 /* Add into layout: */ 186 m_pSettingsLayout1->addWidget(m_pFileSelector, 0, 1, 1, 2); 187 } 188 /* Create file selector label: */ 189 m_pFileSelectorLabel = new QLabel; 190 if (m_pFileSelectorLabel) 191 { 192 m_pFileSelectorLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); 193 m_pFileSelectorLabel->setBuddy(m_pFileSelector); 194 195 /* Add into layout: */ 196 m_pSettingsLayout1->addWidget(m_pFileSelectorLabel, 0, 0); 197 } 198 199 /* Create MAC policy combo-box: */ 200 m_pMACComboBox = new QIComboBox; 201 if (m_pMACComboBox) 202 { 203 /* Add into layout: */ 204 m_pSettingsLayout1->addWidget(m_pMACComboBox, 1, 1, 1, 2); 205 } 206 /* Create format combo-box label: */ 207 m_pMACComboBoxLabel = new QLabel; 208 if (m_pMACComboBoxLabel) 209 { 210 m_pMACComboBoxLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); 211 m_pMACComboBoxLabel->setBuddy(m_pMACComboBox); 212 213 /* Add into layout: */ 214 m_pSettingsLayout1->addWidget(m_pMACComboBoxLabel, 1, 0); 215 } 216 217 /* Create advanced label: */ 218 m_pAdditionalLabel = new QLabel; 219 if (m_pAdditionalLabel) 220 { 221 m_pAdditionalLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); 222 223 /* Add into layout: */ 224 m_pSettingsLayout1->addWidget(m_pAdditionalLabel, 2, 0); 225 } 226 /* Create manifest check-box editor: */ 227 m_pManifestCheckbox = new QCheckBox; 228 if (m_pManifestCheckbox) 229 { 230 /* Add into layout: */ 231 m_pSettingsLayout1->addWidget(m_pManifestCheckbox, 2, 1); 232 } 233 /* Create include ISOs check-box: */ 234 m_pIncludeISOsCheckbox = new QCheckBox; 235 if (m_pIncludeISOsCheckbox) 236 { 237 /* Add into layout: */ 238 m_pSettingsLayout1->addWidget(m_pIncludeISOsCheckbox, 3, 1); 239 } 240 241 /* Create placeholder: */ 242 QWidget *pPlaceholder = new QWidget; 243 if (pPlaceholder) 244 { 245 /* Add into layout: */ 246 m_pSettingsLayout1->addWidget(pPlaceholder, 4, 0, 1, 3); 247 } 248 } 249 250 /* Add into layout: */ 251 m_pSettingsWidget1->addWidget(pSettingsPane1); 252 } 253 254 /* Create settings pane 2: */ 255 QWidget *pSettingsPane2 = new QWidget(m_pSettingsWidget1); 256 if (pSettingsPane2) 257 { 258 /* Create settings layout 2: */ 259 m_pSettingsLayout2 = new QGridLayout(pSettingsPane2); 260 if (m_pSettingsLayout2) 261 { 262 #ifdef VBOX_WS_MAC 263 m_pSettingsLayout2->setSpacing(10); 264 #endif 265 m_pSettingsLayout2->setContentsMargins(0, 0, 0, 0); 266 m_pSettingsLayout2->setColumnStretch(0, 0); 267 m_pSettingsLayout2->setColumnStretch(1, 1); 268 269 /* Create profile label: */ 270 m_pProfileLabel = new QLabel(pSettingsPane2); 271 if (m_pProfileLabel) 272 { 273 m_pProfileLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); 274 m_pSettingsLayout2->addWidget(m_pProfileLabel, 0, 0); 275 } 276 /* Create sub-layout: */ 277 QHBoxLayout *pSubLayout = new QHBoxLayout; 278 if (pSubLayout) 279 { 280 pSubLayout->setContentsMargins(0, 0, 0, 0); 281 pSubLayout->setSpacing(1); 282 283 /* Create profile combo-box: */ 284 m_pProfileComboBox = new QIComboBox(pSettingsPane2); 285 if (m_pProfileComboBox) 286 { 287 m_pProfileLabel->setBuddy(m_pProfileComboBox); 288 pSubLayout->addWidget(m_pProfileComboBox); 289 } 290 /* Create profile tool-button: */ 291 m_pProfileToolButton = new QIToolButton(pSettingsPane2); 292 if (m_pProfileToolButton) 293 { 294 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 295 ":/cloud_profile_manager_disabled_16px.png")); 296 pSubLayout->addWidget(m_pProfileToolButton); 297 } 298 299 /* Add into layout: */ 300 m_pSettingsLayout2->addLayout(pSubLayout, 0, 1); 301 } 302 303 /* Create profile label: */ 304 m_pExportModeLabel = new QLabel(pSettingsPane2); 305 if (m_pExportModeLabel) 306 { 307 m_pExportModeLabel->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter); 308 m_pSettingsLayout2->addWidget(m_pExportModeLabel, 1, 0); 309 } 310 311 /* Create button-group: */ 312 m_pExportModeButtonGroup = new QButtonGroup(pSettingsPane2); 313 if (m_pExportModeButtonGroup) 314 { 315 /* Create Do Not Ask button: */ 316 m_exportModeButtons[CloudExportMode_DoNotAsk] = new QRadioButton(pSettingsPane2); 317 if (m_exportModeButtons.value(CloudExportMode_DoNotAsk)) 318 { 319 m_pExportModeButtonGroup->addButton(m_exportModeButtons.value(CloudExportMode_DoNotAsk)); 320 m_pSettingsLayout2->addWidget(m_exportModeButtons.value(CloudExportMode_DoNotAsk), 1, 1); 321 } 322 /* Create Ask Then Export button: */ 323 m_exportModeButtons[CloudExportMode_AskThenExport] = new QRadioButton(pSettingsPane2); 324 if (m_exportModeButtons.value(CloudExportMode_AskThenExport)) 325 { 326 m_pExportModeButtonGroup->addButton(m_exportModeButtons.value(CloudExportMode_AskThenExport)); 327 m_pSettingsLayout2->addWidget(m_exportModeButtons.value(CloudExportMode_AskThenExport), 2, 1); 328 } 329 /* Create Export Then Ask button: */ 330 m_exportModeButtons[CloudExportMode_ExportThenAsk] = new QRadioButton(pSettingsPane2); 331 if (m_exportModeButtons.value(CloudExportMode_ExportThenAsk)) 332 { 333 m_pExportModeButtonGroup->addButton(m_exportModeButtons.value(CloudExportMode_ExportThenAsk)); 334 m_pSettingsLayout2->addWidget(m_exportModeButtons.value(CloudExportMode_ExportThenAsk), 3, 1); 335 } 336 } 337 } 338 339 /* Add into layout: */ 340 m_pSettingsWidget1->addWidget(pSettingsPane2); 341 } 342 343 /* Add into layout: */ 344 pSettingsCntLayout->addWidget(m_pSettingsWidget1); 345 } 346 } 347 348 /* Add into layout: */ 349 pMainLayout->addWidget(m_pSettingsCnt, 1, 0, 1, 2); 115 350 } 116 351 … … 178 413 /* Add into layout: */ 179 414 pMainLayout->addWidget(m_pApplianceCnt, 0, 1); 180 }181 182 /* Create settings widget container: */183 m_pSettingsCnt = new QGroupBox(this);184 if (m_pSettingsCnt)185 {186 /* Create settings widget container layout: */187 QVBoxLayout *pSettingsCntLayout = new QVBoxLayout(m_pSettingsCnt);188 if (pSettingsCntLayout)189 {190 #ifdef VBOX_WS_MAC191 pSettingsCntLayout->setSpacing(5);192 #endif193 194 /* Create format layout: */195 m_pFormatLayout = new QGridLayout;196 if (m_pFormatLayout)197 {198 m_pFormatLayout->setContentsMargins(0, 0, 0, 0);199 #ifdef VBOX_WS_MAC200 m_pFormatLayout->setSpacing(10);201 #endif202 m_pFormatLayout->setColumnStretch(0, 0);203 m_pFormatLayout->setColumnStretch(1, 1);204 205 /* Create format combo-box: */206 m_pFormatComboBox = new QIComboBox(m_pSettingsCnt);207 if (m_pFormatComboBox)208 m_pFormatLayout->addWidget(m_pFormatComboBox, 0, 1);209 /* Create format combo-box label: */210 m_pFormatComboBoxLabel = new QLabel(m_pSettingsCnt);211 if (m_pFormatComboBoxLabel)212 {213 m_pFormatComboBoxLabel->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);214 m_pFormatComboBoxLabel->setBuddy(m_pFormatComboBox);215 m_pFormatLayout->addWidget(m_pFormatComboBoxLabel, 0, 0);216 }217 218 /* Add into layout: */219 pSettingsCntLayout->addLayout(m_pFormatLayout);220 }221 222 /* Create settings widget: */223 m_pSettingsWidget1 = new QStackedWidget;224 if (m_pSettingsWidget1)225 {226 /* Create settings pane 1: */227 QWidget *pSettingsPane1 = new QWidget(m_pSettingsWidget1);228 if (pSettingsPane1)229 {230 /* Create settings layout 1: */231 m_pSettingsLayout1 = new QGridLayout(pSettingsPane1);232 if (m_pSettingsLayout1)233 {234 #ifdef VBOX_WS_MAC235 m_pSettingsLayout1->setSpacing(10);236 #endif237 m_pSettingsLayout1->setContentsMargins(0, 0, 0, 0);238 m_pSettingsLayout1->setColumnStretch(0, 0);239 m_pSettingsLayout1->setColumnStretch(1, 1);240 241 /* Create file selector: */242 m_pFileSelector = new UIEmptyFilePathSelector;243 if (m_pFileSelector)244 {245 m_pFileSelector->setMode(UIEmptyFilePathSelector::Mode_File_Save);246 m_pFileSelector->setEditable(true);247 m_pFileSelector->setButtonPosition(UIEmptyFilePathSelector::RightPosition);248 m_pFileSelector->setDefaultSaveExt("ova");249 250 /* Add into layout: */251 m_pSettingsLayout1->addWidget(m_pFileSelector, 0, 1, 1, 2);252 }253 /* Create file selector label: */254 m_pFileSelectorLabel = new QLabel;255 if (m_pFileSelectorLabel)256 {257 m_pFileSelectorLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);258 m_pFileSelectorLabel->setBuddy(m_pFileSelector);259 260 /* Add into layout: */261 m_pSettingsLayout1->addWidget(m_pFileSelectorLabel, 0, 0);262 }263 264 /* Create MAC policy combo-box: */265 m_pMACComboBox = new QIComboBox;266 if (m_pMACComboBox)267 {268 /* Add into layout: */269 m_pSettingsLayout1->addWidget(m_pMACComboBox, 1, 1, 1, 2);270 }271 /* Create format combo-box label: */272 m_pMACComboBoxLabel = new QLabel;273 if (m_pMACComboBoxLabel)274 {275 m_pMACComboBoxLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);276 m_pMACComboBoxLabel->setBuddy(m_pMACComboBox);277 278 /* Add into layout: */279 m_pSettingsLayout1->addWidget(m_pMACComboBoxLabel, 1, 0);280 }281 282 /* Create advanced label: */283 m_pAdditionalLabel = new QLabel;284 if (m_pAdditionalLabel)285 {286 m_pAdditionalLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);287 288 /* Add into layout: */289 m_pSettingsLayout1->addWidget(m_pAdditionalLabel, 2, 0);290 }291 /* Create manifest check-box editor: */292 m_pManifestCheckbox = new QCheckBox;293 if (m_pManifestCheckbox)294 {295 /* Add into layout: */296 m_pSettingsLayout1->addWidget(m_pManifestCheckbox, 2, 1);297 }298 /* Create include ISOs check-box: */299 m_pIncludeISOsCheckbox = new QCheckBox;300 if (m_pIncludeISOsCheckbox)301 {302 /* Add into layout: */303 m_pSettingsLayout1->addWidget(m_pIncludeISOsCheckbox, 3, 1);304 }305 306 /* Create placeholder: */307 QWidget *pPlaceholder = new QWidget;308 if (pPlaceholder)309 {310 /* Add into layout: */311 m_pSettingsLayout1->addWidget(pPlaceholder, 4, 0, 1, 3);312 }313 }314 315 /* Add into layout: */316 m_pSettingsWidget1->addWidget(pSettingsPane1);317 }318 319 /* Create settings pane 2: */320 QWidget *pSettingsPane2 = new QWidget(m_pSettingsWidget1);321 if (pSettingsPane2)322 {323 /* Create settings layout 2: */324 m_pSettingsLayout2 = new QGridLayout(pSettingsPane2);325 if (m_pSettingsLayout2)326 {327 #ifdef VBOX_WS_MAC328 m_pSettingsLayout2->setSpacing(10);329 #endif330 m_pSettingsLayout2->setContentsMargins(0, 0, 0, 0);331 m_pSettingsLayout2->setColumnStretch(0, 0);332 m_pSettingsLayout2->setColumnStretch(1, 1);333 334 /* Create profile label: */335 m_pProfileLabel = new QLabel(pSettingsPane2);336 if (m_pProfileLabel)337 {338 m_pProfileLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);339 m_pSettingsLayout2->addWidget(m_pProfileLabel, 0, 0);340 }341 /* Create sub-layout: */342 QHBoxLayout *pSubLayout = new QHBoxLayout;343 if (pSubLayout)344 {345 pSubLayout->setContentsMargins(0, 0, 0, 0);346 pSubLayout->setSpacing(1);347 348 /* Create profile combo-box: */349 m_pProfileComboBox = new QIComboBox(pSettingsPane2);350 if (m_pProfileComboBox)351 {352 m_pProfileLabel->setBuddy(m_pProfileComboBox);353 pSubLayout->addWidget(m_pProfileComboBox);354 }355 /* Create profile tool-button: */356 m_pProfileToolButton = new QIToolButton(pSettingsPane2);357 if (m_pProfileToolButton)358 {359 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",360 ":/cloud_profile_manager_disabled_16px.png"));361 pSubLayout->addWidget(m_pProfileToolButton);362 }363 364 /* Add into layout: */365 m_pSettingsLayout2->addLayout(pSubLayout, 0, 1);366 }367 368 /* Create profile label: */369 m_pExportModeLabel = new QLabel(pSettingsPane2);370 if (m_pExportModeLabel)371 {372 m_pExportModeLabel->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);373 m_pSettingsLayout2->addWidget(m_pExportModeLabel, 1, 0);374 }375 376 /* Create button-group: */377 m_pExportModeButtonGroup = new QButtonGroup(pSettingsPane2);378 if (m_pExportModeButtonGroup)379 {380 /* Create Do Not Ask button: */381 m_exportModeButtons[CloudExportMode_DoNotAsk] = new QRadioButton(pSettingsPane2);382 if (m_exportModeButtons.value(CloudExportMode_DoNotAsk))383 {384 m_pExportModeButtonGroup->addButton(m_exportModeButtons.value(CloudExportMode_DoNotAsk));385 m_pSettingsLayout2->addWidget(m_exportModeButtons.value(CloudExportMode_DoNotAsk), 1, 1);386 }387 /* Create Ask Then Export button: */388 m_exportModeButtons[CloudExportMode_AskThenExport] = new QRadioButton(pSettingsPane2);389 if (m_exportModeButtons.value(CloudExportMode_AskThenExport))390 {391 m_pExportModeButtonGroup->addButton(m_exportModeButtons.value(CloudExportMode_AskThenExport));392 m_pSettingsLayout2->addWidget(m_exportModeButtons.value(CloudExportMode_AskThenExport), 2, 1);393 }394 /* Create Export Then Ask button: */395 m_exportModeButtons[CloudExportMode_ExportThenAsk] = new QRadioButton(pSettingsPane2);396 if (m_exportModeButtons.value(CloudExportMode_ExportThenAsk))397 {398 m_pExportModeButtonGroup->addButton(m_exportModeButtons.value(CloudExportMode_ExportThenAsk));399 m_pSettingsLayout2->addWidget(m_exportModeButtons.value(CloudExportMode_ExportThenAsk), 3, 1);400 }401 }402 }403 404 /* Add into layout: */405 m_pSettingsWidget1->addWidget(pSettingsPane2);406 }407 408 /* Add into layout: */409 pSettingsCntLayout->addWidget(m_pSettingsWidget1);410 }411 }412 413 /* Add into layout: */414 pMainLayout->addWidget(m_pSettingsCnt, 1, 0, 1, 2);415 415 } 416 416 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
r91461 r91463 139 139 /** Holds the VM selector instance. */ 140 140 QListWidget *m_pVMSelector; 141 142 143 /** Holds the appliance widget container reference. */144 QGroupBox *m_pApplianceCnt;145 146 /** Holds the settings widget 2 instance. */147 QStackedWidget *m_pSettingsWidget2;148 149 /** Holds the appliance widget reference. */150 UIApplianceExportEditorWidget *m_pApplianceWidget;151 /** Holds the Form Editor widget instance. */152 UIFormEditorWidget *m_pFormEditor;153 141 154 142 … … 198 186 /** Holds the map of export mode button instances. */ 199 187 QMap<CloudExportMode, QAbstractButton*> m_exportModeButtons; 188 189 190 /** Holds the appliance widget container reference. */ 191 QGroupBox *m_pApplianceCnt; 192 193 /** Holds the settings widget 2 instance. */ 194 QStackedWidget *m_pSettingsWidget2; 195 196 /** Holds the appliance widget reference. */ 197 UIApplianceExportEditorWidget *m_pApplianceWidget; 198 /** Holds the Form Editor widget instance. */ 199 UIFormEditorWidget *m_pFormEditor; 200 200 }; 201 201
Note:
See TracChangeset
for help on using the changeset viewer.