VirtualBox

Changeset 64402 in vbox


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

FE/Qt: bugref:6899: Accessibility support (step 102): Cleanup 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

    • Property svn:keywords changed from Id Revision to Date Revision Author Id
    r64401 r64402  
    3030
    3131
    32 QITreeView::QITreeView (QWidget *aParent)
    33     : QTreeView (aParent)
     32QITreeView::QITreeView(QWidget *pParent)
     33    : QTreeView(pParent)
    3434{
    3535    /* Mark header hidden: */
    36     setHeaderHidden (true);
     36    setHeaderHidden(true);
    3737    /* Mark root hidden: */
    38     setRootIsDecorated (false);
     38    setRootIsDecorated(false);
    3939}
    4040
    41 void QITreeView::currentChanged (const QModelIndex &aCurrent, const QModelIndex &aPrevious)
     41void QITreeView::currentChanged(const QModelIndex &current, const QModelIndex &previous)
    4242{
    4343    /* Notify listeners about it: */
    44     emit currentItemChanged (aCurrent, aPrevious);
     44    emit currentItemChanged(current, previous);
    4545    /* Call to base-class: */
    46     QTreeView::currentChanged (aCurrent, aPrevious);
     46    QTreeView::currentChanged(current, previous);
    4747}
    4848
    49 void QITreeView::drawBranches (QPainter *aPainter, const QRect &aRect, const QModelIndex &aIndex) const
     49void QITreeView::drawBranches(QPainter *pPainter, const QRect &rect, const QModelIndex &index) const
    5050{
    5151    /* Notify listeners about it: */
    52     emit drawItemBranches (aPainter, aRect, aIndex);
     52    emit drawItemBranches(pPainter, rect, index);
    5353    /* Call to base-class: */
    54     QTreeView::drawBranches (aPainter, aRect, aIndex);
     54    QTreeView::drawBranches(pPainter, rect, index);
    5555}
    5656
    57 void QITreeView::mouseMoveEvent (QMouseEvent *aEvent)
     57void QITreeView::mouseMoveEvent(QMouseEvent *pEvent)
    5858{
    5959    /* Reject event initially: */
    60     aEvent->setAccepted (false);
     60    pEvent->setAccepted(false);
    6161    /* Notify listeners about event allowing them to handle it: */
    62     emit mouseMoved (aEvent);
     62    emit mouseMoved(pEvent);
    6363    /* Call to base-class only if event was not yet accepted: */
    64     if (!aEvent->isAccepted())
    65         QTreeView::mouseMoveEvent (aEvent);
     64    if (!pEvent->isAccepted())
     65        QTreeView::mouseMoveEvent(pEvent);
    6666}
    6767
    68 void QITreeView::mousePressEvent (QMouseEvent *aEvent)
     68void QITreeView::mousePressEvent(QMouseEvent *pEvent)
    6969{
    7070    /* Reject event initially: */
    71     aEvent->setAccepted (false);
     71    pEvent->setAccepted(false);
    7272    /* Notify listeners about event allowing them to handle it: */
    73     emit mousePressed (aEvent);
     73    emit mousePressed(pEvent);
    7474    /* Call to base-class only if event was not yet accepted: */
    75     if (!aEvent->isAccepted())
    76         QTreeView::mousePressEvent (aEvent);
     75    if (!pEvent->isAccepted())
     76        QTreeView::mousePressEvent(pEvent);
    7777}
    7878
    79 void QITreeView::mouseDoubleClickEvent (QMouseEvent *aEvent)
     79void QITreeView::mouseDoubleClickEvent(QMouseEvent *pEvent)
    8080{
    8181    /* Reject event initially: */
    82     aEvent->setAccepted (false);
     82    pEvent->setAccepted(false);
    8383    /* Notify listeners about event allowing them to handle it: */
    84     emit mouseDoubleClicked (aEvent);
     84    emit mouseDoubleClicked(pEvent);
    8585    /* Call to base-class only if event was not yet accepted: */
    86     if (!aEvent->isAccepted())
    87         QTreeView::mouseDoubleClickEvent (aEvent);
     86    if (!pEvent->isAccepted())
     87        QTreeView::mouseDoubleClickEvent(pEvent);
    8888}
    8989
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QITreeView.h

    • Property svn:keywords set to Date Revision Author Id
    r64401 r64402  
    1 /* $Id: $ */
     1/* $Id$ */
    22/** @file
    33 * VBox Qt GUI - Qt extensions: QITreeView class declaration.
     
    1616 */
    1717
    18 #ifndef __QITreeView_h__
    19 #define __QITreeView_h__
     18#ifndef ___QITreeView_h___
     19#define ___QITreeView_h___
    2020
    2121/* Qt includes: */
     
    2828    Q_OBJECT;
    2929
     30signals:
     31
     32    /** Notifies listeners about index changed from @a previous to @a current.*/
     33    void currentItemChanged(const QModelIndex &current, const QModelIndex &previous);
     34
     35    /** Notifies listeners about painting of item branches.
     36      * @param  pPainter  Brings the painter to draw branches.
     37      * @param  rect      Brings the rectangle embedding branches.
     38      * @param  index     Brings the index of the item for which branches will be painted. */
     39    void drawItemBranches(QPainter *pPainter, const QRect &rect, const QModelIndex &index) const;
     40
     41    /** Notifies listeners about mouse moved @a pEvent. */
     42    void mouseMoved(QMouseEvent *pEvent);
     43    /** Notifies listeners about mouse pressed @a pEvent. */
     44    void mousePressed(QMouseEvent *pEvent);
     45    /** Notifies listeners about mouse double-clicked @a pEvent. */
     46    void mouseDoubleClicked(QMouseEvent *pEvent);
     47
    3048public:
    3149
    32     /** Constructs table-view passing @a aParent to the base-class. */
    33     QITreeView (QWidget *aParent = 0);
    34 
    35 signals:
    36 
    37     /** Notifies listeners about index changed from @a aPrevious to @a aCurrent.*/
    38     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. */
    44     void drawItemBranches (QPainter *aPainter, const QRect &aRect, const QModelIndex &aIndex) const;
    45 
    46     /** Notifies listeners about mouse moved @a aEvent. */
    47     void mouseMoved (QMouseEvent *aEvent);
    48     /** Notifies listeners about mouse pressed @a aEvent. */
    49     void mousePressed (QMouseEvent *aEvent);
    50     /** Notifies listeners about mouse double-clicked @a aEvent. */
    51     void mouseDoubleClicked (QMouseEvent *aEvent);
     50    /** Constructs table-view passing @a pParent to the base-class. */
     51    QITreeView(QWidget *pParent = 0);
    5252
    5353protected slots:
    5454
    55     /** Handles index changed from @a aPrevious to @a aCurrent.*/
    56     void currentChanged (const QModelIndex &aCurrent, const QModelIndex &aPrevious);
     55    /** Handles index changed from @a previous to @a current.*/
     56    void currentChanged(const QModelIndex &current, const QModelIndex &previous);
    5757
    5858protected:
    5959
    6060    /** 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. */
    64     void drawBranches (QPainter *aPainter, const QRect &aRect, const QModelIndex &aIndex) const;
     61      * @param  pPainter  Brings the painter to draw branches.
     62      * @param  rect      Brings the rectangle embedding branches.
     63      * @param  index     Brings the index of the item for which branches will be painted. */
     64    void drawBranches(QPainter *pPainter, const QRect &rect, const QModelIndex &index) const;
    6565
    66     /** Handles mouse move @a aEvent. */
    67     void mouseMoveEvent (QMouseEvent *aEvent);
    68     /** Handles mouse press @a aEvent. */
    69     void mousePressEvent (QMouseEvent *aEvent);
    70     /** Handles mouse double-click @a aEvent. */
    71     void mouseDoubleClickEvent (QMouseEvent *aEvent);
     66    /** Handles mouse move @a pEvent. */
     67    void mouseMoveEvent(QMouseEvent *pEvent);
     68    /** Handles mouse press @a pEvent. */
     69    void mousePressEvent(QMouseEvent *pEvent);
     70    /** Handles mouse double-click @a pEvent. */
     71    void mouseDoubleClickEvent(QMouseEvent *pEvent);
    7272};
    7373
    74 #endif /* !__QITreeView_h__ */
     74#endif /* !___QITreeView_h___ */
    7575
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