Kross
Public Types |
Public Member Functions |
Static Public Member Functions |
Protected Member Functions |
List of all members
Kross::ActionCollectionModel Class Reference
#include <model.h>
Inheritance diagram for Kross::ActionCollectionModel:

Public Types | |
enum | Mode { None = 0, Icons = 1, ToolTips = 2, UserCheckable = 4 } |
Public Member Functions | |
ActionCollectionModel (QObject *parent, ActionCollection *collection=0, Mode mode=Mode(Icons|ToolTips)) | |
virtual | ~ActionCollectionModel () |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
virtual bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) |
virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
QModelIndex | indexForAction (Action *action) const |
QModelIndex | indexForCollection (ActionCollection *collection) const |
virtual bool | insertColumns (int column, int count, const QModelIndex &parent=QModelIndex()) |
virtual bool | insertRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
virtual QMimeData * | mimeData (const QModelIndexList &indexes) const |
virtual QStringList | mimeTypes () const |
virtual QModelIndex | parent (const QModelIndex &index) const |
virtual bool | removeColumns (int column, int count, const QModelIndex &parent=QModelIndex()) |
virtual bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
ActionCollection * | rootCollection () const |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
virtual bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
virtual Qt::DropActions | supportedDropActions () const |
Static Public Member Functions | |
static Action * | action (const QModelIndex &index) |
static ActionCollection * | collection (const QModelIndex &index) |
Protected Member Functions | |
int | rowNumber (ActionCollection *collection) const |
Detailed Description
The ActionCollectionModel class implements a QAbstractItemModel to provide a model for views of a ActionCollection instance that manages a collection of Action instances.
Important implementation detatils:
- An action can not have children.
- A collection can have both collections and actions as children.
- This model lists actions before collections.
- The internalPointer() of QModelIndex is used to hold a pointer to the parent collection.
Member Enumeration Documentation
§ Mode
Constructor & Destructor Documentation
§ ActionCollectionModel()
§ ~ActionCollectionModel()
Member Function Documentation
§ action()
|
static |
§ collection()
|
static |
- Returns
- the ActionCollection instance the as argument passed QModelIndex represents or NULL if the QModelIndex is not a ActionCollection .
§ columnCount()
|
virtual |
§ data()
|
virtual |
§ dropMimeData()
|
virtual |
§ flags()
|
virtual |
§ index()
|
virtual |
§ indexForAction()
QModelIndex ActionCollectionModel::indexForAction | ( | Action * | action | ) | const |
§ indexForCollection()
QModelIndex ActionCollectionModel::indexForCollection | ( | ActionCollection * | collection | ) | const |
§ insertColumns()
|
virtual |
§ insertRows()
|
virtual |
§ mimeData()
|
virtual |
§ mimeTypes()
|
virtual |
§ parent()
|
virtual |
§ removeColumns()
|
virtual |
§ removeRows()
|
virtual |
§ rootCollection()
ActionCollection * ActionCollectionModel::rootCollection | ( | ) | const |
§ rowCount()
|
virtual |
§ rowNumber()
|
protected |
§ setData()
|
virtual |
§ supportedDropActions()
|
virtual |
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2016 The KDE developers.
Generated on Thu Oct 20 2016 07:19:26 by doxygen 1.8.12 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2016 The KDE developers.
Generated on Thu Oct 20 2016 07:19:26 by doxygen 1.8.12 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.