connect(ui->playpauseButton,SIGNAL(clicked()),this,SLOT(playpause()));
connect(ui->stopButton,SIGNAL(clicked()),this,SLOT(stop()));
- //connect(ui->pauseButton,SIGNAL(clicked()),this,SLOT(playpause()));
connect(ui->previousButton,SIGNAL(clicked()),this,SLOT(previous()));
connect(ui->nextButton,SIGNAL(clicked()),this,SLOT(next()));
connect(ui->fullscreenButton,SIGNAL(clicked()),this,SLOT(fullscreen()));
void PlayerMainWindow::askStatus()
{
- qDebug() << "Status requested. at:" << QTime::currentTime().toString("hh::mm:ss");
+ //qDebug() << "Status requested. at:" << QTime::currentTime().toString("hh::mm:ss");
QNetworkReply * reply = mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml")));
connect(reply,SIGNAL(readyRead()),this,SLOT(parseXmlStatus()));
}
QString album = metaInfoNode.namedItem("album").toElement().text();
QString now_playing = metaInfoNode.namedItem("now_playing").toElement().text();
QString art_url = metaInfoNode.namedItem("art_url").toElement().text();
+ //metaInfoNode.clear();
+ //infoNode.clear();
+ //docElem.clear();
+ //doc.clear();
// Populate the current status structure
// now would be a good time to work out if we are a new track / file or not.
// key if we are going to look for album art later
}
- if (mCurrentStatus.position >= 0 && mCurrentStatus.position <= 100)
+ if (mCurrentStatus.position >= 0 && mCurrentStatus.position <= 100) {
+ ui->slider->blockSignals(true);
ui->slider->setValue(mCurrentStatus.position);
+ ui->slider->blockSignals(false);
+ }
ui->labelTitle->setText(mCurrentStatus.title);
ui->labelArtist->setText(mCurrentStatus.artist);
this->setCoverArt(mResponse);
// only interested in finished signals
disconnect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
+ delete reply;
}
void PlayerMainWindow::getCoverArt(int id) {
qDebug() << "getCoverArt id=!" << id;
ui->labelArtPortrait->setVisible(false);
ui->labelArtLandscape->setVisible(false);
}
+ delete image;
}
void PlayerMainWindow::setCoverArtFromPixmap(QPixmap image) {
mHasImage = true;