Commit graph

27 commits

Author SHA1 Message Date
Miika Turkia
1e04aec7fd Preconfigured import of Subsurface CSV log file
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-26 08:43:43 -08:00
Miika Turkia
83fd196c4a Automatically increment column number on CSV import
This increments the column number automatically when doing manual CSV
import. Counter is decreased when un-checking checkboxes, but that is
all the logic there currently is.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-25 10:38:23 -08:00
Miika Turkia
071cea15c0 Glue between GUI and XSLT for additions in CSV import
This code sets the parameters properly to support the new fields in
manual CSV import.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-20 11:30:52 -08:00
Miika Turkia
1b74947bf5 Allow user to select date format on manual CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-25 13:19:49 -08:00
Miika Turkia
4bc9b7748b Parse meta information from Seaber log
This will parse date information from Seabear log file and skips the
"header" data to allow parsing of the CSV content.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-28 07:25:45 -07:00
Anton Lundin
dd924a21ed Add quirks for Seabear CSV settings for pressure
This adds the settings quirk workaround for the pressure import from the
Seabear CSV file.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 12:40:41 -07:00
Anton Lundin
89d74888b3 Add support for importing pressure from CSV files
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 12:40:25 -07:00
Anton Lundin
c7df6df8cd Fix bug in Seabear Quirks
By mistake i used memcpy to "fix" the samples, but the sample list was
overlapping so i needed to use memmove.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 07:39:20 -07:00
Anton Lundin
f940ebcf74 Add quirk for Seabear CSV settings
The Seabear software stores its settings as two csv-rows in the same
file as its samples. These settings got read as two bogus samples in the
beginning of the dive.

This kills those off and repairs the temperature damage they done.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-09 14:22:48 -07:00
Anton Lundin
ffb441aa84 Add quirk for Seabear CSV NDL/TTS in minutes
In the Seabear CSV the NDL and TTS fields are in minutes, not seconds as
their time field. This is an ugly quirk but it gets the job done.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-09 13:22:06 -07:00
Anton Lundin
6cd0928487 Add support for importing TTS from CSV files
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-09 13:22:00 -07:00
Anton Lundin
d5991800ee Add support for importing NDL from CSV files
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-09 13:22:00 -07:00
Anton Lundin
b1d7ba9f63 Initial stab at Seabear CSV imports
This adds a preconfigured import setting for Seabear CSV files.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-09 13:18:58 -07:00
Dirk Hohndel
155eac11d2 Ctrl-W and -Q support for GPS, divelogs.de, divecomputer and CVS import
Getting closer to consistent behavior.

See #489

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 10:47:44 -07:00
Linus Torvalds
609715ab69 Convert other users of showError() to the new world order
The "report_error()" interface is a lot simpler, although some of the
C++ code uses QStrings which make them a bit annoying, especially for
the varargs model.  Still, even with the explicit conversion to UTF8 and
"char *", the report_error() model is much nicer.

This also just makes refreshDisplay() do the error reporting in the UI
automatically, so a number of error paths don't even have to worry.  And
the multi-line model of error reporting means that it all automatically
does the right thing, and reports errors for each file rather than just
for the last file that failed to open.

So this removes closer to a hundred lines of cruft, while being a
simpler interface and doing better error reporting.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-14 12:36:06 -07:00
Dirk Hohndel
7c535452f9 Whitespace cleanup
Minor change to the perl postprocessing script and resulting changes to
the affected source files.

This deals with two issues:
- "foreach"-like structures were not always treated correctly
- some longer calculations that ended on "+ constant" were reformatted in
  a rather unatractive manner

In one source file (divelist.c) I ended up adding braces to the sources...
trying to cascade the indentation further down without having the block
there seemed a lot more trouble than it's worth.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-03 13:29:22 -08:00
Dirk Hohndel
76e6420f6b Massive automated whitespace cleanup
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-27 20:09:57 -08:00
Miika Turkia
cb5ab4bc8e Add unit support for CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15 06:33:33 -08:00
Boris Barbulovski
c86822c2f4 Replace mainWindow() with MainWindow::instance()
C++ style of accessing single instance class object.

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-12 11:42:59 -08:00
Miika Turkia
47ad50d6de C++ code to call parsing functions for manual CSV
This code sets up the C++ part for importing manually kept CSV log.
That includes setting up the field separator selection and calling
C-code for parsing the log file.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25 06:52:06 -08:00
Miika Turkia
e9f3d652e8 Treat Sensus CSV import specially on GUI
As Sensus import needs a specific XSLT and user specified parameters are
not used nor needed, tune the GUI accordingly (disable options and add
Sensus in the list of known imports).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-17 05:57:45 +07:00
Anton Lundin
7e9582631d Convert to TRUE/FALSE to stdbools true/false
I had problems with this one on Qt5.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-15 15:52:31 +07:00
Rodrigo Severo
349f3e9cde More CSV import fixes
Pre-configured imports in Import Dive Log File for CSV files should also
be cleared when the field separator is changed by the user.

Promoted DiveLogImportDialog::unknownImports to slot as per Canabrava's
suggestion and Hohndel's request.

Signed-off-by: Rodrigo Severo <rodrigo@fabricadeideias.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-15 05:56:34 +07:00
Rodrigo Severo
3a3d61ba53 Pre-configured CSV imports should also set the field separator
Pre-configured imports in Import Dive Log File for CSV files should also
set the pre-defined field separator.

[Dirk Hohndel: cleaned up hideous whitespace]

Signed-off-by:Rodrigo Severo <rodrigo@fabricadeideias.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-14 21:18:28 +07:00
Rodrigo Severo
2da8146b46 Include support for semicolon separated CSV files
Oceanic's Geo's companion software, OceanLog, when exporting as txt produces log files with the dives samples as semicolon separated CSV files.

Signed-off-by: Rodrigo Severo <rodrigo@fabricadeideias.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-14 21:08:31 +07:00
Miika Turkia
88fdf1b138 Show import dialog only when needed for CSV config
We do not need any import dialog when importing normal XML based
divelogs. With this they are imported directly after file selection
dialog. However, when CSV files are detected in the import list, the
configuration dialog is displayed and applied for them. (CSV files are
detected by file extension.)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-08 05:54:20 +08:00
Miika Turkia
b052b790df Refactoring import to DiveLogImportDialog
Changing the import stuff to DiveLogImport. Now we should have one
import function/dialog for importing divelogs instead of multiple menu
entries.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-03 10:30:08 -08:00
Renamed from qt-ui/csvimportdialog.cpp (Browse further)