Added MedialibModels but still are disabled because they don't work.

This commit is contained in:
Tobias Rundstrom 2006-08-19 14:50:55 -04:00
parent d114edf75f
commit 02c64bf99b
9 changed files with 218 additions and 35 deletions

View file

@ -1,10 +1,14 @@
#ifndef __MEDIALIBTREEMODEL_H__
#define __MEDIALIBTREEMODEL_H__
#include "XMMSSocket.h"
#include <QAbstractTableModel>
#include <xmmsclient/xmmsclient++.h>
class MedialibTreeModel : public QAbstractTableModel
#include "MedialibItem.h"
#include <QAbstractItemModel>
#include <QStringList>
class MedialibTreeModel : public QAbstractItemModel
{
Q_OBJECT
public:
@ -14,11 +18,16 @@ class MedialibTreeModel : public QAbstractTableModel
/* QModel overrides */
int rowCount (const QModelIndex &parent) const;
int columnCount (const QModelIndex &parent) const;
QVariant data (const QModelIndex &parent, int role = Qt::DisplayRole) const;
QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
Qt::ItemFlags flags (const QModelIndex &index) const;
QModelIndex index (int row, int column, const QModelIndex &parent) const;
QModelIndex parent (const QModelIndex &index) const;
private:
XMMSSocket m_socket;
bool artist_list (const Xmms::List< Xmms::Dict > &artists);
Xmms::Client m_client;
MedialibItem *m_rootitem;
};
#endif