VirtualBox

Changeset 83653 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 9, 2020 4:38:03 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137119
Message:

FE/Qt: bugref:9653: Implementing Add Cloud VM wizard.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
8 deleted
5 edited
7 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r83350 r83653  
    318318        ./src/widgets/graphics \
    319319        ./src/wizards \
     320        ./src/wizards/addcloudvm \
    320321        ./src/wizards/newcloudvm \
    321322        ./src/wizards/newvm \
     
    683684        src/widgets/graphics/UIGraphicsToolBar.h \
    684685        src/widgets/graphics/UIGraphicsTextPane.h \
     686        src/wizards/addcloudvm/UIWizardAddCloudVM.h \
     687        src/wizards/addcloudvm/UIWizardAddCloudVMPageBasic1.h \
     688        src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.h \
    685689        src/wizards/newcloudvm/UIWizardNewCloudVM.h \
    686690        src/wizards/newcloudvm/UIWizardNewCloudVMPageBasic1.h \
     
    11311135        src/widgets/graphics/UIGraphicsToolBar.cpp \
    11321136        src/widgets/graphics/UIGraphicsTextPane.cpp \
     1137        src/wizards/addcloudvm/UIWizardAddCloudVM.cpp \
     1138        src/wizards/addcloudvm/UIWizardAddCloudVMPageBasic1.cpp \
     1139        src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.cpp \
    11331140        src/wizards/newcloudvm/UIWizardNewCloudVM.cpp \
    11341141        src/wizards/newcloudvm/UIWizardNewCloudVMPageBasic1.cpp \
     
    19471954                widgets/graphics \
    19481955                wizards \
     1956                wizards/addcloudvm \
    19491957                wizards/clonevd \
    19501958                wizards/clonevm \
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp

    r83494 r83653  
    19941994        case WizardType_ImportAppliance: strResult = "ImportAppliance"; break;
    19951995        case WizardType_NewCloudVM:      strResult = "NewCloudVM"; break;
     1996        case WizardType_AddCloudVM:      strResult = "AddCloudVM"; break;
    19961997        case WizardType_FirstRun:        strResult = "FirstRun"; break;
    19971998        case WizardType_NewVD:           strResult = "NewVD"; break;
     
    20172018    keys << "ImportAppliance"; values << WizardType_ImportAppliance;
    20182019    keys << "NewCloudVM";      values << WizardType_NewCloudVM;
     2020    keys << "AddCloudVM";      values << WizardType_AddCloudVM;
    20192021    keys << "FirstRun";        values << WizardType_FirstRun;
    20202022    keys << "NewVD";           values << WizardType_NewVD;
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r83494 r83653  
    862862    WizardType_ImportAppliance,
    863863    WizardType_NewCloudVM,
     864    WizardType_AddCloudVM,
    864865    WizardType_FirstRun,
    865866    WizardType_NewVD,
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r83330 r83653  
    4646#include "UIVirtualBoxManagerWidget.h"
    4747#include "UIVirtualMachineItemCloud.h"
    48 #include "UIWizardNewCloudVM.h"
     48#include "UIWizardAddCloudVM.h"
    4949#include "UIWizardNewVM.h"
    5050
     
    920920        /* Use the "safe way" to open stack of Mac OS X Sheets: */
    921921        QWidget *pWizardParent = windowManager().realParentWindow(chooser()->managerWidget());
    922         UISafePointerWizardNewCloudVM pWizard = new UIWizardNewCloudVM(pWizardParent);
     922        UISafePointerWizardAddCloudVM pWizard = new UIWizardAddCloudVM(pWizardParent);
    923923        windowManager().registerNewParent(pWizard, pWizardParent);
    924924        pWizard->prepare();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.cpp

    r82968 r83653  
    418418            break;
    419419        case WizardType_NewCloudVM:
     420        case WizardType_AddCloudVM:
    420421            dRatio += 0.7;
    421422            break;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVM.cpp

    r83646 r83653  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - UIWizardNewCloudVM class implementation.
     3 * VBox Qt GUI - UIWizardAddCloudVM class implementation.
    44 */
    55
     
    1616 */
    1717
    18 /* Qt includes: */
    19 #include <QAbstractButton>
    20 
    2118/* GUI includes: */
    2219#include "UIMessageCenter.h"
    23 #include "UIWizardNewCloudVM.h"
    24 #include "UIWizardNewCloudVMPageBasic1.h"
    25 #include "UIWizardNewCloudVMPageBasic2.h"
    26 #include "UIWizardNewCloudVMPageExpert.h"
     20#include "UIWizardAddCloudVM.h"
     21#include "UIWizardAddCloudVMPageBasic1.h"
     22#include "UIWizardAddCloudVMPageExpert.h"
    2723
    2824/* COM includes: */
     
    3026
    3127
    32 UIWizardNewCloudVM::UIWizardNewCloudVM(QWidget *pParent,
     28UIWizardAddCloudVM::UIWizardAddCloudVM(QWidget *pParent,
    3329                                       const CCloudClient &comClient /* = CCloudClient() */,
    34                                        const CVirtualSystemDescription &comDescription /* = CVirtualSystemDescription() */,
    3530                                       WizardMode enmMode /* = WizardMode_Auto */)
    36     : UIWizard(pParent, WizardType_NewCloudVM, enmMode)
     31    : UIWizard(pParent, WizardType_AddCloudVM, enmMode)
    3732    , m_comClient(comClient)
    38     , m_comVSD(comDescription)
    39     , m_fFullWizard(m_comClient.isNull() || m_comVSD.isNull())
    40     , m_fFinalStepPrevented(false)
    4133{
    4234#ifndef VBOX_WS_MAC
     
    4941}
    5042
    51 void UIWizardNewCloudVM::prepare()
     43void UIWizardAddCloudVM::prepare()
    5244{
    5345    /* Create corresponding pages: */
     
    5648        case WizardMode_Basic:
    5749        {
    58             if (m_fFullWizard)
    59                 setPage(Page1, new UIWizardNewCloudVMPageBasic1);
    60             setPage(Page2, new UIWizardNewCloudVMPageBasic2(m_fFullWizard));
     50            setPage(Page1, new UIWizardAddCloudVMPageBasic1);
    6151            break;
    6252        }
    6353        case WizardMode_Expert:
    6454        {
    65             setPage(PageExpert, new UIWizardNewCloudVMPageExpert(m_fFullWizard));
     55            setPage(PageExpert, new UIWizardAddCloudVMPageExpert);
    6656            break;
    6757        }
     
    7666}
    7767
    78 bool UIWizardNewCloudVM::createVSDForm()
     68bool UIWizardAddCloudVM::addCloudVMs()
    7969{
    80     /* Prepare result: */
    81     bool fResult = false;
     70    /* Acquire prepared client and description: */
     71    CCloudClient comClient = client();
     72    AssertReturn(comClient.isNotNull(), false);
    8273
    83     /* Main API request sequence, can be interrupted after any step: */
    84     do
     74    /* For each cloud instance name we have: */
     75    foreach (const QString &strInstanceName, field("instanceIds").toStringList())
    8576    {
    86         /* Acquire prepared client and description: */
    87         CCloudClient comClient = client();
    88         CVirtualSystemDescription comDescription = vsd();
    89         AssertReturn(comClient.isNotNull() && comDescription.isNotNull(), false);
    90 
    91         /* Read Cloud Client description form: */
    92         CVirtualSystemDescriptionForm comForm;
    93         CProgress comProgress = comClient.GetLaunchDescriptionForm(comDescription, comForm);
    94         if (!comClient.isOk())
    95         {
    96             msgCenter().cannotAcquireCloudClientParameter(comClient);
    97             break;
    98         }
    99 
    100         /* Show "Acquire launch form" progress: */
    101         msgCenter().showModalProgressDialog(comProgress, tr("Acquire launch form ..."),
    102                                             ":/progress_refresh_90px.png", this, 0);
    103         if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
    104         {
    105             msgCenter().cannotAcquireCloudClientParameter(comProgress);
    106             break;
    107         }
    108 
    109         /* Remember Virtual System Description Form: */
    110         setVSDForm(comForm);
    111 
    112         /* Finally, success: */
    113         fResult = true;
    114     }
    115     while (0);
    116 
    117     /* Return result: */
    118     return fResult;
    119 }
    120 
    121 bool UIWizardNewCloudVM::createCloudVM()
    122 {
    123     /* Prepare result: */
    124     bool fResult = false;
    125 
    126     /* Main API request sequence, can be interrupted after any step: */
    127     do
    128     {
    129         /* Do nothing if prevented: */
    130         if (m_fFinalStepPrevented)
    131         {
    132             fResult = true;
    133             break;
    134         }
    135 
    136         /* Acquire prepared client and description: */
    137         CCloudClient comClient = client();
    138         CVirtualSystemDescription comDescription = vsd();
    139         AssertReturn(comClient.isNotNull() && comDescription.isNotNull(), false);
    140 
    141         /* Initiate cloud VM creation procedure: */
    142         CProgress comProgress = comClient.LaunchVM(comDescription);
     77        /* Initiate cloud VM add procedure: */
     78        CProgress comProgress = comClient.AddCloudMachine(strInstanceName);
    14379        if (!comClient.isOk())
    14480        {
    14581            msgCenter().cannotCreateCloudMachine(comClient, this);
    146             break;
     82            return false;
    14783        }
    14884
    149         /* Show "Create Cloud Machine" progress: */
    150         msgCenter().showModalProgressDialog(comProgress, tr("Create Cloud Machine ..."),
     85        /* Show "Add cloud machine" progress: */
     86        msgCenter().showModalProgressDialog(comProgress, tr("Add cloud machine ..."),
    15187                                            ":/progress_new_cloud_vm_90px.png", this, 0);
    15288        if (comProgress.GetCanceled())
    153             break;
     89            return false;
    15490        if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
    15591        {
    15692            msgCenter().cannotCreateCloudMachine(comProgress, this);
    157             break;
     93            return false;
    15894        }
     95    }
    15996
    160         /* Finally, success: */
    161         fResult = true;
    162     }
    163     while (0);
    164 
    165     /* Return result: */
    166     return fResult;
     97    /* Success by default: */
     98    return true;
    16799}
    168100
    169 void UIWizardNewCloudVM::scheduleAutoFinish()
    170 {
    171     QMetaObject::invokeMethod(this, "sltTriggerFinishButton", Qt::QueuedConnection);
    172 }
    173 
    174 void UIWizardNewCloudVM::retranslateUi()
     101void UIWizardAddCloudVM::retranslateUi()
    175102{
    176103    /* Call to base-class: */
     
    178105
    179106    /* Translate wizard: */
    180     setWindowTitle(tr("Create Cloud Virtual Machine"));
    181     setButtonText(QWizard::FinishButton, tr("Create"));
     107    setWindowTitle(tr("Add Cloud Virtual Machine"));
     108    setButtonText(QWizard::FinishButton, tr("Add"));
    182109}
    183 
    184 void UIWizardNewCloudVM::sltTriggerFinishButton()
    185 {
    186     button(QWizard::FinishButton)->click();
    187 }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVM.h

    r83646 r83653  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - UIWizardNewCloudVM class declaration.
     3 * VBox Qt GUI - UIWizardAddCloudVM class declaration.
    44 */
    55
     
    1616 */
    1717
    18 #ifndef FEQT_INCLUDED_SRC_wizards_newcloudvm_UIWizardNewCloudVM_h
    19 #define FEQT_INCLUDED_SRC_wizards_newcloudvm_UIWizardNewCloudVM_h
     18#ifndef FEQT_INCLUDED_SRC_wizards_addcloudvm_UIWizardAddCloudVM_h
     19#define FEQT_INCLUDED_SRC_wizards_addcloudvm_UIWizardAddCloudVM_h
    2020#ifndef RT_WITHOUT_PRAGMA_ONCE
    2121# pragma once
     
    2828#include "COMEnums.h"
    2929#include "CCloudClient.h"
    30 #include "CVirtualSystemDescription.h"
    31 #include "CVirtualSystemDescriptionForm.h"
    3230
    33 /** New Cloud VM wizard. */
    34 class UIWizardNewCloudVM : public UIWizard
     31/** Add Cloud VM wizard. */
     32class UIWizardAddCloudVM : public UIWizard
    3533{
    3634    Q_OBJECT;
     
    4139    enum
    4240    {
    43         Page1,
    44         Page2
     41        Page1
    4542    };
    4643
     
    5148    };
    5249
    53     /** Constructs New Cloud VM wizard passing @a pParent to the base-class.
    54       * @param  comClient       Brings the Cloud Client object to work with.
    55       * @param  comDescription  Brings the Virtual System Description object to use. */
    56     UIWizardNewCloudVM(QWidget *pParent,
     50    /** Constructs Add Cloud VM wizard passing @a pParent & @a enmMode to the base-class.
     51      * @param  comClient  Brings the Cloud Client object wrapper to work with. */
     52    UIWizardAddCloudVM(QWidget *pParent,
    5753                       const CCloudClient &comClient = CCloudClient(),
    58                        const CVirtualSystemDescription &comDescription = CVirtualSystemDescription(),
    5954                       WizardMode enmMode = WizardMode_Auto);
    6055
    6156    /** Prepares all. */
    6257    virtual void prepare() /* override */;
    63 
    64     /** Sets whether the final step is @a fPrevented. */
    65     void setFinalStepPrevented(bool fPrevented) { m_fFinalStepPrevented = fPrevented; }
    6658
    6759    /** Defines Cloud @a comClient object. */
     
    7062    CCloudClient client() const { return m_comClient; }
    7163
    72     /** Defines Virtual System @a comDescription object. */
    73     void setVSD(const CVirtualSystemDescription &comDescription) { m_comVSD = comDescription; }
    74     /** Returns Virtual System Description object. */
    75     CVirtualSystemDescription vsd() const { return m_comVSD; }
    76 
    77     /** Defines Virtual System Description @a comForm object. */
    78     void setVSDForm(const CVirtualSystemDescriptionForm &comForm) { m_comVSDForm = comForm; }
    79     /** Returns Virtual System Description Form object. */
    80     CVirtualSystemDescriptionForm vsdForm() const { return m_comVSDForm; }
    81 
    82     /** Creates VSD Form. */
    83     bool createVSDForm();
    84 
    85     /** Creates New Cloud VM. */
    86     bool createCloudVM();
    87 
    88     /** Schedules Finish button trigger for
    89       * the next event-loop cicle. */
    90     void scheduleAutoFinish();
     64    /** Adds cloud VMs. */
     65    bool addCloudVMs();
    9166
    9267protected:
     
    9570    virtual void retranslateUi() /* override */;
    9671
    97 private slots:
    98 
    99     /** Triggers Finish button. */
    100     void sltTriggerFinishButton();
    101 
    10272private:
    10373
    104     /** Holds the Cloud Client object reference. */
    105     CCloudClient                   m_comClient;
    106     /** Holds the Virtual System Description object reference. */
    107     CVirtualSystemDescription      m_comVSD;
    108     /** Holds the Virtual System Description Form object reference. */
    109     CVirtualSystemDescriptionForm  m_comVSDForm;
    110 
    111     /** Holds whether we want full wizard form or short one. */
    112     bool  m_fFullWizard;
    113     /** Holds whether the final step is prevented. */
    114     bool  m_fFinalStepPrevented;
     74    /** Holds the Cloud Client object wrapper. */
     75    CCloudClient  m_comClient;
    11576};
    11677
    117 /** Safe pointer to new cloud vm wizard. */
    118 typedef QPointer<UIWizardNewCloudVM> UISafePointerWizardNewCloudVM;
     78/** Safe pointer to add cloud vm wizard. */
     79typedef QPointer<UIWizardAddCloudVM> UISafePointerWizardAddCloudVM;
    11980
    120 #endif /* !FEQT_INCLUDED_SRC_wizards_newcloudvm_UIWizardNewCloudVM_h */
     81#endif /* !FEQT_INCLUDED_SRC_wizards_addcloudvm_UIWizardAddCloudVM_h */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageBasic1.cpp

    r83646 r83653  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - UIWizardNewCloudVMPageBasic1 class implementation.
     3 * VBox Qt GUI - UIWizardAddCloudVMPageBasic1 class implementation.
    44 */
    55
     
    3131#include "UIMessageCenter.h"
    3232#include "UIVirtualBoxManager.h"
    33 #include "UIWizardNewCloudVM.h"
    34 #include "UIWizardNewCloudVMPageBasic1.h"
     33#include "UIWizardAddCloudVM.h"
     34#include "UIWizardAddCloudVMPageBasic1.h"
    3535
    3636/* COM includes: */
    37 #include "CAppliance.h"
    3837#include "CStringArray.h"
    3938
    4039
    4140/*********************************************************************************************************************************
    42 *   Class UIWizardNewCloudVMPage1 implementation.                                                                                *
     41*   Class UIWizardAddCloudVMPage1 implementation.                                                                                *
    4342*********************************************************************************************************************************/
    4443
    45 UIWizardNewCloudVMPage1::UIWizardNewCloudVMPage1()
     44UIWizardAddCloudVMPage1::UIWizardAddCloudVMPage1()
    4645    : m_fPolished(false)
    47     , m_pDestinationLayout(0)
    48     , m_pDestinationLabel(0)
    49     , m_pDestinationComboBox(0)
     46    , m_pSourceLayout(0)
     47    , m_pSourceLabel(0)
     48    , m_pSourceComboBox(0)
    5049    , m_pCloudContainerLayout(0)
    5150    , m_pAccountLabel(0)
     
    5352    , m_pAccountToolButton(0)
    5453    , m_pAccountPropertyTable(0)
    55     , m_pAccountImageLabel(0)
    56     , m_pAccountImageList(0)
    57 {
    58 }
    59 
    60 void UIWizardNewCloudVMPage1::populateDestinations()
     54    , m_pAccountInstanceLabel(0)
     55    , m_pAccountInstanceList(0)
     56{
     57}
     58
     59void UIWizardAddCloudVMPage1::populateSources()
    6160{
    6261    /* To be executed just once, so combo should be empty: */
    63     AssertReturnVoid(m_pDestinationComboBox->count() == 0);
    64 
    65     /* Do we have OCI destination? */
     62    AssertReturnVoid(m_pSourceComboBox->count() == 0);
     63
     64    /* Do we have OCI source? */
    6665    bool fOCIPresent = false;
    6766
     
    9493
    9594            /* Compose empty item, fill it's data: */
    96             m_pDestinationComboBox->addItem(QString());
    97             m_pDestinationComboBox->setItemData(m_pDestinationComboBox->count() - 1, comProvider.GetId(),        DestinationData_ID);
    98             m_pDestinationComboBox->setItemData(m_pDestinationComboBox->count() - 1, comProvider.GetName(),      DestinationData_Name);
    99             m_pDestinationComboBox->setItemData(m_pDestinationComboBox->count() - 1, comProvider.GetShortName(), DestinationData_ShortName);
    100             if (m_pDestinationComboBox->itemData(m_pDestinationComboBox->count() - 1, DestinationData_ShortName).toString() == "OCI")
     95            m_pSourceComboBox->addItem(QString());
     96            m_pSourceComboBox->setItemData(m_pSourceComboBox->count() - 1, comProvider.GetId(),        SourceData_ID);
     97            m_pSourceComboBox->setItemData(m_pSourceComboBox->count() - 1, comProvider.GetName(),      SourceData_Name);
     98            m_pSourceComboBox->setItemData(m_pSourceComboBox->count() - 1, comProvider.GetShortName(), SourceData_ShortName);
     99            if (m_pSourceComboBox->itemData(m_pSourceComboBox->count() - 1, SourceData_ShortName).toString() == "OCI")
    101100                fOCIPresent = true;
    102101        }
     
    106105    /* Set default: */
    107106    if (fOCIPresent)
    108         setDestination("OCI");
    109 }
    110 
    111 void UIWizardNewCloudVMPage1::populateAccounts()
     107        setSource("OCI");
     108}
     109
     110void UIWizardAddCloudVMPage1::populateAccounts()
    112111{
    113112    /* Block signals while updating: */
     
    125124
    126125    /* If provider chosen: */
    127     if (!destinationId().isNull())
     126    if (!sourceId().isNull())
    128127    {
    129128        /* Main API request sequence, can be interrupted after any step: */
     
    131130        {
    132131            /* (Re)initialize Cloud Provider: */
    133             m_comCloudProvider = m_comCloudProviderManager.GetProviderById(destinationId());
     132            m_comCloudProvider = m_comCloudProviderManager.GetProviderById(sourceId());
    134133            if (!m_comCloudProviderManager.isOk())
    135134            {
    136                 msgCenter().cannotFindCloudProvider(m_comCloudProviderManager, destinationId());
     135                msgCenter().cannotFindCloudProvider(m_comCloudProviderManager, sourceId());
    137136                break;
    138137            }
     
    176175}
    177176
    178 void UIWizardNewCloudVMPage1::populateAccountProperties()
     177void UIWizardAddCloudVMPage1::populateAccountProperties()
    179178{
    180179    /* Block signals while updating: */
     
    269268}
    270269
    271 void UIWizardNewCloudVMPage1::populateAccountImages()
     270void UIWizardAddCloudVMPage1::populateAccountInstances()
    272271{
    273272    /* Block signals while updating: */
    274     m_pAccountImageList->blockSignals(true);
     273    m_pAccountInstanceList->blockSignals(true);
    275274
    276275    /* Clear list initially: */
    277     m_pAccountImageList->clear();
     276    m_pAccountInstanceList->clear();
    278277    /* Clear Cloud Client: */
    279278    setClient(CCloudClient());
     
    296295            setClient(comCloudClient);
    297296
    298             /* Gather image names, ids and states.
    299              * Currently we are interested in Available images only. */
     297            /* Gather instance names, ids and states.
     298             * Currently we are interested in Running and Stopped instances only. */
    300299            CStringArray comNames;
    301300            CStringArray comIDs;
    302             const QVector<KCloudImageState> cloudImageStates  = QVector<KCloudImageState>()
    303                                                              << KCloudImageState_Available;
    304 
    305             /* Ask for cloud custom images: */
    306             CProgress comProgress = comCloudClient.ListImages(cloudImageStates, comNames, comIDs);
     301            const QVector<KCloudMachineState> cloudMachineStates  = QVector<KCloudMachineState>()
     302                                                                 << KCloudMachineState_Running
     303                                                                 << KCloudMachineState_Stopped;
     304
     305            /* Ask for cloud instances: */
     306            CProgress comProgress = comCloudClient.ListInstances(cloudMachineStates, comNames, comIDs);
    307307            if (!comCloudClient.isOk())
    308308            {
     
    311311            }
    312312
    313             /* Show "Acquire cloud images" progress: */
    314             msgCenter().showModalProgressDialog(comProgress, UIWizardNewCloudVM::tr("Acquire cloud images ..."),
     313            /* Show "Acquire cloud instances" progress: */
     314            msgCenter().showModalProgressDialog(comProgress, UIWizardAddCloudVM::tr("Acquire cloud instances ..."),
    315315                                                ":/progress_reading_appliance_90px.png", 0, 0);
    316316            if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
     
    326326            {
    327327                /* Create list item: */
    328                 QListWidgetItem *pItem = new QListWidgetItem(names.at(i), m_pAccountImageList);
     328                QListWidgetItem *pItem = new QListWidgetItem(names.at(i), m_pAccountInstanceList);
    329329                if (pItem)
    330330                {
     
    335335
    336336            /* Choose the 1st one by default if possible: */
    337             if (m_pAccountImageList->count())
    338                 m_pAccountImageList->setCurrentRow(0);
     337            if (m_pAccountInstanceList->count())
     338                m_pAccountInstanceList->setCurrentRow(0);
    339339        }
    340340        while (0);
     
    342342
    343343    /* Unblock signals after update: */
    344     m_pAccountImageList->blockSignals(false);
    345 }
    346 
    347 void UIWizardNewCloudVMPage1::populateFormProperties()
    348 {
    349     /* Clear description & form properties: */
    350     setVSD(CVirtualSystemDescription());
    351     setVSDForm(CVirtualSystemDescriptionForm());
    352 
    353     /* If client created: */
    354     CCloudClient comCloudClient = client();
    355     if (comCloudClient.isNotNull())
    356     {
    357         /* Main API request sequence, can be interrupted after any step: */
    358         do
    359         {
    360             /* Create appliance: */
    361             CVirtualBox comVBox = uiCommon().virtualBox();
    362             CAppliance comAppliance = comVBox.CreateAppliance();
    363             if (!comVBox.isOk())
    364             {
    365                 msgCenter().cannotCreateAppliance(comVBox);
    366                 break;
    367             }
    368 
    369             /* Create virtual system description: */
    370             comAppliance.CreateVirtualSystemDescriptions(1);
    371             if (!comAppliance.isOk())
    372             {
    373                 msgCenter().cannotCreateVirtualSystemDescription(comAppliance);
    374                 break;
    375             }
    376 
    377             /* Acquire virtual system description: */
    378             QVector<CVirtualSystemDescription> descriptions = comAppliance.GetVirtualSystemDescriptions();
    379             if (!comAppliance.isOk())
    380             {
    381                 msgCenter().cannotAcquireVirtualSystemDescription(comAppliance);
    382                 break;
    383             }
    384 
    385             /* Make sure there is at least one virtual system description created: */
    386             AssertReturnVoid(!descriptions.isEmpty());
    387             CVirtualSystemDescription comVSD = descriptions.at(0);
    388 
    389             /* Remember Virtual System Description: */
    390             setVSD(comVSD);
    391 
    392             /* Add image id to virtual system description: */
    393             comVSD.AddDescription(KVirtualSystemDescriptionType_CloudImageId, imageId(), QString());
    394             if (!comVSD.isOk())
    395             {
    396                 msgCenter().cannotAddVirtualSystemDescriptionValue(comVSD);
    397                 break;
    398             }
    399 
    400             /* Create Virtual System Description Form: */
    401             qobject_cast<UIWizardNewCloudVM*>(wizardImp())->createVSDForm();
    402         }
    403         while (0);
    404     }
    405 }
    406 
    407 void UIWizardNewCloudVMPage1::updateDestinationComboToolTip()
    408 {
    409     const int iCurrentIndex = m_pDestinationComboBox->currentIndex();
     344    m_pAccountInstanceList->blockSignals(false);
     345}
     346
     347void UIWizardAddCloudVMPage1::updateSourceComboToolTip()
     348{
     349    const int iCurrentIndex = m_pSourceComboBox->currentIndex();
    410350    if (iCurrentIndex != -1)
    411351    {
    412         const QString strCurrentToolTip = m_pDestinationComboBox->itemData(iCurrentIndex, Qt::ToolTipRole).toString();
     352        const QString strCurrentToolTip = m_pSourceComboBox->itemData(iCurrentIndex, Qt::ToolTipRole).toString();
    413353        AssertMsg(!strCurrentToolTip.isEmpty(), ("Data not found!"));
    414         m_pDestinationComboBox->setToolTip(strCurrentToolTip);
    415     }
    416 }
    417 
    418 void UIWizardNewCloudVMPage1::updateAccountPropertyTableToolTips()
     354        m_pSourceComboBox->setToolTip(strCurrentToolTip);
     355    }
     356}
     357
     358void UIWizardAddCloudVMPage1::updateAccountPropertyTableToolTips()
    419359{
    420360    /* Iterate through all the key items: */
     
    426366        {
    427367            const QString strToolTip = pItemK->data(Qt::UserRole).toString();
    428             pItemK->setToolTip(QApplication::translate("UIWizardNewCloudVMPageBasic1", strToolTip.toUtf8().constData()));
    429         }
    430     }
    431 }
    432 
    433 void UIWizardNewCloudVMPage1::adjustAccountPropertyTable()
     368            pItemK->setToolTip(QApplication::translate("UIWizardAddCloudVMPageBasic1", strToolTip.toUtf8().constData()));
     369        }
     370    }
     371}
     372
     373void UIWizardAddCloudVMPage1::adjustAccountPropertyTable()
    434374{
    435375    /* Disable last column stretching temporary: */
     
    448388}
    449389
    450 void UIWizardNewCloudVMPage1::setDestination(const QString &strDestination)
    451 {
    452     const int iIndex = m_pDestinationComboBox->findData(strDestination, DestinationData_ShortName);
     390void UIWizardAddCloudVMPage1::setSource(const QString &strSource)
     391{
     392    const int iIndex = m_pSourceComboBox->findData(strSource, SourceData_ShortName);
    453393    AssertMsg(iIndex != -1, ("Data not found!"));
    454     m_pDestinationComboBox->setCurrentIndex(iIndex);
    455 }
    456 
    457 QString UIWizardNewCloudVMPage1::destination() const
    458 {
    459     const int iIndex = m_pDestinationComboBox->currentIndex();
    460     return m_pDestinationComboBox->itemData(iIndex, DestinationData_ShortName).toString();
    461 }
    462 
    463 QUuid UIWizardNewCloudVMPage1::destinationId() const
    464 {
    465     const int iIndex = m_pDestinationComboBox->currentIndex();
    466     return m_pDestinationComboBox->itemData(iIndex, DestinationData_ID).toUuid();
    467 }
    468 
    469 QString UIWizardNewCloudVMPage1::profileName() const
     394    m_pSourceComboBox->setCurrentIndex(iIndex);
     395}
     396
     397QString UIWizardAddCloudVMPage1::source() const
     398{
     399    const int iIndex = m_pSourceComboBox->currentIndex();
     400    return m_pSourceComboBox->itemData(iIndex, SourceData_ShortName).toString();
     401}
     402
     403QUuid UIWizardAddCloudVMPage1::sourceId() const
     404{
     405    const int iIndex = m_pSourceComboBox->currentIndex();
     406    return m_pSourceComboBox->itemData(iIndex, SourceData_ID).toUuid();
     407}
     408
     409QString UIWizardAddCloudVMPage1::profileName() const
    470410{
    471411    const int iIndex = m_pAccountComboBox->currentIndex();
     
    473413}
    474414
    475 QString UIWizardNewCloudVMPage1::imageId() const
    476 {
    477     QListWidgetItem *pItem = m_pAccountImageList->currentItem();
    478     return pItem ? pItem->data(Qt::UserRole).toString() : QString();
    479 }
    480 
    481 void UIWizardNewCloudVMPage1::setClient(const CCloudClient &comClient)
    482 {
    483     qobject_cast<UIWizardNewCloudVM*>(wizardImp())->setClient(comClient);
    484 }
    485 
    486 CCloudClient UIWizardNewCloudVMPage1::client() const
    487 {
    488     return qobject_cast<UIWizardNewCloudVM*>(wizardImp())->client();
    489 }
    490 
    491 void UIWizardNewCloudVMPage1::setVSD(const CVirtualSystemDescription &comDescription)
    492 {
    493     qobject_cast<UIWizardNewCloudVM*>(wizardImp())->setVSD(comDescription);
    494 }
    495 
    496 CVirtualSystemDescription UIWizardNewCloudVMPage1::vsd() const
    497 {
    498     return qobject_cast<UIWizardNewCloudVM*>(wizardImp())->vsd();
    499 }
    500 
    501 void UIWizardNewCloudVMPage1::setVSDForm(const CVirtualSystemDescriptionForm &comForm)
    502 {
    503     qobject_cast<UIWizardNewCloudVM*>(wizardImp())->setVSDForm(comForm);
    504 }
    505 
    506 CVirtualSystemDescriptionForm UIWizardNewCloudVMPage1::vsdForm() const
    507 {
    508     return qobject_cast<UIWizardNewCloudVM*>(wizardImp())->vsdForm();
     415QStringList UIWizardAddCloudVMPage1::instanceIds() const
     416{
     417    QStringList result;
     418    foreach (QListWidgetItem *pItem, m_pAccountInstanceList->selectedItems())
     419        result << pItem->data(Qt::UserRole).toString();
     420    return result;
     421}
     422
     423void UIWizardAddCloudVMPage1::setClient(const CCloudClient &comClient)
     424{
     425    qobject_cast<UIWizardAddCloudVM*>(wizardImp())->setClient(comClient);
     426}
     427
     428CCloudClient UIWizardAddCloudVMPage1::client() const
     429{
     430    return qobject_cast<UIWizardAddCloudVM*>(wizardImp())->client();
    509431}
    510432
    511433
    512434/*********************************************************************************************************************************
    513 *   Class UIWizardNewCloudVMPageBasic1 implementation.                                                                           *
     435*   Class UIWizardAddCloudVMPageBasic1 implementation.                                                                           *
    514436*********************************************************************************************************************************/
    515437
    516 UIWizardNewCloudVMPageBasic1::UIWizardNewCloudVMPageBasic1()
     438UIWizardAddCloudVMPageBasic1::UIWizardAddCloudVMPageBasic1()
    517439    : m_pLabelMain(0)
    518440    , m_pLabelDescription(0)
     
    530452        }
    531453
    532         /* Create destination layout: */
    533         m_pDestinationLayout = new QGridLayout;
    534         if (m_pDestinationLayout)
    535         {
    536             m_pDestinationLayout->setColumnStretch(0, 0);
    537             m_pDestinationLayout->setColumnStretch(1, 1);
    538 
    539             /* Create destination label: */
    540             m_pDestinationLabel = new QLabel(this);
    541             if (m_pDestinationLabel)
     454        /* Create source layout: */
     455        m_pSourceLayout = new QGridLayout;
     456        if (m_pSourceLayout)
     457        {
     458            m_pSourceLayout->setColumnStretch(0, 0);
     459            m_pSourceLayout->setColumnStretch(1, 1);
     460
     461            /* Create source label: */
     462            m_pSourceLabel = new QLabel(this);
     463            if (m_pSourceLabel)
    542464            {
    543465                /* Add into layout: */
    544                 m_pDestinationLayout->addWidget(m_pDestinationLabel, 0, 0, Qt::AlignRight);
    545             }
    546             /* Create destination selector: */
    547             m_pDestinationComboBox = new QIComboBox(this);
    548             if (m_pDestinationComboBox)
    549             {
    550                 m_pDestinationLabel->setBuddy(m_pDestinationComboBox);
     466                m_pSourceLayout->addWidget(m_pSourceLabel, 0, 0, Qt::AlignRight);
     467            }
     468            /* Create source selector: */
     469            m_pSourceComboBox = new QIComboBox(this);
     470            if (m_pSourceComboBox)
     471            {
     472                m_pSourceLabel->setBuddy(m_pSourceComboBox);
    551473
    552474                /* Add into layout: */
    553                 m_pDestinationLayout->addWidget(m_pDestinationComboBox, 0, 1);
     475                m_pSourceLayout->addWidget(m_pSourceComboBox, 0, 1);
    554476            }
    555477
     
    559481            {
    560482                /* Add into layout: */
    561                 m_pDestinationLayout->addWidget(m_pLabelDescription, 1, 0, 1, 2);
     483                m_pSourceLayout->addWidget(m_pLabelDescription, 1, 0, 1, 2);
    562484            }
    563485
    564486            /* Add into layout: */
    565             pMainLayout->addLayout(m_pDestinationLayout);
     487            pMainLayout->addLayout(m_pSourceLayout);
    566488        }
    567489
     
    635557
    636558            /* Create account instance label: */
    637             m_pAccountImageLabel = new QLabel(this);
    638             if (m_pAccountImageLabel)
     559            m_pAccountInstanceLabel = new QLabel(this);
     560            if (m_pAccountInstanceLabel)
    639561            {
    640562                /* Add into layout: */
    641                 m_pCloudContainerLayout->addWidget(m_pAccountImageLabel, 2, 0, Qt::AlignRight);
     563                m_pCloudContainerLayout->addWidget(m_pAccountInstanceLabel, 2, 0, Qt::AlignRight);
    642564            }
    643565            /* Create profile instances table: */
    644             m_pAccountImageList = new QListWidget(this);
    645             if (m_pAccountImageList)
    646             {
    647                 m_pAccountImageLabel->setBuddy(m_pAccountImageLabel);
    648                 const QFontMetrics fm(m_pAccountImageList->font());
     566            m_pAccountInstanceList = new QListWidget(this);
     567            if (m_pAccountInstanceList)
     568            {
     569                m_pAccountInstanceLabel->setBuddy(m_pAccountInstanceLabel);
     570                const QFontMetrics fm(m_pAccountInstanceList->font());
    649571                const int iFontWidth = fm.width('x');
    650572                const int iTotalWidth = 50 * iFontWidth;
    651573                const int iFontHeight = fm.height();
    652574                const int iTotalHeight = 4 * iFontHeight;
    653                 m_pAccountImageList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));
    654                 //m_pAccountImageList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    655                 m_pAccountImageList->setAlternatingRowColors(true);
     575                m_pAccountInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));
     576                //m_pAccountInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
     577                m_pAccountInstanceList->setAlternatingRowColors(true);
     578                m_pAccountInstanceList->setSelectionMode(QAbstractItemView::ExtendedSelection);
    656579
    657580                /* Add into layout: */
    658                 m_pCloudContainerLayout->addWidget(m_pAccountImageList, 2, 1, 2, 1);
     581                m_pCloudContainerLayout->addWidget(m_pAccountInstanceList, 2, 1, 2, 1);
    659582            }
    660583
     
    667590    if (gpManager)
    668591        connect(gpManager, &UIVirtualBoxManager::sigCloudProfileManagerChange,
    669                 this, &UIWizardNewCloudVMPageBasic1::sltHandleDestinationChange);
    670     connect(m_pDestinationComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated),
    671             this, &UIWizardNewCloudVMPageBasic1::sltHandleDestinationChange);
     592                this, &UIWizardAddCloudVMPageBasic1::sltHandleSourceChange);
     593    connect(m_pSourceComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated),
     594            this, &UIWizardAddCloudVMPageBasic1::sltHandleSourceChange);
    672595    connect(m_pAccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
    673             this, &UIWizardNewCloudVMPageBasic1::sltHandleAccountComboChange);
     596            this, &UIWizardAddCloudVMPageBasic1::sltHandleAccountComboChange);
    674597    connect(m_pAccountToolButton, &QIToolButton::clicked,
    675             this, &UIWizardNewCloudVMPageBasic1::sltHandleAccountButtonClick);
    676     connect(m_pAccountImageList, &QListWidget::currentRowChanged,
    677             this, &UIWizardNewCloudVMPageBasic1::completeChanged);
    678 }
    679 
    680 bool UIWizardNewCloudVMPageBasic1::event(QEvent *pEvent)
     598            this, &UIWizardAddCloudVMPageBasic1::sltHandleAccountButtonClick);
     599    connect(m_pAccountInstanceList, &QListWidget::currentRowChanged,
     600            this, &UIWizardAddCloudVMPageBasic1::completeChanged);
     601
     602    /* Register fields: */
     603    registerField("instanceIds", this, "instanceIds");
     604}
     605
     606bool UIWizardAddCloudVMPageBasic1::event(QEvent *pEvent)
    681607{
    682608    /* Handle known event types: */
     
    698624}
    699625
    700 void UIWizardNewCloudVMPageBasic1::retranslateUi()
     626void UIWizardAddCloudVMPageBasic1::retranslateUi()
    701627{
    702628    /* Translate page: */
    703     setTitle(UIWizardNewCloudVM::tr("Destination to create"));
     629    setTitle(UIWizardAddCloudVM::tr("Source to add from"));
    704630
    705631    /* Translate main label: */
    706     m_pLabelMain->setText(UIWizardNewCloudVM::tr("Please choose the destination to create cloud virtual machine in.  This can "
     632    m_pLabelMain->setText(UIWizardAddCloudVM::tr("Please choose the source to add cloud virtual machine from.  This can "
    707633                                                 "be one of known cloud service providers below."));
    708634
    709     /* Translate destination label: */
    710     m_pDestinationLabel->setText(UIWizardNewCloudVM::tr("&Destination:"));
    711     /* Translate received values of Destination combo-box.
     635    /* Translate source label: */
     636    m_pSourceLabel->setText(UIWizardAddCloudVM::tr("&Source:"));
     637    /* Translate received values of Source combo-box.
    712638     * We are enumerating starting from 0 for simplicity: */
    713     for (int i = 0; i < m_pDestinationComboBox->count(); ++i)
    714     {
    715         m_pDestinationComboBox->setItemText(i, m_pDestinationComboBox->itemData(i, DestinationData_Name).toString());
    716         m_pDestinationComboBox->setItemData(i, UIWizardNewCloudVM::tr("Create VM for cloud service provider."), Qt::ToolTipRole);
     639    for (int i = 0; i < m_pSourceComboBox->count(); ++i)
     640    {
     641        m_pSourceComboBox->setItemText(i, m_pSourceComboBox->itemData(i, SourceData_Name).toString());
     642        m_pSourceComboBox->setItemData(i, UIWizardAddCloudVM::tr("Add VM from cloud service provider."), Qt::ToolTipRole);
    717643    }
    718644
    719645    /* Translate description label: */
    720     m_pLabelDescription->setText(UIWizardNewCloudVM::tr("<p>Please choose one of cloud service accounts you have registered to "
    721                                                         "create virtual machine for.  Existing custom images list will be "
    722                                                         "updated.  To continue, select one of custom images to create virtual "
     646    m_pLabelDescription->setText(UIWizardAddCloudVM::tr("<p>Please choose one of cloud service accounts you have registered to "
     647                                                        "add virtual machine from.  Existing instance list will be "
     648                                                        "updated.  To continue, select at least one instance to add virtual "
    723649                                                        "machine on the basis of it.</p>"));
    724650
    725651    /* Translate cloud stuff: */
    726     m_pAccountLabel->setText(UIWizardNewCloudVM::tr("&Account:"));
    727     m_pAccountImageLabel->setText(UIWizardNewCloudVM::tr("&Images:"));
     652    m_pAccountLabel->setText(UIWizardAddCloudVM::tr("&Account:"));
     653    m_pAccountInstanceLabel->setText(UIWizardAddCloudVM::tr("&Instances:"));
    728654
    729655    /* Adjust label widths: */
    730656    QList<QWidget*> labels;
    731     labels << m_pDestinationLabel;
     657    labels << m_pSourceLabel;
    732658    labels << m_pAccountLabel;
    733     labels << m_pAccountImageLabel;
     659    labels << m_pAccountInstanceLabel;
    734660    int iMaxWidth = 0;
    735661    foreach (QWidget *pLabel, labels)
    736662        iMaxWidth = qMax(iMaxWidth, pLabel->minimumSizeHint().width());
    737     m_pDestinationLayout->setColumnMinimumWidth(0, iMaxWidth);
     663    m_pSourceLayout->setColumnMinimumWidth(0, iMaxWidth);
    738664    m_pCloudContainerLayout->setColumnMinimumWidth(0, iMaxWidth);
    739665
    740666    /* Update tool-tips: */
    741     updateDestinationComboToolTip();
     667    updateSourceComboToolTip();
    742668    updateAccountPropertyTableToolTips();
    743669}
    744670
    745 void UIWizardNewCloudVMPageBasic1::initializePage()
     671void UIWizardAddCloudVMPageBasic1::initializePage()
    746672{
    747673    /* If wasn't polished yet: */
    748674    if (!m_fPolished)
    749675    {
    750         /* Populate destinations: */
    751         populateDestinations();
     676        /* Populate sources: */
     677        populateSources();
    752678        /* Choose one of them, asynchronously: */
    753         QMetaObject::invokeMethod(this, "sltHandleDestinationChange", Qt::QueuedConnection);
     679        QMetaObject::invokeMethod(this, "sltHandleSourceChange", Qt::QueuedConnection);
    754680        m_fPolished = true;
    755681    }
     
    759685}
    760686
    761 bool UIWizardNewCloudVMPageBasic1::isComplete() const
     687bool UIWizardAddCloudVMPageBasic1::isComplete() const
    762688{
    763689    /* Initial result: */
    764690    bool fResult = true;
    765691
    766     /* Check cloud settings: */
     692    /* Make sure client is not NULL and
     693     * at least one instance is selected: */
    767694    fResult =    client().isNotNull()
    768               && !imageId().isNull();
     695              && !instanceIds().isEmpty();
    769696
    770697    /* Return result: */
     
    772699}
    773700
    774 bool UIWizardNewCloudVMPageBasic1::validatePage()
     701bool UIWizardAddCloudVMPageBasic1::validatePage()
    775702{
    776703    /* Initial result: */
    777704    bool fResult = true;
    778705
    779     /* Populate vsd and form properties: */
    780     populateFormProperties();
    781     /* And make sure they are not NULL: */
    782     fResult =    vsd().isNotNull()
    783               && vsdForm().isNotNull();
     706    /* Lock finish button: */
     707    startProcessing();
     708
     709    /* Try to add cloud VMs: */
     710    fResult = qobject_cast<UIWizardAddCloudVM*>(wizard())->addCloudVMs();
     711
     712    /* Unlock finish button: */
     713    endProcessing();
    784714
    785715    /* Return result: */
     
    787717}
    788718
    789 void UIWizardNewCloudVMPageBasic1::sltHandleDestinationChange()
     719void UIWizardAddCloudVMPageBasic1::sltHandleSourceChange()
    790720{
    791721    /* Update tool-tip: */
    792     updateDestinationComboToolTip();
    793 
    794     /* Make image list focused by default: */
    795     m_pAccountImageList->setFocus();
     722    updateSourceComboToolTip();
     723
     724    /* Make instance list focused by default: */
     725    m_pAccountInstanceList->setFocus();
    796726
    797727    /* Refresh required settings: */
    798728    populateAccounts();
    799729    populateAccountProperties();
    800     populateAccountImages();
     730    populateAccountInstances();
    801731    emit completeChanged();
    802732}
    803733
    804 void UIWizardNewCloudVMPageBasic1::sltHandleAccountComboChange()
     734void UIWizardAddCloudVMPageBasic1::sltHandleAccountComboChange()
    805735{
    806736    /* Refresh required settings: */
    807737    populateAccountProperties();
    808     populateAccountImages();
     738    populateAccountInstances();
    809739    emit completeChanged();
    810740}
    811741
    812 void UIWizardNewCloudVMPageBasic1::sltHandleAccountButtonClick()
     742void UIWizardAddCloudVMPageBasic1::sltHandleAccountButtonClick()
    813743{
    814744    /* Open Cloud Profile Manager: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageBasic1.h

    r83646 r83653  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - UIWizardNewCloudVMPageBasic1 class declaration.
     3 * VBox Qt GUI - UIWizardAddCloudVMPageBasic1 class declaration.
    44 */
    55
     
    1616 */
    1717
    18 #ifndef FEQT_INCLUDED_SRC_wizards_newcloudvm_UIWizardNewCloudVMPageBasic1_h
    19 #define FEQT_INCLUDED_SRC_wizards_newcloudvm_UIWizardNewCloudVMPageBasic1_h
     18#ifndef FEQT_INCLUDED_SRC_wizards_addcloudvm_UIWizardAddCloudVMPageBasic1_h
     19#define FEQT_INCLUDED_SRC_wizards_addcloudvm_UIWizardAddCloudVMPageBasic1_h
    2020#ifndef RT_WITHOUT_PRAGMA_ONCE
    2121# pragma once
     
    3131#include "CCloudProvider.h"
    3232#include "CCloudProviderManager.h"
    33 #include "CVirtualSystemDescription.h"
    34 #include "CVirtualSystemDescriptionForm.h"
    3533
    3634/* Forward declarations: */
     
    4341class QIToolButton;
    4442
    45 /** Destination combo data fields. */
     43/** Source combo data fields. */
    4644enum
    4745{
    48     DestinationData_ID              = Qt::UserRole + 1,
    49     DestinationData_Name            = Qt::UserRole + 2,
    50     DestinationData_ShortName      = Qt::UserRole + 3
     46    SourceData_ID        = Qt::UserRole + 1,
     47    SourceData_Name      = Qt::UserRole + 2,
     48    SourceData_ShortName = Qt::UserRole + 3
    5149};
    5250
     
    5755};
    5856
    59 /** UIWizardPageBase extension for 1st page of the New Cloud VM wizard. */
    60 class UIWizardNewCloudVMPage1 : public UIWizardPageBase
     57/** UIWizardPageBase extension for 1st page of the Add Cloud VM wizard. */
     58class UIWizardAddCloudVMPage1 : public UIWizardPageBase
    6159{
    6260protected:
    6361
    6462    /** Constructs 1st page base. */
    65     UIWizardNewCloudVMPage1();
     63    UIWizardAddCloudVMPage1();
    6664
    67     /** Populates destinations. */
    68     void populateDestinations();
     65    /** Populates sources. */
     66    void populateSources();
    6967    /** Populates accounts. */
    7068    void populateAccounts();
    7169    /** Populates account properties. */
    7270    void populateAccountProperties();
    73     /** Populates account images. */
    74     void populateAccountImages();
    75     /** Populates form properties. */
    76     void populateFormProperties();
     71    /** Populates account instances. */
     72    void populateAccountInstances();
    7773
    78     /** Updates destination combo tool-tips. */
    79     void updateDestinationComboToolTip();
     74    /** Updates source combo tool-tips. */
     75    void updateSourceComboToolTip();
    8076    /** Updates account property table tool-tips. */
    8177    void updateAccountPropertyTableToolTips();
     
    8379    void adjustAccountPropertyTable();
    8480
    85     /** Defines @a strDestination. */
    86     void setDestination(const QString &strDestination);
    87     /** Returns destination. */
    88     QString destination() const;
    89     /** Returns destination ID. */
    90     QUuid destinationId() const;
     81    /** Defines @a strSource. */
     82    void setSource(const QString &strSource);
     83    /** Returns source. */
     84    QString source() const;
     85    /** Returns source ID. */
     86    QUuid sourceId() const;
    9187
    9288    /** Returns profile name. */
    9389    QString profileName() const;
    94     /** Returns image ID. */
    95     QString imageId() const;
     90    /** Returns instance IDs. */
     91    QStringList instanceIds() const;
    9692
    9793    /** Defines Cloud @a comClient object. */
     
    9995    /** Returns Cloud Client object. */
    10096    CCloudClient client() const;
    101 
    102     /** Defines Virtual System @a comDescription object. */
    103     void setVSD(const CVirtualSystemDescription &comDescription);
    104     /** Returns Virtual System Description object. */
    105     CVirtualSystemDescription vsd() const;
    106 
    107     /** Defines Virtual System Description @a comForm object. */
    108     void setVSDForm(const CVirtualSystemDescriptionForm &comForm);
    109     /** Returns Virtual System Description Form object. */
    110     CVirtualSystemDescriptionForm vsdForm() const;
    11197
    11298    /** Holds whether starting page was polished. */
     
    120106    CCloudProfile          m_comCloudProfile;
    121107
    122     /** Holds the destination layout instance. */
    123     QGridLayout *m_pDestinationLayout;
    124     /** Holds the destination type label instance. */
    125     QLabel      *m_pDestinationLabel;
    126     /** Holds the destination type combo-box instance. */
    127     QIComboBox  *m_pDestinationComboBox;
     108    /** Holds the source layout instance. */
     109    QGridLayout *m_pSourceLayout;
     110    /** Holds the source type label instance. */
     111    QLabel      *m_pSourceLabel;
     112    /** Holds the source type combo-box instance. */
     113    QIComboBox  *m_pSourceComboBox;
    128114
    129115    /** Holds the cloud container layout instance. */
     
    137123    /** Holds the account property table instance. */
    138124    QTableWidget *m_pAccountPropertyTable;
    139     /** Holds the account image label instance. */
    140     QLabel       *m_pAccountImageLabel;
    141     /** Holds the account image list instance. */
    142     QListWidget  *m_pAccountImageList;
     125    /** Holds the account instance label instance. */
     126    QLabel       *m_pAccountInstanceLabel;
     127    /** Holds the account instance list instance. */
     128    QListWidget  *m_pAccountInstanceList;
    143129};
    144130
    145 /** UIWizardPage extension for 1st page of the New Cloud VM wizard, extends UIWizardNewCloudVMPage1 as well. */
    146 class UIWizardNewCloudVMPageBasic1 : public UIWizardPage, public UIWizardNewCloudVMPage1
     131/** UIWizardPage extension for 1st page of the Add Cloud VM wizard, extends UIWizardAddCloudVMPage1 as well. */
     132class UIWizardAddCloudVMPageBasic1 : public UIWizardPage, public UIWizardAddCloudVMPage1
    147133{
    148134    Q_OBJECT;
     135    Q_PROPERTY(QStringList instanceIds READ instanceIds);
    149136
    150137public:
    151138
    152139    /** Constructs 1st basic page. */
    153     UIWizardNewCloudVMPageBasic1();
     140    UIWizardAddCloudVMPageBasic1();
    154141
    155142protected:
     
    175162private slots:
    176163
    177     /** Handles change in destination combo-box. */
    178     void sltHandleDestinationChange();
     164    /** Handles change in source combo-box. */
     165    void sltHandleSourceChange();
    179166
    180167    /** Handles change in account combo-box. */
     
    192179};
    193180
    194 #endif /* !FEQT_INCLUDED_SRC_wizards_newcloudvm_UIWizardNewCloudVMPageBasic1_h */
     181#endif /* !FEQT_INCLUDED_SRC_wizards_addcloudvm_UIWizardAddCloudVMPageBasic1_h */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.cpp

    r83646 r83653  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - UIWizardNewCloudVMPageExpert class implementation.
     3 * VBox Qt GUI - UIWizardAddCloudVMPageExpert class implementation.
    44 */
    55
     
    1818/* Qt includes: */
    1919#include <QGroupBox>
     20#include <QHBoxLayout>
    2021#include <QHeaderView>
    2122#include <QListWidget>
    2223#include <QTableWidget>
    23 #include <QVBoxLayout>
    2424
    2525/* GUI includes: */
     
    2929#include "UIMessageCenter.h"
    3030#include "UIVirtualBoxManager.h"
    31 #include "UIWizardNewCloudVM.h"
    32 #include "UIWizardNewCloudVMPageExpert.h"
    33 
    34 
    35 UIWizardNewCloudVMPageExpert::UIWizardNewCloudVMPageExpert(bool fFullWizard)
    36     : UIWizardNewCloudVMPage2(fFullWizard)
    37     , m_pCntDestination(0)
    38     , m_pSettingsCnt(0)
     31#include "UIWizardAddCloudVM.h"
     32#include "UIWizardAddCloudVMPageExpert.h"
     33
     34
     35UIWizardAddCloudVMPageExpert::UIWizardAddCloudVMPageExpert()
     36    : m_pCntSource(0)
    3937{
    4038    /* Create main layout: */
     
    4240    if (pMainLayout)
    4341    {
    44         /* Create destination container: */
    45         m_pCntDestination = new QGroupBox(this);
    46         if (m_pCntDestination)
     42        /* Create source container: */
     43        m_pCntSource = new QGroupBox(this);
     44        if (m_pCntSource)
    4745        {
    48             /* There is no destination table in short wizard form: */
    49             if (!m_fFullWizard)
    50                 m_pCntDestination->setVisible(false);
    51 
    52             /* Create destination layout: */
    53             m_pDestinationLayout = new QGridLayout(m_pCntDestination);
    54             if (m_pDestinationLayout)
     46            /* Create source layout: */
     47            m_pSourceLayout = new QGridLayout(m_pCntSource);
     48            if (m_pSourceLayout)
    5549            {
    56                 /* Create destination selector: */
    57                 m_pDestinationComboBox = new QIComboBox(m_pCntDestination);
    58                 if (m_pDestinationComboBox)
     50                /* Create source selector: */
     51                m_pSourceComboBox = new QIComboBox(m_pCntSource);
     52                if (m_pSourceComboBox)
    5953                {
    6054                    /* Add into layout: */
    61                     m_pDestinationLayout->addWidget(m_pDestinationComboBox, 0, 0);
     55                    m_pSourceLayout->addWidget(m_pSourceComboBox, 0, 0);
    6256                }
    6357
     
    7771
    7872                        /* Create account combo-box: */
    79                         m_pAccountComboBox = new QIComboBox(m_pCntDestination);
     73                        m_pAccountComboBox = new QIComboBox(m_pCntSource);
    8074                        if (m_pAccountComboBox)
    8175                        {
     
    8478                        }
    8579                        /* Create account tool-button: */
    86                         m_pAccountToolButton = new QIToolButton(m_pCntDestination);
     80                        m_pAccountToolButton = new QIToolButton(m_pCntSource);
    8781                        if (m_pAccountToolButton)
    8882                        {
     
    9993
    10094                    /* Create profile property table: */
    101                     m_pAccountPropertyTable = new QTableWidget(m_pCntDestination);
     95                    m_pAccountPropertyTable = new QTableWidget(m_pCntSource);
    10296                    if (m_pAccountPropertyTable)
    10397                    {
     
    119113
    120114                    /* Create profile instances table: */
    121                     m_pAccountImageList = new QListWidget(m_pCntDestination);
    122                     if (m_pAccountImageList)
     115                    m_pAccountInstanceList = new QListWidget(m_pCntSource);
     116                    if (m_pAccountInstanceList)
    123117                    {
    124                         const QFontMetrics fm(m_pAccountImageList->font());
     118                        const QFontMetrics fm(m_pAccountInstanceList->font());
    125119                        const int iFontWidth = fm.width('x');
    126120                        const int iTotalWidth = 50 * iFontWidth;
    127121                        const int iFontHeight = fm.height();
    128122                        const int iTotalHeight = 4 * iFontHeight;
    129                         m_pAccountImageList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));
    130                         //m_pAccountImageList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    131                         m_pAccountImageList->setAlternatingRowColors(true);
     123                        m_pAccountInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));
     124                        //m_pAccountInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
     125                        m_pAccountInstanceList->setAlternatingRowColors(true);
     126                        m_pAccountInstanceList->setSelectionMode(QAbstractItemView::ExtendedSelection);
    132127
    133128                        /* Add into layout: */
    134                         m_pCloudContainerLayout->addWidget(m_pAccountImageList, 2, 0);
     129                        m_pCloudContainerLayout->addWidget(m_pAccountInstanceList, 2, 0);
    135130                    }
    136131
    137132                    /* Add into layout: */
    138                     m_pDestinationLayout->addLayout(m_pCloudContainerLayout, 1, 0);
     133                    m_pSourceLayout->addLayout(m_pCloudContainerLayout, 1, 0);
    139134                }
    140135            }
    141136
    142137            /* Add into layout: */
    143             pMainLayout->addWidget(m_pCntDestination);
    144         }
    145 
    146         /* Create settings container: */
    147         m_pSettingsCnt = new QGroupBox(this);
    148         if (m_pSettingsCnt)
    149         {
    150             /* Create form editor layout: */
    151             QVBoxLayout *pFormEditorLayout = new QVBoxLayout(m_pSettingsCnt);
    152             if (pFormEditorLayout)
    153             {
    154                 /* Create form editor widget: */
    155                 m_pFormEditor = new UIFormEditorWidget(m_pSettingsCnt);
    156                 if (m_pFormEditor)
    157                 {
    158                     /* Make form-editor fit 8 sections in height by default: */
    159                     const int iDefaultSectionHeight = m_pFormEditor->verticalHeader()
    160                                                     ? m_pFormEditor->verticalHeader()->defaultSectionSize()
    161                                                     : 0;
    162                     if (iDefaultSectionHeight > 0)
    163                         m_pFormEditor->setMinimumHeight(8 * iDefaultSectionHeight);
    164 
    165                     /* Add into layout: */
    166                     pFormEditorLayout->addWidget(m_pFormEditor);
    167                 }
    168             }
    169 
    170             /* Add into layout: */
    171             pMainLayout->addWidget(m_pSettingsCnt);
     138            pMainLayout->addWidget(m_pCntSource);
    172139        }
    173140    }
     
    176143    if (gpManager)
    177144        connect(gpManager, &UIVirtualBoxManager::sigCloudProfileManagerChange,
    178                 this, &UIWizardNewCloudVMPageExpert::sltHandleDestinationChange);
    179     connect(m_pDestinationComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated),
    180             this, &UIWizardNewCloudVMPageExpert::sltHandleDestinationChange);
     145                this, &UIWizardAddCloudVMPageExpert::sltHandleSourceChange);
     146    connect(m_pSourceComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated),
     147            this, &UIWizardAddCloudVMPageExpert::sltHandleSourceChange);
    181148    connect(m_pAccountComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
    182             this, &UIWizardNewCloudVMPageExpert::sltHandleAccountComboChange);
     149            this, &UIWizardAddCloudVMPageExpert::sltHandleAccountComboChange);
    183150    connect(m_pAccountToolButton, &QIToolButton::clicked,
    184             this, &UIWizardNewCloudVMPageExpert::sltHandleAccountButtonClick);
    185     connect(m_pAccountImageList, &QListWidget::currentRowChanged,
    186             this, &UIWizardNewCloudVMPageExpert::sltHandleInstanceListChange);
    187 }
    188 
    189 bool UIWizardNewCloudVMPageExpert::event(QEvent *pEvent)
     151            this, &UIWizardAddCloudVMPageExpert::sltHandleAccountButtonClick);
     152    connect(m_pAccountInstanceList, &QListWidget::currentRowChanged,
     153            this, &UIWizardAddCloudVMPageExpert::completeChanged);
     154
     155    /* Register fields: */
     156    registerField("instanceIds", this, "instanceIds");
     157}
     158
     159bool UIWizardAddCloudVMPageExpert::event(QEvent *pEvent)
    190160{
    191161    /* Handle known event types: */
     
    207177}
    208178
    209 void UIWizardNewCloudVMPageExpert::retranslateUi()
    210 {
    211     /* Translate destination container: */
    212     m_pCntDestination->setTitle(UIWizardNewCloudVM::tr("Destination"));
    213 
    214     /* Translate received values of Destination combo-box.
     179void UIWizardAddCloudVMPageExpert::retranslateUi()
     180{
     181    /* Translate source container: */
     182    m_pCntSource->setTitle(UIWizardAddCloudVM::tr("Source"));
     183
     184    /* Translate received values of Source combo-box.
    215185     * We are enumerating starting from 0 for simplicity: */
    216     for (int i = 0; i < m_pDestinationComboBox->count(); ++i)
    217     {
    218         m_pDestinationComboBox->setItemText(i, m_pDestinationComboBox->itemData(i, DestinationData_Name).toString());
    219         m_pDestinationComboBox->setItemData(i, UIWizardNewCloudVM::tr("Create VM for cloud service provider."), Qt::ToolTipRole);
    220     }
    221 
    222     /* Translate settings container: */
    223     m_pSettingsCnt->setTitle(UIWizardNewCloudVM::tr("Settings"));
     186    for (int i = 0; i < m_pSourceComboBox->count(); ++i)
     187    {
     188        m_pSourceComboBox->setItemText(i, m_pSourceComboBox->itemData(i, SourceData_Name).toString());
     189        m_pSourceComboBox->setItemData(i, UIWizardAddCloudVM::tr("Add VM from cloud service provider."), Qt::ToolTipRole);
     190    }
    224191
    225192    /* Update tool-tips: */
    226     updateDestinationComboToolTip();
     193    updateSourceComboToolTip();
    227194    updateAccountPropertyTableToolTips();
    228195}
    229196
    230 void UIWizardNewCloudVMPageExpert::initializePage()
     197void UIWizardAddCloudVMPageExpert::initializePage()
    231198{
    232199    /* If wasn't polished yet: */
    233     if (!UIWizardNewCloudVMPage1::m_fPolished || !UIWizardNewCloudVMPage2::m_fPolished)
    234     {
    235         if (m_fFullWizard)
    236         {
    237             /* Populate destinations: */
    238             populateDestinations();
    239             /* Choose one of them, asynchronously: */
    240             QMetaObject::invokeMethod(this, "sltHandleDestinationChange", Qt::QueuedConnection);
    241         }
    242         else
    243         {
    244             /* Generate VSD form, asynchronously: */
    245             QMetaObject::invokeMethod(this, "sltInitShortWizardForm", Qt::QueuedConnection);
    246         }
    247         UIWizardNewCloudVMPage1::m_fPolished = true;
    248         UIWizardNewCloudVMPage2::m_fPolished = true;
     200    if (!UIWizardAddCloudVMPage1::m_fPolished)
     201    {
     202        /* Populate sources: */
     203        populateSources();
     204        /* Choose one of them, asynchronously: */
     205        QMetaObject::invokeMethod(this, "sltHandleSourceChange", Qt::QueuedConnection);
     206        UIWizardAddCloudVMPage1::m_fPolished = true;
    249207    }
    250208
     
    253211}
    254212
    255 bool UIWizardNewCloudVMPageExpert::isComplete() const
     213bool UIWizardAddCloudVMPageExpert::isComplete() const
    256214{
    257215    /* Initial result: */
    258216    bool fResult = true;
    259217
    260     /* Check cloud settings: */
    261     fResult =    UIWizardNewCloudVMPage1::client().isNotNull()
    262               && UIWizardNewCloudVMPage1::vsd().isNotNull();
     218    /* Make sure client is not NULL and
     219     * at least one instance is selected: */
     220    fResult =   UIWizardAddCloudVMPage1::client().isNotNull()
     221            && !UIWizardAddCloudVMPage1::instanceIds().isEmpty();
    263222
    264223    /* Return result: */
     
    266225}
    267226
    268 bool UIWizardNewCloudVMPageExpert::validatePage()
     227bool UIWizardAddCloudVMPageExpert::validatePage()
    269228{
    270229    /* Initial result: */
     
    274233    startProcessing();
    275234
    276     /* Make sure table has own data committed: */
    277     m_pFormEditor->makeSureEditorDataCommitted();
    278 
    279     /* Check whether we have proper VSD form: */
    280     CVirtualSystemDescriptionForm comForm = UIWizardNewCloudVMPage1::vsdForm();
    281     /* Give changed VSD back: */
    282     if (comForm.isNotNull())
    283     {
    284         comForm.GetVirtualSystemDescription();
    285         fResult = comForm.isOk();
    286         if (!fResult)
    287             msgCenter().cannotAcquireVirtualSystemDescriptionFormProperty(comForm);
    288     }
    289 
    290     /* Try to create cloud VM: */
    291     if (fResult)
    292     {
    293         fResult = qobject_cast<UIWizardNewCloudVM*>(wizard())->createCloudVM();
    294 
    295         /* If the final step failed we could try
    296          * sugest user more valid form this time: */
    297         if (!fResult)
    298             sltInitShortWizardForm();
    299     }
     235    /* Try to add cloud VMs: */
     236    fResult = qobject_cast<UIWizardAddCloudVM*>(wizard())->addCloudVMs();
    300237
    301238    /* Unlock finish button: */
     
    306243}
    307244
    308 void UIWizardNewCloudVMPageExpert::sltHandleDestinationChange()
     245void UIWizardAddCloudVMPageExpert::sltHandleSourceChange()
    309246{
    310247    /* Update tool-tip: */
    311     updateDestinationComboToolTip();
    312 
    313     /* Make image list focused by default: */
    314     m_pAccountImageList->setFocus();
     248    updateSourceComboToolTip();
     249
     250    /* Make instance list focused by default: */
     251    m_pAccountInstanceList->setFocus();
    315252
    316253    /* Refresh required settings: */
    317254    populateAccounts();
    318255    populateAccountProperties();
    319     populateAccountImages();
    320     populateFormProperties();
    321     refreshFormPropertiesTable();
     256    populateAccountInstances();
    322257    emit completeChanged();
    323258}
    324259
    325 void UIWizardNewCloudVMPageExpert::sltHandleAccountComboChange()
     260void UIWizardAddCloudVMPageExpert::sltHandleAccountComboChange()
    326261{
    327262    /* Refresh required settings: */
    328263    populateAccountProperties();
    329     populateAccountImages();
    330     populateFormProperties();
    331     refreshFormPropertiesTable();
     264    populateAccountInstances();
    332265    emit completeChanged();
    333266}
    334267
    335 void UIWizardNewCloudVMPageExpert::sltHandleAccountButtonClick()
     268void UIWizardAddCloudVMPageExpert::sltHandleAccountButtonClick()
    336269{
    337270    /* Open Cloud Profile Manager: */
     
    339272        gpManager->openCloudProfileManager();
    340273}
    341 
    342 void UIWizardNewCloudVMPageExpert::sltHandleInstanceListChange()
    343 {
    344     /* Refresh required settings: */
    345     populateFormProperties();
    346     refreshFormPropertiesTable();
    347     emit completeChanged();
    348 }
    349 
    350 void UIWizardNewCloudVMPageExpert::sltInitShortWizardForm()
    351 {
    352     /* Create Virtual System Description Form: */
    353     qobject_cast<UIWizardNewCloudVM*>(wizardImp())->createVSDForm();
    354 
    355     /* Refresh form properties table: */
    356     refreshFormPropertiesTable();
    357     emit completeChanged();
    358 }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.h

    r83646 r83653  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - UIWizardNewCloudVMPageExpert class declaration.
     3 * VBox Qt GUI - UIWizardAddCloudVMPageExpert class declaration.
    44 */
    55
     
    1616 */
    1717
    18 #ifndef FEQT_INCLUDED_SRC_wizards_newcloudvm_UIWizardNewCloudVMPageExpert_h
    19 #define FEQT_INCLUDED_SRC_wizards_newcloudvm_UIWizardNewCloudVMPageExpert_h
     18#ifndef FEQT_INCLUDED_SRC_wizards_addcloudvm_UIWizardAddCloudVMPageExpert_h
     19#define FEQT_INCLUDED_SRC_wizards_addcloudvm_UIWizardAddCloudVMPageExpert_h
    2020#ifndef RT_WITHOUT_PRAGMA_ONCE
    2121# pragma once
     
    2323
    2424/* GUI includes: */
    25 #include "UIWizardNewCloudVMPageBasic1.h"
    26 #include "UIWizardNewCloudVMPageBasic2.h"
     25#include "UIWizardAddCloudVMPageBasic1.h"
    2726
    2827/* Forward declarations: */
    2928class QGroupBox;
    3029
    31 /** UIWizardPage extension for UIWizardNewCloudVMPage1 and UIWizardNewCloudVMPage2. */
    32 class UIWizardNewCloudVMPageExpert : public UIWizardPage,
    33                                      public UIWizardNewCloudVMPage1,
    34                                      public UIWizardNewCloudVMPage2
     30/** UIWizardPage extension for UIWizardAddCloudVMPage1. */
     31class UIWizardAddCloudVMPageExpert : public UIWizardPage,
     32                                     public UIWizardAddCloudVMPage1
    3533{
    3634    Q_OBJECT;
     35    Q_PROPERTY(QStringList instanceIds READ instanceIds);
    3736
    3837public:
    3938
    4039    /** Constructs expert page. */
    41     UIWizardNewCloudVMPageExpert(bool fFullWizard);
     40    UIWizardAddCloudVMPageExpert();
    4241
    4342protected:
     
    6362private slots:
    6463
    65     /** Handles change in destination combo-box. */
    66     void sltHandleDestinationChange();
     64    /** Handles change in source combo-box. */
     65    void sltHandleSourceChange();
    6766
    6867    /** Handles change in account combo-box. */
    6968    void sltHandleAccountComboChange();
     69
    7070    /** Handles account tool-button click. */
    7171    void sltHandleAccountButtonClick();
    7272
    73     /** Handles change in instance list. */
    74     void sltHandleInstanceListChange();
    75 
    76     /** Initializes short wizard form. */
    77     void sltInitShortWizardForm();
    78 
    7973private:
    8074
    81     /** Holds the destination container instance. */
    82     QGroupBox *m_pCntDestination;
    83     /** Holds the settings container instance. */
    84     QGroupBox *m_pSettingsCnt;
     75    /** Holds the source container instance. */
     76    QGroupBox *m_pCntSource;
    8577};
    8678
    87 #endif /* !FEQT_INCLUDED_SRC_wizards_newcloudvm_UIWizardNewCloudVMPageExpert_h */
     79#endif /* !FEQT_INCLUDED_SRC_wizards_addcloudvm_UIWizardAddCloudVMPageExpert_h */
Note: See TracChangeset for help on using the changeset viewer.

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