2014-05-30 17:38:27 +00:00
|
|
|
#include "divepicturewidget.h"
|
2015-05-29 17:42:57 +00:00
|
|
|
#include "divepicturemodel.h"
|
2014-10-19 14:15:19 +00:00
|
|
|
#include "metrics.h"
|
2015-01-17 09:43:52 +00:00
|
|
|
#include "dive.h"
|
|
|
|
#include "divelist.h"
|
2015-03-02 15:18:16 +00:00
|
|
|
#include <unistd.h>
|
2014-06-26 17:01:31 +00:00
|
|
|
#include <QtConcurrentMap>
|
2015-02-26 13:39:42 +00:00
|
|
|
#include <QtConcurrentRun>
|
2015-03-10 17:22:34 +00:00
|
|
|
#include <QFuture>
|
2014-06-26 17:01:31 +00:00
|
|
|
#include <QDir>
|
2015-02-26 13:39:42 +00:00
|
|
|
#include <QCryptographicHash>
|
2015-03-02 15:18:16 +00:00
|
|
|
#include <QNetworkAccessManager>
|
|
|
|
#include <QNetworkReply>
|
2015-02-26 13:39:42 +00:00
|
|
|
#include <mainwindow.h>
|
|
|
|
#include <qthelper.h>
|
2015-03-02 15:18:16 +00:00
|
|
|
#include <QStandardPaths>
|
|
|
|
|
2014-06-03 23:48:59 +00:00
|
|
|
DivePictureWidget::DivePictureWidget(QWidget *parent) : QListView(parent)
|
2014-05-30 17:38:27 +00:00
|
|
|
{
|
2014-06-27 12:16:55 +00:00
|
|
|
connect(this, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(doubleClicked(const QModelIndex &)));
|
|
|
|
}
|
|
|
|
|
|
|
|
void DivePictureWidget::doubleClicked(const QModelIndex &index)
|
|
|
|
{
|
|
|
|
QString filePath = model()->data(index, Qt::DisplayPropertyRole).toString();
|
2015-02-26 13:39:42 +00:00
|
|
|
emit photoDoubleClicked(localFilePath(filePath));
|
2014-05-30 17:38:27 +00:00
|
|
|
}
|