Changeset 104558 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.cpp
- Timestamp:
- May 8, 2024 2:49:25 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.cpp
r104555 r104558 27 27 28 28 /* Qt includes: */ 29 #include <QGridLayout> 29 30 #include <QHBoxLayout> 30 31 #include <QHeaderView> 32 #include <QLabel> 31 33 #include <QListWidget> 32 34 #include <QPushButton> … … 51 53 UIWizardAddCloudVMPageExpert::UIWizardAddCloudVMPageExpert() 52 54 : m_pToolBox(0) 55 , m_pLayoutProvider(0) 53 56 , m_pProviderLabel(0) 54 57 , m_pProviderComboBox(0) … … 77 80 pLayoutLocation->setContentsMargins(0, 0, 0, 0); 78 81 79 /* Prepare provider combo-box: */ 80 m_pProviderComboBox = new QIComboBox(pWidgetLocation); 81 if (m_pProviderComboBox) 82 pLayoutLocation->addWidget(m_pProviderComboBox); 83 84 /* Prepare profile layout: */ 85 QHBoxLayout *pLayoutProfile = new QHBoxLayout; 86 if (pLayoutProfile) 82 /* Prepare provider layout: */ 83 m_pLayoutProvider = new QGridLayout; 84 if (m_pLayoutProvider) 87 85 { 88 pLayoutProfile->setContentsMargins(0, 0, 0, 0); 89 pLayoutProfile->setSpacing(1); 90 91 /* Prepare profile combo-box: */ 92 m_pProfileComboBox = new QIComboBox(pWidgetLocation); 93 if (m_pProfileComboBox) 94 pLayoutProfile->addWidget(m_pProfileComboBox); 95 96 /* Prepare profile tool-button: */ 97 m_pProfileToolButton = new QIToolButton(pWidgetLocation); 98 if (m_pProfileToolButton) 86 m_pLayoutProvider->setContentsMargins(0, 0, 0, 0); 87 m_pLayoutProvider->setColumnStretch(0, 0); 88 m_pLayoutProvider->setColumnStretch(1, 1); 89 90 /* Prepare provider label: */ 91 m_pProviderLabel = new QLabel(this); 92 if (m_pProviderLabel) 93 m_pLayoutProvider->addWidget(m_pProviderLabel, 0, 0, Qt::AlignRight); 94 95 /* Prepare provider combo-box: */ 96 m_pProviderComboBox = new QIComboBox(pWidgetLocation); 97 if (m_pProviderComboBox) 99 98 { 100 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 101 ":/cloud_profile_manager_disabled_16px.png")); 102 pLayoutProfile->addWidget(m_pProfileToolButton); 99 m_pProviderLabel->setBuddy(m_pProviderComboBox); 100 m_pLayoutProvider->addWidget(m_pProviderComboBox, 0, 1); 103 101 } 104 102 103 /* Prepare profile label: */ 104 m_pProfileLabel = new QLabel(this); 105 if (m_pProfileLabel) 106 m_pLayoutProvider->addWidget(m_pProfileLabel, 1, 0, Qt::AlignRight); 107 108 /* Prepare profile layout: */ 109 QHBoxLayout *pLayoutProfile = new QHBoxLayout; 110 if (pLayoutProfile) 111 { 112 pLayoutProfile->setContentsMargins(0, 0, 0, 0); 113 pLayoutProfile->setSpacing(1); 114 115 /* Prepare profile combo-box: */ 116 m_pProfileComboBox = new QIComboBox(pWidgetLocation); 117 if (m_pProfileComboBox) 118 { 119 m_pProfileLabel->setBuddy(m_pProfileComboBox); 120 pLayoutProfile->addWidget(m_pProfileComboBox); 121 } 122 123 /* Prepare profile tool-button: */ 124 m_pProfileToolButton = new QIToolButton(pWidgetLocation); 125 if (m_pProfileToolButton) 126 { 127 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 128 ":/cloud_profile_manager_disabled_16px.png")); 129 pLayoutProfile->addWidget(m_pProfileToolButton); 130 } 131 132 /* Add into layout: */ 133 m_pLayoutProvider->addLayout(pLayoutProfile, 1, 1); 134 } 135 105 136 /* Add into layout: */ 106 pLayoutLocation->addLayout( pLayoutProfile);137 pLayoutLocation->addLayout(m_pLayoutProvider); 107 138 } 108 139 } … … 174 205 } 175 206 176 /* Translate profile stuff: */ 177 if (m_pProfileToolButton) 178 { 179 m_pProfileToolButton->setText(UIWizardAddCloudVM::tr("Cloud Profile Manager")); 180 m_pProfileToolButton->setToolTip(UIWizardAddCloudVM::tr("Opens cloud profile manager...")); 181 } 182 207 /* Translate provider label: */ 208 if (m_pProviderLabel) 209 m_pProviderLabel->setText(UIWizardAddCloudVM::tr("&Provider:")); 183 210 /* Translate received values of Provider combo-box. 184 211 * We are enumerating starting from 0 for simplicity: */ … … 188 215 for (int i = 0; i < m_pProviderComboBox->count(); ++i) 189 216 m_pProviderComboBox->setItemText(i, m_pProviderComboBox->itemData(i, ProviderData_Name).toString()); 217 } 218 219 /* Translate profile stuff: */ 220 if (m_pProfileLabel) 221 m_pProfileLabel->setText(UIWizardAddCloudVM::tr("P&rofile:")); 222 if (m_pProfileToolButton) 223 { 224 m_pProfileToolButton->setText(UIWizardAddCloudVM::tr("Cloud Profile Manager")); 225 m_pProfileToolButton->setToolTip(UIWizardAddCloudVM::tr("Opens cloud profile manager...")); 190 226 } 191 227 }
Note:
See TracChangeset
for help on using the changeset viewer.