Track model. More...
#include <VLCQtCore/TrackModel.h>
Public Types | |
enum | Roles { IdRole = Qt::UserRole + 1, TitleRole } |
Model data roles. | |
Signals | |
void | countChanged () |
Count changed signal. | |
Public Member Functions | |
VlcTrackModel (QObject *parent=0) | |
VlcTrackModel constructor. More... | |
VlcTrackModel (const QMap< int, QString > &tracks, QObject *parent=0) | |
VlcTrackModel constructor. More... | |
VlcTrackModel (const VlcTrackModel &other) | |
VlcTrackModel constructor. More... | |
int | rowCount (const QModelIndex &parent) const |
Get row count. More... | |
QHash< int, QByteArray > | roleNames () const |
Model role names. More... | |
QVariant | data (const QModelIndex &index, int role) const |
Read data from model. More... | |
QVariant | data (const int row, int role) const |
Read data from model. More... | |
void | clear () |
Clear the model. | |
void | load (const QMap< int, QString > &data) |
Load tracks into model. More... | |
void | insert (const int id, const QString &title) |
Insert track into model. More... | |
int | count () const |
Get tracks count. More... | |
Properties | |
int | count |
Current tracks count. More... | |
Track model.
A model for displaying audio, video and other tracks
|
explicit |
VlcTrackModel constructor.
parent | parent object |
|
explicit |
VlcTrackModel constructor.
tracks | tracks map |
parent | parent object |
|
explicit |
VlcTrackModel constructor.
other | another VlcTrackModel instance |
int VlcTrackModel::count | ( | ) | const |
Get tracks count.
QVariant VlcTrackModel::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
Read data from model.
index | model index |
role | required role |
QVariant VlcTrackModel::data | ( | const int | row, |
int | role | ||
) | const |
Read data from model.
row | model row |
role | required role |
void VlcTrackModel::insert | ( | const int | id, |
const QString & | title | ||
) |
Insert track into model.
id | track id |
title | track title |
void VlcTrackModel::load | ( | const QMap< int, QString > & | data | ) |
Load tracks into model.
data | tracks map id-title |
QHash< int, QByteArray > VlcTrackModel::roleNames | ( | ) | const |
Model role names.
int VlcTrackModel::rowCount | ( | const QModelIndex & | parent | ) | const |
Get row count.
parent | parent model index |
|
read |
Current tracks count.