Documents > BPS V2 C++ API
BpsTreeWidget Class Reference

This class adds some convenience to QTreeWidget: More...

#include <bpstreewidget.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 focusInOutEvent (bool aFocusIn)
 This signal is emitted when the widget gets or loses the focus.

Public Member Functions

 BpsTreeWidget (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 QTreeWidget:

  • Alternating row colors
  • Resize all columns to content with Ctrl + Plus
  • Variable size hint
  • Signals for context menus

Constructor & Destructor Documentation

BpsTreeWidget::BpsTreeWidget ( QWidget *  aParent = 0)
Parameters:
[in]aParentThe parent widget.

Member Function Documentation

void BpsTreeWidget::contextMenuRequested ( const QPoint &  aPosition,
const QModelIndex &  aIndex 
) [signal]

This signal is emitted when a context menu is requested on a item.

Parameters:
[in]aPositionThe context menu position.
[in]aIndexThe model index of the item, or an invalid index when not on a item.
void BpsTreeWidget::focusInOutEvent ( bool  aFocusIn) [signal]

This signal is emitted when the widget gets or loses the focus.

Parameters:
[in]aFocusInTrue when getting focus, false when losing focus.
void BpsTreeWidget::restoreHeaderState ( const QVariant &  aData)

Restores the header state from settings.

Parameters:
[in]aDataThe data from the settings to restore
QVariant BpsTreeWidget::saveHeaderState ( )
Returns:
The current header state to save in the settings.
void BpsTreeWidget::setSizeHint ( const QSize &  aSize)

Define the size hint.

Parameters:
[in]aSizeThe size to use as size hint.
virtual QSize BpsTreeWidget::sizeHint ( ) const [virtual]
Returns:
A QSize as size hint.

The documentation for this class was generated from the following file: