VirtualBox

Changeset 64401 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Oct 24, 2016 4:35:58 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Accessibility support (step 101): Doxy for QITreeView.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/extensions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QITreeView.cpp

    r62493 r64401  
    2020#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
    2121
    22 /* Global includes */
     22/* Qt includes: */
    2323# include <QMouseEvent>
    2424# include <QPainter>
    2525
    26 /* Local includes */
     26/* GUI includes: */
    2727# include "QITreeView.h"
    2828
     
    3333    : QTreeView (aParent)
    3434{
     35    /* Mark header hidden: */
    3536    setHeaderHidden (true);
     37    /* Mark root hidden: */
    3638    setRootIsDecorated (false);
    3739}
     
    3941void QITreeView::currentChanged (const QModelIndex &aCurrent, const QModelIndex &aPrevious)
    4042{
     43    /* Notify listeners about it: */
    4144    emit currentItemChanged (aCurrent, aPrevious);
     45    /* Call to base-class: */
    4246    QTreeView::currentChanged (aCurrent, aPrevious);
    4347}
     
    4549void QITreeView::drawBranches (QPainter *aPainter, const QRect &aRect, const QModelIndex &aIndex) const
    4650{
     51    /* Notify listeners about it: */
    4752    emit drawItemBranches (aPainter, aRect, aIndex);
     53    /* Call to base-class: */
    4854    QTreeView::drawBranches (aPainter, aRect, aIndex);
    4955}
     
    5157void QITreeView::mouseMoveEvent (QMouseEvent *aEvent)
    5258{
     59    /* Reject event initially: */
    5360    aEvent->setAccepted (false);
     61    /* Notify listeners about event allowing them to handle it: */
    5462    emit mouseMoved (aEvent);
     63    /* Call to base-class only if event was not yet accepted: */
    5564    if (!aEvent->isAccepted())
    5665        QTreeView::mouseMoveEvent (aEvent);
     
    5968void QITreeView::mousePressEvent (QMouseEvent *aEvent)
    6069{
     70    /* Reject event initially: */
    6171    aEvent->setAccepted (false);
     72    /* Notify listeners about event allowing them to handle it: */
    6273    emit mousePressed (aEvent);
     74    /* Call to base-class only if event was not yet accepted: */
    6375    if (!aEvent->isAccepted())
    6476        QTreeView::mousePressEvent (aEvent);
     
    6779void QITreeView::mouseDoubleClickEvent (QMouseEvent *aEvent)
    6880{
     81    /* Reject event initially: */
    6982    aEvent->setAccepted (false);
     83    /* Notify listeners about event allowing them to handle it: */
    7084    emit mouseDoubleClicked (aEvent);
     85    /* Call to base-class only if event was not yet accepted: */
    7186    if (!aEvent->isAccepted())
    7287        QTreeView::mouseDoubleClickEvent (aEvent);
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QITreeView.h

    r62493 r64401  
    1919#define __QITreeView_h__
    2020
    21 /* Global includes */
     21/* Qt includes: */
    2222#include <QTreeView>
    2323
    24 /*
    25  * QITreeView class which extends standard QITreeView's functionality.
    26  */
     24
     25/** QTreeView subclass extending standard functionality. */
    2726class QITreeView: public QTreeView
    2827{
     
    3130public:
    3231
     32    /** Constructs table-view passing @a aParent to the base-class. */
    3333    QITreeView (QWidget *aParent = 0);
    3434
    3535signals:
    3636
     37    /** Notifies listeners about index changed from @a aPrevious to @a aCurrent.*/
    3738    void currentItemChanged (const QModelIndex &aCurrent, const QModelIndex &aPrevious);
     39
     40    /** Notifies listeners about painting of item branches.
     41      * @param  aPainter  Brings the painter to draw branches.
     42      * @param  aRect     Brings the rectangle embedding branches.
     43      * @param  aIndex    Brings the index of the item for which branches will be painted. */
    3844    void drawItemBranches (QPainter *aPainter, const QRect &aRect, const QModelIndex &aIndex) const;
     45
     46    /** Notifies listeners about mouse moved @a aEvent. */
    3947    void mouseMoved (QMouseEvent *aEvent);
     48    /** Notifies listeners about mouse pressed @a aEvent. */
    4049    void mousePressed (QMouseEvent *aEvent);
     50    /** Notifies listeners about mouse double-clicked @a aEvent. */
    4151    void mouseDoubleClicked (QMouseEvent *aEvent);
    4252
    4353protected slots:
    4454
     55    /** Handles index changed from @a aPrevious to @a aCurrent.*/
    4556    void currentChanged (const QModelIndex &aCurrent, const QModelIndex &aPrevious);
    4657
    4758protected:
    4859
     60    /** Handles painting of item branches.
     61      * @param  aPainter  Brings the painter to draw branches.
     62      * @param  aRect     Brings the rectangle embedding branches.
     63      * @param  aIndex    Brings the index of the item for which branches will be painted. */
    4964    void drawBranches (QPainter *aPainter, const QRect &aRect, const QModelIndex &aIndex) const;
     65
     66    /** Handles mouse move @a aEvent. */
    5067    void mouseMoveEvent (QMouseEvent *aEvent);
     68    /** Handles mouse press @a aEvent. */
    5169    void mousePressEvent (QMouseEvent *aEvent);
     70    /** Handles mouse double-click @a aEvent. */
    5271    void mouseDoubleClickEvent (QMouseEvent *aEvent);
    5372};
    5473
    55 #endif /* __QITreeView_h__ */
     74#endif /* !__QITreeView_h__ */
    5675
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