Changeset 86346 in vbox
- Timestamp:
- Sep 30, 2020 1:02:39 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageBasic1.cpp
r86345 r86346 48 48 , m_pSourceComboBox(0) 49 49 , m_pCloudContainerLayout(0) 50 , m_p AccountLabel(0)51 , m_p AccountComboBox(0)52 , m_p AccountToolButton(0)53 , m_p AccountInstanceLabel(0)54 , m_p AccountInstanceList(0)50 , m_pProfileLabel(0) 51 , m_pProfileComboBox(0) 52 , m_pProfileToolButton(0) 53 , m_pProfileInstanceLabel(0) 54 , m_pProfileInstanceList(0) 55 55 { 56 56 } … … 107 107 } 108 108 109 void UIWizardAddCloudVMPage1::populate Accounts()109 void UIWizardAddCloudVMPage1::populateProfiles() 110 110 { 111 111 /* Block signals while updating: */ 112 m_p AccountComboBox->blockSignals(true);112 m_pProfileComboBox->blockSignals(true); 113 113 114 114 /* Remember current item data to be able to restore it: */ 115 115 QString strOldData; 116 if (m_p AccountComboBox->currentIndex() != -1)117 strOldData = m_p AccountComboBox->itemData(m_pAccountComboBox->currentIndex(), AccountData_ProfileName).toString();116 if (m_pProfileComboBox->currentIndex() != -1) 117 strOldData = m_pProfileComboBox->itemData(m_pProfileComboBox->currentIndex(), ProfileData_Name).toString(); 118 118 else 119 119 { 120 /* Try to fetch "old" accountname from wizard full group name: */120 /* Try to fetch "old" profile name from wizard full group name: */ 121 121 UIWizardAddCloudVM *pWizard = qobject_cast<UIWizardAddCloudVM*>(wizardImp()); 122 122 AssertPtrReturnVoid(pWizard); … … 128 128 129 129 /* Clear combo initially: */ 130 m_p AccountComboBox->clear();130 m_pProfileComboBox->clear(); 131 131 /* Clear Cloud Provider: */ 132 132 m_comCloudProvider = CCloudProvider(); … … 162 162 163 163 /* Compose item, fill it's data: */ 164 m_p AccountComboBox->addItem(strProfileName);165 m_p AccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProfileName, AccountData_ProfileName);164 m_pProfileComboBox->addItem(strProfileName); 165 m_pProfileComboBox->setItemData(m_pProfileComboBox->count() - 1, strProfileName, ProfileData_Name); 166 166 } 167 167 … … 170 170 if ( iNewIndex == -1 171 171 && !strOldData.isNull()) 172 iNewIndex = m_p AccountComboBox->findData(strOldData, AccountData_ProfileName);172 iNewIndex = m_pProfileComboBox->findData(strOldData, ProfileData_Name); 173 173 if ( iNewIndex == -1 174 && m_p AccountComboBox->count() > 0)174 && m_pProfileComboBox->count() > 0) 175 175 iNewIndex = 0; 176 176 if (iNewIndex != -1) 177 m_p AccountComboBox->setCurrentIndex(iNewIndex);177 m_pProfileComboBox->setCurrentIndex(iNewIndex); 178 178 } 179 179 while (0); … … 181 181 182 182 /* Unblock signals after update: */ 183 m_p AccountComboBox->blockSignals(false);184 } 185 186 void UIWizardAddCloudVMPage1::populate Account()183 m_pProfileComboBox->blockSignals(false); 184 } 185 186 void UIWizardAddCloudVMPage1::populateProfile() 187 187 { 188 188 /* Clear Cloud Profile: */ … … 200 200 } 201 201 202 void UIWizardAddCloudVMPage1::populate AccountInstances()202 void UIWizardAddCloudVMPage1::populateProfileInstances() 203 203 { 204 204 /* Block signals while updating: */ 205 m_p AccountInstanceList->blockSignals(true);205 m_pProfileInstanceList->blockSignals(true); 206 206 207 207 /* Clear list initially: */ 208 m_p AccountInstanceList->clear();208 m_pProfileInstanceList->clear(); 209 209 /* Clear Cloud Client: */ 210 210 setClient(CCloudClient()); … … 259 259 { 260 260 /* Create list item: */ 261 QListWidgetItem *pItem = new QListWidgetItem(names.at(i), m_p AccountInstanceList);261 QListWidgetItem *pItem = new QListWidgetItem(names.at(i), m_pProfileInstanceList); 262 262 if (pItem) 263 263 { … … 268 268 269 269 /* Choose the 1st one by default if possible: */ 270 if (m_p AccountInstanceList->count())271 m_p AccountInstanceList->setCurrentRow(0);270 if (m_pProfileInstanceList->count()) 271 m_pProfileInstanceList->setCurrentRow(0); 272 272 } 273 273 while (0); … … 275 275 276 276 /* Unblock signals after update: */ 277 m_p AccountInstanceList->blockSignals(false);277 m_pProfileInstanceList->blockSignals(false); 278 278 } 279 279 … … 310 310 QString UIWizardAddCloudVMPage1::profileName() const 311 311 { 312 const int iIndex = m_p AccountComboBox->currentIndex();313 return m_p AccountComboBox->itemData(iIndex, AccountData_ProfileName).toString();312 const int iIndex = m_pProfileComboBox->currentIndex(); 313 return m_pProfileComboBox->itemData(iIndex, ProfileData_Name).toString(); 314 314 } 315 315 … … 317 317 { 318 318 QStringList result; 319 foreach (QListWidgetItem *pItem, m_p AccountInstanceList->selectedItems())319 foreach (QListWidgetItem *pItem, m_pProfileInstanceList->selectedItems()) 320 320 result << pItem->data(Qt::UserRole).toString(); 321 321 return result; … … 399 399 m_pCloudContainerLayout->setRowStretch(3, 1); 400 400 401 /* Create accountlabel: */402 m_p AccountLabel = new QLabel(this);403 if (m_p AccountLabel)401 /* Create profile label: */ 402 m_pProfileLabel = new QLabel(this); 403 if (m_pProfileLabel) 404 404 { 405 405 /* Add into layout: */ 406 m_pCloudContainerLayout->addWidget(m_p AccountLabel, 0, 0, Qt::AlignRight);406 m_pCloudContainerLayout->addWidget(m_pProfileLabel, 0, 0, Qt::AlignRight); 407 407 } 408 408 /* Create sub-layout: */ … … 413 413 pSubLayout->setSpacing(1); 414 414 415 /* Create accountcombo-box: */416 m_p AccountComboBox = new QIComboBox(this);417 if (m_p AccountComboBox)415 /* Create profile combo-box: */ 416 m_pProfileComboBox = new QIComboBox(this); 417 if (m_pProfileComboBox) 418 418 { 419 m_p AccountLabel->setBuddy(m_pAccountComboBox);419 m_pProfileLabel->setBuddy(m_pProfileComboBox); 420 420 421 421 /* Add into layout: */ 422 pSubLayout->addWidget(m_p AccountComboBox);422 pSubLayout->addWidget(m_pProfileComboBox); 423 423 } 424 /* Create accounttool-button: */425 m_p AccountToolButton = new QIToolButton(this);426 if (m_p AccountToolButton)424 /* Create profile tool-button: */ 425 m_pProfileToolButton = new QIToolButton(this); 426 if (m_pProfileToolButton) 427 427 { 428 m_p AccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",428 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 429 429 ":/cloud_profile_manager_disabled_16px.png")); 430 430 431 431 /* Add into layout: */ 432 pSubLayout->addWidget(m_p AccountToolButton);432 pSubLayout->addWidget(m_pProfileToolButton); 433 433 } 434 434 … … 437 437 } 438 438 439 /* Create accountinstance label: */440 m_p AccountInstanceLabel = new QLabel(this);441 if (m_p AccountInstanceLabel)439 /* Create profile instance label: */ 440 m_pProfileInstanceLabel = new QLabel(this); 441 if (m_pProfileInstanceLabel) 442 442 { 443 443 /* Add into layout: */ 444 m_pCloudContainerLayout->addWidget(m_p AccountInstanceLabel, 1, 0, Qt::AlignRight);444 m_pCloudContainerLayout->addWidget(m_pProfileInstanceLabel, 1, 0, Qt::AlignRight); 445 445 } 446 446 /* Create profile instances table: */ 447 m_p AccountInstanceList = new QListWidget(this);448 if (m_p AccountInstanceList)449 { 450 m_p AccountInstanceLabel->setBuddy(m_pAccountInstanceLabel);451 const QFontMetrics fm(m_p AccountInstanceList->font());447 m_pProfileInstanceList = new QListWidget(this); 448 if (m_pProfileInstanceList) 449 { 450 m_pProfileInstanceLabel->setBuddy(m_pProfileInstanceLabel); 451 const QFontMetrics fm(m_pProfileInstanceList->font()); 452 452 const int iFontWidth = fm.width('x'); 453 453 const int iTotalWidth = 50 * iFontWidth; 454 454 const int iFontHeight = fm.height(); 455 455 const int iTotalHeight = 4 * iFontHeight; 456 m_p AccountInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));457 //m_p AccountInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);458 m_p AccountInstanceList->setAlternatingRowColors(true);459 m_p AccountInstanceList->setSelectionMode(QAbstractItemView::ExtendedSelection);456 m_pProfileInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight)); 457 //m_pProfileInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); 458 m_pProfileInstanceList->setAlternatingRowColors(true); 459 m_pProfileInstanceList->setSelectionMode(QAbstractItemView::ExtendedSelection); 460 460 461 461 /* Add into layout: */ 462 m_pCloudContainerLayout->addWidget(m_p AccountInstanceList, 1, 1, 2, 1);462 m_pCloudContainerLayout->addWidget(m_pProfileInstanceList, 1, 1, 2, 1); 463 463 } 464 464 … … 474 474 connect(m_pSourceComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated), 475 475 this, &UIWizardAddCloudVMPageBasic1::sltHandleSourceChange); 476 connect(m_p AccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),477 this, &UIWizardAddCloudVMPageBasic1::sltHandle AccountComboChange);478 connect(m_p AccountToolButton, &QIToolButton::clicked,479 this, &UIWizardAddCloudVMPageBasic1::sltHandle AccountButtonClick);480 connect(m_p AccountInstanceList, &QListWidget::currentRowChanged,476 connect(m_pProfileComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged), 477 this, &UIWizardAddCloudVMPageBasic1::sltHandleProfileComboChange); 478 connect(m_pProfileToolButton, &QIToolButton::clicked, 479 this, &UIWizardAddCloudVMPageBasic1::sltHandleProfileButtonClick); 480 connect(m_pProfileInstanceList, &QListWidget::currentRowChanged, 481 481 this, &UIWizardAddCloudVMPageBasic1::completeChanged); 482 482 … … 507 507 508 508 /* Translate description label: */ 509 m_pLabelDescription->setText(UIWizardAddCloudVM::tr("<p>Please choose one of cloud service accounts you have registered to "509 m_pLabelDescription->setText(UIWizardAddCloudVM::tr("<p>Please choose one of cloud service profiles you have registered to " 510 510 "add virtual machine from. Existing instance list will be " 511 511 "updated. To continue, select at least one instance to add virtual " … … 513 513 514 514 /* Translate cloud stuff: */ 515 m_p AccountLabel->setText(UIWizardAddCloudVM::tr("&Account:"));516 m_p AccountInstanceLabel->setText(UIWizardAddCloudVM::tr("&Instances:"));515 m_pProfileLabel->setText(UIWizardAddCloudVM::tr("&Profile:")); 516 m_pProfileInstanceLabel->setText(UIWizardAddCloudVM::tr("&Instances:")); 517 517 518 518 /* Adjust label widths: */ 519 519 QList<QWidget*> labels; 520 520 labels << m_pSourceLabel; 521 labels << m_p AccountLabel;522 labels << m_p AccountInstanceLabel;521 labels << m_pProfileLabel; 522 labels << m_pProfileInstanceLabel; 523 523 int iMaxWidth = 0; 524 524 foreach (QWidget *pLabel, labels) … … 585 585 586 586 /* Make instance list focused by default: */ 587 m_p AccountInstanceList->setFocus();587 m_pProfileInstanceList->setFocus(); 588 588 589 589 /* Refresh required settings: */ 590 populate Accounts();591 populate Account();592 populate AccountInstances();590 populateProfiles(); 591 populateProfile(); 592 populateProfileInstances(); 593 593 emit completeChanged(); 594 594 } 595 595 596 void UIWizardAddCloudVMPageBasic1::sltHandle AccountComboChange()596 void UIWizardAddCloudVMPageBasic1::sltHandleProfileComboChange() 597 597 { 598 598 /* Refresh required settings: */ 599 populate Account();600 populate AccountInstances();599 populateProfile(); 600 populateProfileInstances(); 601 601 emit completeChanged(); 602 602 } 603 603 604 void UIWizardAddCloudVMPageBasic1::sltHandle AccountButtonClick()604 void UIWizardAddCloudVMPageBasic1::sltHandleProfileButtonClick() 605 605 { 606 606 /* Open Cloud Profile Manager: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageBasic1.h
r86343 r86346 49 49 }; 50 50 51 /** Accountcombo data fields. */51 /** Profile combo data fields. */ 52 52 enum 53 53 { 54 AccountData_ProfileName = Qt::UserRole + 154 ProfileData_Name = Qt::UserRole + 1 55 55 }; 56 56 … … 65 65 /** Populates sources. */ 66 66 void populateSources(); 67 /** Populates accounts. */68 void populate Accounts();69 /** Populates account. */70 void populate Account();71 /** Populates accountinstances. */72 void populate AccountInstances();67 /** Populates profiles. */ 68 void populateProfiles(); 69 /** Populates profile. */ 70 void populateProfile(); 71 /** Populates profile instances. */ 72 void populateProfileInstances(); 73 73 74 74 /** Updates source combo tool-tips. */ … … 111 111 /** Holds the cloud container layout instance. */ 112 112 QGridLayout *m_pCloudContainerLayout; 113 /** Holds the accountlabel instance. */114 QLabel *m_p AccountLabel;115 /** Holds the accountcombo-box instance. */116 QIComboBox *m_p AccountComboBox;117 /** Holds the accountmanagement tool-button instance. */118 QIToolButton *m_p AccountToolButton;119 /** Holds the accountinstance label instance. */120 QLabel *m_p AccountInstanceLabel;121 /** Holds the accountinstance list instance. */122 QListWidget *m_p AccountInstanceList;113 /** Holds the profile label instance. */ 114 QLabel *m_pProfileLabel; 115 /** Holds the profile combo-box instance. */ 116 QIComboBox *m_pProfileComboBox; 117 /** Holds the profile management tool-button instance. */ 118 QIToolButton *m_pProfileToolButton; 119 /** Holds the profile instance label instance. */ 120 QLabel *m_pProfileInstanceLabel; 121 /** Holds the profile instance list instance. */ 122 QListWidget *m_pProfileInstanceList; 123 123 }; 124 124 … … 158 158 void sltHandleSourceChange(); 159 159 160 /** Handles change in accountcombo-box. */161 void sltHandle AccountComboChange();160 /** Handles change in profile combo-box. */ 161 void sltHandleProfileComboChange(); 162 162 163 /** Handles accounttool-button click. */164 void sltHandle AccountButtonClick();163 /** Handles profile tool-button click. */ 164 void sltHandleProfileButtonClick(); 165 165 166 166 private: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.cpp
r86343 r86346 70 70 pSubLayout->setSpacing(1); 71 71 72 /* Create accountcombo-box: */73 m_p AccountComboBox = new QIComboBox(m_pCntSource);74 if (m_p AccountComboBox)72 /* Create profile combo-box: */ 73 m_pProfileComboBox = new QIComboBox(m_pCntSource); 74 if (m_pProfileComboBox) 75 75 { 76 76 /* Add into layout: */ 77 pSubLayout->addWidget(m_p AccountComboBox);77 pSubLayout->addWidget(m_pProfileComboBox); 78 78 } 79 /* Create accounttool-button: */80 m_p AccountToolButton = new QIToolButton(m_pCntSource);81 if (m_p AccountToolButton)79 /* Create profile tool-button: */ 80 m_pProfileToolButton = new QIToolButton(m_pCntSource); 81 if (m_pProfileToolButton) 82 82 { 83 m_p AccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",83 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 84 84 ":/cloud_profile_manager_disabled_16px.png")); 85 85 86 86 /* Add into layout: */ 87 pSubLayout->addWidget(m_p AccountToolButton);87 pSubLayout->addWidget(m_pProfileToolButton); 88 88 } 89 89 … … 93 93 94 94 /* Create profile instances table: */ 95 m_p AccountInstanceList = new QListWidget(m_pCntSource);96 if (m_p AccountInstanceList)95 m_pProfileInstanceList = new QListWidget(m_pCntSource); 96 if (m_pProfileInstanceList) 97 97 { 98 const QFontMetrics fm(m_p AccountInstanceList->font());98 const QFontMetrics fm(m_pProfileInstanceList->font()); 99 99 const int iFontWidth = fm.width('x'); 100 100 const int iTotalWidth = 50 * iFontWidth; 101 101 const int iFontHeight = fm.height(); 102 102 const int iTotalHeight = 4 * iFontHeight; 103 m_p AccountInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));104 //m_p AccountInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);105 m_p AccountInstanceList->setAlternatingRowColors(true);106 m_p AccountInstanceList->setSelectionMode(QAbstractItemView::ExtendedSelection);103 m_pProfileInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight)); 104 //m_pProfileInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); 105 m_pProfileInstanceList->setAlternatingRowColors(true); 106 m_pProfileInstanceList->setSelectionMode(QAbstractItemView::ExtendedSelection); 107 107 108 108 /* Add into layout: */ 109 m_pCloudContainerLayout->addWidget(m_p AccountInstanceList, 1, 0);109 m_pCloudContainerLayout->addWidget(m_pProfileInstanceList, 1, 0); 110 110 } 111 111 … … 126 126 connect(m_pSourceComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated), 127 127 this, &UIWizardAddCloudVMPageExpert::sltHandleSourceChange); 128 connect(m_p AccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),129 this, &UIWizardAddCloudVMPageExpert::sltHandle AccountComboChange);130 connect(m_p AccountToolButton, &QIToolButton::clicked,131 this, &UIWizardAddCloudVMPageExpert::sltHandle AccountButtonClick);132 connect(m_p AccountInstanceList, &QListWidget::currentRowChanged,128 connect(m_pProfileComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged), 129 this, &UIWizardAddCloudVMPageExpert::sltHandleProfileComboChange); 130 connect(m_pProfileToolButton, &QIToolButton::clicked, 131 this, &UIWizardAddCloudVMPageExpert::sltHandleProfileButtonClick); 132 connect(m_pProfileInstanceList, &QListWidget::currentRowChanged, 133 133 this, &UIWizardAddCloudVMPageExpert::completeChanged); 134 134 … … 210 210 211 211 /* Make instance list focused by default: */ 212 m_p AccountInstanceList->setFocus();212 m_pProfileInstanceList->setFocus(); 213 213 214 214 /* Refresh required settings: */ 215 populate Accounts();216 populate Account();217 populate AccountInstances();215 populateProfiles(); 216 populateProfile(); 217 populateProfileInstances(); 218 218 emit completeChanged(); 219 219 } 220 220 221 void UIWizardAddCloudVMPageExpert::sltHandle AccountComboChange()221 void UIWizardAddCloudVMPageExpert::sltHandleProfileComboChange() 222 222 { 223 223 /* Refresh required settings: */ 224 populate Account();225 populate AccountInstances();224 populateProfile(); 225 populateProfileInstances(); 226 226 emit completeChanged(); 227 227 } 228 228 229 void UIWizardAddCloudVMPageExpert::sltHandle AccountButtonClick()229 void UIWizardAddCloudVMPageExpert::sltHandleProfileButtonClick() 230 230 { 231 231 /* Open Cloud Profile Manager: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.h
r86343 r86346 64 64 void sltHandleSourceChange(); 65 65 66 /** Handles change in accountcombo-box. */67 void sltHandle AccountComboChange();66 /** Handles change in profile combo-box. */ 67 void sltHandleProfileComboChange(); 68 68 69 /** Handles accounttool-button click. */70 void sltHandle AccountButtonClick();69 /** Handles profile tool-button click. */ 70 void sltHandleProfileButtonClick(); 71 71 72 72 private: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp
r86343 r86346 65 65 , m_pManifestCheckbox(0) 66 66 , m_pIncludeISOsCheckbox(0) 67 , m_p AccountLabel(0)68 , m_p AccountComboBox(0)69 , m_p AccountToolButton(0)67 , m_pProfileLabel(0) 68 , m_pProfileComboBox(0) 69 , m_pProfileToolButton(0) 70 70 { 71 71 } … … 163 163 } 164 164 165 void UIWizardExportAppPage2::populate Accounts()165 void UIWizardExportAppPage2::populateProfiles() 166 166 { 167 167 /* Block signals while updating: */ 168 m_p AccountComboBox->blockSignals(true);168 m_pProfileComboBox->blockSignals(true); 169 169 170 170 /* Remember current item data to be able to restore it: */ 171 171 QString strOldData; 172 if (m_p AccountComboBox->currentIndex() != -1)173 strOldData = m_p AccountComboBox->itemData(m_pAccountComboBox->currentIndex(), AccountData_ProfileName).toString();172 if (m_pProfileComboBox->currentIndex() != -1) 173 strOldData = m_pProfileComboBox->itemData(m_pProfileComboBox->currentIndex(), ProfileData_Name).toString(); 174 174 175 175 /* Clear combo initially: */ 176 m_p AccountComboBox->clear();176 m_pProfileComboBox->clear(); 177 177 /* Clear Cloud Provider: */ 178 178 m_comCloudProvider = CCloudProvider(); … … 203 203 204 204 /* Compose item, fill it's data: */ 205 m_p AccountComboBox->addItem(strProfileName);206 m_p AccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProfileName, AccountData_ProfileName);205 m_pProfileComboBox->addItem(strProfileName); 206 m_pProfileComboBox->setItemData(m_pProfileComboBox->count() - 1, strProfileName, ProfileData_Name); 207 207 } 208 208 } … … 213 213 if ( iNewIndex == -1 214 214 && !strOldData.isNull()) 215 iNewIndex = m_p AccountComboBox->findData(strOldData, AccountData_ProfileName);215 iNewIndex = m_pProfileComboBox->findData(strOldData, ProfileData_Name); 216 216 if ( iNewIndex == -1 217 && m_p AccountComboBox->count() > 0)217 && m_pProfileComboBox->count() > 0) 218 218 iNewIndex = 0; 219 219 if (iNewIndex != -1) 220 m_p AccountComboBox->setCurrentIndex(iNewIndex);220 m_pProfileComboBox->setCurrentIndex(iNewIndex); 221 221 } 222 222 223 223 /* Unblock signals after update: */ 224 m_p AccountComboBox->blockSignals(false);225 } 226 227 void UIWizardExportAppPage2::populate Account()224 m_pProfileComboBox->blockSignals(false); 225 } 226 227 void UIWizardExportAppPage2::populateProfile() 228 228 { 229 229 /* Clear Cloud Profile: */ … … 547 547 QString UIWizardExportAppPage2::profileName() const 548 548 { 549 const int iIndex = m_p AccountComboBox->currentIndex();550 return m_p AccountComboBox->itemData(iIndex, AccountData_ProfileName).toString();549 const int iIndex = m_pProfileComboBox->currentIndex(); 550 return m_pProfileComboBox->itemData(iIndex, ProfileData_Name).toString(); 551 551 } 552 552 … … 765 765 m_pSettingsLayout2->setColumnStretch(1, 1); 766 766 767 /* Create accountlabel: */768 m_p AccountLabel = new QLabel;769 if (m_p AccountLabel)770 { 771 m_p AccountLabel->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);772 773 /* Add into layout: */ 774 m_pSettingsLayout2->addWidget(m_p AccountLabel, 0, 0);767 /* Create profile label: */ 768 m_pProfileLabel = new QLabel; 769 if (m_pProfileLabel) 770 { 771 m_pProfileLabel->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter); 772 773 /* Add into layout: */ 774 m_pSettingsLayout2->addWidget(m_pProfileLabel, 0, 0); 775 775 } 776 776 /* Create sub-layout: */ … … 781 781 pSubLayout->setSpacing(1); 782 782 783 /* Create accountcombo-box: */784 m_p AccountComboBox = new QComboBox;785 if (m_p AccountComboBox)783 /* Create profile combo-box: */ 784 m_pProfileComboBox = new QComboBox; 785 if (m_pProfileComboBox) 786 786 { 787 m_p AccountLabel->setBuddy(m_pAccountComboBox);787 m_pProfileLabel->setBuddy(m_pProfileComboBox); 788 788 789 789 /* Add into layout: */ 790 pSubLayout->addWidget(m_p AccountComboBox);790 pSubLayout->addWidget(m_pProfileComboBox); 791 791 } 792 /* Create accounttool-button: */793 m_p AccountToolButton = new QIToolButton;794 if (m_p AccountToolButton)792 /* Create profile tool-button: */ 793 m_pProfileToolButton = new QIToolButton; 794 if (m_pProfileToolButton) 795 795 { 796 m_p AccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",796 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 797 797 ":/cloud_profile_manager_disabled_16px.png")); 798 798 799 799 /* Add into layout: */ 800 pSubLayout->addWidget(m_p AccountToolButton);800 pSubLayout->addWidget(m_pProfileToolButton); 801 801 } 802 802 … … 805 805 } 806 806 807 /* Create accountlabel: */807 /* Create profile label: */ 808 808 m_pMachineLabel = new QLabel; 809 809 if (m_pMachineLabel) … … 850 850 /* Populate MAC address policies: */ 851 851 populateMACAddressPolicies(); 852 /* Populate accounts: */853 populate Accounts();854 /* Populate account: */855 populate Account();852 /* Populate profiles: */ 853 populateProfiles(); 854 /* Populate profile: */ 855 populateProfile(); 856 856 857 857 /* Setup connections: */ … … 865 865 connect(m_pMACComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), 866 866 this, &UIWizardExportAppPageBasic2::sltHandleMACAddressExportPolicyComboChange); 867 connect(m_p AccountComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),868 this, &UIWizardExportAppPageBasic2::sltHandle AccountComboChange);869 connect(m_p AccountToolButton, &QIToolButton::clicked,870 this, &UIWizardExportAppPageBasic2::sltHandle AccountButtonClick);867 connect(m_pProfileComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), 868 this, &UIWizardExportAppPageBasic2::sltHandleProfileComboChange); 869 connect(m_pProfileToolButton, &QIToolButton::clicked, 870 this, &UIWizardExportAppPageBasic2::sltHandleProfileButtonClick); 871 871 872 872 /* Register fields: */ … … 963 963 m_pIncludeISOsCheckbox->setText(UIWizardExportApp::tr("&Include ISO image files")); 964 964 965 /* Translate Accountlabel: */966 m_p AccountLabel->setText(UIWizardExportApp::tr("&Account:"));965 /* Translate Profile label: */ 966 m_pProfileLabel->setText(UIWizardExportApp::tr("&Profile:")); 967 967 968 968 /* Translate option label: */ … … 978 978 labels << m_pMACComboBoxLabel; 979 979 labels << m_pAdditionalLabel; 980 labels << m_p AccountLabel;980 labels << m_pProfileLabel; 981 981 labels << m_pMachineLabel; 982 982 int iMaxWidth = 0; … … 1061 1061 { 1062 1062 m_pLabelSettings->setText(UIWizardExportApp:: 1063 tr("<p>Please choose one of cloud service accounts you have registered to export virtual "1063 tr("<p>Please choose one of cloud service profiles you have registered to export virtual " 1064 1064 "machines to. It will be used to establish network connection required to upload your " 1065 1065 "virtual machine files to a remote cloud facility.</p>")); 1066 m_p AccountComboBox->setFocus();1066 m_pProfileComboBox->setFocus(); 1067 1067 } 1068 1068 else … … 1086 1086 refreshManifestCheckBoxAccess(); 1087 1087 refreshIncludeISOsCheckBoxAccess(); 1088 populate Accounts();1089 populate Account();1088 populateProfiles(); 1089 populateProfile(); 1090 1090 emit completeChanged(); 1091 1091 } … … 1107 1107 } 1108 1108 1109 void UIWizardExportAppPageBasic2::sltHandle AccountComboChange()1109 void UIWizardExportAppPageBasic2::sltHandleProfileComboChange() 1110 1110 { 1111 1111 /* Refresh required settings: */ 1112 populate Account();1113 } 1114 1115 void UIWizardExportAppPageBasic2::sltHandle AccountButtonClick()1112 populateProfile(); 1113 } 1114 1115 void UIWizardExportAppPageBasic2::sltHandleProfileButtonClick() 1116 1116 { 1117 1117 /* Open Cloud Profile Manager: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.h
r86343 r86346 72 72 }; 73 73 74 /** Accountcombo data fields. */74 /** Profile combo data fields. */ 75 75 enum 76 76 { 77 AccountData_ProfileName = Qt::UserRole + 177 ProfileData_Name = Qt::UserRole + 1 78 78 }; 79 79 … … 101 101 /** Populates MAC address policies. */ 102 102 void populateMACAddressPolicies(); 103 /** Populates accounts. */104 void populate Accounts();105 /** Populates account. */106 void populate Account();103 /** Populates profiles. */ 104 void populateProfiles(); 105 /** Populates profile. */ 106 void populateProfile(); 107 107 /** Populates form properties. */ 108 108 void populateFormProperties(); … … 231 231 QCheckBox *m_pIncludeISOsCheckbox; 232 232 233 /** Holds the accountlabel instance. */234 QLabel *m_p AccountLabel;235 /** Holds the accountcombo-box instance. */236 QComboBox *m_p AccountComboBox;237 /** Holds the accountmanagement tool-button instance. */238 QIToolButton *m_p AccountToolButton;233 /** Holds the profile label instance. */ 234 QLabel *m_pProfileLabel; 235 /** Holds the profile combo-box instance. */ 236 QComboBox *m_pProfileComboBox; 237 /** Holds the profile management tool-button instance. */ 238 QIToolButton *m_pProfileToolButton; 239 239 240 240 /** Holds the machine label instance. */ … … 306 306 void sltHandleMACAddressExportPolicyComboChange(); 307 307 308 /** Handles change in accountcombo-box. */309 void sltHandle AccountComboChange();310 311 /** Handles accounttool-button click. */312 void sltHandle AccountButtonClick();308 /** Handles change in profile combo-box. */ 309 void sltHandleProfileComboChange(); 310 311 /** Handles profile tool-button click. */ 312 void sltHandleProfileButtonClick(); 313 313 314 314 private: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
r86343 r86346 312 312 m_pSettingsLayout2->setColumnStretch(1, 1); 313 313 314 /* Create accountlabel: */315 m_p AccountLabel = new QLabel;316 if (m_p AccountLabel)317 { 318 m_p AccountLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);319 320 /* Add into layout: */ 321 m_pSettingsLayout2->addWidget(m_p AccountLabel, 0, 0);314 /* Create profile label: */ 315 m_pProfileLabel = new QLabel; 316 if (m_pProfileLabel) 317 { 318 m_pProfileLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); 319 320 /* Add into layout: */ 321 m_pSettingsLayout2->addWidget(m_pProfileLabel, 0, 0); 322 322 } 323 323 /* Create sub-layout: */ … … 328 328 pSubLayout->setSpacing(1); 329 329 330 /* Create accountcombo-box: */331 m_p AccountComboBox = new QComboBox;332 if (m_p AccountComboBox)330 /* Create profile combo-box: */ 331 m_pProfileComboBox = new QComboBox; 332 if (m_pProfileComboBox) 333 333 { 334 m_p AccountLabel->setBuddy(m_pAccountComboBox);334 m_pProfileLabel->setBuddy(m_pProfileComboBox); 335 335 336 336 /* Add into layout: */ 337 pSubLayout->addWidget(m_p AccountComboBox);337 pSubLayout->addWidget(m_pProfileComboBox); 338 338 } 339 /* Create accounttool-button: */340 m_p AccountToolButton = new QIToolButton;341 if (m_p AccountToolButton)339 /* Create profile tool-button: */ 340 m_pProfileToolButton = new QIToolButton; 341 if (m_pProfileToolButton) 342 342 { 343 m_p AccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",343 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 344 344 ":/cloud_profile_manager_disabled_16px.png")); 345 345 346 346 /* Add into layout: */ 347 pSubLayout->addWidget(m_p AccountToolButton);347 pSubLayout->addWidget(m_pProfileToolButton); 348 348 } 349 349 … … 352 352 } 353 353 354 /* Create accountlabel: */354 /* Create profile label: */ 355 355 m_pMachineLabel = new QLabel; 356 356 if (m_pMachineLabel) … … 416 416 connect(m_pMACComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), 417 417 this, &UIWizardExportAppPageExpert::sltHandleMACAddressExportPolicyComboChange); 418 connect(m_p AccountComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),419 this, &UIWizardExportAppPageExpert::sltHandle AccountComboChange);420 connect(m_p AccountToolButton, &QIToolButton::clicked,421 this, &UIWizardExportAppPageExpert::sltHandle AccountButtonClick);418 connect(m_pProfileComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), 419 this, &UIWizardExportAppPageExpert::sltHandleProfileComboChange); 420 connect(m_pProfileToolButton, &QIToolButton::clicked, 421 this, &UIWizardExportAppPageExpert::sltHandleProfileButtonClick); 422 422 423 423 /* Register classes: */ … … 512 512 m_pIncludeISOsCheckbox->setText(UIWizardExportApp::tr("&Include ISO image files")); 513 513 514 /* Translate Accountlabel: */515 m_p AccountLabel->setText(UIWizardExportApp::tr("&Account:"));514 /* Translate Profile label: */ 515 m_pProfileLabel->setText(UIWizardExportApp::tr("&Profile:")); 516 516 517 517 /* Translate option label: */ … … 527 527 labels << m_pMACComboBoxLabel; 528 528 labels << m_pAdditionalLabel; 529 labels << m_p AccountLabel;529 labels << m_pProfileLabel; 530 530 labels << m_pMachineLabel; 531 531 int iMaxWidth = 0; … … 662 662 refreshManifestCheckBoxAccess(); 663 663 refreshIncludeISOsCheckBoxAccess(); 664 populate Accounts();665 populate Account();664 populateProfiles(); 665 populateProfile(); 666 666 populateFormProperties(); 667 667 … … 693 693 } 694 694 695 void UIWizardExportAppPageExpert::sltHandle AccountComboChange()695 void UIWizardExportAppPageExpert::sltHandleProfileComboChange() 696 696 { 697 697 /* Refresh required settings: */ 698 populate Account();698 populateProfile(); 699 699 populateFormProperties(); 700 700 … … 710 710 } 711 711 712 void UIWizardExportAppPageExpert::sltHandle AccountButtonClick()712 void UIWizardExportAppPageExpert::sltHandleProfileButtonClick() 713 713 { 714 714 /* Open Cloud Profile Manager: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
r86343 r86346 96 96 void sltHandleMACAddressExportPolicyComboChange(); 97 97 98 /** Handles change in accountcombo-box. */99 void sltHandle AccountComboChange();98 /** Handles change in profile combo-box. */ 99 void sltHandleProfileComboChange(); 100 100 101 /** Handles accounttool-button click. */102 void sltHandle AccountButtonClick();101 /** Handles profile tool-button click. */ 102 void sltHandleProfileButtonClick(); 103 103 104 104 private: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp
r86343 r86346 56 56 , m_pFileSelector(0) 57 57 , m_pCloudContainerLayout(0) 58 , m_p AccountLabel(0)59 , m_p AccountComboBox(0)60 , m_p AccountToolButton(0)61 , m_p AccountInstanceLabel(0)62 , m_p AccountInstanceList(0)58 , m_pProfileLabel(0) 59 , m_pProfileComboBox(0) 60 , m_pProfileToolButton(0) 61 , m_pProfileInstanceLabel(0) 62 , m_pProfileInstanceList(0) 63 63 { 64 64 } … … 129 129 } 130 130 131 void UIWizardImportAppPage1::populate Accounts()131 void UIWizardImportAppPage1::populateProfiles() 132 132 { 133 133 /* Block signals while updating: */ 134 m_p AccountComboBox->blockSignals(true);134 m_pProfileComboBox->blockSignals(true); 135 135 136 136 /* Remember current item data to be able to restore it: */ 137 137 QString strOldData; 138 if (m_p AccountComboBox->currentIndex() != -1)139 strOldData = m_p AccountComboBox->itemData(m_pAccountComboBox->currentIndex(), AccountData_ProfileName).toString();138 if (m_pProfileComboBox->currentIndex() != -1) 139 strOldData = m_pProfileComboBox->itemData(m_pProfileComboBox->currentIndex(), ProfileData_Name).toString(); 140 140 141 141 /* Clear combo initially: */ 142 m_p AccountComboBox->clear();142 m_pProfileComboBox->clear(); 143 143 /* Clear Cloud Provider: */ 144 144 m_comCloudProvider = CCloudProvider(); … … 174 174 175 175 /* Compose item, fill it's data: */ 176 m_p AccountComboBox->addItem(strProfileName);177 m_p AccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProfileName, AccountData_ProfileName);176 m_pProfileComboBox->addItem(strProfileName); 177 m_pProfileComboBox->setItemData(m_pProfileComboBox->count() - 1, strProfileName, ProfileData_Name); 178 178 } 179 179 … … 182 182 if ( iNewIndex == -1 183 183 && !strOldData.isNull()) 184 iNewIndex = m_p AccountComboBox->findData(strOldData, AccountData_ProfileName);184 iNewIndex = m_pProfileComboBox->findData(strOldData, ProfileData_Name); 185 185 if ( iNewIndex == -1 186 && m_p AccountComboBox->count() > 0)186 && m_pProfileComboBox->count() > 0) 187 187 iNewIndex = 0; 188 188 if (iNewIndex != -1) 189 m_p AccountComboBox->setCurrentIndex(iNewIndex);189 m_pProfileComboBox->setCurrentIndex(iNewIndex); 190 190 } 191 191 while (0); … … 193 193 194 194 /* Unblock signals after update: */ 195 m_p AccountComboBox->blockSignals(false);196 } 197 198 void UIWizardImportAppPage1::populate Account()195 m_pProfileComboBox->blockSignals(false); 196 } 197 198 void UIWizardImportAppPage1::populateProfile() 199 199 { 200 200 /* Clear Cloud Profile: */ … … 212 212 } 213 213 214 void UIWizardImportAppPage1::populate AccountInstances()214 void UIWizardImportAppPage1::populateProfileInstances() 215 215 { 216 216 /* Block signals while updating: */ 217 m_p AccountInstanceList->blockSignals(true);217 m_pProfileInstanceList->blockSignals(true); 218 218 219 219 /* Clear list initially: */ 220 m_p AccountInstanceList->clear();220 m_pProfileInstanceList->clear(); 221 221 /* Clear Cloud Client: */ 222 222 m_comCloudClient = CCloudClient(); … … 267 267 { 268 268 /* Create list item: */ 269 QListWidgetItem *pItem = new QListWidgetItem(names.at(i), m_p AccountInstanceList);269 QListWidgetItem *pItem = new QListWidgetItem(names.at(i), m_pProfileInstanceList); 270 270 if (pItem) 271 271 { … … 276 276 277 277 /* Choose the 1st one by default if possible: */ 278 if (m_p AccountInstanceList->count())279 m_p AccountInstanceList->setCurrentRow(0);278 if (m_pProfileInstanceList->count()) 279 m_pProfileInstanceList->setCurrentRow(0); 280 280 } 281 281 while (0); … … 283 283 284 284 /* Unblock signals after update: */ 285 m_p AccountInstanceList->blockSignals(false);285 m_pProfileInstanceList->blockSignals(false); 286 286 } 287 287 … … 407 407 QString UIWizardImportAppPage1::profileName() const 408 408 { 409 const int iIndex = m_p AccountComboBox->currentIndex();410 return m_p AccountComboBox->itemData(iIndex, AccountData_ProfileName).toString();409 const int iIndex = m_pProfileComboBox->currentIndex(); 410 return m_pProfileComboBox->itemData(iIndex, ProfileData_Name).toString(); 411 411 } 412 412 413 413 QString UIWizardImportAppPage1::machineId() const 414 414 { 415 QListWidgetItem *pItem = m_p AccountInstanceList->currentItem();415 QListWidgetItem *pItem = m_pProfileInstanceList->currentItem(); 416 416 return pItem ? pItem->data(Qt::UserRole).toString() : QString(); 417 417 } … … 548 548 m_pCloudContainerLayout->setRowStretch(3, 1); 549 549 550 /* Create accountlabel: */551 m_p AccountLabel = new QLabel;552 if (m_p AccountLabel)550 /* Create profile label: */ 551 m_pProfileLabel = new QLabel; 552 if (m_pProfileLabel) 553 553 { 554 554 /* Add into layout: */ 555 m_pCloudContainerLayout->addWidget(m_p AccountLabel, 0, 0, Qt::AlignRight);555 m_pCloudContainerLayout->addWidget(m_pProfileLabel, 0, 0, Qt::AlignRight); 556 556 } 557 557 … … 563 563 pSubLayout->setSpacing(1); 564 564 565 /* Create accountcombo-box: */566 m_p AccountComboBox = new QIComboBox;567 if (m_p AccountComboBox)565 /* Create profile combo-box: */ 566 m_pProfileComboBox = new QIComboBox; 567 if (m_pProfileComboBox) 568 568 { 569 m_p AccountLabel->setBuddy(m_pAccountComboBox);569 m_pProfileLabel->setBuddy(m_pProfileComboBox); 570 570 571 571 /* Add into layout: */ 572 pSubLayout->addWidget(m_p AccountComboBox);572 pSubLayout->addWidget(m_pProfileComboBox); 573 573 } 574 574 575 /* Create accounttool-button: */576 m_p AccountToolButton = new QIToolButton;577 if (m_p AccountToolButton)575 /* Create profile tool-button: */ 576 m_pProfileToolButton = new QIToolButton; 577 if (m_pProfileToolButton) 578 578 { 579 m_p AccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",579 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 580 580 ":/cloud_profile_manager_disabled_16px.png")); 581 581 582 582 /* Add into layout: */ 583 pSubLayout->addWidget(m_p AccountToolButton);583 pSubLayout->addWidget(m_pProfileToolButton); 584 584 } 585 585 … … 588 588 } 589 589 590 /* Create accountinstance label: */591 m_p AccountInstanceLabel = new QLabel;592 if (m_p AccountInstanceLabel)590 /* Create profile instance label: */ 591 m_pProfileInstanceLabel = new QLabel; 592 if (m_pProfileInstanceLabel) 593 593 { 594 594 /* Add into layout: */ 595 m_pCloudContainerLayout->addWidget(m_p AccountInstanceLabel, 1, 0, Qt::AlignRight);595 m_pCloudContainerLayout->addWidget(m_pProfileInstanceLabel, 1, 0, Qt::AlignRight); 596 596 } 597 597 598 598 /* Create profile instances table: */ 599 m_p AccountInstanceList = new QListWidget;600 if (m_p AccountInstanceList)599 m_pProfileInstanceList = new QListWidget; 600 if (m_pProfileInstanceList) 601 601 { 602 m_p AccountInstanceLabel->setBuddy(m_pAccountInstanceLabel);603 const QFontMetrics fm(m_p AccountInstanceList->font());602 m_pProfileInstanceLabel->setBuddy(m_pProfileInstanceLabel); 603 const QFontMetrics fm(m_pProfileInstanceList->font()); 604 604 const int iFontWidth = fm.width('x'); 605 605 const int iTotalWidth = 50 * iFontWidth; 606 606 const int iFontHeight = fm.height(); 607 607 const int iTotalHeight = 4 * iFontHeight; 608 m_p AccountInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));609 // m_p AccountInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);610 m_p AccountInstanceList->setAlternatingRowColors(true);608 m_pProfileInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight)); 609 // m_pProfileInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); 610 m_pProfileInstanceList->setAlternatingRowColors(true); 611 611 612 612 /* Add into layout: */ 613 m_pCloudContainerLayout->addWidget(m_p AccountInstanceList, 1, 1, 2, 1);613 m_pCloudContainerLayout->addWidget(m_pProfileInstanceList, 1, 1, 2, 1); 614 614 } 615 615 } … … 629 629 /* Populate sources: */ 630 630 populateSources(); 631 /* Populate accounts: */632 populate Accounts();633 /* Populate account: */634 populate Account();635 /* Populate accountinstances: */636 populate AccountInstances();631 /* Populate profiles: */ 632 populateProfiles(); 633 /* Populate profile: */ 634 populateProfile(); 635 /* Populate profile instances: */ 636 populateProfileInstances(); 637 637 638 638 /* Setup connections: */ … … 644 644 connect(m_pFileSelector, &UIEmptyFilePathSelector::pathChanged, 645 645 this, &UIWizardImportAppPageBasic1::completeChanged); 646 connect(m_p AccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),647 this, &UIWizardImportAppPageBasic1::sltHandle AccountComboChange);648 connect(m_p AccountToolButton, &QIToolButton::clicked,649 this, &UIWizardImportAppPageBasic1::sltHandle AccountButtonClick);650 connect(m_p AccountInstanceList, &QListWidget::currentRowChanged,646 connect(m_pProfileComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged), 647 this, &UIWizardImportAppPageBasic1::sltHandleProfileComboChange); 648 connect(m_pProfileToolButton, &QIToolButton::clicked, 649 this, &UIWizardImportAppPageBasic1::sltHandleProfileButtonClick); 650 connect(m_pProfileInstanceList, &QListWidget::currentRowChanged, 651 651 this, &UIWizardImportAppPageBasic1::completeChanged); 652 652 … … 691 691 692 692 /* Translate cloud stuff: */ 693 m_p AccountLabel->setText(UIWizardImportApp::tr("&Account:"));694 m_p AccountInstanceLabel->setText(UIWizardImportApp::tr("&Machines:"));693 m_pProfileLabel->setText(UIWizardImportApp::tr("&Profile:")); 694 m_pProfileInstanceLabel->setText(UIWizardImportApp::tr("&Machines:")); 695 695 696 696 /* Adjust label widths: */ … … 698 698 labels << m_pFileLabel; 699 699 labels << m_pSourceLabel; 700 labels << m_p AccountLabel;701 labels << m_p AccountInstanceLabel;700 labels << m_pProfileLabel; 701 labels << m_pProfileInstanceLabel; 702 702 int iMaxWidth = 0; 703 703 foreach (QWidget *pLabel, labels) … … 781 781 { 782 782 m_pLabelDescription->setText(UIWizardImportApp:: 783 tr("<p>Please choose one of cloud service accounts you have registered to import virtual "783 tr("<p>Please choose one of cloud service profiles you have registered to import virtual " 784 784 "machine from. Corresponding machines list will be updated. To continue, " 785 785 "select one of machines to import below.</p>")); 786 m_p AccountInstanceList->setFocus();786 m_pProfileInstanceList->setFocus(); 787 787 } 788 788 else … … 803 803 /* Refresh required settings: */ 804 804 updatePageAppearance(); 805 populate Accounts();806 populate Account();807 populate AccountInstances();805 populateProfiles(); 806 populateProfile(); 807 populateProfileInstances(); 808 808 emit completeChanged(); 809 809 } 810 810 811 void UIWizardImportAppPageBasic1::sltHandle AccountComboChange()811 void UIWizardImportAppPageBasic1::sltHandleProfileComboChange() 812 812 { 813 813 /* Refresh required settings: */ 814 populate Account();815 populate AccountInstances();814 populateProfile(); 815 populateProfileInstances(); 816 816 emit completeChanged(); 817 817 } 818 818 819 void UIWizardImportAppPageBasic1::sltHandle AccountButtonClick()819 void UIWizardImportAppPageBasic1::sltHandleProfileButtonClick() 820 820 { 821 821 /* Open Cloud Profile Manager: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h
r86343 r86346 54 54 }; 55 55 56 /** Accountcombo data fields. */56 /** Profile combo data fields. */ 57 57 enum 58 58 { 59 AccountData_ProfileName = Qt::UserRole + 159 ProfileData_Name = Qt::UserRole + 1 60 60 }; 61 61 … … 70 70 /** Populates sources. */ 71 71 void populateSources(); 72 /** Populates accounts. */73 void populate Accounts();74 /** Populates account. */75 void populate Account();76 /** Populates accountinstances. */77 void populate AccountInstances();72 /** Populates profiles. */ 73 void populateProfiles(); 74 /** Populates profile. */ 75 void populateProfile(); 76 /** Populates profile instances. */ 77 void populateProfileInstances(); 78 78 /** Populates form properties. */ 79 79 void populateFormProperties(); … … 140 140 /** Holds the cloud container layout instance. */ 141 141 QGridLayout *m_pCloudContainerLayout; 142 /** Holds the accountlabel instance. */143 QLabel *m_p AccountLabel;144 /** Holds the accountcombo-box instance. */145 QIComboBox *m_p AccountComboBox;146 /** Holds the accountmanagement tool-button instance. */147 QIToolButton *m_p AccountToolButton;148 /** Holds the accountinstance label instance. */149 QLabel *m_p AccountInstanceLabel;150 /** Holds the accountinstance list instance. */151 QListWidget *m_p AccountInstanceList;142 /** Holds the profile label instance. */ 143 QLabel *m_pProfileLabel; 144 /** Holds the profile combo-box instance. */ 145 QIComboBox *m_pProfileComboBox; 146 /** Holds the profile management tool-button instance. */ 147 QIToolButton *m_pProfileToolButton; 148 /** Holds the profile instance label instance. */ 149 QLabel *m_pProfileInstanceLabel; 150 /** Holds the profile instance list instance. */ 151 QListWidget *m_pProfileInstanceList; 152 152 }; 153 153 … … 190 190 void sltHandleSourceChange(); 191 191 192 /** Handles change in accountcombo-box. */193 void sltHandle AccountComboChange();194 195 /** Handles accounttool-button click. */196 void sltHandle AccountButtonClick();192 /** Handles change in profile combo-box. */ 193 void sltHandleProfileComboChange(); 194 195 /** Handles profile tool-button click. */ 196 void sltHandleProfileButtonClick(); 197 197 198 198 private: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp
r86343 r86346 115 115 pSubLayout->setSpacing(1); 116 116 117 /* Create accountcombo-box: */118 m_p AccountComboBox = new QIComboBox(pCloudContainer);119 if (m_p AccountComboBox)117 /* Create profile combo-box: */ 118 m_pProfileComboBox = new QIComboBox(pCloudContainer); 119 if (m_pProfileComboBox) 120 120 { 121 121 /* Add into layout: */ 122 pSubLayout->addWidget(m_p AccountComboBox);122 pSubLayout->addWidget(m_pProfileComboBox); 123 123 } 124 124 125 /* Create accounttool-button: */126 m_p AccountToolButton = new QIToolButton(pCloudContainer);127 if (m_p AccountToolButton)125 /* Create profile tool-button: */ 126 m_pProfileToolButton = new QIToolButton(pCloudContainer); 127 if (m_pProfileToolButton) 128 128 { 129 m_p AccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",129 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 130 130 ":/cloud_profile_manager_disabled_16px.png")); 131 131 132 132 /* Add into layout: */ 133 pSubLayout->addWidget(m_p AccountToolButton);133 pSubLayout->addWidget(m_pProfileToolButton); 134 134 } 135 135 … … 139 139 140 140 /* Create profile instances table: */ 141 m_p AccountInstanceList = new QListWidget(pCloudContainer);142 if (m_p AccountInstanceList)141 m_pProfileInstanceList = new QListWidget(pCloudContainer); 142 if (m_pProfileInstanceList) 143 143 { 144 const QFontMetrics fm(m_p AccountInstanceList->font());144 const QFontMetrics fm(m_pProfileInstanceList->font()); 145 145 const int iFontWidth = fm.width('x'); 146 146 const int iTotalWidth = 50 * iFontWidth; 147 147 const int iFontHeight = fm.height(); 148 148 const int iTotalHeight = 4 * iFontHeight; 149 m_p AccountInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));150 // m_p AccountInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);151 m_p AccountInstanceList->setAlternatingRowColors(true);149 m_pProfileInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight)); 150 // m_pProfileInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); 151 m_pProfileInstanceList->setAlternatingRowColors(true); 152 152 153 153 /* Add into layout: */ 154 m_pCloudContainerLayout->addWidget(m_p AccountInstanceList, 1, 0);154 m_pCloudContainerLayout->addWidget(m_pProfileInstanceList, 1, 0); 155 155 } 156 156 } … … 230 230 /* Populate sources: */ 231 231 populateSources(); 232 /* Populate accounts: */233 populate Accounts();234 /* Populate account: */235 populate Account();236 /* Populate accountinstances: */237 populate AccountInstances();232 /* Populate profiles: */ 233 populateProfiles(); 234 /* Populate profile: */ 235 populateProfile(); 236 /* Populate profile instances: */ 237 populateProfileInstances(); 238 238 /* Populate form properties: */ 239 239 populateFormProperties(); … … 248 248 connect(m_pFileSelector, &UIEmptyFilePathSelector::pathChanged, 249 249 this, &UIWizardImportAppPageExpert::sltFilePathChangeHandler); 250 connect(m_p AccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),251 this, &UIWizardImportAppPageExpert::sltHandle AccountComboChange);252 connect(m_p AccountToolButton, &QIToolButton::clicked,253 this, &UIWizardImportAppPageExpert::sltHandle AccountButtonClick);254 connect(m_p AccountInstanceList, &QListWidget::currentRowChanged,250 connect(m_pProfileComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged), 251 this, &UIWizardImportAppPageExpert::sltHandleProfileComboChange); 252 connect(m_pProfileToolButton, &QIToolButton::clicked, 253 this, &UIWizardImportAppPageExpert::sltHandleProfileButtonClick); 254 connect(m_pProfileInstanceList, &QListWidget::currentRowChanged, 255 255 this, &UIWizardImportAppPageExpert::sltHandleInstanceListChange); 256 256 … … 379 379 /* Update page appearance according to chosen storage-type: */ 380 380 if (isSourceCloudOne()) 381 m_p AccountInstanceList->setFocus();381 m_pProfileInstanceList->setFocus(); 382 382 else 383 383 m_pFileSelector->setFocus(); … … 391 391 /* Refresh required settings: */ 392 392 updatePageAppearance(); 393 populate Accounts();394 populate Account();395 populate AccountInstances();393 populateProfiles(); 394 populateProfile(); 395 populateProfileInstances(); 396 396 populateFormProperties(); 397 397 refreshFormPropertiesTable(); … … 412 412 } 413 413 414 void UIWizardImportAppPageExpert::sltHandle AccountComboChange()414 void UIWizardImportAppPageExpert::sltHandleProfileComboChange() 415 415 { 416 416 /* Refresh required settings: */ 417 populate Account();418 populate AccountInstances();417 populateProfile(); 418 populateProfileInstances(); 419 419 populateFormProperties(); 420 420 refreshFormPropertiesTable(); … … 422 422 } 423 423 424 void UIWizardImportAppPageExpert::sltHandle AccountButtonClick()424 void UIWizardImportAppPageExpert::sltHandleProfileButtonClick() 425 425 { 426 426 /* Open Cloud Profile Manager: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.h
r86343 r86346 77 77 void sltFilePathChangeHandler(); 78 78 79 /** Handles change in accountcombo-box. */80 void sltHandle AccountComboChange();81 /** Handles accounttool-button click. */82 void sltHandle AccountButtonClick();79 /** Handles change in profile combo-box. */ 80 void sltHandleProfileComboChange(); 81 /** Handles profile tool-button click. */ 82 void sltHandleProfileButtonClick(); 83 83 84 84 /** Handles change in instance list. */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageBasic1.cpp
r86345 r86346 48 48 , m_pLocationLabel(0) 49 49 , m_pLocationComboBox(0) 50 , m_p AccountLabel(0)51 , m_p AccountComboBox(0)52 , m_p AccountToolButton(0)50 , m_pProfileLabel(0) 51 , m_pProfileComboBox(0) 52 , m_pProfileToolButton(0) 53 53 , m_pSourceImageLabel(0) 54 54 , m_pSourceTabBar(0) … … 108 108 } 109 109 110 void UIWizardNewCloudVMPage1::populate Accounts()110 void UIWizardNewCloudVMPage1::populateProfiles() 111 111 { 112 112 /* Block signals while updating: */ 113 m_p AccountComboBox->blockSignals(true);113 m_pProfileComboBox->blockSignals(true); 114 114 115 115 /* Remember current item data to be able to restore it: */ 116 116 QString strOldData; 117 if (m_p AccountComboBox->currentIndex() != -1)118 strOldData = m_p AccountComboBox->itemData(m_pAccountComboBox->currentIndex(), AccountData_ProfileName).toString();117 if (m_pProfileComboBox->currentIndex() != -1) 118 strOldData = m_pProfileComboBox->itemData(m_pProfileComboBox->currentIndex(), ProfileData_Name).toString(); 119 119 else 120 120 { 121 /* Try to fetch "old" accountname from wizard full group name: */121 /* Try to fetch "old" profile name from wizard full group name: */ 122 122 UIWizardNewCloudVM *pWizard = qobject_cast<UIWizardNewCloudVM*>(wizardImp()); 123 123 AssertPtrReturnVoid(pWizard); … … 129 129 130 130 /* Clear combo initially: */ 131 m_p AccountComboBox->clear();131 m_pProfileComboBox->clear(); 132 132 /* Clear Cloud Provider: */ 133 133 m_comCloudProvider = CCloudProvider(); … … 163 163 164 164 /* Compose item, fill it's data: */ 165 m_p AccountComboBox->addItem(strProfileName);166 m_p AccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProfileName, AccountData_ProfileName);165 m_pProfileComboBox->addItem(strProfileName); 166 m_pProfileComboBox->setItemData(m_pProfileComboBox->count() - 1, strProfileName, ProfileData_Name); 167 167 } 168 168 … … 171 171 if ( iNewIndex == -1 172 172 && !strOldData.isNull()) 173 iNewIndex = m_p AccountComboBox->findData(strOldData, AccountData_ProfileName);173 iNewIndex = m_pProfileComboBox->findData(strOldData, ProfileData_Name); 174 174 if ( iNewIndex == -1 175 && m_p AccountComboBox->count() > 0)175 && m_pProfileComboBox->count() > 0) 176 176 iNewIndex = 0; 177 177 if (iNewIndex != -1) 178 m_p AccountComboBox->setCurrentIndex(iNewIndex);178 m_pProfileComboBox->setCurrentIndex(iNewIndex); 179 179 } 180 180 while (0); … … 182 182 183 183 /* Unblock signals after update: */ 184 m_p AccountComboBox->blockSignals(false);185 } 186 187 void UIWizardNewCloudVMPage1::populate Account()184 m_pProfileComboBox->blockSignals(false); 185 } 186 187 void UIWizardNewCloudVMPage1::populateProfile() 188 188 { 189 189 /* Clear Cloud Profile: */ … … 403 403 QString UIWizardNewCloudVMPage1::profileName() const 404 404 { 405 const int iIndex = m_p AccountComboBox->currentIndex();406 return m_p AccountComboBox->itemData(iIndex, AccountData_ProfileName).toString();405 const int iIndex = m_pProfileComboBox->currentIndex(); 406 return m_pProfileComboBox->itemData(iIndex, ProfileData_Name).toString(); 407 407 } 408 408 … … 513 513 m_pOptionsLayout->setRowStretch(3, 1); 514 514 515 /* Create accountlabel: */516 m_p AccountLabel = new QLabel(this);517 if (m_p AccountLabel)515 /* Create profile label: */ 516 m_pProfileLabel = new QLabel(this); 517 if (m_pProfileLabel) 518 518 { 519 519 /* Add into layout: */ 520 m_pOptionsLayout->addWidget(m_p AccountLabel, 0, 0, Qt::AlignRight);521 } 522 /* Create accountlayout: */523 QHBoxLayout *p AccountLayout = new QHBoxLayout;524 if (p AccountLayout)525 { 526 p AccountLayout->setContentsMargins(0, 0, 0, 0);527 p AccountLayout->setSpacing(1);528 529 /* Create accountcombo-box: */530 m_p AccountComboBox = new QIComboBox(this);531 if (m_p AccountComboBox)532 { 533 m_p AccountLabel->setBuddy(m_pAccountComboBox);520 m_pOptionsLayout->addWidget(m_pProfileLabel, 0, 0, Qt::AlignRight); 521 } 522 /* Create profile layout: */ 523 QHBoxLayout *pProfileLayout = new QHBoxLayout; 524 if (pProfileLayout) 525 { 526 pProfileLayout->setContentsMargins(0, 0, 0, 0); 527 pProfileLayout->setSpacing(1); 528 529 /* Create profile combo-box: */ 530 m_pProfileComboBox = new QIComboBox(this); 531 if (m_pProfileComboBox) 532 { 533 m_pProfileLabel->setBuddy(m_pProfileComboBox); 534 534 535 535 /* Add into layout: */ 536 p AccountLayout->addWidget(m_pAccountComboBox);537 } 538 /* Create accounttool-button: */539 m_p AccountToolButton = new QIToolButton(this);540 if (m_p AccountToolButton)541 { 542 m_p AccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",536 pProfileLayout->addWidget(m_pProfileComboBox); 537 } 538 /* Create profile tool-button: */ 539 m_pProfileToolButton = new QIToolButton(this); 540 if (m_pProfileToolButton) 541 { 542 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 543 543 ":/cloud_profile_manager_disabled_16px.png")); 544 544 545 545 /* Add into layout: */ 546 p AccountLayout->addWidget(m_pAccountToolButton);546 pProfileLayout->addWidget(m_pProfileToolButton); 547 547 } 548 548 549 549 /* Add into layout: */ 550 m_pOptionsLayout->addLayout(p AccountLayout, 0, 1);550 m_pOptionsLayout->addLayout(pProfileLayout, 0, 1); 551 551 } 552 552 … … 611 611 connect(m_pLocationComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated), 612 612 this, &UIWizardNewCloudVMPageBasic1::sltHandleLocationChange); 613 connect(m_p AccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),614 this, &UIWizardNewCloudVMPageBasic1::sltHandle AccountComboChange);615 connect(m_p AccountToolButton, &QIToolButton::clicked,616 this, &UIWizardNewCloudVMPageBasic1::sltHandle AccountButtonClick);613 connect(m_pProfileComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged), 614 this, &UIWizardNewCloudVMPageBasic1::sltHandleProfileComboChange); 615 connect(m_pProfileToolButton, &QIToolButton::clicked, 616 this, &UIWizardNewCloudVMPageBasic1::sltHandleProfileButtonClick); 617 617 connect(m_pSourceImageList, &QListWidget::currentRowChanged, 618 618 this, &UIWizardNewCloudVMPageBasic1::completeChanged); … … 643 643 644 644 /* Translate description label: */ 645 m_pLabelDescription->setText(UIWizardNewCloudVM::tr("<p>Please choose one of cloud service accounts you have registered to "645 m_pLabelDescription->setText(UIWizardNewCloudVM::tr("<p>Please choose one of cloud service profiles you have registered to " 646 646 "create virtual machine for. Existing images list will be " 647 647 "updated. To continue, select one of images to create virtual " … … 649 649 650 650 /* Translate cloud stuff: */ 651 m_p AccountLabel->setText(UIWizardNewCloudVM::tr("&Account:"));651 m_pProfileLabel->setText(UIWizardNewCloudVM::tr("&Profile:")); 652 652 m_pSourceImageLabel->setText(UIWizardNewCloudVM::tr("&Source:")); 653 653 … … 659 659 QList<QWidget*> labels; 660 660 labels << m_pLocationLabel; 661 labels << m_p AccountLabel;661 labels << m_pProfileLabel; 662 662 labels << m_pSourceImageLabel; 663 663 int iMaxWidth = 0; … … 724 724 725 725 /* Refresh required settings: */ 726 populate Accounts();727 populate Account();726 populateProfiles(); 727 populateProfile(); 728 728 populateSourceImages(); 729 729 emit completeChanged(); 730 730 } 731 731 732 void UIWizardNewCloudVMPageBasic1::sltHandle AccountComboChange()732 void UIWizardNewCloudVMPageBasic1::sltHandleProfileComboChange() 733 733 { 734 734 /* Refresh required settings: */ 735 populate Account();735 populateProfile(); 736 736 populateSourceImages(); 737 737 emit completeChanged(); 738 738 } 739 739 740 void UIWizardNewCloudVMPageBasic1::sltHandle AccountButtonClick()740 void UIWizardNewCloudVMPageBasic1::sltHandleProfileButtonClick() 741 741 { 742 742 /* Open Cloud Profile Manager: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageBasic1.h
r86343 r86346 52 52 }; 53 53 54 /** Accountcombo data fields. */54 /** Profile combo data fields. */ 55 55 enum 56 56 { 57 AccountData_ProfileName = Qt::UserRole + 157 ProfileData_Name = Qt::UserRole + 1 58 58 }; 59 59 … … 68 68 /** Populates locations. */ 69 69 void populateLocations(); 70 /** Populates accounts. */71 void populate Accounts();72 /** Populates account. */73 void populate Account();70 /** Populates profiles. */ 71 void populateProfiles(); 72 /** Populates profile. */ 73 void populateProfile(); 74 74 /** Populates source images. */ 75 75 void populateSourceImages(); … … 122 122 QIComboBox *m_pLocationComboBox; 123 123 124 /** Holds the accountlabel instance. */125 QLabel *m_p AccountLabel;126 /** Holds the accountcombo-box instance. */127 QIComboBox *m_p AccountComboBox;128 /** Holds the accountmanagement tool-button instance. */129 QIToolButton *m_p AccountToolButton;124 /** Holds the profile label instance. */ 125 QLabel *m_pProfileLabel; 126 /** Holds the profile combo-box instance. */ 127 QIComboBox *m_pProfileComboBox; 128 /** Holds the profile management tool-button instance. */ 129 QIToolButton *m_pProfileToolButton; 130 130 /** Holds the source image label instance. */ 131 131 QLabel *m_pSourceImageLabel; … … 170 170 void sltHandleLocationChange(); 171 171 172 /** Handles change in accountcombo-box. */173 void sltHandle AccountComboChange();172 /** Handles change in profile combo-box. */ 173 void sltHandleProfileComboChange(); 174 174 175 /** Handles accounttool-button click. */176 void sltHandle AccountButtonClick();175 /** Handles profile tool-button click. */ 176 void sltHandleProfileButtonClick(); 177 177 178 178 /** Handles change in source tab-bar. */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp
r86343 r86346 67 67 } 68 68 69 /* Create accountlayout: */70 QHBoxLayout *p AccountLayout = new QHBoxLayout;71 if (p AccountLayout)72 { 73 p AccountLayout->setContentsMargins(0, 0, 0, 0);74 p AccountLayout->setSpacing(1);75 76 /* Create accountcombo-box: */77 m_p AccountComboBox = new QIComboBox(m_pCntLocation);78 if (m_p AccountComboBox)69 /* Create profile layout: */ 70 QHBoxLayout *pProfileLayout = new QHBoxLayout; 71 if (pProfileLayout) 72 { 73 pProfileLayout->setContentsMargins(0, 0, 0, 0); 74 pProfileLayout->setSpacing(1); 75 76 /* Create profile combo-box: */ 77 m_pProfileComboBox = new QIComboBox(m_pCntLocation); 78 if (m_pProfileComboBox) 79 79 { 80 80 /* Add into layout: */ 81 p AccountLayout->addWidget(m_pAccountComboBox);81 pProfileLayout->addWidget(m_pProfileComboBox); 82 82 } 83 /* Create accounttool-button: */84 m_p AccountToolButton = new QIToolButton(m_pCntLocation);85 if (m_p AccountToolButton)83 /* Create profile tool-button: */ 84 m_pProfileToolButton = new QIToolButton(m_pCntLocation); 85 if (m_pProfileToolButton) 86 86 { 87 m_p AccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",87 m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png", 88 88 ":/cloud_profile_manager_disabled_16px.png")); 89 89 90 90 /* Add into layout: */ 91 p AccountLayout->addWidget(m_pAccountToolButton);91 pProfileLayout->addWidget(m_pProfileToolButton); 92 92 } 93 93 94 94 /* Add into layout: */ 95 pLocationLayout->addLayout(p AccountLayout);95 pLocationLayout->addLayout(pProfileLayout); 96 96 } 97 97 } … … 185 185 connect(m_pLocationComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated), 186 186 this, &UIWizardNewCloudVMPageExpert::sltHandleLocationChange); 187 connect(m_p AccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),188 this, &UIWizardNewCloudVMPageExpert::sltHandle AccountComboChange);189 connect(m_p AccountToolButton, &QIToolButton::clicked,190 this, &UIWizardNewCloudVMPageExpert::sltHandle AccountButtonClick);187 connect(m_pProfileComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged), 188 this, &UIWizardNewCloudVMPageExpert::sltHandleProfileComboChange); 189 connect(m_pProfileToolButton, &QIToolButton::clicked, 190 this, &UIWizardNewCloudVMPageExpert::sltHandleProfileButtonClick); 191 191 connect(m_pSourceImageList, &QListWidget::currentRowChanged, 192 192 this, &UIWizardNewCloudVMPageExpert::sltHandleInstanceListChange); … … 311 311 312 312 /* Refresh required settings: */ 313 populate Accounts();314 populate Account();313 populateProfiles(); 314 populateProfile(); 315 315 populateSourceImages(); 316 316 populateFormProperties(); … … 319 319 } 320 320 321 void UIWizardNewCloudVMPageExpert::sltHandle AccountComboChange()321 void UIWizardNewCloudVMPageExpert::sltHandleProfileComboChange() 322 322 { 323 323 /* Refresh required settings: */ 324 populate Account();324 populateProfile(); 325 325 populateSourceImages(); 326 326 populateFormProperties(); … … 329 329 } 330 330 331 void UIWizardNewCloudVMPageExpert::sltHandle AccountButtonClick()331 void UIWizardNewCloudVMPageExpert::sltHandleProfileButtonClick() 332 332 { 333 333 /* Open Cloud Profile Manager: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.h
r86343 r86346 65 65 void sltHandleLocationChange(); 66 66 67 /** Handles change in accountcombo-box. */68 void sltHandle AccountComboChange();69 /** Handles accounttool-button click. */70 void sltHandle AccountButtonClick();67 /** Handles change in profile combo-box. */ 68 void sltHandleProfileComboChange(); 69 /** Handles profile tool-button click. */ 70 void sltHandleProfileButtonClick(); 71 71 72 72 /** Handles change in source tab-bar. */
Note:
See TracChangeset
for help on using the changeset viewer.