Changeset 84283 in vbox
- Timestamp:
- May 13, 2020 11:38:51 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137920
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageBasic1.cpp
r84277 r84283 45 45 UIWizardNewCloudVMPage1::UIWizardNewCloudVMPage1() 46 46 : m_fPolished(false) 47 , m_pLocationLayout(0)48 47 , m_pLocationLabel(0) 49 48 , m_pLocationComboBox(0) 50 , m_pCloudContainerLayout(0)51 49 , m_pAccountLabel(0) 52 50 , m_pAccountComboBox(0) … … 516 514 UIWizardNewCloudVMPageBasic1::UIWizardNewCloudVMPageBasic1() 517 515 : m_pLabelMain(0) 516 , m_pLocationLayout(0) 518 517 , m_pLabelDescription(0) 518 , m_pOptionsLayout(0) 519 519 { 520 520 /* Create main layout: */ … … 534 534 if (m_pLocationLayout) 535 535 { 536 m_pLocationLayout->setContentsMargins(0, 0, 0, 0); 536 537 m_pLocationLayout->setColumnStretch(0, 0); 537 538 m_pLocationLayout->setColumnStretch(1, 1); … … 544 545 m_pLocationLayout->addWidget(m_pLocationLabel, 0, 0, Qt::AlignRight); 545 546 } 546 /* Create location selector: */547 /* Create location combo-box: */ 547 548 m_pLocationComboBox = new QIComboBox(this); 548 549 if (m_pLocationComboBox) … … 554 555 } 555 556 556 /* Create description label: */557 m_pLabelDescription = new QIRichTextLabel(this);558 if (m_pLabelDescription)559 {560 /* Add into layout: */561 m_pLocationLayout->addWidget(m_pLabelDescription, 1, 0, 1, 2);562 }563 564 557 /* Add into layout: */ 565 558 pMainLayout->addLayout(m_pLocationLayout); 566 559 } 567 560 568 /* Create cloud container layout: */ 569 m_pCloudContainerLayout = new QGridLayout; 570 if (m_pCloudContainerLayout) 571 { 572 m_pCloudContainerLayout->setContentsMargins(0, 0, 0, 0); 573 m_pCloudContainerLayout->setColumnStretch(0, 0); 574 m_pCloudContainerLayout->setColumnStretch(1, 1); 575 m_pCloudContainerLayout->setRowStretch(2, 0); 576 m_pCloudContainerLayout->setRowStretch(3, 1); 561 /* Create description label: */ 562 m_pLabelDescription = new QIRichTextLabel(this); 563 if (m_pLabelDescription) 564 { 565 /* Add into layout: */ 566 pMainLayout->addWidget(m_pLabelDescription); 567 } 568 569 /* Create options layout: */ 570 m_pOptionsLayout = new QGridLayout; 571 if (m_pOptionsLayout) 572 { 573 m_pOptionsLayout->setContentsMargins(0, 0, 0, 0); 574 m_pOptionsLayout->setColumnStretch(0, 0); 575 m_pOptionsLayout->setColumnStretch(1, 1); 576 m_pOptionsLayout->setRowStretch(2, 0); 577 m_pOptionsLayout->setRowStretch(3, 1); 577 578 578 579 /* Create account label: */ … … 581 582 { 582 583 /* Add into layout: */ 583 m_p CloudContainerLayout->addWidget(m_pAccountLabel, 0, 0, Qt::AlignRight);584 } 585 /* Create sub-layout: */584 m_pOptionsLayout->addWidget(m_pAccountLabel, 0, 0, Qt::AlignRight); 585 } 586 /* Create account layout: */ 586 587 QHBoxLayout *pAccountLayout = new QHBoxLayout; 587 588 if (pAccountLayout) … … 611 612 612 613 /* Add into layout: */ 613 m_p CloudContainerLayout->addLayout(pAccountLayout, 0, 1);614 } 615 616 /* Create profileproperty table: */614 m_pOptionsLayout->addLayout(pAccountLayout, 0, 1); 615 } 616 617 /* Create account property table: */ 617 618 m_pAccountPropertyTable = new QTableWidget(this); 618 619 if (m_pAccountPropertyTable) … … 631 632 632 633 /* Add into layout: */ 633 m_p CloudContainerLayout->addWidget(m_pAccountPropertyTable, 1, 1);634 m_pOptionsLayout->addWidget(m_pAccountPropertyTable, 1, 1); 634 635 } 635 636 … … 639 640 { 640 641 /* Add into layout: */ 641 m_p CloudContainerLayout->addWidget(m_pSourceImageLabel, 2, 0, Qt::AlignRight);642 m_pOptionsLayout->addWidget(m_pSourceImageLabel, 2, 0, Qt::AlignRight); 642 643 } 643 644 /* Create source image list: */ … … 656 657 657 658 /* Add into layout: */ 658 m_p CloudContainerLayout->addWidget(m_pSourceImageList, 2, 1, 2, 1);659 m_pOptionsLayout->addWidget(m_pSourceImageList, 2, 1, 2, 1); 659 660 } 660 661 661 662 /* Add into layout: */ 662 pMainLayout->addLayout(m_p CloudContainerLayout);663 pMainLayout->addLayout(m_pOptionsLayout); 663 664 } 664 665 } … … 740 741 iMaxWidth = qMax(iMaxWidth, pLabel->minimumSizeHint().width()); 741 742 m_pLocationLayout->setColumnMinimumWidth(0, iMaxWidth); 742 m_p CloudContainerLayout->setColumnMinimumWidth(0, iMaxWidth);743 m_pOptionsLayout->setColumnMinimumWidth(0, iMaxWidth); 743 744 744 745 /* Update tool-tips: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageBasic1.h
r84277 r84283 120 120 CCloudProfile m_comCloudProfile; 121 121 122 /** Holds the location layout instance. */123 QGridLayout *m_pLocationLayout;124 122 /** Holds the location type label instance. */ 125 123 QLabel *m_pLocationLabel; … … 127 125 QIComboBox *m_pLocationComboBox; 128 126 129 /** Holds the cloud container layout instance. */130 QGridLayout *m_pCloudContainerLayout;131 127 /** Holds the account label instance. */ 132 128 QLabel *m_pAccountLabel; … … 190 186 /** Holds the main label instance. */ 191 187 QIRichTextLabel *m_pLabelMain; 188 /** Holds the location layout instance. */ 189 QGridLayout *m_pLocationLayout; 192 190 /** Holds the description label instance. */ 193 191 QIRichTextLabel *m_pLabelDescription; 192 /** Holds the options layout instance. */ 193 QGridLayout *m_pOptionsLayout; 194 194 }; 195 195 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp
r84277 r84283 46 46 if (m_pCntLocation) 47 47 { 48 /* There is no location tablein short wizard form: */48 /* There is no location container in short wizard form: */ 49 49 if (!m_fFullWizard) 50 50 m_pCntLocation->setVisible(false); 51 51 52 52 /* Create location layout: */ 53 m_pLocationLayout = new QGridLayout(m_pCntLocation);54 if ( m_pLocationLayout)53 QVBoxLayout *pLocationLayout = new QVBoxLayout(m_pCntLocation); 54 if (pLocationLayout) 55 55 { 56 /* Create location selector: */56 /* Create location combo-box: */ 57 57 m_pLocationComboBox = new QIComboBox(m_pCntLocation); 58 58 if (m_pLocationComboBox) 59 59 { 60 60 /* Add into layout: */ 61 m_pLocationLayout->addWidget(m_pLocationComboBox, 0, 0);62 } 63 64 /* Create cloud containerlayout: */65 m_pCloudContainerLayout = new QGridLayout;66 if ( m_pCloudContainerLayout)67 { 68 m_pCloudContainerLayout->setContentsMargins(0, 0, 0, 0);69 m_pCloudContainerLayout->setRowStretch(3,1);70 71 /* Create sub-layout: */72 QHBoxLayout *pSubLayout = new QHBoxLayout;73 if ( pSubLayout)61 pLocationLayout->addWidget(m_pLocationComboBox); 62 } 63 64 /* Create account layout: */ 65 QHBoxLayout *pAccountLayout = new QHBoxLayout; 66 if (pAccountLayout) 67 { 68 pAccountLayout->setContentsMargins(0, 0, 0, 0); 69 pAccountLayout->setSpacing(1); 70 71 /* Create account combo-box: */ 72 m_pAccountComboBox = new QIComboBox(m_pCntLocation); 73 if (m_pAccountComboBox) 74 74 { 75 pSubLayout->setContentsMargins(0, 0, 0, 0);76 pSubLayout->setSpacing(1);77 78 /* Create account combo-box: */79 m_pAccountComboBox = new QIComboBox(m_pCntLocation);80 if (m_pAccountComboBox)81 {82 /* Add into layout: */83 pSubLayout->addWidget(m_pAccountComboBox);84 }85 /* Create account tool-button: */86 m_pAccountToolButton = new QIToolButton(m_pCntLocation);87 if (m_pAccountToolButton)88 {89 m_pAccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",90 ":/cloud_profile_manager_disabled_16px.png"));91 92 /* Add into layout: */93 pSubLayout->addWidget(m_pAccountToolButton);94 }95 96 75 /* Add into layout: */ 97 m_pCloudContainerLayout->addLayout(pSubLayout, 0, 0);76 pAccountLayout->addWidget(m_pAccountComboBox); 98 77 } 99 100 /* Create profile property table: */ 101 m_pAccountPropertyTable = new QTableWidget(m_pCntLocation); 102 if (m_pAccountPropertyTable) 78 /* Create account tool-button: */ 79 m_pAccountToolButton = new QIToolButton(m_pCntLocation); 80 if (m_pAccountToolButton) 103 81 { 104 const QFontMetrics fm(m_pAccountPropertyTable->font()); 105 const int iFontWidth = fm.width('x'); 106 const int iTotalWidth = 50 * iFontWidth; 107 const int iFontHeight = fm.height(); 108 const int iTotalHeight = 4 * iFontHeight; 109 m_pAccountPropertyTable->setMinimumSize(QSize(iTotalWidth, iTotalHeight)); 110 //m_pAccountPropertyTable->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); 111 m_pAccountPropertyTable->setAlternatingRowColors(true); 112 m_pAccountPropertyTable->horizontalHeader()->setVisible(false); 113 m_pAccountPropertyTable->verticalHeader()->setVisible(false); 114 m_pAccountPropertyTable->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); 82 m_pAccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 83 ":/cloud_profile_manager_disabled_16px.png")); 115 84 116 85 /* Add into layout: */ 117 m_pCloudContainerLayout->addWidget(m_pAccountPropertyTable, 1, 0);86 pAccountLayout->addWidget(m_pAccountToolButton); 118 87 } 119 88 120 /* Create source image list: */ 121 m_pSourceImageList = new QListWidget(m_pCntLocation); 122 if (m_pSourceImageList) 123 { 124 const QFontMetrics fm(m_pSourceImageList->font()); 125 const int iFontWidth = fm.width('x'); 126 const int iTotalWidth = 50 * iFontWidth; 127 const int iFontHeight = fm.height(); 128 const int iTotalHeight = 4 * iFontHeight; 129 m_pSourceImageList->setMinimumSize(QSize(iTotalWidth, iTotalHeight)); 130 //m_pSourceImageList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); 131 m_pSourceImageList->setAlternatingRowColors(true); 132 133 /* Add into layout: */ 134 m_pCloudContainerLayout->addWidget(m_pSourceImageList, 2, 0); 135 } 136 137 /* Add into layout: */ 138 m_pLocationLayout->addLayout(m_pCloudContainerLayout, 1, 0); 89 /* Add into layout: */ 90 pLocationLayout->addLayout(pAccountLayout); 91 } 92 93 /* Create account property table: */ 94 m_pAccountPropertyTable = new QTableWidget(m_pCntLocation); 95 if (m_pAccountPropertyTable) 96 { 97 const QFontMetrics fm(m_pAccountPropertyTable->font()); 98 const int iFontWidth = fm.width('x'); 99 const int iTotalWidth = 50 * iFontWidth; 100 const int iFontHeight = fm.height(); 101 const int iTotalHeight = 4 * iFontHeight; 102 m_pAccountPropertyTable->setMinimumSize(QSize(iTotalWidth, iTotalHeight)); 103 //m_pAccountPropertyTable->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); 104 m_pAccountPropertyTable->setAlternatingRowColors(true); 105 m_pAccountPropertyTable->horizontalHeader()->setVisible(false); 106 m_pAccountPropertyTable->verticalHeader()->setVisible(false); 107 m_pAccountPropertyTable->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); 108 109 /* Add into layout: */ 110 pLocationLayout->addWidget(m_pAccountPropertyTable); 111 } 112 113 /* Create source image list: */ 114 m_pSourceImageList = new QListWidget(m_pCntLocation); 115 if (m_pSourceImageList) 116 { 117 const QFontMetrics fm(m_pSourceImageList->font()); 118 const int iFontWidth = fm.width('x'); 119 const int iTotalWidth = 50 * iFontWidth; 120 const int iFontHeight = fm.height(); 121 const int iTotalHeight = 4 * iFontHeight; 122 m_pSourceImageList->setMinimumSize(QSize(iTotalWidth, iTotalHeight)); 123 //m_pSourceImageList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); 124 m_pSourceImageList->setAlternatingRowColors(true); 125 126 /* Add into layout: */ 127 pLocationLayout->addWidget(m_pSourceImageList); 139 128 } 140 129 } … … 148 137 if (m_pSettingsCnt) 149 138 { 150 /* Create form editorlayout: */151 QVBoxLayout *p FormEditorLayout = new QVBoxLayout(m_pSettingsCnt);152 if (p FormEditorLayout)139 /* Create settings layout: */ 140 QVBoxLayout *pSettingsLayout = new QVBoxLayout(m_pSettingsCnt); 141 if (pSettingsLayout) 153 142 { 154 143 /* Create form editor widget: */ … … 164 153 165 154 /* Add into layout: */ 166 p FormEditorLayout->addWidget(m_pFormEditor);155 pSettingsLayout->addWidget(m_pFormEditor); 167 156 } 168 157 }
Note:
See TracChangeset
for help on using the changeset viewer.