VirtualBox

Ignore:
Timestamp:
Jul 5, 2018 12:21:25 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9152: Cleanup/rework for Export Appliance wizard: Doxygen/comments.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp

    r72696 r72916  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4040#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    4141
     42/* COM includes: */
    4243#include "CVFSExplorer.h"
    4344
     
    5051    /* Assign watermark: */
    5152    assignWatermark(":/wizard_ovf_export.png");
    52 #else /* VBOX_WS_MAC */
     53#else
    5354    /* Assign background image: */
    5455    assignBackground(":/wizard_ovf_export_bg.png");
    55 #endif /* VBOX_WS_MAC */
     56#endif
    5657}
    5758
    5859bool UIWizardExportApp::exportAppliance()
    5960{
    60     /* Get export appliance widget: */
     61    /* We need to know every filename which will be created, so that we can ask the user for confirmation of overwriting.
     62     * For that we iterating over all virtual systems & fetch all descriptions of the type HardDiskImage. Also add the
     63     * manifest file to the check. In the .ova case only the target file itself get checked. */
     64
     65    /* Get export appliance widget & fetch all settings from the appliance editor: */
    6166    UIApplianceExportEditorWidget *pExportApplianceWidget = field("applianceWidget").value<ExportAppliancePointer>();
    62     /* Fetch all settings from the appliance editor. */
    6367    pExportApplianceWidget->prepareExport();
    64     /* Get the appliance. */
     68
     69    /* Get the appliance: */
    6570    CAppliance *pAppliance = pExportApplianceWidget->appliance();
    66     /* We need to know every filename which will be created, so that we can
    67      * ask the user for confirmation of overwriting. For that we iterating
    68      * over all virtual systems & fetch all descriptions of the type
    69      * HardDiskImage. Also add the manifest file to the check. In the ova
    70      * case only the target file itself get checked. */
     71
     72    /* Compose a list of all required files: */
    7173    QFileInfo fi(field("path").toString());
    7274    QVector<QString> files;
     75
     76    /* Add arhive itself: */
    7377    files << fi.fileName();
     78
     79    /* If archive is of .ovf type: */
    7480    if (fi.suffix().toLower() == "ovf")
    7581    {
     82        /* Add manifest file if requested: */
    7683        if (field("manifestSelected").toBool())
    7784            files << fi.baseName() + ".mf";
     85
     86        /* Add all hard disk images: */
    7887        CVirtualSystemDescriptionVector vsds = pAppliance->GetVirtualSystemDescriptions();
    7988        for (int i = 0; i < vsds.size(); ++ i)
     
    8796        }
    8897    }
     98
     99    /* Initialize VFS explorer: */
    89100    CVFSExplorer explorer = pAppliance->CreateVFSExplorer(uri(false /* fWithFile */));
    90101    CProgress progress = explorer.Update();
     
    92103    if (fResult)
    93104    {
    94         /* Show some progress, so the user know whats going on: */
    95105        msgCenter().showModalProgressDialog(progress, QApplication::translate("UIWizardExportApp", "Checking files ..."),
    96106                                            ":/progress_refresh_90px.png", this);
     
    103113        }
    104114    }
     115
     116    /* Confirm overwriting for existing files: */
    105117    QVector<QString> exists = explorer.Exists(files);
    106     /* Check if the file exists already, if yes get confirmation for overwriting from the user. */
    107118    if (!msgCenter().confirmOverridingFiles(exists, this))
    108119        return false;
    109     /* Ok all is confirmed so delete all the files which exists: */
     120
     121    /* DELETE all the files which exists after everything is confirmed: */
    110122    if (!exists.isEmpty())
    111123    {
     
    114126        if (fResult)
    115127        {
    116             /* Show some progress, so the user know whats going on: */
    117128            msgCenter().showModalProgressDialog(progress1, QApplication::translate("UIWizardExportApp", "Removing files ..."),
    118129                                                ":/progress_delete_90px.png", this);
     
    142153    if (!encryptedMediums.isEmpty())
    143154    {
    144         /* Create corresponding dialog: */
     155        /* Modal dialog can be destroyed in own event-loop as a part of application
     156         * termination procedure. We have to make sure that the dialog pointer is
     157         * always up to date. So we are wrapping created dialog with QPointer. */
    145158        QPointer<UIAddDiskEncryptionPasswordDialog> pDlg =
    146159             new UIAddDiskEncryptionPasswordDialog(this,
     
    173186        else
    174187        {
    175             /* Any modal dialog can be destroyed in own event-loop
    176              * as a part of application termination procedure..
    177              * We have to check if the dialog still valid. */
    178188            if (pDlg)
    179189            {
     
    194204    if (fResult)
    195205    {
    196         /* Show some progress, so the user know whats going on: */
    197206        msgCenter().showModalProgressDialog(progress, QApplication::translate("UIWizardExportApp", "Exporting Appliance ..."),
    198207                                            ":/progress_export_90px.png", this);
     
    216225    StorageType type = field("storageType").value<StorageType>();
    217226
     227    /* Prepare stirage path: */
    218228    QString path = field("path").toString();
    219229    if (!fWithFile)
     
    222232        path = fi.path();
    223233    }
     234
     235    /* For known storage types: */
    224236    switch (type)
    225237    {
     
    253265        }
    254266    }
     267
     268    /* Return nothing by default: */
    255269    return QString();
    256270}
     
    260274    /* Call to base-class: */
    261275    UIWizard::sltCurrentIdChanged(iId);
     276
    262277    /* Enable 2nd button (Reset to Defaults) for 4th and Expert pages only! */
    263278    setOption(QWizard::HaveCustomButton2, (mode() == WizardMode_Basic && iId == Page4) ||
     
    273288    if (iId == CustomButton2)
    274289    {
    275         /* Get appliance widget: */
     290        /* Get appliance widget and make sure it's valid: */
    276291        ExportAppliancePointer pApplianceWidget = field("applianceWidget").value<ExportAppliancePointer>();
    277292        AssertMsg(!pApplianceWidget.isNull(), ("Appliance Widget is not set!\n"));
     
    319334    UIWizard::prepare();
    320335}
    321 
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.h

    r69500 r72916  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616 */
    1717
    18 #ifndef __UIWizardExportApp_h__
    19 #define __UIWizardExportApp_h__
     18#ifndef ___UIWizardExportApp_h___
     19#define ___UIWizardExportApp_h___
    2020
    21 /* Local includes: */
     21/* GUI includes: */
    2222#include "UIWizard.h"
    2323
     
    2525class CAppliance;
    2626
    27 /* Export Appliance wizard: */
     27/** Export Appliance wizard. */
    2828class UIWizardExportApp : public UIWizard
    2929{
     
    3232public:
    3333
    34     /* Page IDs: */
     34    /** Basic page IDs. */
    3535    enum
    3636    {
     
    4141    };
    4242
    43     /* Page IDs: */
     43    /** Expert page IDs. */
    4444    enum
    4545    {
     
    4747    };
    4848
    49     /* Constructor: */
     49    /** Constructs export appliance wizard passing @a pParent to the base-class.
     50      * @param  selectedVMNames  Brings the names of VMs to be exported. */
    5051    UIWizardExportApp(QWidget *pParent, const QStringList &selectedVMNames = QStringList());
    5152
    5253protected:
    5354
    54     /* Export appliance stuff: */
     55    /** Exports full appliance. */
    5556    bool exportAppliance();
     57    /** Exports @a appliance VMs. */
    5658    bool exportVMs(CAppliance &appliance);
     59    /** Composes universal resource identifier.
     60      * @param  fWithFile  Brings whether uri should include file name as well. */
    5761    QString uri(bool fWithFile = true) const;
    5862
     63    /** @todo remove it */
    5964    /* Who will be able to export appliance: */
    6065    friend class UIWizardExportAppPage4;
     
    6469private slots:
    6570
    66     /* Page change handler: */
     71    /** Handles page change to @a iId. */
    6772    void sltCurrentIdChanged(int iId);
    68     /* Custom button 2 click handler: */
     73    /** Handles custom button @a iId click. */
    6974    void sltCustomButtonClicked(int iId);
    7075
    7176private:
    7277
    73     /* Translation stuff: */
     78    /** Handles translation event. */
    7479    void retranslateUi();
    7580
    76     /* Pages related stuff: */
     81    /** Prepares all. */
    7782    void prepare();
    7883
    79     /* Variables: */
     84    /** Holds the names of VMs to be exported. */
    8085    QStringList m_selectedVMNames;
    8186};
    8287
    83 #endif /* __UIWizardExportApp_h__ */
    84 
     88#endif /* !___UIWizardExportApp_h___ */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppDefs.h

    r69500 r72916  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616 */
    1717
    18 #ifndef __UIWizardExportAppDefs_h__
    19 #define __UIWizardExportAppDefs_h__
     18#ifndef ___UIWizardExportAppDefs_h___
     19#define ___UIWizardExportAppDefs_h___
    2020
    21 /* Global includes: */
     21/* Qt includes: */
    2222#include <QMetaType>
    2323#include <QPointer>
    2424#include <QListWidget>
    2525
    26 /* Local includes: */
     26/* GUI includes: */
    2727#include "UIApplianceExportEditorWidget.h"
    2828
    29 /* Typedefs: */
     29/** Storage types. */
    3030enum StorageType { Filesystem, SunCloud, S3 };
    3131Q_DECLARE_METATYPE(StorageType);
     
    3535Q_DECLARE_METATYPE(ExportAppliancePointer);
    3636
     37/** QListWidgetItem subclass for Export Appliance wizard VM list. */
    3738class VMListWidgetItem : public QListWidgetItem
    3839{
    3940public:
    4041
     42    /** Constructs VM list item passing @a pixIcon, @a strText and @a pParent to the base-class.
     43      * @param  strUuid       Brings the machine ID.
     44      * @param  fInSaveState  Brings whether machine is in Saved state. */
    4145    VMListWidgetItem(QPixmap &pixIcon, QString &strText, QString strUuid, bool fInSaveState, QListWidget *pParent)
    4246        : QListWidgetItem(pixIcon, strText, pParent)
    4347        , m_strUuid(strUuid)
    4448        , m_fInSaveState(fInSaveState)
    45     {
    46     }
     49    {}
    4750
     51    /** Returns whether this item is less than @a other. */
    4852    bool operator<(const QListWidgetItem &other) const
    4953    {
     
    5155    }
    5256
     57    /** Returns the machine ID. */
    5358    QString uuid() { return m_strUuid; }
     59    /** Returns whether machine is in Saved state. */
    5460    bool isInSaveState() { return m_fInSaveState; }
    5561
    5662private:
    5763
    58     QString m_strUuid;
    59     bool m_fInSaveState;
     64    /** Holds the machine ID. */
     65    QString  m_strUuid;
     66    /** Holds whether machine is in Saved state. */
     67    bool     m_fInSaveState;
    6068};
    6169
    62 #endif /* __UIWizardExportAppDefs_h__ */
    63 
     70#endif /* !___UIWizardExportAppDefs_h___ */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp

    r70805 r72916  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2323# include <QVBoxLayout>
    2424
    25 /* Local includes: */
     25/* GUI includes: */
    2626# include "UIWizardExportAppPageBasic1.h"
    2727# include "UIWizardExportApp.h"
     
    3838
    3939
     40/*********************************************************************************************************************************
     41*   Class UIWizardExportAppPage1 implementation.                                                                                 *
     42*********************************************************************************************************************************/
     43
    4044UIWizardExportAppPage1::UIWizardExportAppPage1()
    4145{
     
    4448void UIWizardExportAppPage1::populateVMSelectorItems(const QStringList &selectedVMNames)
    4549{
    46     /* Add all VM items into 'VM Selector': */
     50    /* Add all VM items into VM selector: */
    4751    foreach (const CMachine &machine, vboxGlobal().virtualBox().GetMachines())
    4852    {
     
    114118}
    115119
     120
     121/*********************************************************************************************************************************
     122*   Class UIWizardExportAppPageBasic1 implementation.                                                                            *
     123*********************************************************************************************************************************/
     124
    116125UIWizardExportAppPageBasic1::UIWizardExportAppPageBasic1(const QStringList &selectedVMNames)
    117126{
    118     /* Create widgets: */
     127    /* Create main layout: */
    119128    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    120129    {
     130        /* Create label: */
    121131        m_pLabel = new QIRichTextLabel(this);
     132
     133        /* Create VM selector: */
    122134        m_pVMSelector = new QListWidget(this);
    123135        {
     
    125137            m_pVMSelector->setSelectionMode(QAbstractItemView::ExtendedSelection);
    126138        }
     139
     140        /* Add into layout: */
    127141        pMainLayout->addWidget(m_pLabel);
    128142        pMainLayout->addWidget(m_pVMSelector);
     143
     144        /* Populate VM selector items: */
    129145        populateVMSelectorItems(selectedVMNames);
    130146    }
     
    157173bool UIWizardExportAppPageBasic1::isComplete() const
    158174{
    159     /* There should be at least one vm selected: */
     175    /* There should be at least one VM selected: */
    160176    return m_pVMSelector->selectedItems().size() > 0;
    161177}
     
    166182    bool fResult = true;
    167183
    168     /* Ask user about machines which are in save state currently: */
     184    /* Ask user about machines which are in Saved state currently: */
    169185    QStringList savedMachines;
    170186    QList<QListWidgetItem*> pItems = m_pVMSelector->selectedItems();
     
    186202    return UIWizardExportApp::Page3;
    187203}
    188 
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.h

    r69500 r72916  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616 */
    1717
    18 #ifndef __UIWizardExportAppPageBasic1_h__
    19 #define __UIWizardExportAppPageBasic1_h__
     18#ifndef ___UIWizardExportAppPageBasic1_h___
     19#define ___UIWizardExportAppPageBasic1_h___
    2020
    21 /* Local includes: */
     21/* GUI includes: */
    2222#include "UIWizardPage.h"
    2323
     
    2626class QIRichTextLabel;
    2727
    28 /* 1st page of the Export Appliance wizard (base part): */
     28
     29/** UIWizardPageBase extension for 1st page of the Export Appliance wizard. */
    2930class UIWizardExportAppPage1 : public UIWizardPageBase
    3031{
    3132protected:
    3233
    33     /* Constructor: */
     34    /** Constructs 1st page base. */
    3435    UIWizardExportAppPage1();
    3536
    36     /* Helping stuff: */
     37    /** Populates VM selector items on the basis of passed @a selectedVMNames. */
    3738    void populateVMSelectorItems(const QStringList &selectedVMNames);
    3839
    39     /* Stuff for 'machineNames' field: */
     40    /** Returns a list of selected machine names. */
    4041    QStringList machineNames() const;
    4142
    42     /* Stuff for 'machineIDs' field: */
     43    /** Returns a list of selected machine IDs. */
    4344    QStringList machineIDs() const;
    4445
    45     /* Widgets: */
     46    /** Holds the VM selector instance. */
    4647    QListWidget *m_pVMSelector;
    4748};
    4849
    49 /* 1st page of the Export Appliance wizard (basic extension): */
     50
     51/** UIWizardPage extension for 1st page of the Export Appliance wizard, extends UIWizardExportAppPage1 as well. */
    5052class UIWizardExportAppPageBasic1 : public UIWizardPage, public UIWizardExportAppPage1
    5153{
     
    5658public:
    5759
    58     /* Constructor: */
     60    /** Constructs 1st basic page.
     61      * @param  selectedVMNames  Brings the list of selected VM names. */
    5962    UIWizardExportAppPageBasic1(const QStringList &selectedVMNames);
    6063
    6164private:
    6265
    63     /* Translate stuff: */
     66    /** Handles translation event. */
    6467    void retranslateUi();
    6568
    66     /* Prepare stuff: */
     69    /** Performs page initialization. */
    6770    void initializePage();
    6871
    69     /* Validation stuff: */
     72    /** Returns whether page is complete. */
    7073    bool isComplete() const;
     74    /** Performs page validation. */
    7175    bool validatePage();
    7276
    73     /* Navigation stuff: */
     77    /** Returns next page ID. */
    7478    int nextId() const;
    7579
    76     /* Widgets: */
     80    /** Holds the label instance. */
    7781    QIRichTextLabel *m_pLabel;
    7882};
    7983
    80 #endif /* __UIWizardExportAppPageBasic1_h__ */
    81 
     84#endif /* !___UIWizardExportAppPageBasic1_h___ */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp

    r70805 r72916  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
    2121
    22 /* Global includes: */
     22/* Qt includes: */
    2323# include <QVBoxLayout>
    2424# include <QGroupBox>
    2525# include <QRadioButton>
    2626
    27 /* Local includes: */
     27/* GUI includes: */
    2828# include "UIWizardExportAppPageBasic2.h"
    2929# include "UIWizardExportApp.h"
     
    3333
    3434
     35/*********************************************************************************************************************************
     36*   Class UIWizardExportAppPage2 implementation.                                                                                 *
     37*********************************************************************************************************************************/
     38
    3539UIWizardExportAppPage2::UIWizardExportAppPage2()
    3640{
     
    3943void UIWizardExportAppPage2::chooseDefaultStorageType()
    4044{
    41     /* Just select first of types: */
     45    /* Choose Filesystem by default: */
    4246    setStorageType(Filesystem);
    4347}
     
    4549StorageType UIWizardExportAppPage2::storageType() const
    4650{
     51    /* Check SunCloud and S3: */
    4752    if (m_pTypeSunCloud->isChecked())
    4853        return SunCloud;
    4954    else if (m_pTypeSimpleStorageSystem->isChecked())
    5055        return S3;
     56
     57    /* Return Filesystem by default: */
    5158    return Filesystem;
    5259}
     
    5461void UIWizardExportAppPage2::setStorageType(StorageType storageType)
    5562{
     63    /* Check and focus the requested type: */
    5664    switch (storageType)
    5765    {
     
    7179}
    7280
     81
     82/*********************************************************************************************************************************
     83*   Class UIWizardExportAppPageBasic2 implementation.                                                                            *
     84*********************************************************************************************************************************/
     85
    7386UIWizardExportAppPageBasic2::UIWizardExportAppPageBasic2()
    7487{
    75     /* Create widgets: */
     88    /* Create main layout: */
    7689    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    7790    {
     91        /* Create label: */
    7892        m_pLabel = new QIRichTextLabel(this);
     93
     94        /* Create storage type container: */
    7995        m_pTypeCnt = new QGroupBox(this);
    8096        {
     97            /* Create storage type container layout: */
    8198            QVBoxLayout *pTypeCntLayout = new QVBoxLayout(m_pTypeCnt);
    8299            {
     100                /* Create Local Filesystem radio-button: */
    83101                m_pTypeLocalFilesystem = new QRadioButton(m_pTypeCnt);
     102                /* Create SunCloud radio-button: */
    84103                m_pTypeSunCloud = new QRadioButton(m_pTypeCnt);
     104                /* Create Simple Storage System radio-button: */
    85105                m_pTypeSimpleStorageSystem = new QRadioButton(m_pTypeCnt);
     106
     107                /* Add into layout: */
    86108                pTypeCntLayout->addWidget(m_pTypeLocalFilesystem);
    87109                pTypeCntLayout->addWidget(m_pTypeSunCloud);
     
    89111            }
    90112        }
     113
     114        /* Add into layout: */
    91115        pMainLayout->addWidget(m_pLabel);
    92116        pMainLayout->addWidget(m_pTypeCnt);
    93117        pMainLayout->addStretch();
     118
     119        /* Choose default storage type: */
    94120        chooseDefaultStorageType();
    95121    }
     
    102128    /* Register classes: */
    103129    qRegisterMetaType<StorageType>();
     130
    104131    /* Register fields: */
    105132    registerField("storageType", this, "storageType");
     
    126153    retranslateUi();
    127154}
    128 
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.h

    r69500 r72916  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616 */
    1717
    18 #ifndef __UIWizardExportAppPageBasic2_h__
    19 #define __UIWizardExportAppPageBasic2_h__
     18#ifndef ___UIWizardExportAppPageBasic2_h___
     19#define ___UIWizardExportAppPageBasic2_h___
    2020
    21 /* Local includes: */
     21/* GUI includes: */
    2222#include "UIWizardPage.h"
    2323#include "UIWizardExportAppDefs.h"
     
    2828class QIRichTextLabel;
    2929
    30 /* 2nd page of the Export Appliance wizard (base part): */
     30
     31/** UIWizardPageBase extension for 2nd page of the Export Appliance wizard. */
    3132class UIWizardExportAppPage2 : public UIWizardPageBase
    3233{
    3334protected:
    3435
    35     /* Constructor: */
     36    /** Constructs 2nd page base. */
    3637    UIWizardExportAppPage2();
    3738
    38     /* Helpers: */
     39    /** Chooses default storage type. */
    3940    void chooseDefaultStorageType();
    4041
    41     /* Stuff for 'storageType' field: */
     42    /** Returns current storage type. */
    4243    StorageType storageType() const;
     44    /** Defines current @a storageType. */
    4345    void setStorageType(StorageType storageType);
    4446
    45     /* Widgets: */
     47    /** Holds the storage type container instance. */
    4648    QGroupBox *m_pTypeCnt;
     49    /** Holds the Local Filesystem radio-button. */
    4750    QRadioButton *m_pTypeLocalFilesystem;
     51    /** Holds the Sun Cloud radio-button. */
    4852    QRadioButton *m_pTypeSunCloud;
     53    /** Holds the Simple Storage System radio-button. */
    4954    QRadioButton *m_pTypeSimpleStorageSystem;
    5055};
    5156
    52 /* 2nd page of the Export Appliance wizard (basic extension): */
     57
     58/** UIWizardPage extension for 2nd page of the Export Appliance wizard, extends UIWizardExportAppPage2 as well. */
    5359class UIWizardExportAppPageBasic2 : public UIWizardPage, public UIWizardExportAppPage2
    5460{
     
    5864public:
    5965
    60     /* Constructor: */
     66    /** Constructs 2nd basic page. */
    6167    UIWizardExportAppPageBasic2();
    6268
    6369private:
    6470
    65     /* Translate stuff: */
     71    /** Handles translation event. */
    6672    void retranslateUi();
    6773
    68     /* Prepare stuff: */
     74    /** Performs page initialization. */
    6975    void initializePage();
    7076
    71     /* Widgets: */
     77    /** Holds the label instance. */
    7278    QIRichTextLabel *m_pLabel;
    7379};
    7480
    75 #endif /* __UIWizardExportAppPageBasic2_h__ */
    76 
     81#endif /* !___UIWizardExportAppPageBasic2_h___ */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp

    r70805 r72916  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
    2121
    22 /* Global includes: */
     22/* Qt includes: */
    2323# include <QDir>
    2424# include <QVBoxLayout>
     
    2929# include <QCheckBox>
    3030
    31 /* Local includes: */
     31/* GUI includes: */
    3232# include "UIWizardExportAppPageBasic3.h"
    3333# include "UIWizardExportApp.h"
     
    4040
    4141
     42/*********************************************************************************************************************************
     43*   Class UIWizardExportAppPage3 implementation.                                                                                 *
     44*********************************************************************************************************************************/
     45
    4246UIWizardExportAppPage3::UIWizardExportAppPage3()
    4347{
     
    4650void UIWizardExportAppPage3::chooseDefaultSettings()
    4751{
    48     /* Choose default format: */
     52    /* Choose ovf-1.0 by default: */
    4953    setFormat("ovf-1.0");
    5054}
     
    225229}
    226230
     231
     232/*********************************************************************************************************************************
     233*   Class UIWizardExportAppPageBasic3 implementation.                                                                            *
     234*********************************************************************************************************************************/
     235
    227236UIWizardExportAppPageBasic3::UIWizardExportAppPageBasic3()
    228237{
    229     /* Create widgets: */
     238    /* Create main layout: */
    230239    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    231240    {
     241        /* Create label: */
    232242        m_pLabel = new QIRichTextLabel(this);
     243
     244        /* Create settings layout: */
    233245        QGridLayout *pSettingsLayout = new QGridLayout;
    234246        {
     247            /* Create username editor: */
    235248            m_pUsernameEditor = new QLineEdit(this);
     249            /* Create username label: */
    236250            m_pUsernameLabel = new QLabel(this);
    237251            {
     
    239253                m_pUsernameLabel->setBuddy(m_pUsernameEditor);
    240254            }
     255
     256            /* Create password editor: */
    241257            m_pPasswordEditor = new QLineEdit(this);
    242258            {
    243259                m_pPasswordEditor->setEchoMode(QLineEdit::Password);
    244260            }
     261            /* Create password label: */
    245262            m_pPasswordLabel = new QLabel(this);
    246263            {
     
    248265                m_pPasswordLabel->setBuddy(m_pPasswordEditor);
    249266            }
     267
     268            /* Create hostname editor: */
    250269            m_pHostnameEditor = new QLineEdit(this);
     270            /* Create hostname label: */
    251271            m_pHostnameLabel = new QLabel(this);
    252272            {
     
    254274                m_pHostnameLabel->setBuddy(m_pHostnameEditor);
    255275            }
     276
     277            /* Create bucket editor: */
    256278            m_pBucketEditor = new QLineEdit(this);
     279            /* Create bucket label: */
    257280            m_pBucketLabel = new QLabel(this);
    258281            {
     
    260283                m_pBucketLabel->setBuddy(m_pBucketEditor);
    261284            }
     285
     286            /* Create file selector: */
    262287            m_pFileSelector = new UIEmptyFilePathSelector(this);
    263288            {
     
    267292                m_pFileSelector->setDefaultSaveExt("ova");
    268293            }
     294            /* Create file selector label: */
    269295            m_pFileSelectorLabel = new QLabel(this);
    270296            {
     
    272298                m_pFileSelectorLabel->setBuddy(m_pFileSelector);
    273299            }
     300
     301            /* Create format combo-box: */
    274302            m_pFormatComboBox = new QComboBox(this);
    275303            {
     
    285313                        this, &UIWizardExportAppPageBasic3::sltHandleFormatComboChange);
    286314            }
     315            /* Create format combo-box label: */
    287316            m_pFormatComboBoxLabel = new QLabel(this);
    288317            {
     
    290319                m_pFormatComboBoxLabel->setBuddy(m_pFormatComboBox);
    291320            }
     321
     322            /* Add into layout: */
    292323            pSettingsLayout->addWidget(m_pUsernameLabel, 0, 0);
    293324            pSettingsLayout->addWidget(m_pUsernameEditor, 0, 1);
     
    303334            pSettingsLayout->addWidget(m_pFormatComboBox, 5, 1);
    304335        }
     336
     337        /* Create manifest check-box: */
    305338        m_pManifestCheckbox = new QCheckBox(this);
     339
     340        /* Add into layout: */
    306341        pMainLayout->addWidget(m_pLabel);
    307342        pMainLayout->addLayout(pSettingsLayout);
    308343        pMainLayout->addWidget(m_pManifestCheckbox);
    309344        pMainLayout->addStretch();
     345
     346        /* Choose default settings: */
    310347        chooseDefaultSettings();
    311348    }
     
    455492    }
    456493}
    457 
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.h

    r69500 r72916  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616 */
    1717
    18 #ifndef __UIWizardExportAppPageBasic3_h__
    19 #define __UIWizardExportAppPageBasic3_h__
     18#ifndef ___UIWizardExportAppPageBasic3_h___
     19#define ___UIWizardExportAppPageBasic3_h___
    2020
    21 /* Global includes: */
     21/* Qt includes: */
    2222#include <QVariant>
    2323
    24 /* Local includes: */
     24/* GUI includes: */
    2525#include "UIWizardPage.h"
    2626
     
    3333class QIRichTextLabel;
    3434
    35 /* 3rd page of the Export Appliance wizard (base part): */
     35
     36/** UIWizardPageBase extension for 3rd page of the Export Appliance wizard. */
    3637class UIWizardExportAppPage3 : public UIWizardPageBase
    3738{
    3839protected:
    3940
    40     /* Constructor: */
     41    /** Constructs 3rd page base. */
    4142    UIWizardExportAppPage3();
    4243
    43     /* Helpers: */
     44    /** Chooses default settings. */
    4445    void chooseDefaultSettings();
     46    /** Refreshes current settings. */
    4547    virtual void refreshCurrentSettings();
     48    /** Updates format combo tool-tips. */
    4649    virtual void updateFormatComboToolTip();
    4750
    48     /* Stuff for 'format' field: */
     51    /** Returns format. */
    4952    QString format() const;
     53    /** Defines @a strFormat. */
    5054    void setFormat(const QString &strFormat);
    51     /* Stuff for 'manifestSelected' field: */
     55
     56    /** Returns whether manifest selected. */
    5257    bool isManifestSelected() const;
     58    /** Defines whether manifest @a fSelected. */
    5359    void setManifestSelected(bool fChecked);
    54     /* Stuff for 'username' field: */
     60
     61    /** Returns user name. */
    5562    QString username() const;
     63    /** Defines @a strUserName. */
    5664    void setUserName(const QString &strUserName);
    57     /* Stuff for 'password' field: */
     65
     66    /** Returns password. */
    5867    QString password() const;
     68    /** Defines @a strPassword. */
    5969    void setPassword(const QString &strPassword);
    60     /* Stuff for 'hostname' field: */
     70
     71    /** Returns hostname. */
    6172    QString hostname() const;
     73    /** Defines @a strHostname. */
    6274    void setHostname(const QString &strHostname);
    63     /* Stuff for 'bucket' field: */
     75
     76    /** Returns bucket. */
    6477    QString bucket() const;
     78    /** Defines @a strBucket. */
    6579    void setBucket(const QString &strBucket);
    66     /* Stuff for 'path' field: */
     80
     81    /** Returns path. */
    6782    QString path() const;
     83    /** Defines @a strPath. */
    6884    void setPath(const QString &strPath);
    6985
    70     /* Variables: */
     86    /** Holds the default appliance name. */
    7187    QString m_strDefaultApplianceName;
    7288
    73     /* Widgets: */
     89    /** Holds the username label instance. */
    7490    QLabel *m_pUsernameLabel;
     91    /** Holds the username editor instance. */
    7592    QLineEdit *m_pUsernameEditor;
     93
     94    /** Holds the password label instance. */
    7695    QLabel *m_pPasswordLabel;
     96    /** Holds the password editor instance. */
    7797    QLineEdit *m_pPasswordEditor;
     98
     99    /** Holds the hostname label instance. */
    78100    QLabel *m_pHostnameLabel;
     101    /** Holds the hostname editor instance. */
    79102    QLineEdit *m_pHostnameEditor;
     103
     104    /** Holds the bucket label instance. */
    80105    QLabel *m_pBucketLabel;
     106    /** Holds the bucket editor instance. */
    81107    QLineEdit *m_pBucketEditor;
     108
     109    /** Holds the file selector label instance. */
    82110    QLabel *m_pFileSelectorLabel;
     111    /** Holds the file selector instance. */
    83112    UIEmptyFilePathSelector *m_pFileSelector;
     113
     114    /** Holds the format combo-box label instance. */
    84115    QLabel *m_pFormatComboBoxLabel;
     116    /** Holds the format combo-box instance. */
    85117    QComboBox *m_pFormatComboBox;
     118
     119    /** Holds the manifest check-box instance. */
    86120    QCheckBox *m_pManifestCheckbox;
    87121};
    88122
    89 /* 3rd page of the Export Appliance wizard (basic extension): */
     123
     124/** UIWizardPage extension for 3rd page of the Export Appliance wizard, extends UIWizardExportAppPage3 as well. */
    90125class UIWizardExportAppPageBasic3 : public UIWizardPage, public UIWizardExportAppPage3
    91126{
     
    101136public:
    102137
    103     /* Constructor: */
     138    /** Constructs 3rd basic page. */
    104139    UIWizardExportAppPageBasic3();
    105140
    106141protected:
    107142
    108     /* Wrapper to access 'wizard-field' from base part: */
     143    /** Allows access wizard-field from base part. */
    109144    QVariant fieldImp(const QString &strFieldName) const { return UIWizardPage::field(strFieldName); }
    110145
    111146private slots:
    112147
    113     /* Format combo change handler: */
     148    /** Handles change in format combo-box. */
    114149    void sltHandleFormatComboChange();
    115150
    116151private:
    117152
    118     /* Translate stuff: */
     153    /** Handles translation event. */
    119154    void retranslateUi();
    120155
    121     /* Prepare stuff: */
     156    /** Performs page initialization. */
    122157    void initializePage();
    123158
    124     /* Validation stuff: */
     159    /** Returns whether page is complete. */
    125160    bool isComplete() const;
    126161
    127     /* Helpers: */
     162    /** Refreshes current settings. */
    128163    void refreshCurrentSettings();
    129164
    130     /* Widgets: */
     165    /** Holds the label instance. */
    131166    QIRichTextLabel *m_pLabel;
    132167};
    133168
    134 #endif /* __UIWizardExportAppPageBasic3_h__ */
    135 
     169#endif /* !___UIWizardExportAppPageBasic3_h___ */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.cpp

    r69500 r72916  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3737#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    3838
     39
     40/*********************************************************************************************************************************
     41*   Class UIWizardExportAppPage4 implementation.                                                                                 *
     42*********************************************************************************************************************************/
    3943
    4044UIWizardExportAppPage4::UIWizardExportAppPage4()
     
    8589}
    8690
     91
     92/*********************************************************************************************************************************
     93*   Class UIWizardExportAppPageBasic4 implementation.                                                                            *
     94*********************************************************************************************************************************/
     95
    8796UIWizardExportAppPageBasic4::UIWizardExportAppPageBasic4()
    8897{
    89     /* Create widgets: */
     98    /* Create main layout: */
    9099    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    91100    {
     101        /* Create label: */
    92102        m_pLabel = new QIRichTextLabel(this);
     103
     104        /* Create appliance widget: */
    93105        m_pApplianceWidget = new UIApplianceExportEditorWidget(this);
    94106        {
    95107            m_pApplianceWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
    96108        }
     109
     110        /* Add into layout: */
    97111        pMainLayout->addWidget(m_pLabel);
    98112        pMainLayout->addWidget(m_pApplianceWidget);
     
    101115    /* Register classes: */
    102116    qRegisterMetaType<ExportAppliancePointer>();
     117
    103118    /* Register fields: */
    104119    registerField("applianceWidget", this, "applianceWidget");
     
    143158    return fResult;
    144159}
    145 
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.h

    r69500 r72916  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616 */
    1717
    18 #ifndef __UIWizardExportAppPageBasic4_h__
    19 #define __UIWizardExportAppPageBasic4_h__
     18#ifndef ___UIWizardExportAppPageBasic4_h___
     19#define ___UIWizardExportAppPageBasic4_h___
    2020
    21 /* Global includes: */
     21/* Qt includes: */
    2222#include <QVariant>
    2323
    24 /* Local includes: */
     24/* GUI includes: */
    2525#include "UIWizardPage.h"
    2626#include "UIWizardExportAppDefs.h"
     
    3030class QIRichTextLabel;
    3131
    32 /* 4th page of the Export Appliance wizard (base part): */
     32
     33/** UIWizardPageBase extension for 4th page of the Export Appliance wizard. */
    3334class UIWizardExportAppPage4 : public UIWizardPageBase
    3435{
    3536protected:
    3637
    37     /* Constructor: */
     38    /** Constructs 4th page base. */
    3839    UIWizardExportAppPage4();
    3940
    40     /* Helpers: */
    41     void refreshApplianceSettingsWidget(    );
     41    /** Refreshes appliance settings widget. */
     42    void refreshApplianceSettingsWidget();
    4243
    43     /* Stuff for 'applianceWidget' field: */
     44    /** Returns the appliance widget reference. */
    4445    ExportAppliancePointer applianceWidget() const { return m_pApplianceWidget; }
    4546
    46     /* Widgets: */
     47    /** Holds the appliance widget reference. */
    4748    UIApplianceExportEditorWidget *m_pApplianceWidget;
    4849};
    4950
    50 /* 4th page of the Export Appliance wizard (basic extension): */
     51
     52/** UIWizardPage extension for 4th page of the Export Appliance wizard, extends UIWizardExportAppPage4 as well. */
    5153class UIWizardExportAppPageBasic4 : public UIWizardPage, public UIWizardExportAppPage4
    5254{
     
    5658public:
    5759
    58     /* Constructor: */
     60    /** Constructs 4th basic page. */
    5961    UIWizardExportAppPageBasic4();
    6062
    6163protected:
    6264
    63     /* Wrapper to access 'wizard' from base part: */
     65    /** Allows access wizard from base part. */
    6466    UIWizard* wizardImp() { return UIWizardPage::wizard(); }
    65     /* Wrapper to access 'this' from base part: */
     67    /** Allows access page from base part. */
    6668    UIWizardPage* thisImp() { return this; }
    67     /* Wrapper to access 'wizard-field' from base part: */
     69    /** Allows access wizard-field from base part. */
    6870    QVariant fieldImp(const QString &strFieldName) const { return UIWizardPage::field(strFieldName); }
    6971
    7072private:
    7173
    72     /* Translate stuff: */
     74    /** Handles translation event. */
    7375    void retranslateUi();
    7476
    75     /* Prepare stuff: */
     77    /** Performs page initialization. */
    7678    void initializePage();
    7779
    78     /* Validation stuff: */
     80    /** Performs page validation. */
    7981    bool validatePage();
    8082
    81     /* Widgets: */
     83    /** Holds the label instance. */
    8284    QIRichTextLabel *m_pLabel;
    8385};
    8486
    85 #endif /* __UIWizardExportAppPageBasic4_h__ */
    86 
     87#endif /* !___UIWizardExportAppPageBasic4_h___ */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp

    r70805 r72916  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
    2121
    22 /* Global includes: */
     22/* Qt includes: */
    2323# include <QVBoxLayout>
    2424# include <QGridLayout>
     
    3131# include <QGroupBox>
    3232
    33 /* Local includes: */
     33/* GUI includes: */
    3434# include "UIWizardExportAppPageExpert.h"
    3535# include "UIWizardExportApp.h"
     
    4242
    4343
     44/*********************************************************************************************************************************
     45*   Class UIWizardExportAppPageExpert implementation.                                                                            *
     46*********************************************************************************************************************************/
     47
    4448UIWizardExportAppPageExpert::UIWizardExportAppPageExpert(const QStringList &selectedVMNames)
    4549{
     
    4751    QGridLayout *pMainLayout = new QGridLayout(this);
    4852    {
     53        /* Create VM selector container: */
    4954        m_pSelectorCnt = new QGroupBox(this);
    5055        {
     56            /* Create VM selector container layout: */
    5157            QVBoxLayout *pSelectorCntLayout = new QVBoxLayout(m_pSelectorCnt);
    5258            {
     59                /* Create VM selector: */
    5360                m_pVMSelector = new QListWidget(m_pSelectorCnt);
    5461                {
     
    5663                    m_pVMSelector->setSelectionMode(QAbstractItemView::ExtendedSelection);
    5764                }
     65
     66                /* Add into layout: */
    5867                pSelectorCntLayout->addWidget(m_pVMSelector);
    5968            }
    6069        }
     70
     71        /* Create appliance widget container: */
    6172        m_pApplianceCnt = new QGroupBox(this);
    6273        {
     74            /* Create appliance widget container layout: */
    6375            QVBoxLayout *pApplianceCntLayout = new QVBoxLayout(m_pApplianceCnt);
    6476            {
     77                /* Create appliance widget: */
    6578                m_pApplianceWidget = new UIApplianceExportEditorWidget(m_pApplianceCnt);
    6679                {
     
    6881                    m_pApplianceWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
    6982                }
     83
     84                /* Add into layout: */
    7085                pApplianceCntLayout->addWidget(m_pApplianceWidget);
    7186            }
    7287        }
     88
     89        /* Create storage type container: */
    7390        m_pTypeCnt = new QGroupBox(this);
    7491        {
     92            /* Hide it for now: */
    7593            m_pTypeCnt->hide();
     94
     95            /* Create storage type container layout: */
    7696            QVBoxLayout *pTypeCntLayout = new QVBoxLayout(m_pTypeCnt);
    7797            {
     98                /* Create Local Filesystem radio-button: */
    7899                m_pTypeLocalFilesystem = new QRadioButton(m_pTypeCnt);
     100                /* Create SunCloud radio-button: */
    79101                m_pTypeSunCloud = new QRadioButton(m_pTypeCnt);
     102                /* Create Simple Storage System radio-button: */
    80103                m_pTypeSimpleStorageSystem = new QRadioButton(m_pTypeCnt);
     104
     105                /* Add into layout: */
    81106                pTypeCntLayout->addWidget(m_pTypeLocalFilesystem);
    82107                pTypeCntLayout->addWidget(m_pTypeSunCloud);
     
    84109            }
    85110        }
     111
     112        /* Create settings widget container: */
    86113        m_pSettingsCnt = new QGroupBox(this);
    87114        {
     115            /* Create settings widget container layout: */
    88116            QGridLayout *pSettingsLayout = new QGridLayout(m_pSettingsCnt);
    89117            {
     118                /* Create username editor: */
    90119                m_pUsernameEditor = new QLineEdit(m_pSettingsCnt);
     120                /* Create username label: */
    91121                m_pUsernameLabel = new QLabel(m_pSettingsCnt);
    92122                {
     
    94124                    m_pUsernameLabel->setBuddy(m_pUsernameEditor);
    95125                }
     126
     127                /* Create password editor: */
    96128                m_pPasswordEditor = new QLineEdit(m_pSettingsCnt);
    97129                {
    98130                    m_pPasswordEditor->setEchoMode(QLineEdit::Password);
    99131                }
     132                /* Create password label: */
    100133                m_pPasswordLabel = new QLabel(m_pSettingsCnt);
    101134                {
     
    103136                    m_pPasswordLabel->setBuddy(m_pPasswordEditor);
    104137                }
     138
     139                /* Create hostname editor: */
    105140                m_pHostnameEditor = new QLineEdit(m_pSettingsCnt);
     141                /* Create hostname label: */
    106142                m_pHostnameLabel = new QLabel(m_pSettingsCnt);
    107143                {
     
    109145                    m_pHostnameLabel->setBuddy(m_pHostnameEditor);
    110146                }
     147
     148                /* Create bucket editor: */
    111149                m_pBucketEditor = new QLineEdit(m_pSettingsCnt);
     150                /* Create bucket label: */
    112151                m_pBucketLabel = new QLabel(m_pSettingsCnt);
    113152                {
     
    115154                    m_pBucketLabel->setBuddy(m_pBucketEditor);
    116155                }
     156
     157                /* Create file selector: */
    117158                m_pFileSelector = new UIEmptyFilePathSelector(m_pSettingsCnt);
    118159                {
     
    122163                    m_pFileSelector->setDefaultSaveExt("ova");
    123164                }
     165                /* Create file selector label: */
    124166                m_pFileSelectorLabel = new QLabel(m_pSettingsCnt);
    125167                {
     
    127169                    m_pFileSelectorLabel->setBuddy(m_pFileSelector);
    128170                }
     171
     172                /* Create format combo-box editor: */
    129173                m_pFormatComboBox = new QComboBox(m_pSettingsCnt);
    130174                {
     
    140184                            this, &UIWizardExportAppPageExpert::sltHandleFormatComboChange);
    141185                }
     186                /* Create format combo-box label: */
    142187                m_pFormatComboBoxLabel = new QLabel(m_pSettingsCnt);
    143188                {
     
    145190                    m_pFormatComboBoxLabel->setBuddy(m_pFormatComboBox);
    146191                }
     192
     193                /* Create manifest check-box editor: */
    147194                m_pManifestCheckbox = new QCheckBox(m_pSettingsCnt);
     195
     196                /* Add into layout: */
    148197                pSettingsLayout->addWidget(m_pUsernameLabel, 0, 0);
    149198                pSettingsLayout->addWidget(m_pUsernameEditor, 0, 1);
     
    161210            }
    162211        }
     212
     213        /* Add into layout: */
    163214        pMainLayout->addWidget(m_pSelectorCnt, 0, 0);
    164215        pMainLayout->addWidget(m_pApplianceCnt, 0, 1);
    165216        pMainLayout->addWidget(m_pTypeCnt, 1, 0, 1, 2);
    166217        pMainLayout->addWidget(m_pSettingsCnt, 2, 0, 1, 2);
     218
     219        /* Populate VM selector items: */
    167220        populateVMSelectorItems(selectedVMNames);
     221        /* Choose default storage type: */
    168222        chooseDefaultStorageType();
     223        /* Choose default settings: */
    169224        chooseDefaultSettings();
    170225    }
     
    184239    qRegisterMetaType<StorageType>();
    185240    qRegisterMetaType<ExportAppliancePointer>();
     241
    186242    /* Register fields: */
    187243    registerField("machineNames", this, "machineNames");
     
    227283    /* Translate objects: */
    228284    m_strDefaultApplianceName = UIWizardExportApp::tr("Appliance");
     285
    229286    /* Translate widgets: */
    230287    m_pSelectorCnt->setTitle(UIWizardExportApp::tr("Virtual &machines to export"));
     
    334391    return fResult;
    335392}
    336 
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h

    r69500 r72916  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616 */
    1717
    18 #ifndef __UIWizardExportAppPageExpert_h__
    19 #define __UIWizardExportAppPageExpert_h__
     18#ifndef ___UIWizardExportAppPageExpert_h___
     19#define ___UIWizardExportAppPageExpert_h___
    2020
    21 /* Local includes: */
     21/* GUI includes: */
    2222#include "UIWizardExportAppPageBasic1.h"
    2323#include "UIWizardExportAppPageBasic2.h"
     
    2828class QGroupBox;
    2929
    30 /* Expert page of the Export Appliance wizard: */
     30/** UIWizardPage extension for 4th page of the Export Appliance wizard,
     31  * extends UIWizardExportAppPage1, UIWizardExportAppPage2,
     32  *         UIWizardExportAppPage3, UIWizardExportAppPage4 as well. */
    3133class UIWizardExportAppPageExpert : public UIWizardPage,
    3234                                    public UIWizardExportAppPage1,
     
    5052public:
    5153
    52     /* Constructor: */
     54    /** Constructs expert basic page.
     55      * @param  selectedVMNames  Brings the list of selected VM names. */
    5356    UIWizardExportAppPageExpert(const QStringList &selectedVMNames);
    5457
    5558protected:
    5659
    57     /* Wrapper to access 'wizard' from base part: */
     60    /** Allows access wizard from base part. */
    5861    UIWizard* wizardImp() { return UIWizardPage::wizard(); }
    59     /* Wrapper to access 'this' from base part: */
     62    /** Allows access page from base part. */
    6063    UIWizardPage* thisImp() { return this; }
    61     /* Wrapper to access 'wizard-field' from base part: */
     64    /** Allows access wizard-field from base part. */
    6265    QVariant fieldImp(const QString &strFieldName) const { return UIWizardPage::field(strFieldName); }
    6366
    6467private slots:
    6568
    66     /* VM Selector selection change handler: */
     69    /** Handles VM selector index change. */
    6770    void sltVMSelectionChangeHandler();
    6871
    69     /* Storage-type change handler: */
     72    /** Handles storage type change. */
    7073    void sltStorageTypeChangeHandler();
    7174
    72     /* Format combo change handler: */
     75    /** Handles format combo change. */
    7376    void sltHandleFormatComboChange();
    7477
    7578private:
    7679
    77     /* Field API: */
     80    /** Wraps wizard field API, calling it with certain @a strFieldName argument. */
    7881    QVariant field(const QString &strFieldName) const { return UIWizardPage::field(strFieldName); }
    7982
    80     /* Translate stuff: */
     83    /** Handles translation event. */
    8184    void retranslateUi();
    8285
    83     /* Prepare stuff: */
     86    /** Performs page initialization. */
    8487    void initializePage();
    8588
    86     /* Validation stuff: */
     89    /** Returns whether page is complete. */
    8790    bool isComplete() const;
     91    /** Performs page validation. */
    8892    bool validatePage();
    8993
    90     /* Widgets: */
     94    /** Holds the VM selector container instance. */
    9195    QGroupBox *m_pSelectorCnt;
     96    /** Holds the appliance widget container reference. */
    9297    QGroupBox *m_pApplianceCnt;
     98    /** Holds the settings widget container reference. */
    9399    QGroupBox *m_pSettingsCnt;
    94100};
    95101
    96 #endif /* __UIWizardExportAppPageExpert_h__ */
    97 
     102#endif /* !___UIWizardExportAppPageExpert_h___ */
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