- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes

# ObjectDescriptionModelData Class Reference

Search for all occurrences

## Detailed Description

Data class for models for ObjectDescription objects.

Author:
  Matthias Kretz <kretz@kde.org>

Definition at line 48 of file objectdescriptionmodel.h.

`#include <Phonon/ObjectDescriptionModelData>`

List of all members.

## Public Member Functions
int | rowCount (const QModelIndex &parent=QModelIndex()) const
| Returns the number of rows in the model.
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const
| Returns data from the item with the given `index` for the specified `role`.
Qt::ItemFlags | flags (const QModelIndex &index) const
| Reimplemented to show unavailable devices as disabled (but still selectable).
QList< int > | tupleIndexOrder () const
| Returns a list of indexes in the same order as they are in the model.
int | tupleIndexAtPositionIndex (int positionIndex) const
| Returns the ObjectDescription::index for the tuple at the given position `positionIndex`.
QMimeData * | mimeData (ObjectDescriptionType type, const QModelIndexList &indexes) const
| Returns the MIME data that dropMimeData() can use to create new items.
void | moveUp (const QModelIndex &index)
| Moves the item at the given `index` up.
void | moveDown (const QModelIndex &index)
| Moves the item at the given `index` down.
void | setModelData (const QList< QExplicitlySharedDataPointer< ObjectDescriptionData > > &data)
QList < QExplicitlySharedDataPointer < ObjectDescriptionData > > | modelData () const
QExplicitlySharedDataPointer < ObjectDescriptionData > | modelData (const QModelIndex &index) const
Qt::DropActions | supportedDropActions () const
bool | dropMimeData (ObjectDescriptionType type, const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex())
QStringList | mimeTypes (ObjectDescriptionType type) const
| ObjectDescriptionModelData (QAbstractListModel *)
## Protected Member Functions
| ~ObjectDescriptionModelData ()
## Protected Attributes
ObjectDescriptionModelDataPrivate *const | d

## Constructor & Destructor Documentation

ObjectDescriptionModelData | ( | QAbstractListModel * |  | ) |

~ObjectDescriptionModelData | ( |  | ) | `[protected]`

## Member Function Documentation

int rowCount | ( | const QModelIndex & | parent = `QModelIndex()` | ) | const

Search for all occurrences

Returns the number of rows in the model.

This value corresponds to the size of the list passed through setModelData.

Parameters:

  parent | The optional `parent` argument is used in most models to specify the parent of the rows to be counted. Because this is a list if a valid parent is specified the result will always be 0.

Reimplemented from QAbstractItemModel.

See also:
  QAbstractItemModel::rowCount

QVariant data | ( | const QModelIndex & | index,
|  | int | role = `Qt::DisplayRole`
| ) |  | const

Search for all occurrences

Returns data from the item with the given `index` for the specified `role`.

If the view requests an invalid index, an invalid variant is returned.

Reimplemented from QAbstractItemModel.

See also:
  QAbstractItemModel::data
  Qt::ItemDataRole

Qt::ItemFlags flags | ( | const QModelIndex & | index | ) | const

Search for all occurrences

Reimplemented to show unavailable devices as disabled (but still selectable).

QList<int> tupleIndexOrder | ( |  | ) | const

Search for all occurrences

Returns a list of indexes in the same order as they are in the model.

The indexes come from the ObjectDescription::index method.

This is useful to let the user define a list of preference.

int tupleIndexAtPositionIndex | ( | int | positionIndex | ) | const

Search for all occurrences

Returns the ObjectDescription::index for the tuple at the given position `positionIndex`.

For example a QComboBox will give you the currentIndex as the position in the list. But to select the according AudioOutputDevice using AudioOutputDevice::fromIndex you can use this method.

Parameters:

  positionIndex | The position in the list.

QMimeData* mimeData | ( | ObjectDescriptionType | type,
|  | const QModelIndexList & | indexes
| ) |  | const

Search for all occurrences

Returns the MIME data that dropMimeData() can use to create new items.

void moveUp | ( | const QModelIndex & | index | ) |

Search for all occurrences

Moves the item at the given `index` up.

In the resulting list the items at index.row() and index.row() - 1 are swapped.

Connected views are updated automatically.

void moveDown | ( | const QModelIndex & | index | ) |

Search for all occurrences

Moves the item at the given `index` down.

In the resulting list the items at index.row() and index.row() + 1 are swapped.

Connected views are updated automatically.

void setModelData | ( | const QList< QExplicitlySharedDataPointer< ObjectDescriptionData > > & | data | ) |

Search for all occurrences

QList<QExplicitlySharedDataPointer<ObjectDescriptionData> > modelData | ( |  | ) | const

Search for all occurrences

QExplicitlySharedDataPointer<ObjectDescriptionData> modelData | ( | const QModelIndex & | index | ) | const

Search for all occurrences

Qt::DropActions supportedDropActions | ( |  | ) | const

Search for all occurrences

bool dropMimeData | ( | ObjectDescriptionType | type,
|  | const QMimeData * | data,
|  | Qt::DropAction | action,
|  | int | row,
|  | int | column,
|  | const QModelIndex & | parent
| ) |  |

Search for all occurrences

bool removeRows | ( | int | row,
|  | int | count,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  |

Search for all occurrences

QStringList mimeTypes | ( | ObjectDescriptionType | type | ) | const

Search for all occurrences

## Member Data Documentation

ObjectDescriptionModelDataPrivate* const d `[protected]`

Search for all occurrences

Definition at line 139 of file objectdescriptionmodel.h.

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

- phonon/objectdescriptionmodel.h

ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData
ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData ObjectDescriptionModelData