aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2015-01-09Dive d/l selection UI: fix the row count rangesGravatar Dirk Hohndel
Yet another bug because the indices are inclusive. We need to start off with the last being smaller than first and we need to adjust the row count. It might be easier to just fix thing to make last be exclusive... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Dive d/l selection UI: update checkmark state correctlyGravatar Dirk Hohndel
This fixes the issue where there was no visual feedback when clicking on the second or third column in the grid. It would actually change the checked state of the checkmark internally (and you would see the new state once you clicked on another dive), but it wouldn't give immediate visual feedback. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Dive d/l selection UI: the indices are inclusive, allocate enough spaceGravatar Dirk Hohndel
The array we allocated was one entry too small. On the flip side, let's just make sure we cannot call this with a negative range. That would be bad, too. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Dive d/l selection UI: only allow one download for nowGravatar Dirk Hohndel
We may reconsider this as this might replace the Retry function that's currently completely broken. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Dive d/l selection UI: don't setup the model if there are no divesGravatar Dirk Hohndel
Setting things up for zero dives will cause all kinds of weird corner cases. Just don't do it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Repair minor bug in CCR setpoint graphGravatar Willem Ferguson
Correct minor malfunction with CCR setpoint display. It was showing even when the po2 display was turned off. This patch ensures that the setpoint graph only shows when the po2 toolbar button is activated (and in addition the appropriate checkbox in the Preferences). Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Remove unused headersGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Only suggest OSTC3 fw upgrade on newer versionGravatar Anton Lundin
Previous code suggested a "upgrade" if your firmware where other than whats parsed from the autofirmware call. This switches that logic into only suggesting firmware upgrade if the found firmware is newer than the firmware your device runs. The previous logic was very annoying if you have a device running a development version of the firmware. If you have taken that step of the guided path, you shouldn't be told to "upgrade" to something older every time you download from your computer. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Remove stray debug printsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08No need for a new variableGravatar Dirk Hohndel
We already have provider in a local variable. The lookup and "model" variable is redundant. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Use setEnabled() instead of setDisabled()Gravatar Dirk Hohndel
I don't like mixing setEnabled() and setDisabled()... let's just always use setEnabled(). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: hook up select / unselect allGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: add select all / unselect allGravatar Dirk Hohndel
This isn't hooked up, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: allow clicking anywhere in a rowGravatar Dirk Hohndel
It seemed silly to only be allowed to click the tiny checkbox. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: fix more array access errorsGravatar Dirk Hohndel
The checked array is zero based, reflecting the rows shown. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: brute force size optimizationsGravatar Dirk Hohndel
This is horrible, but it gets something in place and hopefully we can clean this up soon. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Give reasonable names to layoutsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: show reasonable column headersGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Random whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>