VirtualBox

Changeset 91499 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 30, 2021 2:39:22 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9996: Cleanup for unused stuff in UIWizardNewCloudVM.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVM.cpp

    r91335 r91499  
    1616 */
    1717
    18 /* Qt includes: */
    19 #include <QPushButton>
    20 
    2118/* GUI includes: */
    22 #include "UICommon.h"
    2319#include "UIMessageCenter.h"
    2420#include "UINotificationCenter.h"
     
    3531
    3632UIWizardNewCloudVM::UIWizardNewCloudVM(QWidget *pParent,
    37                                        const QString &strFullGroupName /* = QString() */,
    38                                        const CCloudClient &comClient /* = CCloudClient() */,
    39                                        const CVirtualSystemDescription &comVSD /* = CVirtualSystemDescription() */,
    40                                        WizardMode enmMode /* = WizardMode_Auto */)
    41     : UINativeWizard(pParent, WizardType_NewCloudVM, enmMode)
    42     , m_comClient(comClient)
    43     , m_comVSD(comVSD)
    44     , m_fFullWizard(m_comClient.isNull() || m_comVSD.isNull())
    45     , m_fFinalStepPrevented(false)
     33                                       const QString &strFullGroupName /* = QString() */)
     34    : UINativeWizard(pParent, WizardType_NewCloudVM)
    4635{
    4736#ifndef VBOX_WS_MAC
     
    131120    bool fResult = false;
    132121
    133     /* Do nothing if prevented: */
    134     if (m_fFinalStepPrevented)
    135     {
    136         fResult = true;
    137         return fResult;
    138     }
    139 
    140122    /* Acquire prepared client and description: */
    141123    CCloudClient comClient = client();
     
    163145}
    164146
    165 void UIWizardNewCloudVM::scheduleAutoFinish()
    166 {
    167     QMetaObject::invokeMethod(this, "sltTriggerFinishButton", Qt::QueuedConnection);
    168 }
    169 
    170147void UIWizardNewCloudVM::populatePages()
    171148{
     
    175152        case WizardMode_Basic:
    176153        {
    177             if (m_fFullWizard)
    178                 addPage(new UIWizardNewCloudVMPageSource);
     154            addPage(new UIWizardNewCloudVMPageSource);
    179155            addPage(new UIWizardNewCloudVMPageProperties);
    180156            break;
     
    182158        case WizardMode_Expert:
    183159        {
    184             addPage(new UIWizardNewCloudVMPageExpert(m_fFullWizard));
     160            addPage(new UIWizardNewCloudVMPageExpert);
    185161            break;
    186162        }
     
    203179    //setButtonText(QWizard::FinishButton, tr("Create"));
    204180}
    205 
    206 void UIWizardNewCloudVM::sltTriggerFinishButton()
    207 {
    208     wizardButton(WizardButtonType_Next)->click();
    209 }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVM.h

    r91335 r91499  
    3939
    4040    /** Constructs New Cloud VM wizard passing @a pParent & @a enmMode to the base-class.
    41       * @param  strFullGroupName  Brings full group name (/provider/profile) to create VM in.
    42       * @param  comClient         Brings the Cloud Client object to work with.
    43       * @param  comVSD            Brings the Virtual System Description object to use. */
    44     UIWizardNewCloudVM(QWidget *pParent,
    45                        const QString &strFullGroupName = QString(),
    46                        const CCloudClient &comClient = CCloudClient(),
    47                        const CVirtualSystemDescription &comVSD = CVirtualSystemDescription(),
    48                        WizardMode enmMode = WizardMode_Auto);
    49 
    50     /** Sets whether the final step is @a fPrevented. */
    51     void setFinalStepPrevented(bool fPrevented) { m_fFinalStepPrevented = fPrevented; }
     41      * @param  strFullGroupName  Brings full group name (/provider/profile) to create VM in. */
     42    UIWizardNewCloudVM(QWidget *pParent, const QString &strFullGroupName);
    5243
    5344    /** Defines @a strProviderShortName. */
     
    8273    bool createCloudVM();
    8374
    84     /** Schedules Finish button trigger for
    85       * the next event-loop cicle. */
    86     void scheduleAutoFinish();
    87 
    8875protected:
    8976
     
    9380    /** Handles translation event. */
    9481    virtual void retranslateUi() /* override final */;
    95 
    96 private slots:
    97 
    98     /** Triggers Finish button. */
    99     void sltTriggerFinishButton();
    10082
    10183private:
     
    11193    /** Holds the Virtual System Description Form object reference. */
    11294    CVirtualSystemDescriptionForm  m_comVSDForm;
    113 
    114     /** Holds whether we want full wizard form or short one. */
    115     bool  m_fFullWizard;
    116     /** Holds whether the final step is prevented. */
    117     bool  m_fFinalStepPrevented;
    11895};
    11996
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp

    r91412 r91499  
    4040
    4141
    42 UIWizardNewCloudVMPageExpert::UIWizardNewCloudVMPageExpert(bool fFullWizard)
    43     : m_fFullWizard(fFullWizard)
    44     , m_pCntLocation(0)
     42UIWizardNewCloudVMPageExpert::UIWizardNewCloudVMPageExpert()
     43    : m_pCntLocation(0)
    4544    , m_pProviderComboBox(0)
    4645    , m_pProfileComboBox(0)
     
    6362        if (m_pCntLocation)
    6463        {
    65             /* There is no location container in short wizard form: */
    66             if (!m_fFullWizard)
    67                 m_pCntLocation->setVisible(false);
    68 
    6964            /* Prepare location layout: */
    7065            QVBoxLayout *pLocationLayout = new QVBoxLayout(m_pCntLocation);
     
    110105        if (m_pCntSource)
    111106        {
    112             /* There is no source table in short wizard form: */
    113             if (!m_fFullWizard)
    114                 m_pCntSource->setVisible(false);
    115 
    116107            /* Prepare source layout: */
    117108            QVBoxLayout *pSourceLayout = new QVBoxLayout(m_pCntSource);
     
    256247void UIWizardNewCloudVMPageExpert::initializePage()
    257248{
    258     if (m_fFullWizard)
    259     {
    260         /* Populate providers: */
    261         populateProviders(m_pProviderComboBox);
    262         /* Translate providers: */
    263         retranslateUi();
    264         /* Fetch it, asynchronously: */
    265         QMetaObject::invokeMethod(this, "sltHandleProviderComboChange", Qt::QueuedConnection);
    266         /* Make image list focused by default: */
    267         m_pSourceImageList->setFocus();
    268     }
    269     else
    270     {
    271         /* Generate VSD form, asynchronously: */
    272         QMetaObject::invokeMethod(this, "sltInitShortWizardForm", Qt::QueuedConnection);
    273     }
     249    /* Populate providers: */
     250    populateProviders(m_pProviderComboBox);
     251    /* Translate providers: */
     252    retranslateUi();
     253    /* Make image list focused by default: */
     254    m_pSourceImageList->setFocus();
     255    /* Fetch it, asynchronously: */
     256    QMetaObject::invokeMethod(this, "sltHandleProviderComboChange", Qt::QueuedConnection);
    274257}
    275258
     
    316299        {
    317300            wizard()->setVSDForm(CVirtualSystemDescriptionForm());
    318             sltInitShortWizardForm();
     301            wizard()->createVSDForm();
     302            updatePropertiesTable();
     303            emit completeChanged();
    319304        }
    320305    }
     
    351336{
    352337    updateSourceImage();
    353     emit completeChanged();
    354 }
    355 
    356 void UIWizardNewCloudVMPageExpert::sltInitShortWizardForm()
    357 {
    358     if (wizard()->vsdForm().isNull())
    359         wizard()->createVSDForm();
    360     updatePropertiesTable();
    361338    emit completeChanged();
    362339}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.h

    r91412 r91499  
    3939
    4040    /** Constructs expert page. */
    41     UIWizardNewCloudVMPageExpert(bool fFullWizard);
     41    UIWizardNewCloudVMPageExpert();
    4242
    4343protected:
     
    7373    /** Handles change in instance list. */
    7474    void sltHandleSourceImageChange();
    75 
    76     /** Initializes short wizard form. */
    77     void sltInitShortWizardForm();
    7875
    7976private:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageProperties.h

    r91412 r91499  
    2525#include "UINativeWizardPage.h"
    2626
    27 /* COM includes: */
    28 #include "CVirtualSystemDescriptionForm.h"
    29 
    3027/* Forward declarations: */
    3128class QIRichTextLabel;
    3229class UIFormEditorWidget;
    3330class UIWizardNewCloudVM;
     31class CVirtualSystemDescriptionForm;
    3432
    3533/** Namespace for properties page of the New Cloud VM wizard. */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.cpp

    r91411 r91499  
    1717
    1818/* Qt includes: */
    19 #include <QHeaderView>
    2019#include <QGridLayout>
    2120#include <QLabel>
    2221#include <QListWidget>
    2322#include <QTabBar>
    24 #include <QTableWidget>
    2523#include <QVBoxLayout>
    2624
     
    3836
    3937/* COM includes: */
    40 #include "CAppliance.h"
    4138#include "CStringArray.h"
    4239
     
    164161}
    165162
    166 void UIWizardNewCloudVMSource::populateSourceImages(QListWidget *pList, QTabBar *pTabBar, const CCloudClient &comClient)
     163void UIWizardNewCloudVMSource::populateSourceImages(QListWidget *pList,
     164                                                    QTabBar *pTabBar,
     165                                                    const CCloudClient &comClient)
    167166{
    168167    /* Sanity check: */
     
    217216}
    218217
    219 void UIWizardNewCloudVMSource::populateFormProperties(CVirtualSystemDescription comVSD, QTabBar *pTabBar, const QString &strImageId)
     218void UIWizardNewCloudVMSource::populateFormProperties(CVirtualSystemDescription comVSD,
     219                                                      QTabBar *pTabBar,
     220                                                      const QString &strImageId)
    220221{
    221222    /* Sanity check: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.h

    r91410 r91499  
    2727/* COM includes: */
    2828#include "COMEnums.h"
    29 #include "CCloudClient.h"
    3029#include "CVirtualSystemDescription.h"
    31 #include "CVirtualSystemDescriptionForm.h"
    3230
    3331/* Forward declarations: */
     
    4038class QIToolButton;
    4139class UIWizardNewCloudVM;
     40class CCloudClient;
    4241class CCloudProvider;
    4342
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