Commit graph

13 commits

Author SHA1 Message Date
Lubomir I. Ivanov
7c4b083c2b Divelogs.de: change the 'Apply' button to 'Done' for upload
Post downloading we have an 'Apply' button that can be clicked
to apply/merge the downloaded dives. When uploading we
rename the button to 'Done' and enable the button if the
upload was successful. The 'Cancel' button on the other hand
becomes disabled.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09 18:40:52 +01:00
Lubomir I. Ivanov
5869712569 Divelogs.de: add a divelist context menu item for upload
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-09 15:51:17 +02:00
Thiago Macieira
a1972bc343 Implement the network part of the support for divelogs.de
This implements support for:
 * uploading a zip file containing dives - untested
   (the zip file must have been prepared elsewhere)
 * downloading the dive list and the dive XML files

The networking part is finished, but it's missing the actual import of
the XML files sent by divelogs.de.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03 13:53:00 -08:00
Thiago Macieira
919c7045b7 Add support for timing the download out
The time out is 30 seconds from the start of the request or from the
last time we got any data from the server.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03 13:53:00 -08:00
Thiago Macieira
ab1b314a84 Set the download reply pointer to NULL after dismissing it
QNetworkReply might emit signals after it's been told to go away. We
don't want to change the status after that.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03 13:53:00 -08:00
Thiago Macieira
fa07f554e2 Properly reset the state of the download dialog before dismissing
Re-enable buttons that should be enabled by default, disable the others,
set the status to empty, make the progress bar go back to zero.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03 13:53:00 -08:00
Thiago Macieira
ff96bcb0fc Make the QNetworkAccessManager a singleton available to all
One of the rules of using QNetworkAccessManager is to share it among all
users, since sockets and other state can be shared. Looks like Marble
doesn't allow us to set it, though, and it creates multiple instances.
I'll prepare an upstream patch to fix that sometime.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03 13:53:00 -08:00
Thiago Macieira
0ed95678ba Whitespace: fix indentation in subsurfacewebservices.* to use tabs
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03 13:52:59 -08:00
Tomaz Canabrava
216f9212b9 Added the skeleton for the Download / Upload from Divelogs.de
Added the skeleton code for the Download / Upload from Divelogs.
de webservice. Now I need to hoopup things from the .ui side and
do the actual implementation of the code.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-24 22:52:11 -02:00
Tomaz Canabrava
5eb2cc4594 Created a 'WebService' dialog that will handle download and upload.
Created a WebService dialog that will handle download and upload
from all child based webservices. Also, ported the currently - only
- one webservice to use the new dialog.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-24 22:30:21 -02:00
Thiago Macieira
8e81d3f100 Make the classes generated by uic be real members of our classes
This means we don't have to new/delete them, which is a waste of
overhead.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-03 12:13:48 -07:00
Tomaz Canabrava
f55ae15707 Hoocked up the buttons and the parsing of the XML.
The XML is now being correctly parsed, Clicking on Help
will open the browser pointing to the api site, and clicking
on cancel will cancel the download.

Clicking on Apply still doesn't apply, but that's next. :)

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-06 11:31:55 -03:00
Tomaz Canabrava
c1cf6c02a8 Added initial support for download dive info from the subsurface web service.
Added initial support for download dive info from subsurface web service,
the current code only downloads and output the xml downloaded in the debug
area. Now I need to parse things up and plug the unplugged stuff.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-06 10:33:15 -03:00