Révision 83a77071 webphotoalbum.cpp
webphotoalbum.cpp | ||
---|---|---|
430 | 430 |
makeZip(m_baseDir.absolutePath() + "/" + ui->treeWidget->currentItem()->text(0) + "/thumbs", |
431 | 431 |
m_baseDir.absolutePath() + "/" + ui->treeWidget->currentItem()->text(0) + "/zip/thumbs.zip"); |
432 | 432 |
|
433 |
QSettings settings; |
|
434 |
settings.beginGroup("FTP"); |
|
435 |
settings.setValue("FTPLogin",ui->leFTPLogin->text()); |
|
436 |
settings.setValue("FTPPass",ui->leFTPPass->text()); |
|
437 |
settings.setValue("FTPServeur",ui->leFTPServeur->text()); |
|
438 |
settings.setValue("FTPDirectory",ui->leFTPDirectory->text()); |
|
439 |
settings.setValue("SiteAdresse",ui->leSiteAdresse->text()); |
|
440 |
|
|
433 | 441 |
m_tools->clear(); |
434 | 442 |
|
435 | 443 |
m_tools->ftpConnect(ui->leFTPServeur->text(), |
... | ... | |
447 | 455 |
QDir dir(fi.absoluteFilePath()); |
448 | 456 |
m_tools->parcoursRecursif(dir.absolutePath(),ui->treeWidget->currentItem()->text(0)); |
449 | 457 |
//qDebug() << m_fileListToUpload; |
450 |
m_tools->uploadRecursifGallery(ui->leFTPDirectory->text()); |
|
458 |
m_tools->uploadRecursifGallery(ui->leFTPDirectory->text(),ui->leSiteAdresse->text().trimmed());
|
|
451 | 459 |
connect(m_tools, SIGNAL(signalUpload(int,int,QString)), this, SLOT(updateProgressFichier(int,int,QString))); |
452 | 460 |
connect(m_tools, SIGNAL(signalUploadData(int,int)), this, SLOT(updateProgressData(int,int))); |
453 | 461 |
} |
... | ... | |
462 | 470 |
{ |
463 | 471 |
ui->pbFTPFichier->setMaximum(total); |
464 | 472 |
ui->pbFTPFichier->setValue(current); |
465 |
ui->textBrowser->append(fileName + "\n");
|
|
473 |
ui->textBrowser->append(fileName); |
|
466 | 474 |
} |
467 | 475 |
|
468 | 476 |
void WebPhotoAlbum::updateProgressData(int total, int current) |
... | ... | |
511 | 519 |
|
512 | 520 |
void WebPhotoAlbum::uploadEnd() |
513 | 521 |
{ |
514 |
ui->textBrowser->append(trUtf8("Téléchargement terminé\n")); |
|
522 |
ui->textBrowser->append(trUtf8("Téléchargement terminé")); |
|
523 |
} |
|
524 |
|
|
525 |
void WebPhotoAlbum::on_tabWidget_currentChanged(int index) |
|
526 |
{ |
|
527 |
if(index == 2) { |
|
528 |
//Lecture du QSettings pour avoir les infos login / pass / url site |
|
529 |
QSettings settings; |
|
530 |
settings.beginGroup("FTP"); |
|
531 |
ui->leFTPLogin->setText(settings.value("FTPLogin","identifiant").toString()); |
|
532 |
ui->leFTPPass->setText(settings.value("FTPPass").toString()); |
|
533 |
ui->leFTPServeur->setText(settings.value("FTPServeur","ftpperso.free.fr").toString()); |
|
534 |
ui->leFTPDirectory->setText(settings.value("FTPDirectory","/album").toString()); |
|
535 |
ui->leSiteAdresse->setText(settings.value("SiteAdresse","http://votresite.free.fr/album/").toString()); |
|
536 |
} |
|
515 | 537 |
} |
Formats disponibles : Unified diff