liblancelot
#include <StandardActionTreeModel.h>
Classes | |
class | Item |
Public Member Functions | |
StandardActionTreeModel () | |
virtual | ~StandardActionTreeModel () |
void | add (Item *item, Item *parent=NULL) |
void | add (const QString &title, const QString &description, QIcon icon, const QVariant &data, Item *parent=NULL) |
L_Override ActionTreeModel * | child (int index) |
void | clear (Item *parent=NULL) |
QVariant | data (int index) const |
L_Override QString | description (int index) const |
L_Override QIcon | icon (int index) const |
L_Override bool | isCategory (int index) const |
Item * | itemAt (int index, Item *parent=NULL) |
void | removeAt (int index, Item *parent=NULL) |
L_Override QIcon | selfIcon () const |
L_Override QString | selfTitle () const |
void | set (int index, Item *item, Item *parent=NULL) |
void | set (int index, const QString &title, const QString &description, QIcon icon, const QVariant &data, Item *parent=NULL) |
L_Override int | size () const |
L_Override QString | title (int index) const |
Public Member Functions inherited from Lancelot::ActionTreeModel | |
ActionTreeModel () | |
virtual | ~ActionTreeModel () |
Public Member Functions inherited from Lancelot::ActionListModel | |
ActionListModel () | |
virtual | ~ActionListModel () |
virtual void | contextActivate (int index, QAction *context) |
virtual void | dataDragFinished (int index, Qt::DropAction action) |
virtual bool | dataDropAvailable (int where, const QMimeData *mimeData) |
virtual void | dataDropped (int where, const QMimeData *mimeData) |
virtual bool | hasContextActions (int index) const |
virtual QMimeData * | mimeData (int index) const |
virtual QMimeData * | selfMimeData () const |
virtual QString | selfShortTitle () const |
virtual void | setContextActions (int index, Lancelot::PopupMenu *menu) |
virtual void | setDropActions (int index, Qt::DropActions &actions, Qt::DropAction &defaultAction) |
Protected Member Functions | |
StandardActionTreeModel (Item *root) | |
virtual StandardActionTreeModel * | createChild (int index)=0 |
Item * | root () const |
Protected Member Functions inherited from Lancelot::ActionListModel | |
virtual void | activate (int index) |
Additional Inherited Members | |
Public Slots inherited from Lancelot::ActionListModel | |
void | activated (int index) |
Signals inherited from Lancelot::ActionListModel | |
void | itemActivated (int index) |
void | itemAltered (int index) |
void | itemDeleted (int index) |
void | itemInserted (int index) |
void | updated () |
Detailed Description
Definition at line 30 of file StandardActionTreeModel.h.
Constructor & Destructor Documentation
|
protected |
Definition at line 52 of file StandardActionTreeModel.cpp.
Lancelot::StandardActionTreeModel::StandardActionTreeModel | ( | ) |
Definition at line 45 of file StandardActionTreeModel.cpp.
|
virtual |
Definition at line 63 of file StandardActionTreeModel.cpp.
Member Function Documentation
Adds a new item into the model.
- Parameters
-
item new item
Definition at line 165 of file StandardActionTreeModel.cpp.
void Lancelot::StandardActionTreeModel::add | ( | const QString & | title, |
const QString & | description, | ||
QIcon | icon, | ||
const QVariant & | data, | ||
Item * | parent = NULL |
||
) |
Adds a new item into the model.
- Parameters
-
title the title for the new item description the description of the new item icon the icon for the new item data data for the new item. Not shown to user
Definition at line 172 of file StandardActionTreeModel.cpp.
|
virtual |
Implements Lancelot::ActionTreeModel.
Definition at line 77 of file StandardActionTreeModel.cpp.
void Lancelot::StandardActionTreeModel::clear | ( | Item * | parent = NULL | ) |
Clears all items.
Definition at line 197 of file StandardActionTreeModel.cpp.
|
protectedpure virtual |
QVariant Lancelot::StandardActionTreeModel::data | ( | int | index | ) | const |
Definition at line 151 of file StandardActionTreeModel.cpp.
|
virtual |
- Parameters
-
index index of the item
- Returns
- description of the specified item
Reimplemented from Lancelot::ActionListModel.
Definition at line 133 of file StandardActionTreeModel.cpp.
|
virtual |
- Parameters
-
index index of the item
- Returns
- icon for the specified item
Reimplemented from Lancelot::ActionListModel.
Definition at line 142 of file StandardActionTreeModel.cpp.
|
virtual |
- Parameters
-
index index of the item
- Returns
- whether the item represents a category
Reimplemented from Lancelot::ActionListModel.
Definition at line 97 of file StandardActionTreeModel.cpp.
StandardActionTreeModel::Item * Lancelot::StandardActionTreeModel::itemAt | ( | int | index, |
Item * | parent = NULL |
||
) |
- Returns
- the specified item
- Parameters
-
index index of the item to return
Definition at line 203 of file StandardActionTreeModel.cpp.
void Lancelot::StandardActionTreeModel::removeAt | ( | int | index, |
Item * | parent = NULL |
||
) |
Removes an item.
- Parameters
-
index index of the item to remove
Definition at line 191 of file StandardActionTreeModel.cpp.
|
protected |
Definition at line 72 of file StandardActionTreeModel.cpp.
|
virtual |
Reimplemented from Lancelot::ActionListModel.
Definition at line 119 of file StandardActionTreeModel.cpp.
|
virtual |
Reimplemented from Lancelot::ActionListModel.
Definition at line 114 of file StandardActionTreeModel.cpp.
Replaces existing item at specified index with a new one.
- Parameters
-
index index of the item to be replaced item new item
Definition at line 177 of file StandardActionTreeModel.cpp.
void Lancelot::StandardActionTreeModel::set | ( | int | index, |
const QString & | title, | ||
const QString & | description, | ||
QIcon | icon, | ||
const QVariant & | data, | ||
Item * | parent = NULL |
||
) |
Replaces existing item at specified index with a new one.
- Parameters
-
index index of the item to be replaced title the title for the new item description the description of the new item icon the icon for the new item data data for the new item. Not shown to user
Definition at line 186 of file StandardActionTreeModel.cpp.
|
virtual |
- Returns
- the number of items in model
Implements Lancelot::ActionListModel.
Definition at line 160 of file StandardActionTreeModel.cpp.
|
virtual |
- Parameters
-
index index of the item
- Returns
- title for the specified item
Implements Lancelot::ActionListModel.
Definition at line 124 of file StandardActionTreeModel.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Mon Oct 13 2014 22:55:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.