summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-01-06Add missing divemaster field to the manual importGravatar Dirk Hohndel
No idea why I didn't notice earlier that this was missing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Fix crash when importing CSV that requires change of separatorGravatar Dirk Hohndel
The dialog defaults to tab; if a file is indeed comma separated and one switches to that, data() could be called on a higher index before the model is re-populated. I'm a bit surprised why index.isValid() doesn't catch this, but the manual check appears to work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Do not allow the drop target to erase an old columnGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Fix moving columnsGravatar Tomaz Canabrava
Qt has a very bad habit of getting the inner widget instead of the outer one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Remove data if it was correctly moved to the upper modelGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> 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-06Add missing returnsGravatar 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-06Remove pesky QDebug that snook inGravatar 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-06Better sizings for the CSV dialogGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Do not accept drops from outside of subsurfaceGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Re-add the string to the avaliable models if drag cancelledGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Set data done, drag & drop worksGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Implement most of the drag operationGravatar Tomaz Canabrava
Only thing missing is the Drop. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Fix constructorGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Add setData() to the ColumnResult modelGravatar Tomaz Canabrava
This way the drop target will work when implemented. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Add the data() methodGravatar Tomaz Canabrava
Now we can correctly visualize the file data, and changing the separator will update on the fly. 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-06Show the pixmap being draggedGravatar Tomaz Canabrava
This way we know that we got the correct drag thingy. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Re-add the string removed upon drop operationGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Remove the string from the model while draggingGravatar Tomaz Canabrava
We are not correctly readding it yet - be patient. 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-06Start to drag the correct valuesGravatar Tomaz Canabrava
This piece of code starts a drag and moves around data, it does nothing with it yet. 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-06Set the lsit view to IconModeGravatar Tomaz Canabrava
This is needed so the list of items appear in a grid like view. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Display the list of column names on the ListViewGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Add data, row count and the string list that populate the modelGravatar Tomaz Canabrava
I know that there is a QStringListModel, but that doesn't have add and remove methods, and thus I cannot use it. ;) 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>
2015-01-06Always show deco gas as dive gasGravatar Anton Lundin
This unifies how we prints Nitrox deco gas dives with Trimix deco gas dives. Reviewed-By: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05Remove unused importsGravatar Anton Lundin
These doesn't exits in Qt for android to... Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05DLF import: Document unknown fieldsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2015-01-05DLF import: Decode and import ceiling informationGravatar Anton Lundin
This imports the ceiling information as stopdepth, our way of showing a ceiling. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05DLF import: Decode and import temperatureGravatar Anton Lundin
These decodings and constants makes the numbers line up perfectly with the numbers presented on wetnotes.com. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05DLF import: Decode and import NDL and TTSGravatar Anton Lundin
The units of these values are guessed, but these values makes they match up well with the values we calculate ourself. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05DLF import: Decode ppO2Gravatar Anton Lundin
This decodes the ppO2 value stored in the DLF files. It looks like the DiveSoft Freedom computers always stores the ppO2 value, even for OC dives. This import only stores the ppO2 value from CCR and PSCR dives, where these values comes from sensors and makes sense to store. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05DLF import: Restructure depth decodingGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05Give oxygen a proper colour in the tankbarGravatar Joakim Bygdell
Oxygen should be representad by its own solid green colour not the yellow/green of nitrox. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05Use correct name for oxygenGravatar Joakim Bygdell
When O2 is 100% we should use oxygen instead of EAN100. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05Need to warn about some more characters on CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05Don't always show the setpoint graphGravatar Dirk Hohndel
We need to use the same conditional here as we do earlier in the code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05Display CCR setpoint values on the po2 graphGravatar Willem Ferguson
When a CCR dive is viewed and the toolbar button for PO2 is activated, both the PO2 (green line) and the O2 setpoint (red line) are shown. This allows evaluation of the PO2 in the CCR loop with respect to the pre-configured O2 setpoint. The setpoint graph can be disabled from the Preferences/Graphs tab by checking the appropriate checkbox. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>