aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/divelistview.h
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-04-24 17:10:55 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-24 09:36:21 -0700
commit757c4aab20cee9cd3699276a9b4f7a7aee4719c2 (patch)
treecc4e06502e06183a8267e6708dbb9870ad183816 /qt-ui/divelistview.h
parent98ae7b1f8657d153dd3b431638ff0110429b9d5f (diff)
downloadsubsurface-757c4aab20cee9cd3699276a9b4f7a7aee4719c2.tar.gz
Allow images to be added via the web
This adds a new divelist context menu entry which asks for a URL. The file is retrieved and if it is an image it is added to the cache and the url is associated to dives as with local files. NB this currently only works with URLs pointing directly to images. But it should not be too hard to add the possibility to add a direction via an html file and its image tags. To test: open dives/test43.xml and delete the image and then add the URL http://euve10195.vserver.de/~robert/wreck.jpg Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelistview.h')
-rw-r--r--qt-ui/divelistview.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/divelistview.h b/qt-ui/divelistview.h
index a6522fa9a..6e9a18215 100644
--- a/qt-ui/divelistview.h
+++ b/qt-ui/divelistview.h
@@ -13,6 +13,7 @@
#include <QTreeView>
#include <QLineEdit>
+#include <QNetworkAccessManager>
#include "models.h"
class DiveListView : public QTreeView {
@@ -51,6 +52,7 @@ slots:
void renumberDives();
void shiftTimes();
void loadImages();
+ void loadWebImages();
static QString lastUsedImageDir();
signals:
@@ -78,6 +80,9 @@ private:
void updateLastImageTimeOffset(int offset);
int lastImageTimeOffset();
void addToTrip(int delta);
+ void matchImagesToDives(QStringList fileNames);
+ void loadImageFromURL(QUrl url);
+ QNetworkAccessManager manager;
};
#endif // DIVELISTVIEW_H