Exemplo n.º 1
0
void DownloadDialog::handleFinished(QNetworkReply *reply) {
    if(!reply->isReadable()) {
        ui->tBrowser_Download->append("Error downloading the file!");
        return;
    }
    emit downloadReady(reply->readAll());
    ui->bBox_Close->setEnabled(true);
    ui->tBrowser_Download->append("Ready! Please press \"Close\"!");
}
Exemplo n.º 2
0
void
Mp3tunesHarmonyDaemon::setClient( Mp3tunesHarmonyClient *client )
{
    m_client = client;
    connect( this, SIGNAL( disconnected() ),
            m_client, SLOT( harmonyDisconnected() ));
    connect( this, SIGNAL( waitingForEmail( QString ) ),
            m_client, SLOT( harmonyWaitingForEmail( QString ) ) );
    connect( this, SIGNAL( connected() ),
            m_client, SLOT( harmonyConnected() ) );
    connect( this, SIGNAL( errorSignal( QString ) ),
            m_client, SLOT( harmonyError( QString ) ) );
    connect( this, SIGNAL( downloadReady( Mp3tunesHarmonyDownload ) ),
            m_client, SLOT( harmonyDownloadReady( Mp3tunesHarmonyDownload ) ) );
    connect( this, SIGNAL( downloadPending( Mp3tunesHarmonyDownload ) ),
            m_client, SLOT( harmonyDownloadPending( Mp3tunesHarmonyDownload ) ) );
}
Exemplo n.º 3
0
void ImageViewer::loadImageFromURL()
{
    QUrl saveURL = QUrl::fromLocalFile(file.fileName() );

    if (!saveURL.isValid())
        qDebug()<<"tempfile-URL is malformed\n";

    //downloadJob = KIO::copy (m_ImageUrl, saveURL);	// starts the download asynchron
    //connect (downloadJob, SIGNAL (result (KJob *)), SLOT (downloadReady (KJob *)));

    QApplication::setOverrideCursor(Qt::WaitCursor);

    connect(&downloadJob, SIGNAL(downloaded()), this, SLOT(downloadReady()));
    connect(&downloadJob, SIGNAL(error(QString)), this, SLOT(downloadError(QString)));

    downloadJob.get(m_ImageUrl);
}