aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/downloadfromdivecomputer.h
AgeCommit message (Collapse)Author
2014-06-26Headers cleanup.Gravatar Tomaz Canabrava
Too much noise on the headers, this commit remove uneeded headers when they are uneeded. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-26Rework slot to quiet down Qt5 warningGravatar Anton Lundin
Qt5 got confused about this slot. This does the same as previously but gets Qt5 happy. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-19Divecomputer download: try to offer only those devices that make senseGravatar Dirk Hohndel
If the user selects a Uemis divecomputer, don't show serial devices. If the user selects a serial divecomputer, don't show the Uemis filesystem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27Massive automated whitespace cleanupGravatar Dirk Hohndel
I know everyone will hate it. Go ahead. Complain. Call me names. At least now things are consistent and reproducible. If you want changes, have your complaint come with a patch to scripts/whitespace.pl so that we can automate it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-18Implement the '...' search button for Uemis dive computersGravatar Dirk Hohndel
Right now the search button isn't connected for any device (clearly an oversight). At least for the Uemis I think I have a sane implementation of what that should do. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-11Put include guard to every headerGravatar Boris Barbulovski
* ensure include guard to every header * comment endif guard block Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-11Update #include statement for QStringListModelGravatar Boris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-09DownloadFromDCWidget class cleanupGravatar Boris Barbulovski
Remove static DownloadFromDCWidget::instance() method Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-27Disable DC device node if it is not neededGravatar Benjamin
This patch disables/enables the DC device node based on what type of transport the selected DC uses. The only time the device node field is used is if the selected DC uses a serial transport type. IrDA and USB type transports do not use the device node. Signed-off-by: Benjamin Fogel <nystire@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-26Display warning that dives won't be downloaded when enabling libdc dumpGravatar Dirk Hohndel
The warning is only shown once per session. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Enable libdivecomputer log or dump from the UIGravatar Dirk Hohndel
Pick filenames for these functions as they are selected. Use the windows-safe fopen function. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-11downloadfromdivecomputer.h: remove a forward declarationGravatar Lubomir I. Ivanov
The forward declaration of 'struct device_data_t' is not needed as it already comes from '../libdivecomputer.h'. Reported by the program cppcheck. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08When the user cancels a download, reject already downloaded divesGravatar Dirk Hohndel
This seems like the more logical behavior, anyway. Cancel means you didn't want the result... Fixes #341 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-03Make the classes generated by uic be real members of our classesGravatar Thiago Macieira
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-03Include the ui_*.h headers in the main headers.Gravatar Thiago Macieira
This means we can also remove the forward declarations. This is the first step in removing the memory allocation for the ui sub-classes. Without the second step, this commit is just making the compilation time increase for no good reason :-) Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-09-16implement device probe in CGravatar Danilo Cesar Lemes de Paula
It's an attempt to build auto-completion for the dive-computers based on unpublished code inside libdivecomputer[1] [1] - http://git.libdivecomputer.org/?p=libdivecomputer.git;a=commitdiff;h=d44053a99435fb9fc1f408fb3f1629a54c938afc Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
2013-09-10improve DownloadDialog's error handlingGravatar Danilo Cesar Lemes de Paula
shows an error message when libdivecomputer returns an error. Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
2013-09-10improve DownloadDialog UI controlGravatar Danilo Cesar Lemes de Paula
* Removes the InterfaceThread which is basically an unecessary proxy between the MainThread and the DownloadThread. * Use a state machine to control the DownloadWidget UI logic. Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
2013-08-29fix DownloadDialog behaviorGravatar Danilo Cesar Lemes de Paula
The DownloadDialog behavior was broken in a way it allows the user to make changes on the dialog while the download is happening. Also, clicking on "Cancel" breaks/hangs the UI sometimes, as libdivingcomputer doesn't always cancels the download right away. That's a bug that still needs to be fixed. Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
2013-06-19Consistently use slots / signalsGravatar Dirk Hohndel
We started out using Q_SLOTS and Q_SIGNALS but then changed our mind. Let's make this consistent again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Fixed running the Download dialog multiple timesGravatar Dirk Hohndel
We never reset the 'downloading' variable. Solved-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Hook up the Download dialogGravatar Dirk Hohndel
The download already worked, but we didn't display the new dives. This introduces a new slot for MainWindow that updates what is displayed in Subsurface after files were imported. With this change we can successfully download ONCE - but when trying to download a second dive the dialog doesn't appear to get refreshed the right way - the OK button doesn't appear to work anymore (Cancel however does). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-22The never ending, futile fight for whitespace consistencyGravatar Dirk Hohndel
I just need to write a tool that does this... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-20Implement rudimentary divecomputer downloadGravatar Dirk Hohndel
Small changes to the names of elements the divecomputer download UI and very simplistic first stab at populating the device_data_t structure. This is lacking lots of things - it should remember the last vendor / product used - it should figure out which device (mount point) to offer - it needs proper error handling But it's a step in the right direction. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-20Populate the Vendor && Dive computer information.Gravatar Tomaz Canabrava
This uses the QStringListModel to populate the items of the QComboBoxes. I used a QHash to hold every Computer of a particular Vendor. so, products[vendor] gives me the full list of products from each vendor. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-20Added code to cancel the thread.Gravatar Tomaz Canabrava
I think it's self explanatory - When user clicks on 'Cancel', the interface will wait for the trhead to quit then will close itself. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-20Skeleton code for a non-blocking UI thread for downloading dives from the DCGravatar Tomaz Canabrava
This is the skeleton code for a non-blocking ui-thread It already creates the first-thread ( 'do not block the ui' ) and the second thread ('download from the dive computer') We can in the future merge both in the same place - I didn't want to do that now because the download function is written in the libdivecomputer.c code, and I cant just transform that to a QThread and use signals, so I used two threads for that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>