#include <streamdirectoryentry.h>
Public Member Functions | |
streamDirectoryEntry () | |
virtual | ~streamDirectoryEntry () |
void | appendChild (streamDirectoryEntry *child) |
virtual bool | canFetchMore () const |
streamDirectoryEntry * | child (int row) const |
int | childCount () const |
virtual QVariant | data (const int column) const |
virtual void | fetchMore () |
virtual bool | hasChildren () const =0 |
QString | name () const |
streamDirectoryEntry * | parent () const |
virtual QVariant | rawData (const int column) const |
int | row () const |
void | setName (const QString &name) |
void | setValue (const KUrl &value) |
KUrl | value () const |
Private Attributes | |
QList< streamDirectoryEntry * > | childItems |
QString | entryName |
KUrl | entryValue |
streamDirectoryEntry * | parentItem |
streamDirectoryEntry * | self |
You can use it like ordinary data types. This class doesn't provide much intellegence. You should reimplement data() when deriving from this class.
Objects of this class have its data orginized in columns. Furthermore, they can have children. The children are organized in rows; each of them is accessible through its row number.
This class is designed for internal use and serves to providing a stream directory.
Definition at line 43 of file streamdirectoryentry.h.
streamDirectoryEntry::streamDirectoryEntry | ( | ) |
streamDirectoryEntry::~streamDirectoryEntry | ( | ) | [virtual] |
The destructor.
Will delete all child objects.
Definition at line 29 of file streamdirectoryentry.cpp.
References childItems.
void streamDirectoryEntry::appendChild | ( | streamDirectoryEntry * | child | ) |
Makes an object become a child of this object.
child | A pointer to the new child. |
Definition at line 50 of file streamdirectoryentry.cpp.
References childItems, and parentItem.
Referenced by icecast::use_data().
bool streamDirectoryEntry::canFetchMore | ( | ) | const [virtual] |
Reimplemented in streamDirectoryEntry_genre.
Definition at line 100 of file streamdirectoryentry.cpp.
streamDirectoryEntry * streamDirectoryEntry::child | ( | int | row | ) | const |
row | The row number for which the pointer is requested. |
Definition at line 41 of file streamdirectoryentry.cpp.
References childItems.
Referenced by streamDirectoryModel::index().
int streamDirectoryEntry::childCount | ( | ) | const |
Definition at line 36 of file streamdirectoryentry.cpp.
References childItems.
Referenced by streamDirectoryEntry_root::hasChildren(), streamDirectoryEntry_genre::hasChildren(), and streamDirectoryModel::rowCount().
QVariant streamDirectoryEntry::data | ( | const int | column | ) | const [virtual] |
Reimplemented in streamDirectoryEntry_genre, and streamDirectoryEntry_stream.
Definition at line 70 of file streamdirectoryentry.cpp.
Referenced by streamDirectoryModel::data(), and rawData().
void streamDirectoryEntry::fetchMore | ( | ) | [virtual] |
Fetchs missing children entries.
The default implementation does nothing. Reimplement it for custom behavior.
Reimplemented in streamDirectoryEntry_genre.
Definition at line 105 of file streamdirectoryentry.cpp.
virtual bool streamDirectoryEntry::hasChildren | ( | ) | const [pure virtual] |
Implemented in streamDirectoryEntry_genre, streamDirectoryEntry_root, and streamDirectoryEntry_stream.
QString streamDirectoryEntry::name | ( | ) | const |
Definition at line 80 of file streamdirectoryentry.cpp.
References entryName.
Referenced by streamDirectoryEntry_stream::data(), streamDirectoryEntry_genre::data(), and streamDirectoryEntry_stream::streamDirectoryEntry_stream().
streamDirectoryEntry * streamDirectoryEntry::parent | ( | ) | const |
Definition at line 75 of file streamdirectoryentry.cpp.
References parentItem.
Referenced by streamDirectoryModel::parent().
QVariant streamDirectoryEntry::rawData | ( | const int | column | ) | const [virtual] |
Reimplemented in streamDirectoryEntry_stream.
Definition at line 56 of file streamdirectoryentry.cpp.
References data().
Referenced by streamDirectoryModel::data().
int streamDirectoryEntry::row | ( | ) | const |
Definition at line 61 of file streamdirectoryentry.cpp.
References childItems, and parentItem.
Referenced by streamDirectoryModel::parent().
void streamDirectoryEntry::setName | ( | const QString & | name | ) |
Sets entryName.
name | The new value |
Definition at line 85 of file streamdirectoryentry.cpp.
References entryName.
Referenced by icecast_internalThread::readStreamEntry().
void streamDirectoryEntry::setValue | ( | const KUrl & | value | ) |
Sets entryValue.
value | The new value |
Definition at line 95 of file streamdirectoryentry.cpp.
References entryValue.
Referenced by icecast_internalThread::readStreamEntry().
KUrl streamDirectoryEntry::value | ( | ) | const |
Definition at line 90 of file streamdirectoryentry.cpp.
References entryValue.
Referenced by streamDirectoryEntry_stream::data().
QList<streamDirectoryEntry *> streamDirectoryEntry::childItems [private] |
The list of child items.
Definition at line 101 of file streamdirectoryentry.h.
Referenced by appendChild(), child(), childCount(), row(), and ~streamDirectoryEntry().
QString streamDirectoryEntry::entryName [private] |
KUrl streamDirectoryEntry::entryValue [private] |
The value of this entry. This is the URL that is used for Drag and Drop.
In this class, this member is useless. The implementation is up to the derived classes.
Definition at line 116 of file streamdirectoryentry.h.
Referenced by setValue(), and value().
A pointer to the parent of this object (or NULL if this object doesn't have a parent).
Definition at line 119 of file streamdirectoryentry.h.
Referenced by appendChild(), parent(), row(), and streamDirectoryEntry().
streamDirectoryEntry* streamDirectoryEntry::self [private] |
A pointer to this.
Definition at line 121 of file streamdirectoryentry.h.