VirtualBox

Changeset 67965 in vbox


Ignore:
Timestamp:
Jul 14, 2017 1:01:13 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8400: Virtual Media Manager: A bit of fixes for medium details widget.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r67923 r67965  
    12171217             .arg(gpConverter->toString(oldMediumType)).arg(gpConverter->toString(newMediumType)),
    12181218          formatErrorInfo(medium));
     1219}
     1220
     1221void UIMessageCenter::cannotMoveMediumStorage(const CMedium &comMedium, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent /* = 0 */) const
     1222{
     1223    error(pParent, MessageType_Error,
     1224          tr("Failed to move the storage unit of the disk image <b>%1</b> to <b>%2</b>.")
     1225             .arg(strLocationOld, strLocationNew),
     1226          formatErrorInfo(comMedium));
     1227}
     1228
     1229void UIMessageCenter::cannotMoveMediumStorage(const CProgress &comProgress, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent /* = 0 */) const
     1230{
     1231    error(pParent, MessageType_Error,
     1232          tr("Failed to move the storage unit of the disk image <b>%1</b> to <b>%2</b>.")
     1233             .arg(strLocationOld, strLocationNew),
     1234          formatErrorInfo(comProgress));
    12191235}
    12201236
     
    13251341             .arg(strLocation),
    13261342          formatErrorInfo(progress));
    1327 }
    1328 
    1329 void UIMessageCenter::cannotMoveHardDiskStorage(const CMedium &comMedium, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent /* = 0 */) const
    1330 {
    1331     error(pParent, MessageType_Error,
    1332           tr("Failed to move the storage unit of the hard disk <b>%1</b> to <b>%2</b>.")
    1333              .arg(strLocationOld, strLocationNew),
    1334           formatErrorInfo(comMedium));
    1335 }
    1336 
    1337 void UIMessageCenter::cannotMoveHardDiskStorage(const CProgress &comProgress, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent /* = 0 */) const
    1338 {
    1339     error(pParent, MessageType_Error,
    1340           tr("Failed to move the storage unit of the hard disk <b>%1</b> to <b>%2</b>.")
    1341              .arg(strLocationOld, strLocationNew),
    1342           formatErrorInfo(comProgress));
    13431343}
    13441344
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r67923 r67965  
    245245    /* API: Virtual Medium Manager warnings: */
    246246    void cannotChangeMediumType(const CMedium &medium, KMediumType oldMediumType, KMediumType newMediumType, QWidget *pParent = 0) const;
     247    void cannotMoveMediumStorage(const CMedium &comMedium, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent = 0) const;
     248    void cannotMoveMediumStorage(const CProgress &comProgress, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent = 0) const;
    247249    bool confirmMediumRelease(const UIMedium &medium, QWidget *pParent = 0) const;
    248250    bool confirmMediumRemoval(const UIMedium &medium, QWidget *pParent = 0) const;
     
    250252    void cannotDeleteHardDiskStorage(const CMedium &medium, const QString &strLocation, QWidget *pParent = 0) const;
    251253    void cannotDeleteHardDiskStorage(const CProgress &progress, const QString &strLocation, QWidget *pParent = 0) const;
    252     void cannotMoveHardDiskStorage(const CMedium &comMedium, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent = 0) const;
    253     void cannotMoveHardDiskStorage(const CProgress &comProgress, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent = 0) const;
    254254    void cannotResizeHardDiskStorage(const CMedium &comMedium, const QString &strLocation, const QString &strSizeOld, const QString &strSizeNew, QWidget *pParent = 0) const;
    255255    void cannotResizeHardDiskStorage(const CProgress &comProgress, const QString &strLocation, const QString &strSizeOld, const QString &strSizeNew, QWidget *pParent = 0) const;
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDetailsWidget.cpp

    r67947 r67965  
    136136}
    137137
    138 void UIMediumDetailsWidget::sltSizeEditorChanged(qulonglong uSize)
     138void UIMediumDetailsWidget::sltSizeValueChanged(qulonglong uSize)
    139139{
    140140    m_newData.m_options.m_uLogicalSize = uSize;
     
    349349                    m_pEditorSize->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
    350350                    connect(m_pEditorSize, &UIMediumSizeEditor::sigSizeChanged,
    351                             this, &UIMediumDetailsWidget::sltSizeEditorChanged);
     351                            this, &UIMediumDetailsWidget::sltSizeValueChanged);
    352352
    353353                    /* Add into layout: */
     
    361361                    /* Configure label: */
    362362                    m_pErrorPaneSize->setAlignment(Qt::AlignCenter);
     363                    m_pErrorPaneSize->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
    363364                    m_pErrorPaneSize->setPixmap(UIIconPool::iconSet(":/status_error_16px.png")
    364                                                     .pixmap(QSize(iIconMetric, iIconMetric)));
    365 
    366                     /* Add into layout: */
    367                     pLayoutSize->addWidget(m_pErrorPaneSize, 0, 1);
     365                                                .pixmap(QSize(iIconMetric, iIconMetric)));
     366
     367                    /* Add into layout: */
     368                    pLayoutSize->addWidget(m_pErrorPaneSize, 0, 1, Qt::AlignCenter);
    368369                }
    369370
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDetailsWidget.h

    r67947 r67965  
    201201        void sltLocationPathChanged(const QString &strPath);
    202202        /** Handles size editor change. */
    203         void sltSizeEditorChanged(qulonglong uSize);
     203        void sltSizeValueChanged(qulonglong uSize);
    204204
    205205        /** Handles button-box button click. */
     
    277277
    278278        /** Holds the location label. */
    279         QLabel    *m_pLabelLocation;
     279        QLabel             *m_pLabelLocation;
    280280        /** Holds the location selector. */
    281281        UIFilePathSelector *m_pSelectorLocation;
    282282        /** Holds the location error pane. */
    283         QLabel    *m_pErrorPaneLocation;
     283        QLabel             *m_pErrorPaneLocation;
    284284
    285285        /** Holds the size label. */
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp

    r67947 r67965  
    943943        /* Show error message if necessary: */
    944944        if (!comMedium.isOk())
    945             msgCenter().cannotMoveHardDiskStorage(comMedium,
    946                                                   oldData.m_options.m_strLocation,
    947                                                   newData.m_options.m_strLocation,
    948                                                   this);
     945            msgCenter().cannotMoveMediumStorage(comMedium,
     946                                                oldData.m_options.m_strLocation,
     947                                                newData.m_options.m_strLocation,
     948                                                this);
    949949        else
    950950        {
     
    955955            /* Show error message if necessary: */
    956956            if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
    957                 msgCenter().cannotMoveHardDiskStorage(comProgress,
    958                                                       oldData.m_options.m_strLocation,
    959                                                       newData.m_options.m_strLocation,
    960                                                       this);
     957                msgCenter().cannotMoveMediumStorage(comProgress,
     958                                                    oldData.m_options.m_strLocation,
     959                                                    newData.m_options.m_strLocation,
     960                                                    this);
    961961        }
    962962    }
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