2014-05-30 14:38:27 -03:00
|
|
|
#include "divepicturewidget.h"
|
2015-05-29 14:42:57 -03:00
|
|
|
#include "divepicturemodel.h"
|
2014-10-19 16:15:19 +02:00
|
|
|
#include "metrics.h"
|
2015-01-17 22:43:52 +13:00
|
|
|
#include "dive.h"
|
|
|
|
#include "divelist.h"
|
2015-03-02 16:18:16 +01:00
|
|
|
#include <unistd.h>
|
2014-06-26 14:01:31 -03:00
|
|
|
#include <QtConcurrentMap>
|
2015-02-26 14:39:42 +01:00
|
|
|
#include <QtConcurrentRun>
|
2015-03-10 10:22:34 -07:00
|
|
|
#include <QFuture>
|
2014-06-26 14:01:31 -03:00
|
|
|
#include <QDir>
|
2015-02-26 14:39:42 +01:00
|
|
|
#include <QCryptographicHash>
|
2015-03-02 16:18:16 +01:00
|
|
|
#include <QNetworkAccessManager>
|
|
|
|
#include <QNetworkReply>
|
2015-02-26 14:39:42 +01:00
|
|
|
#include <mainwindow.h>
|
|
|
|
#include <qthelper.h>
|
2015-03-02 16:18:16 +01:00
|
|
|
#include <QStandardPaths>
|
|
|
|
|
2014-06-03 16:48:59 -07:00
|
|
|
DivePictureWidget::DivePictureWidget(QWidget *parent) : QListView(parent)
|
2014-05-30 14:38:27 -03:00
|
|
|
{
|
2014-06-27 16:16:55 +04: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 14:39:42 +01:00
|
|
|
emit photoDoubleClicked(localFilePath(filePath));
|
2014-05-30 14:38:27 -03:00
|
|
|
}
|