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/urldialog.ui | |
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/urldialog.ui')
-rw-r--r-- | qt-ui/urldialog.ui | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/qt-ui/urldialog.ui b/qt-ui/urldialog.ui new file mode 100644 index 000000000..397f90a64 --- /dev/null +++ b/qt-ui/urldialog.ui @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>URLDialog</class> + <widget class="QDialog" name="URLDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>397</width> + <height>103</height> + </rect> + </property> + <property name="windowTitle"> + <string>Dialog</string> + </property> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="geometry"> + <rect> + <x>40</x> + <y>60</y> + <width>341</width> + <height>32</height> + </rect> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + <widget class="QPlainTextEdit" name="urlField"> + <property name="geometry"> + <rect> + <x>10</x> + <y>30</y> + <width>371</width> + <height>21</height> + </rect> + </property> + </widget> + <widget class="QLabel" name="label"> + <property name="geometry"> + <rect> + <x>10</x> + <y>10</y> + <width>151</width> + <height>16</height> + </rect> + </property> + <property name="text"> + <string>Enter URL for images</string> + </property> + </widget> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>URLDialog</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>URLDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> |