Added start of new Medialib view
This commit is contained in:
parent
219327ca20
commit
d114edf75f
12 changed files with 194 additions and 27 deletions
42
MedialibTreeModel.cpp
Normal file
42
MedialibTreeModel.cpp
Normal file
|
@ -0,0 +1,42 @@
|
|||
#include "XMMSSocket.h"
|
||||
#include "MedialibTreeModel.h"
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
|
||||
MedialibTreeModel::MedialibTreeModel (QObject *parent) : QAbstractTableModel (parent), m_socket ("PromoeMedialibTree")
|
||||
{
|
||||
m_socket.connect (getenv ("XMMS_PATH"));
|
||||
}
|
||||
|
||||
/* QModel overrides */
|
||||
int
|
||||
MedialibTreeModel::rowCount (const QModelIndex &parent) const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
int
|
||||
MedialibTreeModel::columnCount (const QModelIndex &parent) const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
QVariant
|
||||
MedialibTreeModel::data (const QModelIndex &parent,
|
||||
int role) const
|
||||
{
|
||||
if (role == Qt::DisplayRole)
|
||||
return QVariant("hej");
|
||||
return QVariant ();
|
||||
}
|
||||
|
||||
QVariant
|
||||
MedialibTreeModel::headerData (int section,
|
||||
Qt::Orientation orientation,
|
||||
int role) const
|
||||
{
|
||||
if (role == Qt::DisplayRole)
|
||||
return QVariant("header");
|
||||
return QVariant ();
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue