diff options
author | Robert C. Helling <helling@atdotde.de> | 2015-04-24 17:10:55 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-04-24 09:36:21 -0700 |
commit | 757c4aab20cee9cd3699276a9b4f7a7aee4719c2 (patch) | |
tree | cc4e06502e06183a8267e6708dbb9870ad183816 /qt-ui/simplewidgets.h | |
parent | 98ae7b1f8657d153dd3b431638ff0110429b9d5f (diff) | |
download | subsurface-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/simplewidgets.h')
-rw-r--r-- | qt-ui/simplewidgets.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 { |