Changeset 91561 in vbox
- Timestamp:
- Oct 5, 2021 10:15:55 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 147268
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp
r91522 r91561 370 370 , m_pLabelDescription(0) 371 371 { 372 /* Create main layout: */372 /* Prepare main layout: */ 373 373 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 374 374 if (pMainLayout) 375 375 { 376 /* Create main label: */376 /* Prepare main label: */ 377 377 m_pLabelMain = new QIRichTextLabel(this); 378 378 if (m_pLabelMain) 379 {380 /* Add into layout: */381 379 pMainLayout->addWidget(m_pLabelMain); 382 } 383 384 /* Create source layout: */ 380 381 /* Prepare source layout: */ 385 382 m_pSourceLayout = new QGridLayout; 386 383 if (m_pSourceLayout) … … 390 387 m_pSourceLayout->setColumnStretch(1, 1); 391 388 392 /* Create source label: */389 /* Prepare source label: */ 393 390 m_pSourceLabel = new QLabel(this); 394 391 if (m_pSourceLabel) 395 {396 /* Add into layout: */397 392 m_pSourceLayout->addWidget(m_pSourceLabel, 0, 0, Qt::AlignRight); 398 } 399 /* Create source selector: */ 393 /* Prepare source selector: */ 400 394 m_pSourceComboBox = new QIComboBox(this); 401 395 if (m_pSourceComboBox) 402 396 { 403 397 m_pSourceLabel->setBuddy(m_pSourceComboBox); 404 405 /* Add into layout: */406 398 m_pSourceLayout->addWidget(m_pSourceComboBox, 0, 1); 407 399 } … … 411 403 } 412 404 413 /* Create description label: */405 /* Prepare description label: */ 414 406 m_pLabelDescription = new QIRichTextLabel(this); 415 407 if (m_pLabelDescription) 416 {417 /* Add into layout: */418 408 pMainLayout->addWidget(m_pLabelDescription); 419 } 420 421 /* Create stacked layout: */ 409 410 /* Prepare stacked layout: */ 422 411 m_pStackedLayout = new QStackedLayout; 423 412 if (m_pStackedLayout) 424 413 { 425 /* Create local container: */414 /* Prepare local container: */ 426 415 QWidget *pLocalContainer = new QWidget(this); 427 416 if (pLocalContainer) 428 417 { 429 /* Create local container layout: */418 /* Prepare local container layout: */ 430 419 m_pLocalContainerLayout = new QGridLayout(pLocalContainer); 431 420 if (m_pLocalContainerLayout) … … 436 425 m_pLocalContainerLayout->setRowStretch(1, 1); 437 426 438 /* Create file label: */439 m_pFileLabel = new QLabel ;427 /* Prepare file label: */ 428 m_pFileLabel = new QLabel(pLocalContainer); 440 429 if (m_pFileLabel) 441 {442 /* Add into layout: */443 430 m_pLocalContainerLayout->addWidget(m_pFileLabel, 0, 0, Qt::AlignRight); 444 } 445 446 /* Create file-path selector: */ 447 m_pFileSelector = new UIEmptyFilePathSelector(this); 431 432 /* Prepare file-path selector: */ 433 m_pFileSelector = new UIEmptyFilePathSelector(pLocalContainer); 448 434 if (m_pFileSelector) 449 435 { … … 453 439 m_pFileSelector->setButtonPosition(UIEmptyFilePathSelector::RightPosition); 454 440 m_pFileSelector->setEditable(true); 455 456 /* Add into layout: */457 441 m_pLocalContainerLayout->addWidget(m_pFileSelector, 0, 1); 458 442 } … … 463 447 } 464 448 465 /* Create cloud container: */449 /* Prepare cloud container: */ 466 450 QWidget *pCloudContainer = new QWidget(this); 467 451 if (pCloudContainer) 468 452 { 469 /* Create cloud container layout: */453 /* Prepare cloud container layout: */ 470 454 m_pCloudContainerLayout = new QGridLayout(pCloudContainer); 471 455 if (m_pCloudContainerLayout) … … 477 461 m_pCloudContainerLayout->setRowStretch(2, 1); 478 462 479 /* Create profile label: */480 m_pProfileLabel = new QLabel ;463 /* Prepare profile label: */ 464 m_pProfileLabel = new QLabel(pCloudContainer); 481 465 if (m_pProfileLabel) 482 {483 /* Add into layout: */484 466 m_pCloudContainerLayout->addWidget(m_pProfileLabel, 0, 0, Qt::AlignRight); 485 } 486 487 /* Create sub-layout: */ 467 468 /* Prepare sub-layout: */ 488 469 QHBoxLayout *pSubLayout = new QHBoxLayout; 489 470 if (pSubLayout) … … 492 473 pSubLayout->setSpacing(1); 493 474 494 /* Create profile combo-box: */495 m_pProfileComboBox = new QIComboBox ;475 /* Prepare profile combo-box: */ 476 m_pProfileComboBox = new QIComboBox(pCloudContainer); 496 477 if (m_pProfileComboBox) 497 478 { 498 479 m_pProfileLabel->setBuddy(m_pProfileComboBox); 499 500 /* Add into layout: */501 480 pSubLayout->addWidget(m_pProfileComboBox); 502 481 } 503 482 504 /* Create profile tool-button: */505 m_pProfileToolButton = new QIToolButton ;483 /* Prepare profile tool-button: */ 484 m_pProfileToolButton = new QIToolButton(pCloudContainer); 506 485 if (m_pProfileToolButton) 507 486 { 508 487 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 509 488 ":/cloud_profile_manager_disabled_16px.png")); 510 511 /* Add into layout: */512 489 pSubLayout->addWidget(m_pProfileToolButton); 513 490 } … … 517 494 } 518 495 519 /* Create profile instance label: */520 m_pProfileInstanceLabel = new QLabel ;496 /* Prepare profile instance label: */ 497 m_pProfileInstanceLabel = new QLabel(pCloudContainer); 521 498 if (m_pProfileInstanceLabel) 522 {523 /* Add into layout: */524 499 m_pCloudContainerLayout->addWidget(m_pProfileInstanceLabel, 1, 0, Qt::AlignRight); 525 } 526 527 /* Create profile instances table: */ 528 m_pProfileInstanceList = new QListWidget; 500 501 /* Prepare profile instances table: */ 502 m_pProfileInstanceList = new QListWidget(pCloudContainer); 529 503 if (m_pProfileInstanceList) 530 504 { … … 538 512 // m_pProfileInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); 539 513 m_pProfileInstanceList->setAlternatingRowColors(true); 540 541 /* Add into layout: */542 514 m_pCloudContainerLayout->addWidget(m_pProfileInstanceList, 1, 1, 2, 1); 543 515 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic2.cpp
r82968 r91561 73 73 if (pMainLayout) 74 74 { 75 /* Create label: */75 /* Prepare label: */ 76 76 m_pLabel = new QIRichTextLabel(this); 77 77 if (m_pLabel) 78 {79 /* Add into layout: */80 78 pMainLayout->addWidget(m_pLabel); 81 } 82 83 /* Create settings container layout: */ 79 80 /* Prepare settings container layout: */ 84 81 m_pSettingsCntLayout = new QStackedLayout; 85 82 if (m_pSettingsCntLayout) 86 83 { 87 /* Create appliance widget container: */84 /* Prepare appliance widget container: */ 88 85 QWidget *pApplianceWidgetCnt = new QWidget(this); 89 86 if (pApplianceWidgetCnt) 90 87 { 91 /* Create appliance widget layout: */88 /* Prepare appliance widget layout: */ 92 89 QVBoxLayout *pApplianceWidgetLayout = new QVBoxLayout(pApplianceWidgetCnt); 93 90 if (pApplianceWidgetLayout) … … 95 92 pApplianceWidgetLayout->setContentsMargins(0, 0, 0, 0); 96 93 97 /* Create appliance widget: */94 /* Prepare appliance widget: */ 98 95 m_pApplianceWidget = new UIApplianceImportEditorWidget(pApplianceWidgetCnt); 99 96 if (m_pApplianceWidget) … … 101 98 m_pApplianceWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); 102 99 m_pApplianceWidget->setFile(strFileName); 103 104 /* Add into layout: */105 100 pApplianceWidgetLayout->addWidget(m_pApplianceWidget); 106 101 } 107 102 108 /* Create certificate label: */109 m_pCertLabel = new QLabel( QString(),pApplianceWidgetCnt);103 /* Prepare certificate label: */ 104 m_pCertLabel = new QLabel(pApplianceWidgetCnt); 110 105 if (m_pCertLabel) 111 {112 /* Add into layout: */113 106 pApplianceWidgetLayout->addWidget(m_pCertLabel); 114 }115 107 } 116 108 … … 119 111 } 120 112 121 /* Create form editor container: */113 /* Prepare form editor container: */ 122 114 QWidget *pFormEditorCnt = new QWidget(this); 123 115 if (pFormEditorCnt) 124 116 { 125 /* Create form editor layout: */117 /* Prepare form editor layout: */ 126 118 QVBoxLayout *pFormEditorLayout = new QVBoxLayout(pFormEditorCnt); 127 119 if (pFormEditorLayout) … … 129 121 pFormEditorLayout->setContentsMargins(0, 0, 0, 0); 130 122 131 /* Create form editor widget: */123 /* Prepare form editor widget: */ 132 124 m_pFormEditor = new UIFormEditorWidget(pFormEditorCnt); 133 125 if (m_pFormEditor) 134 {135 /* Add into layout: */136 126 pFormEditorLayout->addWidget(m_pFormEditor); 137 }138 127 } 139 128 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp
r91522 r91561 45 45 , m_pSettingsCnt(0) 46 46 { 47 /* Create main layout: */47 /* Prepare main layout: */ 48 48 QHBoxLayout *pMainLayout = new QHBoxLayout(this); 49 49 if (pMainLayout) 50 50 { 51 /* Create source container: */51 /* Prepare source container: */ 52 52 m_pCntSource = new QGroupBox(this); 53 53 if (m_pCntSource) 54 54 { 55 /* Create source layout: */55 /* Prepare source layout: */ 56 56 m_pSourceLayout = new QGridLayout(m_pCntSource); 57 57 if (m_pSourceLayout) 58 58 { 59 /* Create source selector: */59 /* Prepare source selector: */ 60 60 m_pSourceComboBox = new QIComboBox(m_pCntSource); 61 61 if (m_pSourceComboBox) 62 {63 /* Add into layout: */64 62 m_pSourceLayout->addWidget(m_pSourceComboBox, 0, 0); 65 } 66 67 /* Create stacked layout: */ 63 64 /* Prepare stacked layout: */ 68 65 m_pStackedLayout = new QStackedLayout; 69 66 if (m_pStackedLayout) 70 67 { 71 /* Create local container: */68 /* Prepare local container: */ 72 69 QWidget *pLocalContainer = new QWidget(m_pCntSource); 73 70 if (pLocalContainer) 74 71 { 75 /* Create local container layout: */72 /* Prepare local container layout: */ 76 73 m_pLocalContainerLayout = new QGridLayout(pLocalContainer); 77 74 if (m_pLocalContainerLayout) … … 80 77 m_pLocalContainerLayout->setRowStretch(1, 1); 81 78 82 /* Create file-path selector: */79 /* Prepare file-path selector: */ 83 80 m_pFileSelector = new UIEmptyFilePathSelector(pLocalContainer); 84 81 if (m_pFileSelector) … … 88 85 m_pFileSelector->setButtonPosition(UIEmptyFilePathSelector::RightPosition); 89 86 m_pFileSelector->setEditable(true); 90 91 /* Add into layout: */92 87 m_pLocalContainerLayout->addWidget(m_pFileSelector, 0, 0); 93 88 } … … 98 93 } 99 94 100 /* Create cloud container: */95 /* Prepare cloud container: */ 101 96 QWidget *pCloudContainer = new QWidget(m_pCntSource); 102 97 if (pCloudContainer) 103 98 { 104 /* Create cloud container layout: */99 /* Prepare cloud container layout: */ 105 100 m_pCloudContainerLayout = new QGridLayout(pCloudContainer); 106 101 if (m_pCloudContainerLayout) … … 109 104 m_pCloudContainerLayout->setRowStretch(1, 1); 110 105 111 /* Create sub-layout: */106 /* Prepare sub-layout: */ 112 107 QHBoxLayout *pSubLayout = new QHBoxLayout; 113 108 if (pSubLayout) … … 116 111 pSubLayout->setSpacing(1); 117 112 118 /* Create profile combo-box: */113 /* Prepare profile combo-box: */ 119 114 m_pProfileComboBox = new QIComboBox(pCloudContainer); 120 115 if (m_pProfileComboBox) 121 {122 /* Add into layout: */123 116 pSubLayout->addWidget(m_pProfileComboBox); 124 } 125 126 /* Create profile tool-button: */ 117 118 /* Prepare profile tool-button: */ 127 119 m_pProfileToolButton = new QIToolButton(pCloudContainer); 128 120 if (m_pProfileToolButton) … … 130 122 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 131 123 ":/cloud_profile_manager_disabled_16px.png")); 132 133 /* Add into layout: */134 124 pSubLayout->addWidget(m_pProfileToolButton); 135 125 } … … 151 141 // m_pProfileInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); 152 142 m_pProfileInstanceList->setAlternatingRowColors(true); 153 154 /* Add into layout: */155 143 m_pCloudContainerLayout->addWidget(m_pProfileInstanceList, 1, 0); 156 144 } … … 170 158 } 171 159 172 /* Create settings container: */160 /* Prepare settings container: */ 173 161 m_pSettingsCnt = new QGroupBox(this); 174 162 if (m_pSettingsCnt) 175 163 { 176 /* Create settings container layout: */164 /* Prepare settings container layout: */ 177 165 m_pSettingsCntLayout = new QStackedLayout(m_pSettingsCnt); 178 166 if (m_pSettingsCntLayout) 179 167 { 180 /* Create appliance widget container: */168 /* Prepare appliance widget container: */ 181 169 QWidget *pApplianceWidgetCnt = new QWidget(m_pSettingsCnt); 182 170 if (pApplianceWidgetCnt) 183 171 { 184 /* Create appliance widget layout: */172 /* Prepare appliance widget layout: */ 185 173 QVBoxLayout *pApplianceWidgetLayout = new QVBoxLayout(pApplianceWidgetCnt); 186 174 if (pApplianceWidgetLayout) 187 175 { 188 /* Create appliance widget: */176 /* Prepare appliance widget: */ 189 177 m_pApplianceWidget = new UIApplianceImportEditorWidget(pApplianceWidgetCnt); 190 178 if (m_pApplianceWidget) … … 192 180 m_pApplianceWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); 193 181 m_pApplianceWidget->setFile(strFileName); 194 195 /* Add into layout: */196 182 pApplianceWidgetLayout->addWidget(m_pApplianceWidget); 197 183 } … … 202 188 } 203 189 204 /* Create form editor container: */190 /* Prepare form editor container: */ 205 191 QWidget *pFormEditorCnt = new QWidget(m_pSettingsCnt); 206 192 if (pFormEditorCnt) 207 193 { 208 /* Create form editor layout: */194 /* Prepare form editor layout: */ 209 195 QVBoxLayout *pFormEditorLayout = new QVBoxLayout(pFormEditorCnt); 210 196 if (pFormEditorLayout) 211 197 { 212 /* Create form editor widget: */198 /* Prepare form editor widget: */ 213 199 m_pFormEditor = new UIFormEditorWidget(pFormEditorCnt); 214 200 if (m_pFormEditor) 215 {216 /* Add into layout: */217 201 pFormEditorLayout->addWidget(m_pFormEditor); 218 }219 202 } 220 203
Note:
See TracChangeset
for help on using the changeset viewer.