23 #ifndef PHONON_OBJECTDESCRIPTIONMODEL_H
24 #define PHONON_OBJECTDESCRIPTIONMODEL_H
29 #include <QtCore/QList>
30 #include <QtCore/QModelIndex>
31 #include <QtCore/QStringList>
36 #ifndef QT_NO_PHONON_OBJECTDESCRIPTIONMODEL
40 class ObjectDescriptionModelDataPrivate;
82 Qt::ItemFlags flags(
const QModelIndex &index)
const;
103 int tupleIndexAtPositionIndex(
int positionIndex)
const;
130 Qt::DropActions supportedDropActions()
const;
139 ObjectDescriptionModelDataPrivate *
const d;
144 #if (defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT)) || defined(Q_CC_CLANG)
149 #define PHONON_TEMPLATE_CLASS_EXPORT PHONON_EXPORT
150 #define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT
154 #define PHONON_TEMPLATE_CLASS_EXPORT
155 #define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT PHONON_EXPORT
193 template<ObjectDescriptionType type>
303 for (
int i = 0; i <
data.count(); ++i) {
306 d->setModelData(list);
318 for (
int i = 0; i < list.
count(); ++i) {
319 ret << ObjectDescription<type>(list.
at(i));
342 return d->dropMimeData(
type, data, action, row, column, parent);
354 return d->removeRows(row, count, parent);
382 #endif //QT_NO_PHONON_OBJECTDESCRIPTIONMODEL
387 #endif // PHONON_OBJECTDESCRIPTIONMODEL_H
GLuint GLuint GLsizei GLenum type
void setModelData(const QList< ObjectDescription< type > > &data)
Sets the model data using the list provided by data.
The ObjectDescriptionModel class provides a model from a list of ObjectDescription objects...
QList< int > tupleIndexOrder() const
Returns a list of indexes in the same order as they are in the model.
Qt::ItemFlags flags(const QModelIndex &index) const
Reimplemented to show unavailable devices as disabled (but still selectable).
ObjectDescriptionType
Defines the type of information that is contained in a ObjectDescription object.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Returns data from the item with the given index for the specified role.
void moveDown(const QModelIndex &index)
Moves the item at the given index down.
QMimeData * mimeData(const QModelIndexList &indexes) const
Returns the MIME data that dropMimeData() can use to create new items.
ObjectDescriptionModel< AudioCaptureDeviceType > AudioCaptureDeviceModel
ObjectDescriptionModelDataPrivate *const d
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
Accept drops from other models of the same ObjectDescriptionType.
int tupleIndexAtPositionIndex(int positionIndex) const
Returns the ObjectDescription::index for the tuple at the given position positionIndex.
void moveUp(const QModelIndex &index)
Moves the item at the given index up.
ObjectDescriptionModel(const QList< ObjectDescription< type > > &data, QObject *parent=0)
Constructs a ObjectDescription model with the given parent and the given data.
#define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT
ObjectDescriptionModel< SubtitleType > SubtitleDescriptionModel
GLenum GLenum GLvoid * row
#define QT_BEGIN_NAMESPACE
int rowCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of rows in the model.
GLsizei GLsizei GLenum GLenum const GLvoid * data
ObjectDescriptionModel< AudioOutputDeviceType > AudioOutputDeviceModel
Provides a tuple of enduser visible name and description.
const T & at(int i) const
GLuint GLuint GLsizei count
static Q_OBJECT_CHECK PHONON_TEMPLATE_CLASS_MEMBER_EXPORT const QMetaObject staticMetaObject
ObjectDescriptionModel(QObject *parent=0)
Constructs a ObjectDescription model with the given parent.
ObjectDescriptionModel< EffectType > EffectDescriptionModel
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex())
Removes count rows starting with the given row.
int count(const T &t) const
GLenum GLenum GLvoid GLvoid * column
ObjectDescriptionModel< AudioChannelType > AudioChannelDescriptionModel
The KDE Multimedia classes.
#define PHONON_TEMPLATE_CLASS_EXPORT
QList< ObjectDescription< type > > modelData() const
Returns the model data.
Data class for models for ObjectDescription objects.
QStringList mimeTypes() const
Returns a list of supported drag and drop MIME types.
ObjectDescription< type > modelData(const QModelIndex &index) const
Returns one ObjectDescription of the model data for the given index.
ObjectDescriptionModelData *const d
Qt::DropActions supportedDropActions() const
This model supports drag and drop to copy or move items.