mContents = new QList<VlcPlayListElementSimple>();
+ ui->listWidget->setTextElideMode(Qt::ElideLeft);
+ ui->listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+
ui->playButton->setIcon(QIcon::fromTheme("camera_playback"));
ui->clearButton->setIcon(QIcon::fromTheme("general_delete"));
ui->shuffleButton->setIcon(QIcon::fromTheme("mediaplayer_default_shuffle"));
void PlayListMainWindow::onRemove() {
if (0 < this->mCurrentVlcIndex) {
/*QNetworkReply * reply = */ mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_delete&id=" + QString::number(this->mCurrentVlcIndex))));
- this->requestPlayList();
+ connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(requestPlayList()));
}
}
void PlayListMainWindow::onPlay() {
}
void PlayListMainWindow::onClear() {
/*QNetworkReply * reply = */ mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_empty")));
- this->requestPlayList();
+ connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(requestPlayList()));
}
void PlayListMainWindow::requestPlayList() {
mContents->clear();
ui->removeButton->setDisabled(true);
ui->playButton->setDisabled(true);
QNetworkReply * reply = mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/playlist.xml")));
+ disconnect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(requestPlayList()));
connect(reply,SIGNAL(readyRead()),this,SLOT(readReady()));
connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
}
for (int idx = 0; idx < ct; ++idx) {
QDomNode node = nodes.at(idx);
QString name = node.attributes().namedItem("name").nodeValue();
- if (0 == QString::compare("Playlist", name)) {
+ int id = node.attributes().namedItem("id").nodeValue().toInt();
+ if (3 == id) {
// got the main playlist, let's build it up
if (node.hasChildNodes()) {
QDomNodeList leafs = node.childNodes();