Phonon
objectdescriptionmodel.h
129 bool dropMimeData(ObjectDescriptionType type, const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
214 inline int rowCount(const QModelIndex &parent = QModelIndex()) const override { return d->rowCount(parent); } //krazy:exclude=inline
227 inline QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override { return d->data(index, role); } //krazy:exclude=inline
233 inline Qt::ItemFlags flags(const QModelIndex &index) const override { return d->flags(index); } //krazy:exclude=inline
242 inline QList<int> tupleIndexOrder() const { return d->tupleIndexOrder(); } //krazy:exclude=inline
254 inline int tupleIndexAtPositionIndex(int positionIndex) const { return d->tupleIndexAtPositionIndex(positionIndex); } //krazy:exclude=inline
260 inline QMimeData *mimeData(const QModelIndexList &indexes) const override { return d->mimeData(type, indexes); } //krazy:exclude=inline
282 explicit inline ObjectDescriptionModel(QObject *parent = nullptr) : QAbstractListModel(parent), d(new ObjectDescriptionModelData(this)) {} //krazy:exclude=inline
288 explicit inline ObjectDescriptionModel(const QList<ObjectDescription<type> > &data, QObject *parent = nullptr) //krazy:exclude=inline
322 inline ObjectDescription<type> modelData(const QModelIndex &index) const { return ObjectDescription<type>(d->modelData(index)); } //krazy:exclude=inline
328 inline Qt::DropActions supportedDropActions() const override { return d->supportedDropActions(); } //krazy:exclude=inline
336 inline bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override { //krazy:exclude=inline
348 inline bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override { //krazy:exclude=inline
356 inline QStringList mimeTypes() const override { return d->mimeTypes(type); } //krazy:exclude=inline
Data class for models for ObjectDescription objects.
Definition objectdescriptionmodel.h:47
The ObjectDescriptionModel class provides a model from a list of ObjectDescription objects.
Definition objectdescriptionmodel.h:192
void setModelData(const QList< ObjectDescription< type > > &data)
Sets the model data using the list provided by data.
Definition objectdescriptionmodel.h:296
Qt::DropActions supportedDropActions() const override
This model supports drag and drop to copy or move items.
Definition objectdescriptionmodel.h:328
ObjectDescription< type > modelData(const QModelIndex &index) const
Returns one ObjectDescription of the model data for the given index.
Definition objectdescriptionmodel.h:322
static PHONON_TEMPLATE_CLASS_MEMBER_EXPORT const QMetaObject staticMetaObject
Definition objectdescriptionmodel.h:195
Qt::ItemFlags flags(const QModelIndex &index) const override
Reimplemented to show unavailable devices as disabled (but still selectable).
Definition objectdescriptionmodel.h:233
QMimeData * mimeData(const QModelIndexList &indexes) const override
Returns the MIME data that dropMimeData() can use to create new items.
Definition objectdescriptionmodel.h:260
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
Accept drops from other models of the same ObjectDescriptionType.
Definition objectdescriptionmodel.h:336
ObjectDescriptionModel(const QList< ObjectDescription< type > > &data, QObject *parent=nullptr)
Constructs a ObjectDescription model with the given parent and the given data.
Definition objectdescriptionmodel.h:288
QList< ObjectDescription< type > > modelData() const
Returns the model data.
Definition objectdescriptionmodel.h:310
ObjectDescriptionModel(QObject *parent=nullptr)
Constructs a ObjectDescription model with the given parent.
Definition objectdescriptionmodel.h:282
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows in the model.
Definition objectdescriptionmodel.h:214
QStringList mimeTypes() const override
Returns a list of supported drag and drop MIME types.
Definition objectdescriptionmodel.h:356
QList< int > tupleIndexOrder() const
Returns a list of indexes in the same order as they are in the model.
Definition objectdescriptionmodel.h:242
void moveDown(const QModelIndex &index)
Moves the item at the given index down.
Definition objectdescriptionmodel.h:276
int tupleIndexAtPositionIndex(int positionIndex) const
Returns the ObjectDescription::index for the tuple at the given position positionIndex.
Definition objectdescriptionmodel.h:254
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) override
Removes count rows starting with the given row.
Definition objectdescriptionmodel.h:348
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Returns data from the item with the given index for the specified role.
Definition objectdescriptionmodel.h:227
void moveUp(const QModelIndex &index)
Moves the item at the given index up.
Definition objectdescriptionmodel.h:268
Provides a tuple of enduser visible name and description.
Definition objectdescription.h:183
const_reference at(qsizetype i) const const
qsizetype count() const const
typedef DropActions
DisplayRole
typedef ItemFlags
void * data()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:46:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:46:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.