aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/downloadfromdivecomputer.h
AgeCommit message (Collapse)Author
2017-11-11Fix memory leak in download-from-dive-computer widgetGravatar Berthold Stoeger
Instead of (re)allocating the vendor and product models, use the setStringList method on sub objects. Even though only a theoretical problem, the model objects are moved in front of the ui object, so that the widgets referencing the models are destroyed first. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-01Reset device field in DownloadFromDCWidget according to dive computerGravatar Berthold Stoeger
Fixes minor interface inconsistency: The device field in the download-from-dive-computer widget is disabled when selecting a non-serial-transport dive computer. In contrast, post-download the field was reset to enabled for all dive computers. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-05-27Reduce the scope of variablesGravatar Tomaz Canabrava
Those variables should have local scope, not class scope. We are using it only inside of pickDump/LogFile metohds. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Extract the device_data_t into helper classGravatar Tomaz Canabrava
Keeping the Desktop and QML versions of Subsurface using the same codebase will keep the code saner, this change makes the Desktop version use the DCDeviceData helper sturct that encapsulates the device_data_t member for easy access on the QML. This also helped move a bit of initializations from the UI to the Core - and that's always good. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Move the fill_computer_list() out of widgetsGravatar Tomaz Canabrava
fill_computer_list() creates a Qt friendly structure that contains all of the necessary information about dive computers and it's devices, and it's needed both in Qml and Widgets to allow the user to download their dives. This patch makes it possible to use the code in QML without duplication. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Separate the download thread from the widget logicGravatar Tomaz Canabrava
This is important to not duplicate code for the Qml view. Now the DownloadFromDiveComputer widget is mostly free from important code (that has been upgraded to the core folder), and I can start coding the QML interface. There are still a few functions on the desktop widget that will die so I can call them via the QML code later. I also touched the location of a few globals (please, let's stop using those) - because it was declared on the desktop code and being used in the core. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Move model code to modelsGravatar Tomaz Canabrava
This makes it easery to use it on Qml. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29Add SPDX header to desktop widgetsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move qt-ui to desktop-widgetsGravatar Tomaz Canabrava
Since we have now destkop and mobile versions, 'qt-ui' was a very poor name choice for a folder that contains only destkop-enabled widgets. Also, move the graphicsview-common.h/cpp to subsurface-core because it doesn't depend on qgraphicsview, it merely implements all the colors that we use throughout Subsurface, and we will use colors on both desktop and mobile versions Same thing applies for metrics.h/cpp Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>