aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-01-08Dive d/l selection UI: fix check if things were checkedGravatar Dirk Hohndel
Math is hard. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: close the dialog when doneGravatar Dirk Hohndel
This is where we need to call accept() Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Only show checkbox on the first columnGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: disable OK until things are downloadedGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Fix missing return valueGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: show useful data in a useful formatGravatar Dirk Hohndel
We don't get location data from the dive computer (at least not from 99.99% of the dive computers today). And we really need to show the data in a human readable format. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: don't close the dialog when we're done downloadingGravatar Dirk Hohndel
The whole point is that we then want to pick and choose which dives to add to the divelist. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Rename buttonGravatar Tomaz Canabrava
Fix the name of a button so the download from dc actually works. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Only try to get the dive list if d/l succeededGravatar Tomaz Canabrava
This fixes a crash where we tried to get the data without actually having downloaded anything. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Remove unused variableGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Add method to remove unused divesGravatar Tomaz Canabrava
This tries to relete from the dive list the dives that shouldn't be imported. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Hook up OK buttonGravatar Tomaz Canabrava
Create an on_ok_clicked that will do the actuall parsing of choosen dives. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Create a button to download the data from DCGravatar Tomaz Canabrava
Now, ok should close the dialog, and not download the dives from the DC, this way the user can choose what happens. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Add a table for the new dives from DC dialogGravatar Tomaz Canabrava
It will show the model that I just created. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Fill the checked vector as trueGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Set the item flagsGravatar Tomaz Canabrava
Now the user can click on the dives that they want to keep. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Add the setData methodGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Add the check statesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Display the downloaded dives in a tableGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: setImportedDivesIndexes implementationGravatar Tomaz Canabrava
Here we list in the model what are our dives, inside the dive_table. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI:: Constructor, rowCount and ColumnCountGravatar Tomaz Canabrava
Add importedDivesIndexes and Data. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI:: Add skeleton for the dialogGravatar Tomaz Canabrava
So the user can remove the ones they don't like. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.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-07CSV import: first steps to enable the preset types againGravatar Dirk Hohndel
With the new infrastructure colum numbers are 0 based, so the indices had to change. This commit also adds the column names for sample based formats (and ends up re-indenting parts of that code). This doesn't make things work, yet, but it's a step in the right direction. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-07CSV input UI: if we detect columns, set type to "manual" for nowGravatar Dirk Hohndel
We still need to re-implement the other presets. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-07CSV import UI: Minor update to stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-07CVS import UI: mark the column names in blue as wellGravatar Dirk Hohndel
And make the bubbles slightly larger. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-07CVS import UI: mark the drop row in blueGravatar Dirk Hohndel
That way it is distinct from the rest. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-07CVS import UI: better message if some columns were matchedGravatar Dirk Hohndel
If we automatically matched the columns this might already be correct. So the standard text is confusing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-07Better resizing in the divelog import dialogGravatar Joseph W. Joshua
Resize the components of the divelog import dialog neatly, with the table view expanding to fill most of the available space. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-07CSV Import UI: Prettifications, hide headers, code cleanup.Gravatar Tomaz Canabrava
Just a few cleanups. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> 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-07Draw a nice rounded rect around the avaliable column namesGravatar Tomaz Canabrava
This drawns a nice rounded rect around the avaliable column names, using antialiasing. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-07Give the items a bit more spacing / enable the delegateGravatar Tomaz Canabrava
Enable the new delegate on the view, and give the items a bit more spacing, so we can draw things around them. 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-07profile: don't show instantMeanDepth for printModeGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.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-07CSV import UI: First step towards recognizing column headersGravatar Dirk Hohndel
This doesn't do a good job of matching the titles, but it works for some of them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-07CSV import dialog: try to guess the separator based on the fileGravatar Dirk Hohndel
This is taking a very simplistic approach. It picks the predominant potential separator. If there is no clear winner, it uses the UI default and makes the user pick (and either way, this can always be overwritten by the user). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Fix potential crashGravatar Dirk Hohndel
Commits 0de3bc845237 ("Display CCR setpoint values on the po2 graph") and 65eed80e3730 ("Don't always show the setpoint graph") didn't take into account that current_dive could be NULL and therefore accessing current_dc could crash. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Adjust capitalization to our styleGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>