VirtualBox

Changeset 86346 in vbox


Ignore:
Timestamp:
Sep 30, 2020 1:02:39 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: Wizards stuff: Lots of refactoring, rename account to profile for all the cloud related wizards such as export, import, create and add, since it's not a provider/profile pair anymore, they are split now.

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  
    4848    , m_pSourceComboBox(0)
    4949    , m_pCloudContainerLayout(0)
    50     , m_pAccountLabel(0)
    51     , m_pAccountComboBox(0)
    52     , m_pAccountToolButton(0)
    53     , m_pAccountInstanceLabel(0)
    54     , m_pAccountInstanceList(0)
     50    , m_pProfileLabel(0)
     51    , m_pProfileComboBox(0)
     52    , m_pProfileToolButton(0)
     53    , m_pProfileInstanceLabel(0)
     54    , m_pProfileInstanceList(0)
    5555{
    5656}
     
    107107}
    108108
    109 void UIWizardAddCloudVMPage1::populateAccounts()
     109void UIWizardAddCloudVMPage1::populateProfiles()
    110110{
    111111    /* Block signals while updating: */
    112     m_pAccountComboBox->blockSignals(true);
     112    m_pProfileComboBox->blockSignals(true);
    113113
    114114    /* Remember current item data to be able to restore it: */
    115115    QString strOldData;
    116     if (m_pAccountComboBox->currentIndex() != -1)
    117         strOldData = m_pAccountComboBox->itemData(m_pAccountComboBox->currentIndex(), AccountData_ProfileName).toString();
     116    if (m_pProfileComboBox->currentIndex() != -1)
     117        strOldData = m_pProfileComboBox->itemData(m_pProfileComboBox->currentIndex(), ProfileData_Name).toString();
    118118    else
    119119    {
    120         /* Try to fetch "old" account name from wizard full group name: */
     120        /* Try to fetch "old" profile name from wizard full group name: */
    121121        UIWizardAddCloudVM *pWizard = qobject_cast<UIWizardAddCloudVM*>(wizardImp());
    122122        AssertPtrReturnVoid(pWizard);
     
    128128
    129129    /* Clear combo initially: */
    130     m_pAccountComboBox->clear();
     130    m_pProfileComboBox->clear();
    131131    /* Clear Cloud Provider: */
    132132    m_comCloudProvider = CCloudProvider();
     
    162162
    163163                /* Compose item, fill it's data: */
    164                 m_pAccountComboBox->addItem(strProfileName);
    165                 m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProfileName, AccountData_ProfileName);
     164                m_pProfileComboBox->addItem(strProfileName);
     165                m_pProfileComboBox->setItemData(m_pProfileComboBox->count() - 1, strProfileName, ProfileData_Name);
    166166            }
    167167
     
    170170            if (   iNewIndex == -1
    171171                && !strOldData.isNull())
    172                 iNewIndex = m_pAccountComboBox->findData(strOldData, AccountData_ProfileName);
     172                iNewIndex = m_pProfileComboBox->findData(strOldData, ProfileData_Name);
    173173            if (   iNewIndex == -1
    174                 && m_pAccountComboBox->count() > 0)
     174                && m_pProfileComboBox->count() > 0)
    175175                iNewIndex = 0;
    176176            if (iNewIndex != -1)
    177                 m_pAccountComboBox->setCurrentIndex(iNewIndex);
     177                m_pProfileComboBox->setCurrentIndex(iNewIndex);
    178178        }
    179179        while (0);
     
    181181
    182182    /* Unblock signals after update: */
    183     m_pAccountComboBox->blockSignals(false);
    184 }
    185 
    186 void UIWizardAddCloudVMPage1::populateAccount()
     183    m_pProfileComboBox->blockSignals(false);
     184}
     185
     186void UIWizardAddCloudVMPage1::populateProfile()
    187187{
    188188    /* Clear Cloud Profile: */
     
    200200}
    201201
    202 void UIWizardAddCloudVMPage1::populateAccountInstances()
     202void UIWizardAddCloudVMPage1::populateProfileInstances()
    203203{
    204204    /* Block signals while updating: */
    205     m_pAccountInstanceList->blockSignals(true);
     205    m_pProfileInstanceList->blockSignals(true);
    206206
    207207    /* Clear list initially: */
    208     m_pAccountInstanceList->clear();
     208    m_pProfileInstanceList->clear();
    209209    /* Clear Cloud Client: */
    210210    setClient(CCloudClient());
     
    259259            {
    260260                /* Create list item: */
    261                 QListWidgetItem *pItem = new QListWidgetItem(names.at(i), m_pAccountInstanceList);
     261                QListWidgetItem *pItem = new QListWidgetItem(names.at(i), m_pProfileInstanceList);
    262262                if (pItem)
    263263                {
     
    268268
    269269            /* Choose the 1st one by default if possible: */
    270             if (m_pAccountInstanceList->count())
    271                 m_pAccountInstanceList->setCurrentRow(0);
     270            if (m_pProfileInstanceList->count())
     271                m_pProfileInstanceList->setCurrentRow(0);
    272272        }
    273273        while (0);
     
    275275
    276276    /* Unblock signals after update: */
    277     m_pAccountInstanceList->blockSignals(false);
     277    m_pProfileInstanceList->blockSignals(false);
    278278}
    279279
     
    310310QString UIWizardAddCloudVMPage1::profileName() const
    311311{
    312     const int iIndex = m_pAccountComboBox->currentIndex();
    313     return m_pAccountComboBox->itemData(iIndex, AccountData_ProfileName).toString();
     312    const int iIndex = m_pProfileComboBox->currentIndex();
     313    return m_pProfileComboBox->itemData(iIndex, ProfileData_Name).toString();
    314314}
    315315
     
    317317{
    318318    QStringList result;
    319     foreach (QListWidgetItem *pItem, m_pAccountInstanceList->selectedItems())
     319    foreach (QListWidgetItem *pItem, m_pProfileInstanceList->selectedItems())
    320320        result << pItem->data(Qt::UserRole).toString();
    321321    return result;
     
    399399            m_pCloudContainerLayout->setRowStretch(3, 1);
    400400
    401             /* Create account label: */
    402             m_pAccountLabel = new QLabel(this);
    403             if (m_pAccountLabel)
     401            /* Create profile label: */
     402            m_pProfileLabel = new QLabel(this);
     403            if (m_pProfileLabel)
    404404            {
    405405                /* Add into layout: */
    406                 m_pCloudContainerLayout->addWidget(m_pAccountLabel, 0, 0, Qt::AlignRight);
     406                m_pCloudContainerLayout->addWidget(m_pProfileLabel, 0, 0, Qt::AlignRight);
    407407            }
    408408            /* Create sub-layout: */
     
    413413                pSubLayout->setSpacing(1);
    414414
    415                 /* Create account combo-box: */
    416                 m_pAccountComboBox = new QIComboBox(this);
    417                 if (m_pAccountComboBox)
     415                /* Create profile combo-box: */
     416                m_pProfileComboBox = new QIComboBox(this);
     417                if (m_pProfileComboBox)
    418418                {
    419                     m_pAccountLabel->setBuddy(m_pAccountComboBox);
     419                    m_pProfileLabel->setBuddy(m_pProfileComboBox);
    420420
    421421                    /* Add into layout: */
    422                     pSubLayout->addWidget(m_pAccountComboBox);
     422                    pSubLayout->addWidget(m_pProfileComboBox);
    423423                }
    424                 /* Create account tool-button: */
    425                 m_pAccountToolButton = new QIToolButton(this);
    426                 if (m_pAccountToolButton)
     424                /* Create profile tool-button: */
     425                m_pProfileToolButton = new QIToolButton(this);
     426                if (m_pProfileToolButton)
    427427                {
    428                     m_pAccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
     428                    m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
    429429                                                                      ":/cloud_profile_manager_disabled_16px.png"));
    430430
    431431                    /* Add into layout: */
    432                     pSubLayout->addWidget(m_pAccountToolButton);
     432                    pSubLayout->addWidget(m_pProfileToolButton);
    433433                }
    434434
     
    437437            }
    438438
    439             /* Create account instance label: */
    440             m_pAccountInstanceLabel = new QLabel(this);
    441             if (m_pAccountInstanceLabel)
     439            /* Create profile instance label: */
     440            m_pProfileInstanceLabel = new QLabel(this);
     441            if (m_pProfileInstanceLabel)
    442442            {
    443443                /* Add into layout: */
    444                 m_pCloudContainerLayout->addWidget(m_pAccountInstanceLabel, 1, 0, Qt::AlignRight);
     444                m_pCloudContainerLayout->addWidget(m_pProfileInstanceLabel, 1, 0, Qt::AlignRight);
    445445            }
    446446            /* Create profile instances table: */
    447             m_pAccountInstanceList = new QListWidget(this);
    448             if (m_pAccountInstanceList)
    449             {
    450                 m_pAccountInstanceLabel->setBuddy(m_pAccountInstanceLabel);
    451                 const QFontMetrics fm(m_pAccountInstanceList->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());
    452452                const int iFontWidth = fm.width('x');
    453453                const int iTotalWidth = 50 * iFontWidth;
    454454                const int iFontHeight = fm.height();
    455455                const int iTotalHeight = 4 * iFontHeight;
    456                 m_pAccountInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));
    457                 //m_pAccountInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    458                 m_pAccountInstanceList->setAlternatingRowColors(true);
    459                 m_pAccountInstanceList->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);
    460460
    461461                /* Add into layout: */
    462                 m_pCloudContainerLayout->addWidget(m_pAccountInstanceList, 1, 1, 2, 1);
     462                m_pCloudContainerLayout->addWidget(m_pProfileInstanceList, 1, 1, 2, 1);
    463463            }
    464464
     
    474474    connect(m_pSourceComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated),
    475475            this, &UIWizardAddCloudVMPageBasic1::sltHandleSourceChange);
    476     connect(m_pAccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
    477             this, &UIWizardAddCloudVMPageBasic1::sltHandleAccountComboChange);
    478     connect(m_pAccountToolButton, &QIToolButton::clicked,
    479             this, &UIWizardAddCloudVMPageBasic1::sltHandleAccountButtonClick);
    480     connect(m_pAccountInstanceList, &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,
    481481            this, &UIWizardAddCloudVMPageBasic1::completeChanged);
    482482
     
    507507
    508508    /* 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 "
    510510                                                        "add virtual machine from.  Existing instance list will be "
    511511                                                        "updated.  To continue, select at least one instance to add virtual "
     
    513513
    514514    /* Translate cloud stuff: */
    515     m_pAccountLabel->setText(UIWizardAddCloudVM::tr("&Account:"));
    516     m_pAccountInstanceLabel->setText(UIWizardAddCloudVM::tr("&Instances:"));
     515    m_pProfileLabel->setText(UIWizardAddCloudVM::tr("&Profile:"));
     516    m_pProfileInstanceLabel->setText(UIWizardAddCloudVM::tr("&Instances:"));
    517517
    518518    /* Adjust label widths: */
    519519    QList<QWidget*> labels;
    520520    labels << m_pSourceLabel;
    521     labels << m_pAccountLabel;
    522     labels << m_pAccountInstanceLabel;
     521    labels << m_pProfileLabel;
     522    labels << m_pProfileInstanceLabel;
    523523    int iMaxWidth = 0;
    524524    foreach (QWidget *pLabel, labels)
     
    585585
    586586    /* Make instance list focused by default: */
    587     m_pAccountInstanceList->setFocus();
     587    m_pProfileInstanceList->setFocus();
    588588
    589589    /* Refresh required settings: */
    590     populateAccounts();
    591     populateAccount();
    592     populateAccountInstances();
     590    populateProfiles();
     591    populateProfile();
     592    populateProfileInstances();
    593593    emit completeChanged();
    594594}
    595595
    596 void UIWizardAddCloudVMPageBasic1::sltHandleAccountComboChange()
     596void UIWizardAddCloudVMPageBasic1::sltHandleProfileComboChange()
    597597{
    598598    /* Refresh required settings: */
    599     populateAccount();
    600     populateAccountInstances();
     599    populateProfile();
     600    populateProfileInstances();
    601601    emit completeChanged();
    602602}
    603603
    604 void UIWizardAddCloudVMPageBasic1::sltHandleAccountButtonClick()
     604void UIWizardAddCloudVMPageBasic1::sltHandleProfileButtonClick()
    605605{
    606606    /* Open Cloud Profile Manager: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageBasic1.h

    r86343 r86346  
    4949};
    5050
    51 /** Account combo data fields. */
     51/** Profile combo data fields. */
    5252enum
    5353{
    54     AccountData_ProfileName = Qt::UserRole + 1
     54    ProfileData_Name = Qt::UserRole + 1
    5555};
    5656
     
    6565    /** Populates sources. */
    6666    void populateSources();
    67     /** Populates accounts. */
    68     void populateAccounts();
    69     /** Populates account. */
    70     void populateAccount();
    71     /** Populates account instances. */
    72     void populateAccountInstances();
     67    /** Populates profiles. */
     68    void populateProfiles();
     69    /** Populates profile. */
     70    void populateProfile();
     71    /** Populates profile instances. */
     72    void populateProfileInstances();
    7373
    7474    /** Updates source combo tool-tips. */
     
    111111    /** Holds the cloud container layout instance. */
    112112    QGridLayout  *m_pCloudContainerLayout;
    113     /** Holds the account label instance. */
    114     QLabel       *m_pAccountLabel;
    115     /** Holds the account combo-box instance. */
    116     QIComboBox   *m_pAccountComboBox;
    117     /** Holds the account management tool-button instance. */
    118     QIToolButton *m_pAccountToolButton;
    119     /** Holds the account instance label instance. */
    120     QLabel       *m_pAccountInstanceLabel;
    121     /** Holds the account instance list instance. */
    122     QListWidget  *m_pAccountInstanceList;
     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;
    123123};
    124124
     
    158158    void sltHandleSourceChange();
    159159
    160     /** Handles change in account combo-box. */
    161     void sltHandleAccountComboChange();
     160    /** Handles change in profile combo-box. */
     161    void sltHandleProfileComboChange();
    162162
    163     /** Handles account tool-button click. */
    164     void sltHandleAccountButtonClick();
     163    /** Handles profile tool-button click. */
     164    void sltHandleProfileButtonClick();
    165165
    166166private:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.cpp

    r86343 r86346  
    7070                        pSubLayout->setSpacing(1);
    7171
    72                         /* Create account combo-box: */
    73                         m_pAccountComboBox = new QIComboBox(m_pCntSource);
    74                         if (m_pAccountComboBox)
     72                        /* Create profile combo-box: */
     73                        m_pProfileComboBox = new QIComboBox(m_pCntSource);
     74                        if (m_pProfileComboBox)
    7575                        {
    7676                            /* Add into layout: */
    77                             pSubLayout->addWidget(m_pAccountComboBox);
     77                            pSubLayout->addWidget(m_pProfileComboBox);
    7878                        }
    79                         /* Create account tool-button: */
    80                         m_pAccountToolButton = new QIToolButton(m_pCntSource);
    81                         if (m_pAccountToolButton)
     79                        /* Create profile tool-button: */
     80                        m_pProfileToolButton = new QIToolButton(m_pCntSource);
     81                        if (m_pProfileToolButton)
    8282                        {
    83                             m_pAccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
     83                            m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
    8484                                                                              ":/cloud_profile_manager_disabled_16px.png"));
    8585
    8686                            /* Add into layout: */
    87                             pSubLayout->addWidget(m_pAccountToolButton);
     87                            pSubLayout->addWidget(m_pProfileToolButton);
    8888                        }
    8989
     
    9393
    9494                    /* Create profile instances table: */
    95                     m_pAccountInstanceList = new QListWidget(m_pCntSource);
    96                     if (m_pAccountInstanceList)
     95                    m_pProfileInstanceList = new QListWidget(m_pCntSource);
     96                    if (m_pProfileInstanceList)
    9797                    {
    98                         const QFontMetrics fm(m_pAccountInstanceList->font());
     98                        const QFontMetrics fm(m_pProfileInstanceList->font());
    9999                        const int iFontWidth = fm.width('x');
    100100                        const int iTotalWidth = 50 * iFontWidth;
    101101                        const int iFontHeight = fm.height();
    102102                        const int iTotalHeight = 4 * iFontHeight;
    103                         m_pAccountInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));
    104                         //m_pAccountInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    105                         m_pAccountInstanceList->setAlternatingRowColors(true);
    106                         m_pAccountInstanceList->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);
    107107
    108108                        /* Add into layout: */
    109                         m_pCloudContainerLayout->addWidget(m_pAccountInstanceList, 1, 0);
     109                        m_pCloudContainerLayout->addWidget(m_pProfileInstanceList, 1, 0);
    110110                    }
    111111
     
    126126    connect(m_pSourceComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated),
    127127            this, &UIWizardAddCloudVMPageExpert::sltHandleSourceChange);
    128     connect(m_pAccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
    129             this, &UIWizardAddCloudVMPageExpert::sltHandleAccountComboChange);
    130     connect(m_pAccountToolButton, &QIToolButton::clicked,
    131             this, &UIWizardAddCloudVMPageExpert::sltHandleAccountButtonClick);
    132     connect(m_pAccountInstanceList, &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,
    133133            this, &UIWizardAddCloudVMPageExpert::completeChanged);
    134134
     
    210210
    211211    /* Make instance list focused by default: */
    212     m_pAccountInstanceList->setFocus();
     212    m_pProfileInstanceList->setFocus();
    213213
    214214    /* Refresh required settings: */
    215     populateAccounts();
    216     populateAccount();
    217     populateAccountInstances();
     215    populateProfiles();
     216    populateProfile();
     217    populateProfileInstances();
    218218    emit completeChanged();
    219219}
    220220
    221 void UIWizardAddCloudVMPageExpert::sltHandleAccountComboChange()
     221void UIWizardAddCloudVMPageExpert::sltHandleProfileComboChange()
    222222{
    223223    /* Refresh required settings: */
    224     populateAccount();
    225     populateAccountInstances();
     224    populateProfile();
     225    populateProfileInstances();
    226226    emit completeChanged();
    227227}
    228228
    229 void UIWizardAddCloudVMPageExpert::sltHandleAccountButtonClick()
     229void UIWizardAddCloudVMPageExpert::sltHandleProfileButtonClick()
    230230{
    231231    /* Open Cloud Profile Manager: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.h

    r86343 r86346  
    6464    void sltHandleSourceChange();
    6565
    66     /** Handles change in account combo-box. */
    67     void sltHandleAccountComboChange();
     66    /** Handles change in profile combo-box. */
     67    void sltHandleProfileComboChange();
    6868
    69     /** Handles account tool-button click. */
    70     void sltHandleAccountButtonClick();
     69    /** Handles profile tool-button click. */
     70    void sltHandleProfileButtonClick();
    7171
    7272private:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp

    r86343 r86346  
    6565    , m_pManifestCheckbox(0)
    6666    , m_pIncludeISOsCheckbox(0)
    67     , m_pAccountLabel(0)
    68     , m_pAccountComboBox(0)
    69     , m_pAccountToolButton(0)
     67    , m_pProfileLabel(0)
     68    , m_pProfileComboBox(0)
     69    , m_pProfileToolButton(0)
    7070{
    7171}
     
    163163}
    164164
    165 void UIWizardExportAppPage2::populateAccounts()
     165void UIWizardExportAppPage2::populateProfiles()
    166166{
    167167    /* Block signals while updating: */
    168     m_pAccountComboBox->blockSignals(true);
     168    m_pProfileComboBox->blockSignals(true);
    169169
    170170    /* Remember current item data to be able to restore it: */
    171171    QString strOldData;
    172     if (m_pAccountComboBox->currentIndex() != -1)
    173         strOldData = m_pAccountComboBox->itemData(m_pAccountComboBox->currentIndex(), AccountData_ProfileName).toString();
     172    if (m_pProfileComboBox->currentIndex() != -1)
     173        strOldData = m_pProfileComboBox->itemData(m_pProfileComboBox->currentIndex(), ProfileData_Name).toString();
    174174
    175175    /* Clear combo initially: */
    176     m_pAccountComboBox->clear();
     176    m_pProfileComboBox->clear();
    177177    /* Clear Cloud Provider: */
    178178    m_comCloudProvider = CCloudProvider();
     
    203203
    204204                    /* Compose item, fill it's data: */
    205                     m_pAccountComboBox->addItem(strProfileName);
    206                     m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProfileName, AccountData_ProfileName);
     205                    m_pProfileComboBox->addItem(strProfileName);
     206                    m_pProfileComboBox->setItemData(m_pProfileComboBox->count() - 1, strProfileName, ProfileData_Name);
    207207                }
    208208            }
     
    213213        if (   iNewIndex == -1
    214214            && !strOldData.isNull())
    215             iNewIndex = m_pAccountComboBox->findData(strOldData, AccountData_ProfileName);
     215            iNewIndex = m_pProfileComboBox->findData(strOldData, ProfileData_Name);
    216216        if (   iNewIndex == -1
    217             && m_pAccountComboBox->count() > 0)
     217            && m_pProfileComboBox->count() > 0)
    218218            iNewIndex = 0;
    219219        if (iNewIndex != -1)
    220             m_pAccountComboBox->setCurrentIndex(iNewIndex);
     220            m_pProfileComboBox->setCurrentIndex(iNewIndex);
    221221    }
    222222
    223223    /* Unblock signals after update: */
    224     m_pAccountComboBox->blockSignals(false);
    225 }
    226 
    227 void UIWizardExportAppPage2::populateAccount()
     224    m_pProfileComboBox->blockSignals(false);
     225}
     226
     227void UIWizardExportAppPage2::populateProfile()
    228228{
    229229    /* Clear Cloud Profile: */
     
    547547QString UIWizardExportAppPage2::profileName() const
    548548{
    549     const int iIndex = m_pAccountComboBox->currentIndex();
    550     return m_pAccountComboBox->itemData(iIndex, AccountData_ProfileName).toString();
     549    const int iIndex = m_pProfileComboBox->currentIndex();
     550    return m_pProfileComboBox->itemData(iIndex, ProfileData_Name).toString();
    551551}
    552552
     
    765765                    m_pSettingsLayout2->setColumnStretch(1, 1);
    766766
    767                     /* Create account label: */
    768                     m_pAccountLabel = new QLabel;
    769                     if (m_pAccountLabel)
    770                     {
    771                         m_pAccountLabel->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);
    772 
    773                         /* Add into layout: */
    774                         m_pSettingsLayout2->addWidget(m_pAccountLabel, 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);
    775775                    }
    776776                    /* Create sub-layout: */
     
    781781                        pSubLayout->setSpacing(1);
    782782
    783                         /* Create account combo-box: */
    784                         m_pAccountComboBox = new QComboBox;
    785                         if (m_pAccountComboBox)
     783                        /* Create profile combo-box: */
     784                        m_pProfileComboBox = new QComboBox;
     785                        if (m_pProfileComboBox)
    786786                        {
    787                             m_pAccountLabel->setBuddy(m_pAccountComboBox);
     787                            m_pProfileLabel->setBuddy(m_pProfileComboBox);
    788788
    789789                            /* Add into layout: */
    790                             pSubLayout->addWidget(m_pAccountComboBox);
     790                            pSubLayout->addWidget(m_pProfileComboBox);
    791791                        }
    792                         /* Create account tool-button: */
    793                         m_pAccountToolButton = new QIToolButton;
    794                         if (m_pAccountToolButton)
     792                        /* Create profile tool-button: */
     793                        m_pProfileToolButton = new QIToolButton;
     794                        if (m_pProfileToolButton)
    795795                        {
    796                             m_pAccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
     796                            m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
    797797                                                                              ":/cloud_profile_manager_disabled_16px.png"));
    798798
    799799                            /* Add into layout: */
    800                             pSubLayout->addWidget(m_pAccountToolButton);
     800                            pSubLayout->addWidget(m_pProfileToolButton);
    801801                        }
    802802
     
    805805                    }
    806806
    807                     /* Create account label: */
     807                    /* Create profile label: */
    808808                    m_pMachineLabel = new QLabel;
    809809                    if (m_pMachineLabel)
     
    850850    /* Populate MAC address policies: */
    851851    populateMACAddressPolicies();
    852     /* Populate accounts: */
    853     populateAccounts();
    854     /* Populate account: */
    855     populateAccount();
     852    /* Populate profiles: */
     853    populateProfiles();
     854    /* Populate profile: */
     855    populateProfile();
    856856
    857857    /* Setup connections: */
     
    865865    connect(m_pMACComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    866866            this, &UIWizardExportAppPageBasic2::sltHandleMACAddressExportPolicyComboChange);
    867     connect(m_pAccountComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    868             this, &UIWizardExportAppPageBasic2::sltHandleAccountComboChange);
    869     connect(m_pAccountToolButton, &QIToolButton::clicked,
    870             this, &UIWizardExportAppPageBasic2::sltHandleAccountButtonClick);
     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);
    871871
    872872    /* Register fields: */
     
    963963    m_pIncludeISOsCheckbox->setText(UIWizardExportApp::tr("&Include ISO image files"));
    964964
    965     /* Translate Account label: */
    966     m_pAccountLabel->setText(UIWizardExportApp::tr("&Account:"));
     965    /* Translate Profile label: */
     966    m_pProfileLabel->setText(UIWizardExportApp::tr("&Profile:"));
    967967
    968968    /* Translate option label: */
     
    978978    labels << m_pMACComboBoxLabel;
    979979    labels << m_pAdditionalLabel;
    980     labels << m_pAccountLabel;
     980    labels << m_pProfileLabel;
    981981    labels << m_pMachineLabel;
    982982    int iMaxWidth = 0;
     
    10611061    {
    10621062        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 "
    10641064                                     "machines to. It will be used to establish network connection required to upload your "
    10651065                                     "virtual machine files to a remote cloud facility.</p>"));
    1066         m_pAccountComboBox->setFocus();
     1066        m_pProfileComboBox->setFocus();
    10671067    }
    10681068    else
     
    10861086    refreshManifestCheckBoxAccess();
    10871087    refreshIncludeISOsCheckBoxAccess();
    1088     populateAccounts();
    1089     populateAccount();
     1088    populateProfiles();
     1089    populateProfile();
    10901090    emit completeChanged();
    10911091}
     
    11071107}
    11081108
    1109 void UIWizardExportAppPageBasic2::sltHandleAccountComboChange()
     1109void UIWizardExportAppPageBasic2::sltHandleProfileComboChange()
    11101110{
    11111111    /* Refresh required settings: */
    1112     populateAccount();
    1113 }
    1114 
    1115 void UIWizardExportAppPageBasic2::sltHandleAccountButtonClick()
     1112    populateProfile();
     1113}
     1114
     1115void UIWizardExportAppPageBasic2::sltHandleProfileButtonClick()
    11161116{
    11171117    /* Open Cloud Profile Manager: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.h

    r86343 r86346  
    7272};
    7373
    74 /** Account combo data fields. */
     74/** Profile combo data fields. */
    7575enum
    7676{
    77     AccountData_ProfileName = Qt::UserRole + 1
     77    ProfileData_Name = Qt::UserRole + 1
    7878};
    7979
     
    101101    /** Populates MAC address policies. */
    102102    void populateMACAddressPolicies();
    103     /** Populates accounts. */
    104     void populateAccounts();
    105     /** Populates account. */
    106     void populateAccount();
     103    /** Populates profiles. */
     104    void populateProfiles();
     105    /** Populates profile. */
     106    void populateProfile();
    107107    /** Populates form properties. */
    108108    void populateFormProperties();
     
    231231    QCheckBox *m_pIncludeISOsCheckbox;
    232232
    233     /** Holds the account label instance. */
    234     QLabel       *m_pAccountLabel;
    235     /** Holds the account combo-box instance. */
    236     QComboBox    *m_pAccountComboBox;
    237     /** Holds the account management tool-button instance. */
    238     QIToolButton *m_pAccountToolButton;
     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;
    239239
    240240    /** Holds the machine label instance. */
     
    306306    void sltHandleMACAddressExportPolicyComboChange();
    307307
    308     /** Handles change in account combo-box. */
    309     void sltHandleAccountComboChange();
    310 
    311     /** Handles account tool-button click. */
    312     void sltHandleAccountButtonClick();
     308    /** Handles change in profile combo-box. */
     309    void sltHandleProfileComboChange();
     310
     311    /** Handles profile tool-button click. */
     312    void sltHandleProfileButtonClick();
    313313
    314314private:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp

    r86343 r86346  
    312312                            m_pSettingsLayout2->setColumnStretch(1, 1);
    313313
    314                             /* Create account label: */
    315                             m_pAccountLabel = new QLabel;
    316                             if (m_pAccountLabel)
    317                             {
    318                                 m_pAccountLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    319 
    320                                 /* Add into layout: */
    321                                 m_pSettingsLayout2->addWidget(m_pAccountLabel, 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);
    322322                            }
    323323                            /* Create sub-layout: */
     
    328328                                pSubLayout->setSpacing(1);
    329329
    330                                 /* Create account combo-box: */
    331                                 m_pAccountComboBox = new QComboBox;
    332                                 if (m_pAccountComboBox)
     330                                /* Create profile combo-box: */
     331                                m_pProfileComboBox = new QComboBox;
     332                                if (m_pProfileComboBox)
    333333                                {
    334                                     m_pAccountLabel->setBuddy(m_pAccountComboBox);
     334                                    m_pProfileLabel->setBuddy(m_pProfileComboBox);
    335335
    336336                                    /* Add into layout: */
    337                                     pSubLayout->addWidget(m_pAccountComboBox);
     337                                    pSubLayout->addWidget(m_pProfileComboBox);
    338338                                }
    339                                 /* Create account tool-button: */
    340                                 m_pAccountToolButton = new QIToolButton;
    341                                 if (m_pAccountToolButton)
     339                                /* Create profile tool-button: */
     340                                m_pProfileToolButton = new QIToolButton;
     341                                if (m_pProfileToolButton)
    342342                                {
    343                                     m_pAccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
     343                                    m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
    344344                                                                                      ":/cloud_profile_manager_disabled_16px.png"));
    345345
    346346                                    /* Add into layout: */
    347                                     pSubLayout->addWidget(m_pAccountToolButton);
     347                                    pSubLayout->addWidget(m_pProfileToolButton);
    348348                                }
    349349
     
    352352                            }
    353353
    354                             /* Create account label: */
     354                            /* Create profile label: */
    355355                            m_pMachineLabel = new QLabel;
    356356                            if (m_pMachineLabel)
     
    416416    connect(m_pMACComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    417417            this, &UIWizardExportAppPageExpert::sltHandleMACAddressExportPolicyComboChange);
    418     connect(m_pAccountComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    419             this, &UIWizardExportAppPageExpert::sltHandleAccountComboChange);
    420     connect(m_pAccountToolButton, &QIToolButton::clicked,
    421             this, &UIWizardExportAppPageExpert::sltHandleAccountButtonClick);
     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);
    422422
    423423    /* Register classes: */
     
    512512    m_pIncludeISOsCheckbox->setText(UIWizardExportApp::tr("&Include ISO image files"));
    513513
    514     /* Translate Account label: */
    515     m_pAccountLabel->setText(UIWizardExportApp::tr("&Account:"));
     514    /* Translate Profile label: */
     515    m_pProfileLabel->setText(UIWizardExportApp::tr("&Profile:"));
    516516
    517517    /* Translate option label: */
     
    527527    labels << m_pMACComboBoxLabel;
    528528    labels << m_pAdditionalLabel;
    529     labels << m_pAccountLabel;
     529    labels << m_pProfileLabel;
    530530    labels << m_pMachineLabel;
    531531    int iMaxWidth = 0;
     
    662662    refreshManifestCheckBoxAccess();
    663663    refreshIncludeISOsCheckBoxAccess();
    664     populateAccounts();
    665     populateAccount();
     664    populateProfiles();
     665    populateProfile();
    666666    populateFormProperties();
    667667
     
    693693}
    694694
    695 void UIWizardExportAppPageExpert::sltHandleAccountComboChange()
     695void UIWizardExportAppPageExpert::sltHandleProfileComboChange()
    696696{
    697697    /* Refresh required settings: */
    698     populateAccount();
     698    populateProfile();
    699699    populateFormProperties();
    700700
     
    710710}
    711711
    712 void UIWizardExportAppPageExpert::sltHandleAccountButtonClick()
     712void UIWizardExportAppPageExpert::sltHandleProfileButtonClick()
    713713{
    714714    /* Open Cloud Profile Manager: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h

    r86343 r86346  
    9696    void sltHandleMACAddressExportPolicyComboChange();
    9797
    98     /** Handles change in account combo-box. */
    99     void sltHandleAccountComboChange();
     98    /** Handles change in profile combo-box. */
     99    void sltHandleProfileComboChange();
    100100
    101     /** Handles account tool-button click. */
    102     void sltHandleAccountButtonClick();
     101    /** Handles profile tool-button click. */
     102    void sltHandleProfileButtonClick();
    103103
    104104private:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp

    r86343 r86346  
    5656    , m_pFileSelector(0)
    5757    , m_pCloudContainerLayout(0)
    58     , m_pAccountLabel(0)
    59     , m_pAccountComboBox(0)
    60     , m_pAccountToolButton(0)
    61     , m_pAccountInstanceLabel(0)
    62     , m_pAccountInstanceList(0)
     58    , m_pProfileLabel(0)
     59    , m_pProfileComboBox(0)
     60    , m_pProfileToolButton(0)
     61    , m_pProfileInstanceLabel(0)
     62    , m_pProfileInstanceList(0)
    6363{
    6464}
     
    129129}
    130130
    131 void UIWizardImportAppPage1::populateAccounts()
     131void UIWizardImportAppPage1::populateProfiles()
    132132{
    133133    /* Block signals while updating: */
    134     m_pAccountComboBox->blockSignals(true);
     134    m_pProfileComboBox->blockSignals(true);
    135135
    136136    /* Remember current item data to be able to restore it: */
    137137    QString strOldData;
    138     if (m_pAccountComboBox->currentIndex() != -1)
    139         strOldData = m_pAccountComboBox->itemData(m_pAccountComboBox->currentIndex(), AccountData_ProfileName).toString();
     138    if (m_pProfileComboBox->currentIndex() != -1)
     139        strOldData = m_pProfileComboBox->itemData(m_pProfileComboBox->currentIndex(), ProfileData_Name).toString();
    140140
    141141    /* Clear combo initially: */
    142     m_pAccountComboBox->clear();
     142    m_pProfileComboBox->clear();
    143143    /* Clear Cloud Provider: */
    144144    m_comCloudProvider = CCloudProvider();
     
    174174
    175175                /* Compose item, fill it's data: */
    176                 m_pAccountComboBox->addItem(strProfileName);
    177                 m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProfileName, AccountData_ProfileName);
     176                m_pProfileComboBox->addItem(strProfileName);
     177                m_pProfileComboBox->setItemData(m_pProfileComboBox->count() - 1, strProfileName, ProfileData_Name);
    178178            }
    179179
     
    182182            if (   iNewIndex == -1
    183183                && !strOldData.isNull())
    184                 iNewIndex = m_pAccountComboBox->findData(strOldData, AccountData_ProfileName);
     184                iNewIndex = m_pProfileComboBox->findData(strOldData, ProfileData_Name);
    185185            if (   iNewIndex == -1
    186                 && m_pAccountComboBox->count() > 0)
     186                && m_pProfileComboBox->count() > 0)
    187187                iNewIndex = 0;
    188188            if (iNewIndex != -1)
    189                 m_pAccountComboBox->setCurrentIndex(iNewIndex);
     189                m_pProfileComboBox->setCurrentIndex(iNewIndex);
    190190        }
    191191        while (0);
     
    193193
    194194    /* Unblock signals after update: */
    195     m_pAccountComboBox->blockSignals(false);
    196 }
    197 
    198 void UIWizardImportAppPage1::populateAccount()
     195    m_pProfileComboBox->blockSignals(false);
     196}
     197
     198void UIWizardImportAppPage1::populateProfile()
    199199{
    200200    /* Clear Cloud Profile: */
     
    212212}
    213213
    214 void UIWizardImportAppPage1::populateAccountInstances()
     214void UIWizardImportAppPage1::populateProfileInstances()
    215215{
    216216    /* Block signals while updating: */
    217     m_pAccountInstanceList->blockSignals(true);
     217    m_pProfileInstanceList->blockSignals(true);
    218218
    219219    /* Clear list initially: */
    220     m_pAccountInstanceList->clear();
     220    m_pProfileInstanceList->clear();
    221221    /* Clear Cloud Client: */
    222222    m_comCloudClient = CCloudClient();
     
    267267            {
    268268                /* Create list item: */
    269                 QListWidgetItem *pItem = new QListWidgetItem(names.at(i), m_pAccountInstanceList);
     269                QListWidgetItem *pItem = new QListWidgetItem(names.at(i), m_pProfileInstanceList);
    270270                if (pItem)
    271271                {
     
    276276
    277277            /* Choose the 1st one by default if possible: */
    278             if (m_pAccountInstanceList->count())
    279                 m_pAccountInstanceList->setCurrentRow(0);
     278            if (m_pProfileInstanceList->count())
     279                m_pProfileInstanceList->setCurrentRow(0);
    280280        }
    281281        while (0);
     
    283283
    284284    /* Unblock signals after update: */
    285     m_pAccountInstanceList->blockSignals(false);
     285    m_pProfileInstanceList->blockSignals(false);
    286286}
    287287
     
    407407QString UIWizardImportAppPage1::profileName() const
    408408{
    409     const int iIndex = m_pAccountComboBox->currentIndex();
    410     return m_pAccountComboBox->itemData(iIndex, AccountData_ProfileName).toString();
     409    const int iIndex = m_pProfileComboBox->currentIndex();
     410    return m_pProfileComboBox->itemData(iIndex, ProfileData_Name).toString();
    411411}
    412412
    413413QString UIWizardImportAppPage1::machineId() const
    414414{
    415     QListWidgetItem *pItem = m_pAccountInstanceList->currentItem();
     415    QListWidgetItem *pItem = m_pProfileInstanceList->currentItem();
    416416    return pItem ? pItem->data(Qt::UserRole).toString() : QString();
    417417}
     
    548548                    m_pCloudContainerLayout->setRowStretch(3, 1);
    549549
    550                     /* Create account label: */
    551                     m_pAccountLabel = new QLabel;
    552                     if (m_pAccountLabel)
     550                    /* Create profile label: */
     551                    m_pProfileLabel = new QLabel;
     552                    if (m_pProfileLabel)
    553553                    {
    554554                        /* Add into layout: */
    555                         m_pCloudContainerLayout->addWidget(m_pAccountLabel, 0, 0, Qt::AlignRight);
     555                        m_pCloudContainerLayout->addWidget(m_pProfileLabel, 0, 0, Qt::AlignRight);
    556556                    }
    557557
     
    563563                        pSubLayout->setSpacing(1);
    564564
    565                         /* Create account combo-box: */
    566                         m_pAccountComboBox = new QIComboBox;
    567                         if (m_pAccountComboBox)
     565                        /* Create profile combo-box: */
     566                        m_pProfileComboBox = new QIComboBox;
     567                        if (m_pProfileComboBox)
    568568                        {
    569                             m_pAccountLabel->setBuddy(m_pAccountComboBox);
     569                            m_pProfileLabel->setBuddy(m_pProfileComboBox);
    570570
    571571                            /* Add into layout: */
    572                             pSubLayout->addWidget(m_pAccountComboBox);
     572                            pSubLayout->addWidget(m_pProfileComboBox);
    573573                        }
    574574
    575                         /* Create account tool-button: */
    576                         m_pAccountToolButton = new QIToolButton;
    577                         if (m_pAccountToolButton)
     575                        /* Create profile tool-button: */
     576                        m_pProfileToolButton = new QIToolButton;
     577                        if (m_pProfileToolButton)
    578578                        {
    579                             m_pAccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
     579                            m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
    580580                                                                              ":/cloud_profile_manager_disabled_16px.png"));
    581581
    582582                            /* Add into layout: */
    583                             pSubLayout->addWidget(m_pAccountToolButton);
     583                            pSubLayout->addWidget(m_pProfileToolButton);
    584584                        }
    585585
     
    588588                    }
    589589
    590                     /* Create account instance label: */
    591                     m_pAccountInstanceLabel = new QLabel;
    592                     if (m_pAccountInstanceLabel)
     590                    /* Create profile instance label: */
     591                    m_pProfileInstanceLabel = new QLabel;
     592                    if (m_pProfileInstanceLabel)
    593593                    {
    594594                        /* Add into layout: */
    595                         m_pCloudContainerLayout->addWidget(m_pAccountInstanceLabel, 1, 0, Qt::AlignRight);
     595                        m_pCloudContainerLayout->addWidget(m_pProfileInstanceLabel, 1, 0, Qt::AlignRight);
    596596                    }
    597597
    598598                    /* Create profile instances table: */
    599                     m_pAccountInstanceList = new QListWidget;
    600                     if (m_pAccountInstanceList)
     599                    m_pProfileInstanceList = new QListWidget;
     600                    if (m_pProfileInstanceList)
    601601                    {
    602                         m_pAccountInstanceLabel->setBuddy(m_pAccountInstanceLabel);
    603                         const QFontMetrics fm(m_pAccountInstanceList->font());
     602                        m_pProfileInstanceLabel->setBuddy(m_pProfileInstanceLabel);
     603                        const QFontMetrics fm(m_pProfileInstanceList->font());
    604604                        const int iFontWidth = fm.width('x');
    605605                        const int iTotalWidth = 50 * iFontWidth;
    606606                        const int iFontHeight = fm.height();
    607607                        const int iTotalHeight = 4 * iFontHeight;
    608                         m_pAccountInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));
    609 //                        m_pAccountInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    610                         m_pAccountInstanceList->setAlternatingRowColors(true);
     608                        m_pProfileInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));
     609//                        m_pProfileInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
     610                        m_pProfileInstanceList->setAlternatingRowColors(true);
    611611
    612612                        /* Add into layout: */
    613                         m_pCloudContainerLayout->addWidget(m_pAccountInstanceList, 1, 1, 2, 1);
     613                        m_pCloudContainerLayout->addWidget(m_pProfileInstanceList, 1, 1, 2, 1);
    614614                    }
    615615                }
     
    629629    /* Populate sources: */
    630630    populateSources();
    631     /* Populate accounts: */
    632     populateAccounts();
    633     /* Populate account: */
    634     populateAccount();
    635     /* Populate account instances: */
    636     populateAccountInstances();
     631    /* Populate profiles: */
     632    populateProfiles();
     633    /* Populate profile: */
     634    populateProfile();
     635    /* Populate profile instances: */
     636    populateProfileInstances();
    637637
    638638    /* Setup connections: */
     
    644644    connect(m_pFileSelector, &UIEmptyFilePathSelector::pathChanged,
    645645            this, &UIWizardImportAppPageBasic1::completeChanged);
    646     connect(m_pAccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
    647             this, &UIWizardImportAppPageBasic1::sltHandleAccountComboChange);
    648     connect(m_pAccountToolButton, &QIToolButton::clicked,
    649             this, &UIWizardImportAppPageBasic1::sltHandleAccountButtonClick);
    650     connect(m_pAccountInstanceList, &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,
    651651            this, &UIWizardImportAppPageBasic1::completeChanged);
    652652
     
    691691
    692692    /* Translate cloud stuff: */
    693     m_pAccountLabel->setText(UIWizardImportApp::tr("&Account:"));
    694     m_pAccountInstanceLabel->setText(UIWizardImportApp::tr("&Machines:"));
     693    m_pProfileLabel->setText(UIWizardImportApp::tr("&Profile:"));
     694    m_pProfileInstanceLabel->setText(UIWizardImportApp::tr("&Machines:"));
    695695
    696696    /* Adjust label widths: */
     
    698698    labels << m_pFileLabel;
    699699    labels << m_pSourceLabel;
    700     labels << m_pAccountLabel;
    701     labels << m_pAccountInstanceLabel;
     700    labels << m_pProfileLabel;
     701    labels << m_pProfileInstanceLabel;
    702702    int iMaxWidth = 0;
    703703    foreach (QWidget *pLabel, labels)
     
    781781    {
    782782        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 "
    784784                                        "machine from.  Corresponding machines list will be updated.  To continue, "
    785785                                        "select one of machines to import below.</p>"));
    786         m_pAccountInstanceList->setFocus();
     786        m_pProfileInstanceList->setFocus();
    787787    }
    788788    else
     
    803803    /* Refresh required settings: */
    804804    updatePageAppearance();
    805     populateAccounts();
    806     populateAccount();
    807     populateAccountInstances();
     805    populateProfiles();
     806    populateProfile();
     807    populateProfileInstances();
    808808    emit completeChanged();
    809809}
    810810
    811 void UIWizardImportAppPageBasic1::sltHandleAccountComboChange()
     811void UIWizardImportAppPageBasic1::sltHandleProfileComboChange()
    812812{
    813813    /* Refresh required settings: */
    814     populateAccount();
    815     populateAccountInstances();
     814    populateProfile();
     815    populateProfileInstances();
    816816    emit completeChanged();
    817817}
    818818
    819 void UIWizardImportAppPageBasic1::sltHandleAccountButtonClick()
     819void UIWizardImportAppPageBasic1::sltHandleProfileButtonClick()
    820820{
    821821    /* Open Cloud Profile Manager: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h

    r86343 r86346  
    5454};
    5555
    56 /** Account combo data fields. */
     56/** Profile combo data fields. */
    5757enum
    5858{
    59     AccountData_ProfileName = Qt::UserRole + 1
     59    ProfileData_Name = Qt::UserRole + 1
    6060};
    6161
     
    7070    /** Populates sources. */
    7171    void populateSources();
    72     /** Populates accounts. */
    73     void populateAccounts();
    74     /** Populates account. */
    75     void populateAccount();
    76     /** Populates account instances. */
    77     void populateAccountInstances();
     72    /** Populates profiles. */
     73    void populateProfiles();
     74    /** Populates profile. */
     75    void populateProfile();
     76    /** Populates profile instances. */
     77    void populateProfileInstances();
    7878    /** Populates form properties. */
    7979    void populateFormProperties();
     
    140140    /** Holds the cloud container layout instance. */
    141141    QGridLayout  *m_pCloudContainerLayout;
    142     /** Holds the account label instance. */
    143     QLabel       *m_pAccountLabel;
    144     /** Holds the account combo-box instance. */
    145     QIComboBox   *m_pAccountComboBox;
    146     /** Holds the account management tool-button instance. */
    147     QIToolButton *m_pAccountToolButton;
    148     /** Holds the account instance label instance. */
    149     QLabel       *m_pAccountInstanceLabel;
    150     /** Holds the account instance list instance. */
    151     QListWidget  *m_pAccountInstanceList;
     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;
    152152};
    153153
     
    190190    void sltHandleSourceChange();
    191191
    192     /** Handles change in account combo-box. */
    193     void sltHandleAccountComboChange();
    194 
    195     /** Handles account tool-button click. */
    196     void sltHandleAccountButtonClick();
     192    /** Handles change in profile combo-box. */
     193    void sltHandleProfileComboChange();
     194
     195    /** Handles profile tool-button click. */
     196    void sltHandleProfileButtonClick();
    197197
    198198private:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp

    r86343 r86346  
    115115                                pSubLayout->setSpacing(1);
    116116
    117                                 /* Create account combo-box: */
    118                                 m_pAccountComboBox = new QIComboBox(pCloudContainer);
    119                                 if (m_pAccountComboBox)
     117                                /* Create profile combo-box: */
     118                                m_pProfileComboBox = new QIComboBox(pCloudContainer);
     119                                if (m_pProfileComboBox)
    120120                                {
    121121                                    /* Add into layout: */
    122                                     pSubLayout->addWidget(m_pAccountComboBox);
     122                                    pSubLayout->addWidget(m_pProfileComboBox);
    123123                                }
    124124
    125                                 /* Create account tool-button: */
    126                                 m_pAccountToolButton = new QIToolButton(pCloudContainer);
    127                                 if (m_pAccountToolButton)
     125                                /* Create profile tool-button: */
     126                                m_pProfileToolButton = new QIToolButton(pCloudContainer);
     127                                if (m_pProfileToolButton)
    128128                                {
    129                                     m_pAccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
     129                                    m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
    130130                                                                                      ":/cloud_profile_manager_disabled_16px.png"));
    131131
    132132                                    /* Add into layout: */
    133                                     pSubLayout->addWidget(m_pAccountToolButton);
     133                                    pSubLayout->addWidget(m_pProfileToolButton);
    134134                                }
    135135
     
    139139
    140140                            /* Create profile instances table: */
    141                             m_pAccountInstanceList = new QListWidget(pCloudContainer);
    142                             if (m_pAccountInstanceList)
     141                            m_pProfileInstanceList = new QListWidget(pCloudContainer);
     142                            if (m_pProfileInstanceList)
    143143                            {
    144                                 const QFontMetrics fm(m_pAccountInstanceList->font());
     144                                const QFontMetrics fm(m_pProfileInstanceList->font());
    145145                                const int iFontWidth = fm.width('x');
    146146                                const int iTotalWidth = 50 * iFontWidth;
    147147                                const int iFontHeight = fm.height();
    148148                                const int iTotalHeight = 4 * iFontHeight;
    149                                 m_pAccountInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));
    150 //                                m_pAccountInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    151                                 m_pAccountInstanceList->setAlternatingRowColors(true);
     149                                m_pProfileInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));
     150//                                m_pProfileInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
     151                                m_pProfileInstanceList->setAlternatingRowColors(true);
    152152
    153153                                /* Add into layout: */
    154                                 m_pCloudContainerLayout->addWidget(m_pAccountInstanceList, 1, 0);
     154                                m_pCloudContainerLayout->addWidget(m_pProfileInstanceList, 1, 0);
    155155                            }
    156156                        }
     
    230230    /* Populate sources: */
    231231    populateSources();
    232     /* Populate accounts: */
    233     populateAccounts();
    234     /* Populate account: */
    235     populateAccount();
    236     /* Populate account instances: */
    237     populateAccountInstances();
     232    /* Populate profiles: */
     233    populateProfiles();
     234    /* Populate profile: */
     235    populateProfile();
     236    /* Populate profile instances: */
     237    populateProfileInstances();
    238238    /* Populate form properties: */
    239239    populateFormProperties();
     
    248248    connect(m_pFileSelector, &UIEmptyFilePathSelector::pathChanged,
    249249            this, &UIWizardImportAppPageExpert::sltFilePathChangeHandler);
    250     connect(m_pAccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
    251             this, &UIWizardImportAppPageExpert::sltHandleAccountComboChange);
    252     connect(m_pAccountToolButton, &QIToolButton::clicked,
    253             this, &UIWizardImportAppPageExpert::sltHandleAccountButtonClick);
    254     connect(m_pAccountInstanceList, &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,
    255255            this, &UIWizardImportAppPageExpert::sltHandleInstanceListChange);
    256256
     
    379379    /* Update page appearance according to chosen storage-type: */
    380380    if (isSourceCloudOne())
    381         m_pAccountInstanceList->setFocus();
     381        m_pProfileInstanceList->setFocus();
    382382    else
    383383        m_pFileSelector->setFocus();
     
    391391    /* Refresh required settings: */
    392392    updatePageAppearance();
    393     populateAccounts();
    394     populateAccount();
    395     populateAccountInstances();
     393    populateProfiles();
     394    populateProfile();
     395    populateProfileInstances();
    396396    populateFormProperties();
    397397    refreshFormPropertiesTable();
     
    412412}
    413413
    414 void UIWizardImportAppPageExpert::sltHandleAccountComboChange()
     414void UIWizardImportAppPageExpert::sltHandleProfileComboChange()
    415415{
    416416    /* Refresh required settings: */
    417     populateAccount();
    418     populateAccountInstances();
     417    populateProfile();
     418    populateProfileInstances();
    419419    populateFormProperties();
    420420    refreshFormPropertiesTable();
     
    422422}
    423423
    424 void UIWizardImportAppPageExpert::sltHandleAccountButtonClick()
     424void UIWizardImportAppPageExpert::sltHandleProfileButtonClick()
    425425{
    426426    /* Open Cloud Profile Manager: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.h

    r86343 r86346  
    7777    void sltFilePathChangeHandler();
    7878
    79     /** Handles change in account combo-box. */
    80     void sltHandleAccountComboChange();
    81     /** Handles account tool-button click. */
    82     void sltHandleAccountButtonClick();
     79    /** Handles change in profile combo-box. */
     80    void sltHandleProfileComboChange();
     81    /** Handles profile tool-button click. */
     82    void sltHandleProfileButtonClick();
    8383
    8484    /** Handles change in instance list. */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageBasic1.cpp

    r86345 r86346  
    4848    , m_pLocationLabel(0)
    4949    , m_pLocationComboBox(0)
    50     , m_pAccountLabel(0)
    51     , m_pAccountComboBox(0)
    52     , m_pAccountToolButton(0)
     50    , m_pProfileLabel(0)
     51    , m_pProfileComboBox(0)
     52    , m_pProfileToolButton(0)
    5353    , m_pSourceImageLabel(0)
    5454    , m_pSourceTabBar(0)
     
    108108}
    109109
    110 void UIWizardNewCloudVMPage1::populateAccounts()
     110void UIWizardNewCloudVMPage1::populateProfiles()
    111111{
    112112    /* Block signals while updating: */
    113     m_pAccountComboBox->blockSignals(true);
     113    m_pProfileComboBox->blockSignals(true);
    114114
    115115    /* Remember current item data to be able to restore it: */
    116116    QString strOldData;
    117     if (m_pAccountComboBox->currentIndex() != -1)
    118         strOldData = m_pAccountComboBox->itemData(m_pAccountComboBox->currentIndex(), AccountData_ProfileName).toString();
     117    if (m_pProfileComboBox->currentIndex() != -1)
     118        strOldData = m_pProfileComboBox->itemData(m_pProfileComboBox->currentIndex(), ProfileData_Name).toString();
    119119    else
    120120    {
    121         /* Try to fetch "old" account name from wizard full group name: */
     121        /* Try to fetch "old" profile name from wizard full group name: */
    122122        UIWizardNewCloudVM *pWizard = qobject_cast<UIWizardNewCloudVM*>(wizardImp());
    123123        AssertPtrReturnVoid(pWizard);
     
    129129
    130130    /* Clear combo initially: */
    131     m_pAccountComboBox->clear();
     131    m_pProfileComboBox->clear();
    132132    /* Clear Cloud Provider: */
    133133    m_comCloudProvider = CCloudProvider();
     
    163163
    164164                /* Compose item, fill it's data: */
    165                 m_pAccountComboBox->addItem(strProfileName);
    166                 m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProfileName, AccountData_ProfileName);
     165                m_pProfileComboBox->addItem(strProfileName);
     166                m_pProfileComboBox->setItemData(m_pProfileComboBox->count() - 1, strProfileName, ProfileData_Name);
    167167            }
    168168
     
    171171            if (   iNewIndex == -1
    172172                && !strOldData.isNull())
    173                 iNewIndex = m_pAccountComboBox->findData(strOldData, AccountData_ProfileName);
     173                iNewIndex = m_pProfileComboBox->findData(strOldData, ProfileData_Name);
    174174            if (   iNewIndex == -1
    175                 && m_pAccountComboBox->count() > 0)
     175                && m_pProfileComboBox->count() > 0)
    176176                iNewIndex = 0;
    177177            if (iNewIndex != -1)
    178                 m_pAccountComboBox->setCurrentIndex(iNewIndex);
     178                m_pProfileComboBox->setCurrentIndex(iNewIndex);
    179179        }
    180180        while (0);
     
    182182
    183183    /* Unblock signals after update: */
    184     m_pAccountComboBox->blockSignals(false);
    185 }
    186 
    187 void UIWizardNewCloudVMPage1::populateAccount()
     184    m_pProfileComboBox->blockSignals(false);
     185}
     186
     187void UIWizardNewCloudVMPage1::populateProfile()
    188188{
    189189    /* Clear Cloud Profile: */
     
    403403QString UIWizardNewCloudVMPage1::profileName() const
    404404{
    405     const int iIndex = m_pAccountComboBox->currentIndex();
    406     return m_pAccountComboBox->itemData(iIndex, AccountData_ProfileName).toString();
     405    const int iIndex = m_pProfileComboBox->currentIndex();
     406    return m_pProfileComboBox->itemData(iIndex, ProfileData_Name).toString();
    407407}
    408408
     
    513513            m_pOptionsLayout->setRowStretch(3, 1);
    514514
    515             /* Create account label: */
    516             m_pAccountLabel = new QLabel(this);
    517             if (m_pAccountLabel)
     515            /* Create profile label: */
     516            m_pProfileLabel = new QLabel(this);
     517            if (m_pProfileLabel)
    518518            {
    519519                /* Add into layout: */
    520                 m_pOptionsLayout->addWidget(m_pAccountLabel, 0, 0, Qt::AlignRight);
    521             }
    522             /* Create account layout: */
    523             QHBoxLayout *pAccountLayout = new QHBoxLayout;
    524             if (pAccountLayout)
    525             {
    526                 pAccountLayout->setContentsMargins(0, 0, 0, 0);
    527                 pAccountLayout->setSpacing(1);
    528 
    529                 /* Create account combo-box: */
    530                 m_pAccountComboBox = new QIComboBox(this);
    531                 if (m_pAccountComboBox)
    532                 {
    533                     m_pAccountLabel->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);
    534534
    535535                    /* Add into layout: */
    536                     pAccountLayout->addWidget(m_pAccountComboBox);
    537                 }
    538                 /* Create account tool-button: */
    539                 m_pAccountToolButton = new QIToolButton(this);
    540                 if (m_pAccountToolButton)
    541                 {
    542                     m_pAccountToolButton->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",
    543543                                                                      ":/cloud_profile_manager_disabled_16px.png"));
    544544
    545545                    /* Add into layout: */
    546                     pAccountLayout->addWidget(m_pAccountToolButton);
     546                    pProfileLayout->addWidget(m_pProfileToolButton);
    547547                }
    548548
    549549                /* Add into layout: */
    550                 m_pOptionsLayout->addLayout(pAccountLayout, 0, 1);
     550                m_pOptionsLayout->addLayout(pProfileLayout, 0, 1);
    551551            }
    552552
     
    611611    connect(m_pLocationComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated),
    612612            this, &UIWizardNewCloudVMPageBasic1::sltHandleLocationChange);
    613     connect(m_pAccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
    614             this, &UIWizardNewCloudVMPageBasic1::sltHandleAccountComboChange);
    615     connect(m_pAccountToolButton, &QIToolButton::clicked,
    616             this, &UIWizardNewCloudVMPageBasic1::sltHandleAccountButtonClick);
     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);
    617617    connect(m_pSourceImageList, &QListWidget::currentRowChanged,
    618618            this, &UIWizardNewCloudVMPageBasic1::completeChanged);
     
    643643
    644644    /* 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 "
    646646                                                        "create virtual machine for.  Existing images list will be "
    647647                                                        "updated.  To continue, select one of images to create virtual "
     
    649649
    650650    /* Translate cloud stuff: */
    651     m_pAccountLabel->setText(UIWizardNewCloudVM::tr("&Account:"));
     651    m_pProfileLabel->setText(UIWizardNewCloudVM::tr("&Profile:"));
    652652    m_pSourceImageLabel->setText(UIWizardNewCloudVM::tr("&Source:"));
    653653
     
    659659    QList<QWidget*> labels;
    660660    labels << m_pLocationLabel;
    661     labels << m_pAccountLabel;
     661    labels << m_pProfileLabel;
    662662    labels << m_pSourceImageLabel;
    663663    int iMaxWidth = 0;
     
    724724
    725725    /* Refresh required settings: */
    726     populateAccounts();
    727     populateAccount();
     726    populateProfiles();
     727    populateProfile();
    728728    populateSourceImages();
    729729    emit completeChanged();
    730730}
    731731
    732 void UIWizardNewCloudVMPageBasic1::sltHandleAccountComboChange()
     732void UIWizardNewCloudVMPageBasic1::sltHandleProfileComboChange()
    733733{
    734734    /* Refresh required settings: */
    735     populateAccount();
     735    populateProfile();
    736736    populateSourceImages();
    737737    emit completeChanged();
    738738}
    739739
    740 void UIWizardNewCloudVMPageBasic1::sltHandleAccountButtonClick()
     740void UIWizardNewCloudVMPageBasic1::sltHandleProfileButtonClick()
    741741{
    742742    /* Open Cloud Profile Manager: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageBasic1.h

    r86343 r86346  
    5252};
    5353
    54 /** Account combo data fields. */
     54/** Profile combo data fields. */
    5555enum
    5656{
    57     AccountData_ProfileName = Qt::UserRole + 1
     57    ProfileData_Name = Qt::UserRole + 1
    5858};
    5959
     
    6868    /** Populates locations. */
    6969    void populateLocations();
    70     /** Populates accounts. */
    71     void populateAccounts();
    72     /** Populates account. */
    73     void populateAccount();
     70    /** Populates profiles. */
     71    void populateProfiles();
     72    /** Populates profile. */
     73    void populateProfile();
    7474    /** Populates source images. */
    7575    void populateSourceImages();
     
    122122    QIComboBox  *m_pLocationComboBox;
    123123
    124     /** Holds the account label instance. */
    125     QLabel       *m_pAccountLabel;
    126     /** Holds the account combo-box instance. */
    127     QIComboBox   *m_pAccountComboBox;
    128     /** Holds the account management tool-button instance. */
    129     QIToolButton *m_pAccountToolButton;
     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;
    130130    /** Holds the source image label instance. */
    131131    QLabel       *m_pSourceImageLabel;
     
    170170    void sltHandleLocationChange();
    171171
    172     /** Handles change in account combo-box. */
    173     void sltHandleAccountComboChange();
     172    /** Handles change in profile combo-box. */
     173    void sltHandleProfileComboChange();
    174174
    175     /** Handles account tool-button click. */
    176     void sltHandleAccountButtonClick();
     175    /** Handles profile tool-button click. */
     176    void sltHandleProfileButtonClick();
    177177
    178178    /** Handles change in source tab-bar. */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp

    r86343 r86346  
    6767                }
    6868
    69                 /* Create account layout: */
    70                 QHBoxLayout *pAccountLayout = new QHBoxLayout;
    71                 if (pAccountLayout)
    72                 {
    73                     pAccountLayout->setContentsMargins(0, 0, 0, 0);
    74                     pAccountLayout->setSpacing(1);
    75 
    76                     /* Create account combo-box: */
    77                     m_pAccountComboBox = new QIComboBox(m_pCntLocation);
    78                     if (m_pAccountComboBox)
     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)
    7979                    {
    8080                        /* Add into layout: */
    81                         pAccountLayout->addWidget(m_pAccountComboBox);
     81                        pProfileLayout->addWidget(m_pProfileComboBox);
    8282                    }
    83                     /* Create account tool-button: */
    84                     m_pAccountToolButton = new QIToolButton(m_pCntLocation);
    85                     if (m_pAccountToolButton)
     83                    /* Create profile tool-button: */
     84                    m_pProfileToolButton = new QIToolButton(m_pCntLocation);
     85                    if (m_pProfileToolButton)
    8686                    {
    87                         m_pAccountToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
     87                        m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
    8888                                                                          ":/cloud_profile_manager_disabled_16px.png"));
    8989
    9090                        /* Add into layout: */
    91                         pAccountLayout->addWidget(m_pAccountToolButton);
     91                        pProfileLayout->addWidget(m_pProfileToolButton);
    9292                    }
    9393
    9494                    /* Add into layout: */
    95                     pLocationLayout->addLayout(pAccountLayout);
     95                    pLocationLayout->addLayout(pProfileLayout);
    9696                }
    9797            }
     
    185185    connect(m_pLocationComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated),
    186186            this, &UIWizardNewCloudVMPageExpert::sltHandleLocationChange);
    187     connect(m_pAccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
    188             this, &UIWizardNewCloudVMPageExpert::sltHandleAccountComboChange);
    189     connect(m_pAccountToolButton, &QIToolButton::clicked,
    190             this, &UIWizardNewCloudVMPageExpert::sltHandleAccountButtonClick);
     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);
    191191    connect(m_pSourceImageList, &QListWidget::currentRowChanged,
    192192            this, &UIWizardNewCloudVMPageExpert::sltHandleInstanceListChange);
     
    311311
    312312    /* Refresh required settings: */
    313     populateAccounts();
    314     populateAccount();
     313    populateProfiles();
     314    populateProfile();
    315315    populateSourceImages();
    316316    populateFormProperties();
     
    319319}
    320320
    321 void UIWizardNewCloudVMPageExpert::sltHandleAccountComboChange()
     321void UIWizardNewCloudVMPageExpert::sltHandleProfileComboChange()
    322322{
    323323    /* Refresh required settings: */
    324     populateAccount();
     324    populateProfile();
    325325    populateSourceImages();
    326326    populateFormProperties();
     
    329329}
    330330
    331 void UIWizardNewCloudVMPageExpert::sltHandleAccountButtonClick()
     331void UIWizardNewCloudVMPageExpert::sltHandleProfileButtonClick()
    332332{
    333333    /* Open Cloud Profile Manager: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.h

    r86343 r86346  
    6565    void sltHandleLocationChange();
    6666
    67     /** Handles change in account combo-box. */
    68     void sltHandleAccountComboChange();
    69     /** Handles account tool-button click. */
    70     void sltHandleAccountButtonClick();
     67    /** Handles change in profile combo-box. */
     68    void sltHandleProfileComboChange();
     69    /** Handles profile tool-button click. */
     70    void sltHandleProfileButtonClick();
    7171
    7272    /** Handles change in source tab-bar. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette