streamDirectoryModel Class Reference

A model which provides a stream directory. More...

#include <streamdirectorymodel.h>

Inheritance diagram for streamDirectoryModel:

Inheritance graph
[legend]
Collaboration diagram for streamDirectoryModel:

Collaboration graph
[legend]

List of all members.

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_rootrootEntry

Private Attributes

KIcon genreIcon


Detailed Description

A model which provides a stream directory.

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.


Constructor & Destructor Documentation

streamDirectoryModel::streamDirectoryModel ( QObject *  parent,
const QString &  genreIconFileName = QString() 
) [explicit]

Constructor of the class.

Parameters:
parent Sets the parent widget of this object.
genreIconFileName See genreIcon for details.

Definition at line 28 of file streamdirectorymodel.cpp.

References genreIcon, and rootEntry.

streamDirectoryModel::~streamDirectoryModel (  )  [virtual]

The desctructor.

Definition at line 37 of file streamdirectorymodel.cpp.

References rootEntry.


Member Function Documentation

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.

Note:
For the role Qt::UserRole this function provides the same data as for Qt::DisplayRole, but without being formated. This is useful for sorting.

Definition at line 104 of file streamdirectorymodel.cpp.

References streamDirectoryEntry::data(), and streamDirectoryEntry::rawData().

Here is the call graph for this function:

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.

Here is the call graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

QMimeData * streamDirectoryModel::mimeData ( const QModelIndexList &  indexes  )  const [virtual]

Reimplemented from base class.

Definition at line 170 of file streamdirectorymodel.cpp.

References index().

Here is the call graph for this function:

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

Here is the call graph for this function:

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.

Here is the call graph for this function:


Member Data Documentation

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

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


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

doxygen