Révision 8ed8fc1a
main.cpp | ||
---|---|---|
22 | 22 |
|
23 | 23 |
#include "abuleduapplicationv1.h" |
24 | 24 |
#include "version.h" |
25 |
#include "webalbumphoto.h"
|
|
25 |
#include "webphotoalbum.h"
|
|
26 | 26 |
|
27 | 27 |
void debugOutput(QtMsgType type, const char *msg) |
28 | 28 |
{ |
... | ... | |
52 | 52 |
|
53 | 53 |
AbulEduApplicationV1 a(argc, argv,VER_INTERNALNAME_STR, VER_PRODUCTVERSION_STR, VER_COMPANYDOMAIN_STR, VER_COMPANYNAME_STR); |
54 | 54 |
a.setAbeApplicationLongName(QObject::trUtf8(VER_FILEDESCRIPTION_STR)); |
55 |
WebAlbumPhoto w;
|
|
55 |
WebPhotoAlbum w;
|
|
56 | 56 |
w.show(); |
57 | 57 |
|
58 | 58 |
return a.exec(); |
ryxeo-webphotoalbum.pro | ||
---|---|---|
10 | 10 |
TEMPLATE = app |
11 | 11 |
|
12 | 12 |
SOURCES += main.cpp\ |
13 |
webalbumphoto.cpp \
|
|
13 |
webphotoalbum.cpp \
|
|
14 | 14 |
assistant.cpp \ |
15 | 15 |
tools.cpp \ |
16 | 16 |
newalbumdialog.cpp |
17 | 17 |
|
18 |
HEADERS += webalbumphoto.h \
|
|
18 |
HEADERS += webphotoalbum.h \
|
|
19 | 19 |
assistant.h \ |
20 | 20 |
tools.h \ |
21 | 21 |
newalbumdialog.h \ |
22 | 22 |
version.h |
23 | 23 |
|
24 |
FORMS += webalbumphoto.ui \
|
|
24 |
FORMS += webphotoalbum.ui \
|
|
25 | 25 |
assistant.ui \ |
26 | 26 |
newalbumdialog.ui |
27 | 27 |
|
version.h | ||
---|---|---|
8 | 8 |
#define VER_PRODUCTVERSION_STR "0.9.9\0" |
9 | 9 |
|
10 | 10 |
#define VER_COMPANYNAME_STR "RyXeo SARL" |
11 |
#define VER_FILEDESCRIPTION_STR "RyXéo -- WebAlbumPhoto"
|
|
12 |
#define VER_INTERNALNAME_STR "ryxeo-webalbumphoto"
|
|
11 |
#define VER_FILEDESCRIPTION_STR "RyXéo -- WebPhotoAlbum"
|
|
12 |
#define VER_INTERNALNAME_STR "ryxeo-webphotoalbum"
|
|
13 | 13 |
#define VER_LEGALCOPYRIGHT_STR "Copyright (c) 2012 RyXeo SARL" |
14 | 14 |
#define VER_LEGALTRADEMARKS1_STR "All Rights Reserved" |
15 | 15 |
#define VER_LEGALTRADEMARKS2_STR "License GNU/GPL v3" |
16 |
#define VER_ORIGINALFILENAME_STR "ryxeo-webalbumphoto.exe"
|
|
17 |
#define VER_PRODUCTNAME_STR "RyXéo -- WebAlbumPhoto"
|
|
16 |
#define VER_ORIGINALFILENAME_STR "ryxeo-webphotoalbum.exe"
|
|
17 |
#define VER_PRODUCTNAME_STR "RyXéo -- WebPhotoAlbum"
|
|
18 | 18 |
|
19 | 19 |
#define VER_COMPANYDOMAIN_STR "ryxeo.com" |
20 | 20 |
|
webphotoalbum.cpp | ||
---|---|---|
20 | 20 |
*/ |
21 | 21 |
|
22 | 22 |
|
23 |
#include "webalbumphoto.h"
|
|
24 |
#include "ui_webalbumphoto.h"
|
|
23 |
#include "webphotoalbum.h"
|
|
24 |
#include "ui_webphotoalbum.h"
|
|
25 | 25 |
|
26 | 26 |
|
27 | 27 |
//--------------------------------------------------------------------------- |
... | ... | |
45 | 45 |
// ========================================================================================================================= |
46 | 46 |
|
47 | 47 |
|
48 |
WebAlbumPhoto::WebAlbumPhoto(QWidget *parent) :
|
|
48 |
WebPhotoAlbum::WebPhotoAlbum(QWidget *parent) :
|
|
49 | 49 |
QMainWindow(parent), |
50 |
ui(new Ui::WebAlbumPhoto)
|
|
50 |
ui(new Ui::WebPhotoAlbum)
|
|
51 | 51 |
{ |
52 | 52 |
ui->setupUi(this); |
53 | 53 |
|
... | ... | |
111 | 111 |
ui->lwPictures->setDropIndicatorShown(true); |
112 | 112 |
} |
113 | 113 |
|
114 |
WebAlbumPhoto::~WebAlbumPhoto()
|
|
114 |
WebPhotoAlbum::~WebPhotoAlbum()
|
|
115 | 115 |
{ |
116 | 116 |
delete ui; |
117 | 117 |
} |
118 | 118 |
|
119 |
void WebAlbumPhoto::on_action_Nouvel_album_triggered()
|
|
119 |
void WebPhotoAlbum::on_action_Nouvel_album_triggered()
|
|
120 | 120 |
{ |
121 | 121 |
m_currentProjectPictureNumber = 0; |
122 | 122 |
bool ok; |
... | ... | |
139 | 139 |
|
140 | 140 |
} |
141 | 141 |
|
142 |
void WebAlbumPhoto::on_treeWidget_itemClicked(QTreeWidgetItem *item, int column)
|
|
142 |
void WebPhotoAlbum::on_treeWidget_itemClicked(QTreeWidgetItem *item, int column)
|
|
143 | 143 |
{ |
144 | 144 |
QFileInfo fi(ui->treeWidget->currentItem()->data(1,0).toString()+"/info.txt"); |
145 | 145 |
qDebug() << "Lecture de " << fi.absoluteFilePath(); |
... | ... | |
192 | 192 |
qDebug() << "Espace de stockage du projet " << m_currentProjectDir; |
193 | 193 |
} |
194 | 194 |
|
195 |
void WebAlbumPhoto::on_btnSave_clicked()
|
|
195 |
void WebPhotoAlbum::on_btnSave_clicked()
|
|
196 | 196 |
{ |
197 | 197 |
QByteArray data; |
198 | 198 |
data.append(QString("name|%1\n").arg(ui->leTitre->text().trimmed())); |
... | ... | |
215 | 215 |
} |
216 | 216 |
|
217 | 217 |
|
218 |
void WebAlbumPhoto::on_treeWidget_customContextMenuRequested(const QPoint &pos)
|
|
218 |
void WebPhotoAlbum::on_treeWidget_customContextMenuRequested(const QPoint &pos)
|
|
219 | 219 |
{ |
220 | 220 |
m_menu->exec(ui->treeWidget->mapToGlobal(pos)); |
221 | 221 |
} |
222 | 222 |
|
223 |
void WebAlbumPhoto::dragEnterEvent(QDragEnterEvent *event)
|
|
223 |
void WebPhotoAlbum::dragEnterEvent(QDragEnterEvent *event)
|
|
224 | 224 |
{ |
225 | 225 |
if (event->mimeData()->hasUrls()) |
226 | 226 |
{ |
... | ... | |
232 | 232 |
} |
233 | 233 |
} |
234 | 234 |
|
235 |
void WebAlbumPhoto::dropEvent(QDropEvent *event)
|
|
235 |
void WebPhotoAlbum::dropEvent(QDropEvent *event)
|
|
236 | 236 |
{ |
237 | 237 |
qDebug() << "Accepte le drop d'une image"; |
238 | 238 |
|
... | ... | |
255 | 255 |
} |
256 | 256 |
} |
257 | 257 |
|
258 |
void WebAlbumPhoto::addPictureToProject(QString fic)
|
|
258 |
void WebPhotoAlbum::addPictureToProject(QString fic)
|
|
259 | 259 |
{ |
260 | 260 |
ui->statusBar->clearMessage(); |
261 | 261 |
ui->statusBar->showMessage(trUtf8("Fichier en cours: %1").arg(fic),3000); |
... | ... | |
379 | 379 |
refreshPictureList(); |
380 | 380 |
} |
381 | 381 |
|
382 |
void WebAlbumPhoto::refreshPictureList()
|
|
382 |
void WebPhotoAlbum::refreshPictureList()
|
|
383 | 383 |
{ |
384 | 384 |
QTreeWidgetItem *item = ui->treeWidget->currentItem(); |
385 | 385 |
ui->lwPictures->clear(); |
... | ... | |
414 | 414 |
m_currentProjectPictureNumber = currentProjectPictureNumber+1; |
415 | 415 |
} |
416 | 416 |
|
417 |
void WebAlbumPhoto::on_btnUpload_clicked()
|
|
417 |
void WebPhotoAlbum::on_btnUpload_clicked()
|
|
418 | 418 |
{ |
419 | 419 |
qDebug() << "on_btnUpload_clicked : " << ui->treeWidget->currentItem()->data(1,0).toString(); |
420 | 420 |
|
... | ... | |
452 | 452 |
connect(m_tools, SIGNAL(signalUploadData(int,int)), this, SLOT(updateProgressData(int,int))); |
453 | 453 |
} |
454 | 454 |
|
455 |
void WebAlbumPhoto::on_action_Assistant_d_installation_triggered()
|
|
455 |
void WebPhotoAlbum::on_action_Assistant_d_installation_triggered()
|
|
456 | 456 |
{ |
457 | 457 |
Assistant *a = new Assistant(this); |
458 | 458 |
a->show(); |
459 | 459 |
} |
460 | 460 |
|
461 |
void WebAlbumPhoto::updateProgressFichier(int total, int current, QString fileName)
|
|
461 |
void WebPhotoAlbum::updateProgressFichier(int total, int current, QString fileName)
|
|
462 | 462 |
{ |
463 | 463 |
ui->pbFTPFichier->setMaximum(total); |
464 | 464 |
ui->pbFTPFichier->setValue(current); |
465 | 465 |
ui->textBrowser->append(fileName + "\n"); |
466 | 466 |
} |
467 | 467 |
|
468 |
void WebAlbumPhoto::updateProgressData(int total, int current)
|
|
468 |
void WebPhotoAlbum::updateProgressData(int total, int current)
|
|
469 | 469 |
{ |
470 | 470 |
ui->pbFTPProgress->setMaximum(total); |
471 | 471 |
ui->pbFTPProgress->setValue(current); |
472 | 472 |
} |
473 | 473 |
|
474 |
void WebAlbumPhoto::makeZip(QString repSource, QString destFileName)
|
|
474 |
void WebPhotoAlbum::makeZip(QString repSource, QString destFileName)
|
|
475 | 475 |
{ |
476 | 476 |
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); |
477 | 477 |
ui->statusBar->showMessage(QString::fromUtf8("Création du fichier ZIP %1 en cours").arg(destFileName), 5000); |
478 | 478 |
qApp->processEvents(); |
479 |
qDebug() << "WebAlbumPhoto::makeZip " << repSource << " :: " << destFileName;
|
|
479 |
qDebug() << "WebPhotoAlbum::makeZip " << repSource << " :: " << destFileName;
|
|
480 | 480 |
//Creation d'une archive ZIP dans tous les cas |
481 | 481 |
QuaZip zipDestination(destFileName); |
482 | 482 |
if(zipDestination.open(QuaZip::mdCreate)) { |
... | ... | |
509 | 509 |
QApplication::restoreOverrideCursor(); |
510 | 510 |
} |
511 | 511 |
|
512 |
void WebAlbumPhoto::uploadEnd()
|
|
512 |
void WebPhotoAlbum::uploadEnd()
|
|
513 | 513 |
{ |
514 | 514 |
ui->textBrowser->append(trUtf8("Téléchargement terminé\n")); |
515 | 515 |
} |
webphotoalbum.h | ||
---|---|---|
45 | 45 |
|
46 | 46 |
|
47 | 47 |
namespace Ui { |
48 |
class WebAlbumPhoto;
|
|
48 |
class WebPhotoAlbum;
|
|
49 | 49 |
} |
50 | 50 |
|
51 |
class WebAlbumPhoto : public QMainWindow
|
|
51 |
class WebPhotoAlbum : public QMainWindow
|
|
52 | 52 |
{ |
53 | 53 |
Q_OBJECT |
54 | 54 |
|
55 | 55 |
public: |
56 |
explicit WebAlbumPhoto(QWidget *parent = 0);
|
|
57 |
~WebAlbumPhoto();
|
|
56 |
explicit WebPhotoAlbum(QWidget *parent = 0);
|
|
57 |
~WebPhotoAlbum();
|
|
58 | 58 |
|
59 | 59 |
private slots: |
60 | 60 |
void on_action_Nouvel_album_triggered(); |
... | ... | |
78 | 78 |
void uploadEnd(); |
79 | 79 |
|
80 | 80 |
private: |
81 |
Ui::WebAlbumPhoto *ui;
|
|
81 |
Ui::WebPhotoAlbum *ui;
|
|
82 | 82 |
QDir m_baseDir; |
83 | 83 |
QMenu *m_menu; |
84 | 84 |
QLabel *m_labelDeposez; |
webphotoalbum.ui | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<ui version="4.0"> |
3 |
<class>WebAlbumPhoto</class>
|
|
4 |
<widget class="QMainWindow" name="WebAlbumPhoto">
|
|
3 |
<class>WebPhotoAlbum</class>
|
|
4 |
<widget class="QMainWindow" name="WebPhotoAlbum">
|
|
5 | 5 |
<property name="geometry"> |
6 | 6 |
<rect> |
7 | 7 |
<x>0</x> |
... | ... | |
387 | 387 |
<connection> |
388 | 388 |
<sender>action_Quiter</sender> |
389 | 389 |
<signal>triggered()</signal> |
390 |
<receiver>WebAlbumPhoto</receiver>
|
|
390 |
<receiver>WebPhotoAlbum</receiver>
|
|
391 | 391 |
<slot>close()</slot> |
392 | 392 |
<hints> |
393 | 393 |
<hint type="sourcelabel"> |
Formats disponibles : Unified diff