This class adds some convenience to QTreeView:
More...
#include <bpstreeview.h>
List of all members.
Signals |
| void | contextMenuRequested (const QPoint &aPosition, const QModelIndex &aIndex) |
| | This signal is emitted when a context menu is requested on a item.
|
| void | currentItemChanged (const QModelIndex &aCurrent, const QModelIndex &aPrevious) |
| | This signal is emitted when the current item changes.
|
| void | dataGotChanged (const QModelIndex &aTopLeft, const QModelIndex &aBottomRight) |
| | This signal is emitted when item data are changed in the model.
|
| void | dropKeyboardModifiers (Qt::KeyboardModifiers aModifiers) |
| | Signal is emitted on drop events.
|
| void | focusInOutEvent (bool aFocusIn) |
| | This signal is emitted when the widget gets or loses the focus.
|
Public Member Functions |
| | BpsTreeView (QWidget *aParent=0) |
| void | restoreHeaderState (const QVariant &aData) |
| | Restores the header state from settings.
|
| QVariant | saveHeaderState () |
| void | setSizeHint (const QSize &aSize) |
| | Define the size hint.
|
| virtual QSize | sizeHint () const |
Detailed Description
This class adds some convenience to QTreeView:
- Alternating row colors
- Resize all columns to content with Ctrl + Plus
- Variable size hint
- Signals for context menus, item changes, data changes, drop keyboard modifiers
Constructor & Destructor Documentation
| BpsTreeView::BpsTreeView |
( |
QWidget * |
aParent = 0 | ) |
|
- Parameters:
-
| [in] | aParent | The parent widget. |
Member Function Documentation
| void BpsTreeView::contextMenuRequested |
( |
const QPoint & |
aPosition, |
|
|
const QModelIndex & |
aIndex |
|
) |
| [signal] |
This signal is emitted when a context menu is requested on a item.
- Parameters:
-
| [in] | aPosition | The context menu position. |
| [in] | aIndex | The model index of the item, or an invalid index when not on a item. |
| void BpsTreeView::currentItemChanged |
( |
const QModelIndex & |
aCurrent, |
|
|
const QModelIndex & |
aPrevious |
|
) |
| [signal] |
This signal is emitted when the current item changes.
- Parameters:
-
| [in] | aCurrent | The new current item index. |
| [in] | aPrevious | This previous item index. |
| void BpsTreeView::dataGotChanged |
( |
const QModelIndex & |
aTopLeft, |
|
|
const QModelIndex & |
aBottomRight |
|
) |
| [signal] |
This signal is emitted when item data are changed in the model.
The changed items are those from aTopLeft to aBottomRight inclusive. If just one item is changed aTopLeft == aBottomRight.
- Parameters:
-
| [in] | aTopLeft | The top left index. |
| [in] | aBottomRight | The bottom right index. |
| void BpsTreeView::dropKeyboardModifiers |
( |
Qt::KeyboardModifiers |
aModifiers | ) |
[signal] |
Signal is emitted on drop events.
- Parameters:
-
| aModifiers | Keyboard modifiers of the drop action |
| void BpsTreeView::focusInOutEvent |
( |
bool |
aFocusIn | ) |
[signal] |
This signal is emitted when the widget gets or loses the focus.
- Parameters:
-
| [in] | aFocusIn | True when getting focus, false when losing focus. |
| void BpsTreeView::restoreHeaderState |
( |
const QVariant & |
aData | ) |
|
Restores the header state from settings.
- Parameters:
-
| [in] | aData | The data from the settings to restore |
| QVariant BpsTreeView::saveHeaderState |
( |
| ) |
|
- Returns:
- The current header state to save in the settings.
| void BpsTreeView::setSizeHint |
( |
const QSize & |
aSize | ) |
|
Define the size hint.
- Parameters:
-
| [in] | aSize | The size to use as size hint. |
| virtual QSize BpsTreeView::sizeHint |
( |
| ) |
const [virtual] |
- Returns:
- A QSize as size hint.
The documentation for this class was generated from the following file: