VlcTrackModel Class Reference

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...
 

Detailed Description

Track model.

A model for displaying audio, video and other tracks

Since
VLC-Qt 1.1

Constructor & Destructor Documentation

VlcTrackModel::VlcTrackModel ( QObject *  parent = 0)
explicit

VlcTrackModel constructor.

Parameters
parentparent object
VlcTrackModel::VlcTrackModel ( const QMap< int, QString > &  tracks,
QObject *  parent = 0 
)
explicit

VlcTrackModel constructor.

Parameters
trackstracks map
parentparent object
VlcTrackModel::VlcTrackModel ( const VlcTrackModel other)
explicit

VlcTrackModel constructor.

Parameters
otheranother VlcTrackModel instance

Member Function Documentation

int VlcTrackModel::count ( ) const

Get tracks count.

Returns
count
QVariant VlcTrackModel::data ( const QModelIndex &  index,
int  role 
) const

Read data from model.

Parameters
indexmodel index
rolerequired role
QVariant VlcTrackModel::data ( const int  row,
int  role 
) const

Read data from model.

Parameters
rowmodel row
rolerequired role
void VlcTrackModel::insert ( const int  id,
const QString &  title 
)

Insert track into model.

Parameters
idtrack id
titletrack title
void VlcTrackModel::load ( const QMap< int, QString > &  data)

Load tracks into model.

Parameters
datatracks map id-title
QHash< int, QByteArray > VlcTrackModel::roleNames ( ) const

Model role names.

Returns
role names hash
int VlcTrackModel::rowCount ( const QModelIndex &  parent) const

Get row count.

Parameters
parentparent model index
Returns
count

Property Documentation

int VlcTrackModel::count
read

Current tracks count.

See also
count
countChanged

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