#include <streamdirectorymodel.h>
Public Member Functions | |
streamDirectoryModel (QObject *parent, const QString &genreIconFileName=QString()) | |
virtual | ~streamDirectoryModel () |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
virtual bool | hasChildren (const QModelIndex &parent=QModelIndex()) const |
virtual QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
virtual QStringList | mimeTypes () const |
virtual QMimeData * | mimeData (const QModelIndexList &indexes) const |
virtual QModelIndex | parent (const QModelIndex &index) const |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
Protected Attributes | |
streamDirectoryEntry_root * | rootEntry |
Private Attributes | |
KIcon | genreIcon |
This is an abstract base class for Qt tree models that provide stream directories.
The internal data structure is based on the abstract class streamDirectoryEntry and especially on its implementation streamDirectoryEntry_root, which is used as root item for this model.
Definition at line 34 of file streamdirectorymodel.h.
streamDirectoryModel::streamDirectoryModel | ( | QObject * | parent, | |
const QString & | genreIconFileName = QString() | |||
) | [explicit] |
Constructor of the class.
parent | Sets the parent widget of this object. | |
genreIconFileName | See genreIcon for details. |
Definition at line 28 of file streamdirectorymodel.cpp.
streamDirectoryModel::~streamDirectoryModel | ( | ) | [virtual] |
int streamDirectoryModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Reimplemented from base class.
Definition at line 99 of file streamdirectorymodel.cpp.
QVariant streamDirectoryModel::data | ( | const QModelIndex & | index, | |
int | role = Qt::DisplayRole | |||
) | const [virtual] |
Reimplemented from base class.
Definition at line 104 of file streamdirectorymodel.cpp.
References streamDirectoryEntry::data(), and streamDirectoryEntry::rawData().
Qt::ItemFlags streamDirectoryModel::flags | ( | const QModelIndex & | index | ) | const [virtual] |
Reimplemented from base class.
Definition at line 147 of file streamdirectorymodel.cpp.
bool streamDirectoryModel::hasChildren | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Reimplemented from base class.
Definition at line 138 of file streamdirectorymodel.cpp.
References streamDirectoryEntry_root::hasChildren(), and rootEntry.
QVariant streamDirectoryModel::headerData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role = Qt::DisplayRole | |||
) | const [virtual] |
Definition at line 122 of file streamdirectorymodel.cpp.
QModelIndex streamDirectoryModel::index | ( | int | row, | |
int | column, | |||
const QModelIndex & | parent = QModelIndex() | |||
) | const [virtual] |
Reimplemented from base class.
Definition at line 57 of file streamdirectorymodel.cpp.
References streamDirectoryEntry::child(), and rootEntry.
Referenced by mimeData().
QMimeData * streamDirectoryModel::mimeData | ( | const QModelIndexList & | indexes | ) | const [virtual] |
Reimplemented from base class.
Definition at line 170 of file streamdirectorymodel.cpp.
References index().
QStringList streamDirectoryModel::mimeTypes | ( | ) | const [virtual] |
Reimplemented from base class.
Definition at line 160 of file streamdirectorymodel.cpp.
QModelIndex streamDirectoryModel::parent | ( | const QModelIndex & | index | ) | const [virtual] |
Reimplemented from base class.
Definition at line 42 of file streamdirectorymodel.cpp.
References streamDirectoryEntry::parent(), rootEntry, and streamDirectoryEntry::row().
int streamDirectoryModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Reimplemented from base class.
Definition at line 81 of file streamdirectorymodel.cpp.
References streamDirectoryEntry::childCount(), and rootEntry.
KIcon streamDirectoryModel::genreIcon [private] |
Holds the icon the is used for the genres. The file path is set in the constructor and later can't be changed anymore.
Definition at line 79 of file streamdirectorymodel.h.
Referenced by streamDirectoryModel().
streamDirectoryEntry_root* streamDirectoryModel::rootEntry [protected] |
A link to the root entry of the internal data structure.
Definition at line 74 of file streamdirectorymodel.h.
Referenced by hasChildren(), index(), parent(), rowCount(), streamDirectoryModel(), icecast::use_data(), and ~streamDirectoryModel().