Commit graph

11 commits

Author SHA1 Message Date
Berthold Stoeger
d508a16aca parser: replace params[] code by new xml_params struct
This fixes a load of memory holes, and makes the code
(hopefully) more readable.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-23 18:17:02 -07:00
Berthold Stoeger
5a78730561 Import: Make DiveLogImportDialog modal
By making this modal, we can use a local variable and remove the
nasty "deleteLater()" hack to reclaim the resources after the
dialog closes.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-04 10:22:11 +02:00
Berthold Stoeger
3f51849dc3 Cleanup: move CSVApps into .cpp file
No point in having this in the header file as it is not used
outside.

Remove the CSVAPPS macro, as this was never used. One thing less
to maintain.

Remove the sentinel with name = NULL, as we can simply use
range-based for.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-04 10:22:11 +02:00
Berthold Stoeger
a4051749fd Import: import Poseidon MkVI logs via DiveLogImportDialog
Poseidon MkVI logs (.txt) were special cased in MainWindow.cpp,
which led to a user-interface inconsistency. In some cases
[user chooses ".txt" (non-Poseidon) and ".csv"], *two*
import-dialogs were shown.

Move handling of Poseidon MkVI logs into DiveLogImportDialog.
There are already other "special" cases handled in this dialog.

At the moment, this shows the first 10 depth-values, which is
kind of useless, as this will all be at surface level. We
might think about something more useful.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-04 10:22:11 +02:00
Berthold Stoeger
6e24762a6c Cleanup: Don't leak DiveLogImportDialog objects
The non-modal DiveLogImportDialog was only implicitly deleted when
the MainWindow was destroyed. Instead hook into the accept() and
reject() functions and schedule for deletion with deleteLater().

Quite the horrible proposition, but in line with Qt's object model.
Consider making the dialog modal instead. There seems to be no
upside for this being modal.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-29 14:01:22 -07:00
Dirk Hohndel
9021a44ccc Add SPDX header to desktop widgets
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29 13:32:55 -07:00
Miika Turkia
8766054581 Hooking up av1.xslt for log import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2016-12-31 09:56:08 +02:00
Miika Turkia
30976c05a4 Parse txt formatted log files
This parses .txt log files produced by Dataplus and Oceanlog software.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-05 07:28:07 -07:00
Miika Turkia
74f0192711 Basic GUI part for DL7 import
This sets the basic properties properly but is still missing the parsing
of meta-data, especially used units.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:08:25 -07:00
Dirk Hohndel
7be962bfc2 Move subsurface-core to core and qt-mobile to mobile-widgets
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>
2016-04-04 22:33:58 -07:00
Tomaz Canabrava
e49d6213ad Move qt-ui to desktop-widgets
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>
2015-10-30 10:36:49 -07:00
Renamed from qt-ui/divelogimportdialog.h (Browse further)