LibrariesForm::LibrariesForm(MainWindow *parent) : QWidget(parent) , ui(new Ui::LibrariesForm) , parent(parent) { ui->setupUi(this); hasActiveDownload = false; librariesModel = new LibrariesTableModel(this); ui->librariesTable->setModel(librariesModel); ui->librariesTable->setColumnWidth(0, 60); ui->librariesTable->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch); ui->librariesTable->setColumnWidth(2, 150); ui->librariesTable->setColumnWidth(3, 50); ui->librariesTable->setColumnWidth(4, 50); clearLibrariesTable(); connect(ui->updateButton, SIGNAL(clicked()), parent, SLOT(updateLibrarySources())); connect(ui->librariesTable->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(onLibrariesSelectionChanged(QItemSelection,QItemSelection))); connect(LibrarySourceManagerList::instance(), SIGNAL(finishedDownload(Library)), this, SLOT(onLibraryDownloaded(Library))); }
Mediator::Mediator(Player* player,Download* download,HostUser* hostUser,QObject *parent):QObject(parent){ this->_player = player; this->_download = download; this->_hostUser = hostUser; this-> currentlyDownloading = false; connect(_hostUser->myServer,SIGNAL(newMessage(QString)),this,SLOT(addQueue(QString))); connect(_download,SIGNAL(finishedDownloading(QString)),this,SLOT(downloadToPlayer(QString))); connect(_download,SIGNAL(finishedDownloading(QString)),this,SLOT(finishedDownload(QString))); // connect(this,SIGNAL(mediatorToDownload(QString)),this,SLOT(serverToDownload(QString))); }
void FSettingsDialog::on_btn_Artwork_DownloadAll_clicked() { if(QMessageBox::warning(this, tr("Please confirm!"), tr("If artwork is found, existing artwork will be overwritten!"),QMessageBox::Ok, QMessageBox::Cancel) ==QMessageBox::Cancel) return; runningDownloads = 0; totalDownloads = 0; gameList = db->getGameList(); for(int i=0;i<gameList.length();++i) { FArtManager *artmanager = new FArtManager(); connect(artmanager, SIGNAL(startedDownload()), this, SLOT(downloadStarted())); connect(artmanager, SIGNAL(finishedDownload()), this, SLOT(downloadFinished())); artmanager->getGameData(gameList[i], "PC"); } }
void Segment::slotWriteRest() { if (m_buffer.isEmpty()) { return; } kDebug() << this; if (writeBuffer()) { m_errorCount = 0; if (m_findFilesize) { emit finishedDownload(m_bytesWritten); } return; } if (++m_errorCount >= 100) { kWarning() << "Failed to write to the file:" << m_url << this; emit error(this, i18n("Failed to write to the file."), Transfer::Log_Error); } else { kDebug() << "Wait 50 msec:" << this; QTimer::singleShot(50, this, SLOT(slotWriteRest())); } }