VirtualBox

Changeset 78214 in vbox for trunk


Ignore:
Timestamp:
Apr 19, 2019 2:17:33 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9434: Import Appliance wizard: 1st basic page: Split label to main and description labels, first is common, second with description of chosen source.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp

    r78213 r78214  
    416416UIWizardImportAppPageBasic1::UIWizardImportAppPageBasic1(bool fImportFromOCIByDefault)
    417417    : UIWizardImportAppPage1(fImportFromOCIByDefault)
    418     , m_pLabel(0)
     418    , m_pLabelMain(0)
     419    , m_pLabelDescription(0)
    419420{
    420421    /* Create main layout: */
     
    422423    if (pMainLayout)
    423424    {
    424         /* Create label: */
    425         m_pLabel = new QIRichTextLabel(this);
    426         if (m_pLabel)
    427         {
     425        /* Create main label: */
     426        m_pLabelMain = new QIRichTextLabel(this);
     427        if (m_pLabelMain)
     428        {
     429            m_pLabelMain->hide();
     430
    428431            /* Add into layout: */
    429             pMainLayout->addWidget(m_pLabel);
     432            pMainLayout->addWidget(m_pLabelMain);
    430433        }
    431434
     
    446449                m_pSourceLayout->addWidget(m_pSourceLabel, 0, 0, Qt::AlignRight);
    447450            }
    448 
    449451            /* Create source selector: */
    450452            m_pSourceComboBox = new QIComboBox(this);
     
    456458                /* Add into layout: */
    457459                m_pSourceLayout->addWidget(m_pSourceComboBox, 0, 1);
     460            }
     461
     462            /* Create description label: */
     463            m_pLabelDescription = new QIRichTextLabel(this);
     464            if (m_pLabelDescription)
     465            {
     466                /* Add into layout: */
     467                m_pSourceLayout->addWidget(m_pLabelDescription, 1, 0, 1, 2);
    458468            }
    459469
     
    673683    setTitle(UIWizardImportApp::tr("Appliance to import"));
    674684
    675     /* Translate label: */
    676     m_pLabel->setText(UIWizardImportApp::tr("<p>VirtualBox currently supports importing appliances "
    677                                             "saved in the Open Virtualization Format (OVF). "
    678                                             "To continue, select the file to import below.</p>"));
     685    /* Translate main label: */
     686    m_pLabelMain->setText(UIWizardImportApp::tr("Please choose the source to import appliance from.  This can be a "
     687                                                "local file system to import OVF archive or one of known  cloud "
     688                                                "service providers to import cloud VM from."));
    679689
    680690    /* Translate source label: */
     
    804814}
    805815
     816void UIWizardImportAppPageBasic1::updatePageAppearance()
     817{
     818    /* Call to base-class: */
     819    UIWizardImportAppPage1::updatePageAppearance();
     820
     821    /* Update page appearance according to chosen storage-type: */
     822    if (isSourceCloudOne())
     823    {
     824        m_pLabelDescription->setText(UIWizardImportApp::
     825                                     tr("<p>Please choose one of cloud service accounts you have registered to import virtual "
     826                                        "machine from.  Corresponding machines list will be updated.  To continue, "
     827                                        "select one of machines to import below.</p>"));
     828        m_pAccountInstanceList->setFocus();
     829    }
     830    else
     831    {
     832        m_pLabelDescription->setText(UIWizardImportApp::
     833                                     tr("<p>Please choose a file to import the virtual appliance from.  VirtualBox currently "
     834                                        "supports importing appliances saved in the Open Virtualization Format (OVF).  "
     835                                        "To continue, select the file to import below.</p>"));
     836        m_pFileSelector->setFocus();
     837    }
     838}
     839
    806840void UIWizardImportAppPageBasic1::sltHandleSourceChange()
    807841{
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h

    r78213 r78214  
    180180    virtual bool validatePage() /* override */;
    181181
     182    /** Updates page appearance. */
     183    virtual void updatePageAppearance() /* override */;
     184
    182185private slots:
    183186
     
    193196private:
    194197
    195     /** Holds the label instance. */
    196     QIRichTextLabel *m_pLabel;
     198    /** Holds the main label instance. */
     199    QIRichTextLabel *m_pLabelMain;
     200    /** Holds the description label instance. */
     201    QIRichTextLabel *m_pLabelDescription;
    197202};
    198203
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