VirtualBox

Ignore:
Timestamp:
Oct 30, 2020 11:40:37 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
141163
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Chooser pane: Extend chooser-item interface with possibility to mark item selected on virtual basis.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.cpp

    r86767 r86768  
    228228    , m_pNode(pNode)
    229229    , m_fHovered(false)
     230    , m_fSelected(false)
    230231    , m_pHoveringMachine(0)
    231232    , m_pHoveringAnimationForward(0)
     
    403404}
    404405
     406bool UIChooserItem::isSelected() const
     407{
     408    return m_fSelected;
     409}
     410
     411void UIChooserItem::setSelected(bool fSelected)
     412{
     413    m_fSelected = fSelected;
     414}
     415
    405416void UIChooserItem::setDisabledEffect(bool fOn)
    406417{
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.h

    r86767 r86768  
    140140        /** Returns whether item is hovered. */
    141141        bool isHovered() const;
     142
     143        /** Returns whether item is selected.
     144          * @note Sometimes it's useful to know whether item is selected in model above. */
     145        virtual bool isSelected() const;
     146        /** Defines item as @a fSelected.
     147          * @note Don't forget to call for base-class method when reimplementing it. */
     148        virtual void setSelected(bool fSelected);
    142149
    143150        /** Starts item editing. */
     
    308315        /** Holds whether item is hovered. */
    309316        bool                         m_fHovered;
     317        /** Holds whether item is selected. */
     318        bool                         m_fSelected;
    310319        /** Holds the hovering animation machine instance. */
    311320        QStateMachine               *m_pHoveringMachine;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette