libkdepim
KPIM::AutoCheckTreeWidget Class Reference
#include <autochecktreewidget.h>

Detailed Description
A tree widget which supports auto selecting child items, when clicking an item of the tree.Further you can find an item by passing a path as QStringList with the method itemByPath().
Definition at line 38 of file autochecktreewidget.h.
Public Member Functions | |
| bool | autoCheck () const |
| bool | autoCheckChildren () const |
| AutoCheckTreeWidget (QWidget *parent=0) | |
| QTreeWidgetItem * | itemByPath (const QStringList &path) const |
| QStringList | pathByItem (QTreeWidgetItem *item) const |
| void | setAutoCheck (bool autoCheck) |
| void | setAutoCheckChildren (bool autoCheckChildren) |
| ~AutoCheckTreeWidget () | |
Protected Slots | |
| void | slotDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight) |
| void | slotRowsInserted (const QModelIndex &parent, int start, int end) |
Protected Member Functions | |
| QTreeWidgetItem * | findItem (QTreeWidgetItem *parent, const QString &text) const |
Properties | |
| bool | autoCheck |
| bool | autoCheckChildren |
Constructor & Destructor Documentation
| KPIM::AutoCheckTreeWidget::AutoCheckTreeWidget | ( | QWidget * | parent = 0 |
) |
Default constructor.
The default behavior is like a QTreeWidget, so you have to activate the autoCheckChildren property manually.
Definition at line 39 of file autochecktreewidget.cpp.
| KPIM::AutoCheckTreeWidget::~AutoCheckTreeWidget | ( | ) |
Definition at line 50 of file autochecktreewidget.cpp.
Member Function Documentation
| bool KPIM::AutoCheckTreeWidget::autoCheck | ( | ) | const |
- Returns:
- whether newly added items have checkboxes by default.
Default value is true.
| bool KPIM::AutoCheckTreeWidget::autoCheckChildren | ( | ) | const |
- Returns:
- whether autoCheckChildren is enabled or not.
Default value is false.
| QTreeWidgetItem * KPIM::AutoCheckTreeWidget::findItem | ( | QTreeWidgetItem * | parent, | |
| const QString & | text | |||
| ) | const [protected] |
Definition at line 101 of file autochecktreewidget.cpp.
| QTreeWidgetItem * KPIM::AutoCheckTreeWidget::itemByPath | ( | const QStringList & | path | ) | const |
Returns QTreeWidgetItem which matches the path, if available.
- Parameters:
-
path The path
- Returns:
- a item which is represented by the path, if available.
Definition at line 55 of file autochecktreewidget.cpp.
| QStringList KPIM::AutoCheckTreeWidget::pathByItem | ( | QTreeWidgetItem * | item | ) | const |
Returns a path by a given item as QStringList.
- Parameters:
-
item The item
- Returns:
- a string list which is the represented path of the item.
Definition at line 68 of file autochecktreewidget.cpp.
| void KPIM::AutoCheckTreeWidget::setAutoCheck | ( | bool | autoCheck | ) |
Sets whether newly added items have checkboxes by default.
- Parameters:
-
autoCheck if true, newly added items have unchecked checkboxes by default, otherwise not. Default value is true.
Definition at line 96 of file autochecktreewidget.cpp.
| void KPIM::AutoCheckTreeWidget::setAutoCheckChildren | ( | bool | autoCheckChildren | ) |
enables or disables autoCheckChildren behavior.
- Parameters:
-
autoCheckChildren if true, children of items are auto checked or not, otherwise. Default value is false.
Definition at line 86 of file autochecktreewidget.cpp.
| void KPIM::AutoCheckTreeWidget::slotDataChanged | ( | const QModelIndex & | topLeft, | |
| const QModelIndex & | bottomRight | |||
| ) | [protected, slot] |
Definition at line 142 of file autochecktreewidget.cpp.
| void KPIM::AutoCheckTreeWidget::slotRowsInserted | ( | const QModelIndex & | parent, | |
| int | start, | |||
| int | end | |||
| ) | [protected, slot] |
Definition at line 120 of file autochecktreewidget.cpp.
Property Documentation
bool KPIM::AutoCheckTreeWidget::autoCheck [read, write] |
Definition at line 47 of file autochecktreewidget.h.
bool KPIM::AutoCheckTreeWidget::autoCheckChildren [read, write] |
Definition at line 43 of file autochecktreewidget.h.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference