aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/divelogimportdialog.h
AgeCommit message (Collapse)Author
2015-03-23Import support for new Seabear formatGravatar Miika Turkia
This add support for Seabear's new import format that is used by H3 and T1. In the future also the Hudc should switch to the new format. The main difference to the old one is that time stamps are no longer recorded in the samples, but intervali is specified in the header. The header contains other useful information as well that we should build support for. E.g. surface pressure, gas mixes, GF, and mode might be useful additions later on. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-07CSV import: make predefined imports work againGravatar Dirk Hohndel
We need to reparse the file when the known type changes and want to make sure that we only try to guess the separator and the columns if the user hasn't told us otherwise. For the predefined imports this then looks up the correct columns and places the correct headings there - and then allows the user to modify them if needed. This has been lightly tested, there may be dragons. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-07Fix moving columns around when one of the columns is emptyGravatar Tomaz Canabrava
I used to compare strings, but since there can be more than one empty column, this was a very sad choice, now I'm comparing indexes. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-07Add delegate skeleton for the drag columnsGravatar Tomaz Canabrava
This new class is the responsible to draw the columns that can be dragged from the top bar to the bottom one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-07CVS import UI: use my own match functionGravatar Dirk Hohndel
This makes the code simpler and allows us to do a much better job matching the column names. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Make it possible to move from top to bottomGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Add the code to actually make it possible to move columnsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Start to make it possible to move columns aroundGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Remove drag operations from the 'From' widgetGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Port the code that actually parses the CSV to the new systemGravatar Tomaz Canabrava
Change the QWidget based approach to the Model based approach, using the result QStringList for finding if we have the depth or the time of some specific column. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Add the setColumnValues() methodGravatar Tomaz Canabrava
This method populates the model with a few lines of the CSV data to help the user to define what each column is. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Implement LoadFileContentsGravatar Tomaz Canabrava
This will get the first 10 lines of data, try to separate them using the separator specified, and then try to make things display correctly on the table. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Another skeleton: LoadFileContentsGravatar Tomaz Canabrava
Also, do not pass QStringLists by pointer, uneeded. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Set the model on the table view, one more skeletonGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Add skeleton code for the model that will have the result of columnsGravatar Tomaz Canabrava
This model will show some columns and the user will need to provide the correct information for each of them Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Add skeleton code for the table view that will accepts dropsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06More DragDrop skeletonsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Add class skeleton that will handle the drag startsGravatar Tomaz Canabrava
This class will handle the drag 'n drop "drag" part. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Skeleton code for the model that has the columns informationGravatar Tomaz Canabrava
Just the skeleton, then start doing stuff. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Clean a lot of code for a new and improved CSV import dialogGravatar Tomaz Canabrava
This mostly cleans out stuff that is going to be uneeded. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-26Preconfigured import of Subsurface CSV log fileGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-25Automatically increment column number on CSV importGravatar Miika Turkia
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-07-10Add support for importing pressure from CSV filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-09Add support for importing TTS from CSV filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-09Add support for importing NDL from CSV filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-09Initial stab at Seabear CSV importsGravatar Anton Lundin
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-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-22Gratuitous whitespace changesGravatar Dirk Hohndel
I keep trying to get to consistenct. Completely hopeless. 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-01-17Treat Sensus CSV import specially on GUIGravatar Miika Turkia
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-15More CSV import fixesGravatar Rodrigo Severo
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-08Show import dialog only when needed for CSV configGravatar Miika Turkia
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-03Refactoring import to DiveLogImportDialogGravatar Miika Turkia
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>