VirtualBox

Changeset 64161 in vbox for trunk/src


Ignore:
Timestamp:
Oct 6, 2016 12:22:33 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Accessibility support (step 73): QIStyledItemDelegate doxy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIStyledItemDelegate.h

    r62493 r64161  
    1616 */
    1717
    18 #ifdef VBOX_WITH_PRECOMPILED_HEADERS
    19 # include <precomp.h>
    20 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
     18#ifndef ___QIStyledItemDelegate_h___
     19#define ___QIStyledItemDelegate_h___
     20
    2121/* Qt includes: */
    2222# include <QStyledItemDelegate>
    23 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    2423
    25 /** Own QStyledItemDelegate implementation. */
     24
     25/** QStyledItemDelegate subclass extending standard functionality. */
    2626class QIStyledItemDelegate : public QStyledItemDelegate
    2727{
     
    3030signals:
    3131
    32     /** Notifies listeners about
    33       * created editor's Enter/Return key triggering. */
     32    /** Notifies listeners about editor's Enter key triggering. */
    3433    void sigEditorEnterKeyTriggered();
    3534
    3635public:
    3736
    38     /** Constructor. */
     37    /** Constructs delegate passing @a pParent to the base-class. */
    3938    QIStyledItemDelegate(QObject *pParent)
    4039        : QStyledItemDelegate(pParent)
     
    4241    {}
    4342
    44     /** Defines whether QIStyledItemDelegate should watch for the created editor's Enter/Return key triggering. */
     43    /** Defines whether delegate should watch for the editor's Enter key triggering. */
    4544    void setWatchForEditorEnterKeyTriggering(bool fWatch) { m_fWatchForEditorEnterKeyTriggering = fWatch; }
    4645
    4746private:
    4847
    49     /** Returns the widget used to edit the item specified by @a index for editing.
    50       * The @a pParent widget and style @a option are used to control how the editor widget appears.
    51       * Besides that, we are installing the hooks to redirect editor's sigCommitData and sigEnterKeyTriggered signals. */
     48    /** Returns the widget used to edit the item specified by @a index.
     49      * The @a pParent widget and style @a option are used to control how the editor widget appears. */
    5250    QWidget* createEditor(QWidget *pParent, const QStyleOptionViewItem &option, const QModelIndex &index) const
    5351    {
    5452        /* Call to base-class to get actual editor created: */
    5553        QWidget *pEditor = QStyledItemDelegate::createEditor(pParent, option, index);
    56         /* All the stuff we actually need from QIStyledItemDelegate is to redirect these signals: */
     54
    5755        connect(pEditor, SIGNAL(sigCommitData(QWidget*)), this, SIGNAL(commitData(QWidget*)));
     56
     57        /* Watch for editor Enter key triggering, redirect to listeners: */
    5858        if (m_fWatchForEditorEnterKeyTriggering)
    5959            connect(pEditor, SIGNAL(sigEnterKeyTriggered()), this, SIGNAL(sigEditorEnterKeyTriggered()));
     60
    6061        /* Return actual editor: */
    6162        return pEditor;
    6263    }
    6364
    64     /** Holds whether QIStyledItemDelegate should watch
    65       * for the created editor's Enter/Return key triggering. */
     65    /** Holds whether delegate should watch for the editor's Enter key triggering. */
    6666    bool m_fWatchForEditorEnterKeyTriggering;
    6767};
     68
     69#endif /* !___QIStyledItemDelegate_h___ */
     70
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