2014-05-30 14:38:27 -03:00
|
|
|
#ifndef DIVEPICTUREWIDGET_H
|
|
|
|
#define DIVEPICTUREWIDGET_H
|
|
|
|
|
|
|
|
#include <QAbstractTableModel>
|
|
|
|
#include <QListView>
|
|
|
|
#include <QThread>
|
2015-03-10 10:22:34 -07:00
|
|
|
#include <QFuture>
|
2015-03-02 16:18:16 +01:00
|
|
|
#include <QNetworkReply>
|
2014-05-30 14:38:27 -03:00
|
|
|
|
2015-03-02 16:18:16 +01:00
|
|
|
class ImageDownloader : public QObject {
|
|
|
|
Q_OBJECT;
|
|
|
|
public:
|
|
|
|
ImageDownloader(struct picture *picture);
|
|
|
|
void load();
|
|
|
|
private:
|
|
|
|
struct picture *picture;
|
|
|
|
QNetworkAccessManager manager;
|
|
|
|
private slots:
|
|
|
|
void saveImage(QNetworkReply *reply);
|
|
|
|
};
|
2015-02-26 14:39:42 +01:00
|
|
|
|
2014-06-03 16:48:59 -07:00
|
|
|
class DivePictureWidget : public QListView {
|
2014-05-30 14:38:27 -03:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2014-05-30 14:50:49 -03:00
|
|
|
DivePictureWidget(QWidget *parent);
|
2014-06-27 16:16:55 +04:00
|
|
|
signals:
|
|
|
|
void photoDoubleClicked(const QString filePath);
|
|
|
|
private
|
|
|
|
slots:
|
|
|
|
void doubleClicked(const QModelIndex &index);
|
2014-05-30 14:38:27 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
class DivePictureThumbnailThread : public QThread {
|
|
|
|
};
|
|
|
|
|
2014-06-27 16:16:55 +04:00
|
|
|
#endif
|