VirtualBox

Changeset 43544 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 4, 2012 1:42:09 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: VM group feature UI: Current-item handling cleanup (part 6).

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp

    r43543 r43544  
    211211}
    212212
     213void UIGChooserModel::setCurrentItem(UIGChooserItem *pItem)
     214{
     215    /* If navigation list contains passed item: */
     216    if (navigationList().contains(pItem))
     217    {
     218        /* Pass focus/selection to that item: */
     219        setFocusItem(pItem, true);
     220    }
     221    else
     222        AssertMsgFailed(("Passed item not in navigation list!"));
     223}
     224
    213225void UIGChooserModel::setCurrentItem(int iItemIndex)
    214226{
     
    221233    else
    222234        AssertMsgFailed(("Passed index out of bounds!"));
    223 }
    224 
    225 void UIGChooserModel::setCurrentItem(UIGChooserItem *pItem)
    226 {
    227     /* If navigation list contains passed item: */
    228     if (navigationList().contains(pItem))
    229     {
    230         /* Pass focus/selection to that item: */
    231         setFocusItem(pItem, true);
    232     }
    233     else
    234         AssertMsgFailed(("Passed item not in navigation list!"));
    235235}
    236236
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h

    r43542 r43544  
    114114    UIGChooserItem* currentItem() const;
    115115    const QList<UIGChooserItem*>& currentItems() const;
     116    void setCurrentItem(UIGChooserItem *pItem);
    116117    void setCurrentItem(int iItemIndex);
    117     void setCurrentItem(UIGChooserItem *pItem);
    118118    void setCurrentItem(const QString &strDefinition);
    119119    void unsetCurrentItem();
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