VirtualBox

Changeset 50909 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 27, 2014 3:06:05 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Selector UI: Details pane: Anchor handling feature: Small cleanup.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp

    r50907 r50909  
    137137{
    138138    /* Current anchor role: */
    139     QString strRole = strAnchor.section(',', 0, 0);
     139    const QString strRole = strAnchor.section(',', 0, 0);
     140    const QString strData = strAnchor.section(',', 1);
    140141
    141142    /* Handle known roles: */
    142143    if (strRole == "#choose")
    143         handleAnchorClickedRoleChoose(strAnchor.section(',', 1));
     144    {
     145        /* Prepare storage-menu: */
     146        QMenu menu;
     147
     148        /* Storage-controller name: */
     149        QString strControllerName = strData.section(',', 0, 0);
     150        /* Storage-slot: */
     151        StorageSlot storageSlot = gpConverter->fromString<StorageSlot>(strData.section(',', 1));
     152
     153        /* Fill storage-menu: */
     154        vboxGlobal().prepareStorageMenu(menu, this, SLOT(sltMountStorageMedium()),
     155                                        machine(), strControllerName, storageSlot);
     156
     157        /* Exec menu: */
     158        menu.exec(QCursor::pos());
     159    }
    144160}
    145161
     
    651667}
    652668
    653 void UIGDetailsElement::handleAnchorClickedRoleChoose(const QString &strData)
    654 {
    655     /* Prepare storage-menu: */
    656     QMenu menu;
    657 
    658     /* Storage-controller name: */
    659     QString strControllerName = strData.section(',', 0, 0);
    660     /* Storage-slot: */
    661     StorageSlot storageSlot = gpConverter->fromString<StorageSlot>(strData.section(',', 1));
    662 
    663     /* Fill storage-menu: */
    664     vboxGlobal().prepareStorageMenu(menu, this, SLOT(sltMountStorageMedium()),
    665                                     machine(), strControllerName, storageSlot);
    666 
    667     /* Exec menu: */
    668     menu.exec(QCursor::pos());
    669 }
    670 
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.h

    r50871 r50909  
    187187    /* Helper: Animation stuff: */
    188188    void updateAnimationParameters();
    189 
    190     /** Handle clicked anchor with role '#choose'. */
    191     void handleAnchorClickedRoleChoose(const QString &strData);
    192189
    193190    /* Variables: */
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