Public Types |
Public Member Functions |
Static Public Member Functions |
Protected Member Functions
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
Constructor & Destructor Documentation
| ActionCollectionModel::ActionCollectionModel | ( | QObject * | parent, |
| ActionCollection * | collection = 0, |
||
| Mode | mode = Mode(Icons|ToolTips) |
||
| ) | [explicit] |
| ActionCollectionModel::~ActionCollectionModel | ( | ) | [virtual] |
Member Function Documentation
| Action * ActionCollectionModel::action | ( | const QModelIndex & | index | ) | [static] |
| ActionCollection * ActionCollectionModel::collection | ( | const QModelIndex & | index | ) | [static] |
- Returns:
- the ActionCollection instance the as argument passed QModelIndex represents or NULL if the QModelIndex is not a ActionCollection .
| int ActionCollectionModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
| QVariant ActionCollectionModel::data | ( | const QModelIndex & | index, |
| int | role = Qt::DisplayRole |
||
| ) | const [virtual] |
| bool ActionCollectionModel::dropMimeData | ( | const QMimeData * | data, |
| Qt::DropAction | action, | ||
| int | row, | ||
| int | column, | ||
| const QModelIndex & | parent | ||
| ) | [virtual] |
| Qt::ItemFlags ActionCollectionModel::flags | ( | const QModelIndex & | index | ) | const [virtual] |
| QModelIndex ActionCollectionModel::index | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | const [virtual] |
| QModelIndex ActionCollectionModel::indexForAction | ( | Action * | action | ) | const |
| QModelIndex ActionCollectionModel::indexForCollection | ( | ActionCollection * | collection | ) | const |
| bool ActionCollectionModel::insertColumns | ( | int | column, |
| int | count, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [virtual] |
| bool ActionCollectionModel::insertRows | ( | int | row, |
| int | count, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [virtual] |
| QMimeData * ActionCollectionModel::mimeData | ( | const QModelIndexList & | indexes | ) | const [virtual] |
| QStringList ActionCollectionModel::mimeTypes | ( | ) | const [virtual] |
| QModelIndex ActionCollectionModel::parent | ( | const QModelIndex & | index | ) | const [virtual] |
| bool ActionCollectionModel::removeColumns | ( | int | column, |
| int | count, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [virtual] |
| bool ActionCollectionModel::removeRows | ( | int | row, |
| int | count, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [virtual] |
| ActionCollection * ActionCollectionModel::rootCollection | ( | ) | const |
| int ActionCollectionModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
| int ActionCollectionModel::rowNumber | ( | ActionCollection * | collection | ) | const [protected] |
| bool ActionCollectionModel::setData | ( | const QModelIndex & | index, |
| const QVariant & | value, | ||
| int | role = Qt::EditRole |
||
| ) | [virtual] |
| Qt::DropActions ActionCollectionModel::supportedDropActions | ( | ) | const [virtual] |
The documentation for this class was generated from the following files:
KDE 4.7 API Reference