From 757c4aab20cee9cd3699276a9b4f7a7aee4719c2 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Fri, 24 Apr 2015 17:10:55 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/simplewidgets.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'qt-ui/simplewidgets.h') diff --git a/qt-ui/simplewidgets.h b/qt-ui/simplewidgets.h index 5f2402a86..dde30335f 100644 --- a/qt-ui/simplewidgets.h +++ b/qt-ui/simplewidgets.h @@ -14,6 +14,7 @@ class QNetworkReply; #include "ui_setpoint.h" #include "ui_shifttimes.h" #include "ui_shiftimagetimes.h" +#include "ui_urldialog.h" #include "ui_divecomponentselection.h" #include "ui_listfilter.h" #include "ui_filterwidget.h" @@ -115,6 +116,15 @@ private: time_t dcImageEpoch; }; +class URLDialog : public QDialog { + Q_OBJECT +public: + explicit URLDialog(QWidget *parent); + QString url() const; +private: + Ui::URLDialog ui; +}; + class QCalendarWidget; class DateWidget : public QWidget { -- cgit v1.2.3-70-g09d2