VirtualBox

Changeset 92036 in vbox for trunk


Ignore:
Timestamp:
Oct 25, 2021 1:50:22 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10067: UIWizardNewCloudVM: Migrate UIMessageCenter stuff to UINotificationCenter.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp

    r92034 r92036  
    620620}
    621621
     622/* static */
    622623void UINotificationMessage::cannotAcquireDispayParameter(const CDisplay &comDisplay)
    623624{
     
    626627        QApplication::translate("UIMessageCenter", "Failed to acquire display parameter.") +
    627628        UIErrorString::formatErrorInfo(comDisplay));
     629}
     630
     631/* static */
     632void UINotificationMessage::cannotAcquireVirtualSystemDescriptionFormParameter(const CVirtualSystemDescriptionForm &comVsdForm,
     633                                                                               UINotificationCenter *pParent)
     634{
     635    createMessage(
     636        QApplication::translate("UIMessageCenter", "VSD form failure ..."),
     637        QApplication::translate("UIMessageCenter", "Failed to acquire virtual system description form parameter.") +
     638        UIErrorString::formatErrorInfo(comVsdForm),
     639        QString(), QString(), pParent);
    628640}
    629641
     
    709721        QApplication::translate("UIMessageCenter", "Failed to assign cloud profile parameter.") +
    710722        UIErrorString::formatErrorInfo(comProfile));
     723}
     724
     725/* static */
     726void UINotificationMessage::cannotChangeVirtualSystemDescriptionParameter(const CVirtualSystemDescription &comVsd,
     727                                                                          UINotificationCenter *pParent)
     728{
     729    createMessage(
     730        QApplication::translate("UIMessageCenter", "VSD failure ..."),
     731        QApplication::translate("UIMessageCenter", "Failed to assign virtual system description parameter.") +
     732        UIErrorString::formatErrorInfo(comVsd),
     733        QString(), QString(), pParent);
    711734}
    712735
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h

    r92034 r92036  
    263263          * @param  comNetwork  Brings the object parameter get acquired from. */
    264264        static void cannotAcquireDispayParameter(const CDisplay &comDisplay);
     265        /** Notifies about inability to acquire IVirtualSystemDescriptionForm parameter.
     266          * @param  comVsdForm  Brings the object parameter get acquired from. */
     267        static void cannotAcquireVirtualSystemDescriptionFormParameter(const CVirtualSystemDescriptionForm &comVsdForm,
     268                                                                       UINotificationCenter *pParent);
    265269
    266270        /** Notifies about inability to change IMedium parameter.
     
    291295          * @param  comProfile  Brings the object parameter being changed for. */
    292296        static void cannotChangeCloudProfileParameter(const CCloudProfile &comProfile);
     297        /** Notifies about inability to change IVirtualSystemDescription parameter.
     298          * @param  comVsd  Brings the object parameter being changed for. */
     299        static void cannotChangeVirtualSystemDescriptionParameter(const CVirtualSystemDescription &comVsd,
     300                                                                  UINotificationCenter *pParent);
    293301
    294302        /** Notifies about inability to enumerate host USB devices.
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVM.cpp

    r92024 r92036  
    1717
    1818/* GUI includes: */
    19 #include "UIMessageCenter.h"
    2019#include "UINotificationCenter.h"
    2120#include "UIWizardNewCloudVM.h"
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp

    r91698 r92036  
    2929#include "UIFormEditorWidget.h"
    3030#include "UIIconPool.h"
    31 #include "UIMessageCenter.h"
     31#include "UINotificationCenter.h"
    3232#include "UIVirtualBoxEventHandler.h"
    3333#include "UIVirtualBoxManager.h"
     
    286286        fResult = comForm.isOk();
    287287        if (!fResult)
    288             msgCenter().cannotAcquireVirtualSystemDescriptionFormProperty(comForm);
     288            UINotificationMessage::cannotAcquireVirtualSystemDescriptionFormParameter(comForm, wizard()->notificationCenter());
    289289    }
    290290
     
    359359    m_strSourceImageId = currentListWidgetData(m_pSourceImageList);
    360360    wizard()->setVSD(createVirtualSystemDescription(wizard()));
    361     populateFormProperties(wizard()->vsd(), m_pSourceTabBar, m_strSourceImageId);
     361    populateFormProperties(wizard()->vsd(), wizard(), m_pSourceTabBar, m_strSourceImageId);
    362362    wizard()->createVSDForm();
    363363    updatePropertiesTable();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageProperties.cpp

    r91412 r92036  
    2323#include "QIRichTextLabel.h"
    2424#include "UIFormEditorWidget.h"
    25 #include "UIMessageCenter.h"
     25#include "UINotificationCenter.h"
    2626#include "UIWizardNewCloudVM.h"
    2727#include "UIWizardNewCloudVMPageProperties.h"
     
    141141        fResult = comForm.isOk();
    142142        if (!fResult)
    143             msgCenter().cannotAcquireVirtualSystemDescriptionFormProperty(comForm);
     143            UINotificationMessage::cannotAcquireVirtualSystemDescriptionFormParameter(comForm, wizard()->notificationCenter());
    144144    }
    145145
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.cpp

    r91698 r92036  
    2929#include "UICloudNetworkingStuff.h"
    3030#include "UIIconPool.h"
    31 #include "UIMessageCenter.h"
     31#include "UINotificationCenter.h"
    3232#include "UIVirtualBoxEventHandler.h"
    3333#include "UIVirtualBoxManager.h"
     
    217217
    218218void UIWizardNewCloudVMSource::populateFormProperties(CVirtualSystemDescription comVSD,
     219                                                      UIWizardNewCloudVM *pWizard,
    219220                                                      QTabBar *pTabBar,
    220221                                                      const QString &strImageId)
     
    234235    }
    235236    if (!comVSD.isOk())
    236         msgCenter().cannotAddVirtualSystemDescriptionValue(comVSD);
     237        UINotificationMessage::cannotChangeVirtualSystemDescriptionParameter(comVSD, pWizard->notificationCenter());
    237238}
    238239
     
    517518    /* Populate vsd and form properties: */
    518519    wizard()->setVSD(createVirtualSystemDescription(wizard()));
    519     populateFormProperties(wizard()->vsd(), m_pSourceTabBar, m_strSourceImageId);
     520    populateFormProperties(wizard()->vsd(), wizard(), m_pSourceTabBar, m_strSourceImageId);
    520521    wizard()->createVSDForm();
    521522
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.h

    r91698 r92036  
    6262      * @param  strProviderShortName  Brings the short name of provider profiles related to.
    6363      * @param  strProfileName        Brings the name of profile to be chosen by default. */
    64     void populateProfiles(QIComboBox *pCombo, const QString &strProviderShortName, const QString &strProfileName);
    65     /** Populates @a pList with source images from tab of @a pTabBar available in @a comClient. */
    66     void populateSourceImages(QListWidget *pList, QTabBar *pTabBar, const CCloudClient &comClient);
    67     /** Populates @a comVSD with form property suitable for tab of @a pTabBar with @a strImageId value. */
    68     void populateFormProperties(CVirtualSystemDescription comVSD, QTabBar *pTabBar, const QString &strImageId);
     64    void populateProfiles(QIComboBox *pCombo,
     65                          const QString &strProviderShortName,
     66                          const QString &strProfileName);
     67    /** Populates @a pList with source images.
     68      @param  pTabBar    Brings the tab-bar source images should be acquired for.
     69      @param  comClient  Brings the cloud client source images should be acquired from. */
     70    void populateSourceImages(QListWidget *pList,
     71                              QTabBar *pTabBar,
     72                              const CCloudClient &comClient);
     73    /** Populates @a comVSD with form property.
     74      * @param  pWizard     Brings the wizard used as parent for warnings inside.
     75      * @param  pTabBar     Brings the tab-bar property should gather according to.
     76      * @param  strImageId  Brings the image id which should be added as property. */
     77    void populateFormProperties(CVirtualSystemDescription comVSD,
     78                                UIWizardNewCloudVM *pWizard,
     79                                QTabBar *pTabBar,
     80                                const QString &strImageId);
    6981
    7082    /** Updates @a pCombo tool-tips. */
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