5 #include <QStandardItem>
7 #include <QNetworkReply>
9 #include <QSignalMapper>
11 class playlist : public QAbstractTableModel
26 //this Enum MUST BE sequantial
27 //And when changed must update the length
28 #define PLAYLISTENUMS 8
54 QList<songElement *>* getList();
55 explicit playlist(QObject *parent = 0);
56 int addSong(QStandardItem *item,QString name);
57 void removeSong(int position);
58 void getSong(int position);
59 QIODevice * getBuffer(int position);
60 bool isStream(int position);
61 void markPlayed(int position);
62 void deleteSong(int position);
63 void setGscom(gscom *comm);
64 void freeMemory(int position);
66 void setCurrentPlaying(int position);
68 int findFirstNotPlayed();
69 void beginDownload(int position);
70 bool existAt(int position);
72 //Implemented virtual classes for Model View
73 QVariant data(const QModelIndex &index, int role) const;
74 int columnCount(const QModelIndex &parent) const;
75 int rowCount(const QModelIndex &parent) const;
78 void downloadProgress(int position, qint64 d, qint64 t);
79 void bufferReady(int position);
80 void sFailure(int position,failType);
81 void downloadComplete(int position);
83 //void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
84 void rowsInserted ( const QModelIndex & parent, int start, int end );
88 void downloadSlot(qint64 d, qint64 t);
89 void networkReplyFinish();
90 void downloadDone(int position);
92 void setBufferRdy(int b);
93 void getNError(QNetworkReply::NetworkError);
100 int currentplayingitem;
102 QList<songElement *> *pList;
103 QSignalMapper *mapper;
104 QNetworkReply *reply;
105 QNetworkAccessManager *manager;
106 int currentdownloaditem;