VirtualBox

Changeset 79699 in vbox


Ignore:
Timestamp:
Jul 11, 2019 2:16:41 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9484: Export Appliance wizard: Initial implementation for ask-then-export mode where export and launch forms being acquired/filled before exporting/launching itself.

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

Legend:

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

    r79697 r79699  
    316316            options.append(KExportOptions_ExportDVDImages);
    317317
     318        /* Is this VM being exported to cloud? */
     319        if (field("isFormatCloudOne").toBool())
     320        {
     321            /* We can have wizard and it's result
     322             * should be distinguishable: */
     323            int iWizardResult = -1;
     324
     325            switch (field("cloudExportMode").value<CloudExportMode>())
     326            {
     327                case CloudExportMode_AskThenExport:
     328                {
     329                    /* Get the required parameters to init short wizard mode: */
     330                    CCloudClient comClient = field("client").value<CCloudClient>();
     331                    CVirtualSystemDescription comDescription = field("vsd").value<CVirtualSystemDescription>();
     332                    /* Create and run wizard as modal dialog, but prevent final step: */
     333                    pNewCloudVMWizard = new UIWizardNewCloudVM(this, comClient, comDescription);
     334                    pNewCloudVMWizard->setFinalStepPrevented(true);
     335                    pNewCloudVMWizard->prepare();
     336                    iWizardResult = pNewCloudVMWizard->exec();
     337                    break;
     338                }
     339                default:
     340                    break;
     341            }
     342
     343            /* We should stop everything only if
     344             * there was wizard and it was rejected: */
     345            if (iWizardResult == QDialog::Rejected)
     346                break;
     347        }
     348
    318349        /* Prepare Export VM progress: */
    319350        CProgress comProgress = comAppliance.Write(field("format").toString(), options, uri());
     
    344375            switch (field("cloudExportMode").value<CloudExportMode>())
    345376            {
     377                case CloudExportMode_AskThenExport:
     378                {
     379                    /* Run the wizard as modal dialog again,
     380                     * moreover in auto-finish mode and
     381                     * do not prevent final step. */
     382                    pNewCloudVMWizard->setFinalStepPrevented(false);
     383                    pNewCloudVMWizard->scheduleAutoFinish();
     384                    iWizardResult = pNewCloudVMWizard->exec();
     385                    break;
     386                }
    346387                case CloudExportMode_ExportThenAsk:
    347388                {
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp

    r79661 r79699  
    926926                    if (m_pRadioAskThenExport)
    927927                    {
    928                         m_pRadioAskThenExport->setEnabled(false);
    929 
    930928                        /* Add into layout: */
    931929                        m_pSettingsLayout2->addWidget(m_pRadioAskThenExport, 3, 1);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp

    r79590 r79699  
    391391                            if (m_pRadioAskThenExport)
    392392                            {
    393                                 m_pRadioAskThenExport->setEnabled(false);
    394 
    395393                                /* Add into layout: */
    396394                                m_pSettingsLayout2->addWidget(m_pRadioAskThenExport, 3, 1);
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