Changeset 104547 in vbox
- Timestamp:
- May 8, 2024 12:25:11 PM (7 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp
r103957 r104547 27 27 28 28 /* Qt includes: */ 29 #include <QGridLayout> 29 30 #include <QHeaderView> 31 #include <QLabel> 30 32 #include <QListWidget> 31 33 #include <QPushButton> … … 53 55 UIWizardNewCloudVMPageExpert::UIWizardNewCloudVMPageExpert() 54 56 : m_pToolBox(0) 57 , m_pLayoutProvider(0) 58 , m_pProviderLabel(0) 55 59 , m_pProviderComboBox(0) 60 , m_pProfileLabel(0) 56 61 , m_pProfileComboBox(0) 57 62 , m_pProfileToolButton(0) … … 78 83 pLayoutLocation->setContentsMargins(0, 0, 0, 0); 79 84 80 /* Prepare provider combo-box: */ 81 m_pProviderComboBox = new QIComboBox(pWidgetLocation); 82 if (m_pProviderComboBox) 83 pLayoutLocation->addWidget(m_pProviderComboBox); 84 85 /* Prepare profile layout: */ 86 QHBoxLayout *pLayoutProfile = new QHBoxLayout; 87 if (pLayoutProfile) 85 /* Prepare provider layout: */ 86 m_pLayoutProvider = new QGridLayout; 87 if (m_pLayoutProvider) 88 88 { 89 pLayoutProfile->setContentsMargins(0, 0, 0, 0); 90 pLayoutProfile->setSpacing(1); 91 92 /* Prepare profile combo-box: */ 93 m_pProfileComboBox = new QIComboBox(pWidgetLocation); 94 if (m_pProfileComboBox) 95 pLayoutProfile->addWidget(m_pProfileComboBox); 96 97 /* Prepare profile tool-button: */ 98 m_pProfileToolButton = new QIToolButton(pWidgetLocation); 99 if (m_pProfileToolButton) 89 m_pLayoutProvider->setContentsMargins(0, 0, 0, 0); 90 m_pLayoutProvider->setColumnStretch(0, 0); 91 m_pLayoutProvider->setColumnStretch(1, 1); 92 93 /* Prepare provider label: */ 94 m_pProviderLabel = new QLabel(this); 95 if (m_pProviderLabel) 96 m_pLayoutProvider->addWidget(m_pProviderLabel, 0, 0, Qt::AlignRight); 97 98 /* Prepare provider combo-box: */ 99 m_pProviderComboBox = new QIComboBox(pWidgetLocation); 100 if (m_pProviderComboBox) 100 101 { 101 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 102 ":/cloud_profile_manager_disabled_16px.png")); 103 pLayoutProfile->addWidget(m_pProfileToolButton); 102 m_pProviderLabel->setBuddy(m_pProviderComboBox); 103 m_pLayoutProvider->addWidget(m_pProviderComboBox, 0, 1); 104 104 } 105 105 106 /* Prepare profile label: */ 107 m_pProfileLabel = new QLabel(this); 108 if (m_pProfileLabel) 109 m_pLayoutProvider->addWidget(m_pProfileLabel, 1, 0, Qt::AlignRight); 110 111 /* Prepare profile layout: */ 112 QHBoxLayout *pLayoutProfile = new QHBoxLayout; 113 if (pLayoutProfile) 114 { 115 pLayoutProfile->setContentsMargins(0, 0, 0, 0); 116 pLayoutProfile->setSpacing(1); 117 118 /* Prepare profile combo-box: */ 119 m_pProfileComboBox = new QIComboBox(pWidgetLocation); 120 if (m_pProfileComboBox) 121 { 122 m_pProfileLabel->setBuddy(m_pProfileComboBox); 123 pLayoutProfile->addWidget(m_pProfileComboBox); 124 } 125 126 /* Prepare profile tool-button: */ 127 m_pProfileToolButton = new QIToolButton(pWidgetLocation); 128 if (m_pProfileToolButton) 129 { 130 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 131 ":/cloud_profile_manager_disabled_16px.png")); 132 pLayoutProfile->addWidget(m_pProfileToolButton); 133 } 134 135 /* Add into layout: */ 136 m_pLayoutProvider->addLayout(pLayoutProfile, 1, 1); 137 } 138 106 139 /* Add into layout: */ 107 pLayoutLocation->addLayout( pLayoutProfile);140 pLayoutLocation->addLayout(m_pLayoutProvider); 108 141 } 109 142 } … … 213 246 } 214 247 248 /* Translate provider label: */ 249 if (m_pProviderLabel) 250 m_pProviderLabel->setText(UIWizardNewCloudVM::tr("&Location:")); 215 251 /* Translate received values of Location combo-box. 216 252 * We are enumerating starting from 0 for simplicity: */ … … 230 266 231 267 /* Translate profile stuff: */ 268 if (m_pProfileLabel) 269 m_pProfileLabel->setText(UIWizardNewCloudVM::tr("&Profile:")); 232 270 if (m_pProfileToolButton) 233 271 m_pProfileToolButton->setToolTip(UIWizardNewCloudVM::tr("Open Cloud Profile Manager...")); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.h
r103982 r104547 37 37 38 38 /* Forward declarations: */ 39 class QGridLayout; 40 class QLabel; 39 41 class UIToolBox; 40 42 class UIWizardNewCloudVM; … … 97 99 UIToolBox *m_pToolBox; 98 100 101 /** Holds the location layout instance. */ 102 QGridLayout *m_pLayoutProvider; 103 /** Holds the provider type label instance. */ 104 QLabel *m_pProviderLabel; 99 105 /** Holds the location type combo-box instance. */ 100 106 QIComboBox *m_pProviderComboBox; 107 /** Holds the profile label instance. */ 108 QLabel *m_pProfileLabel; 101 109 /** Holds the profile combo-box instance. */ 102 110 QIComboBox *m_pProfileComboBox;
Note:
See TracChangeset
for help on using the changeset viewer.