otherwise the max interferes with the value. Furthermore this increases
the max values a bit.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In the planner, for recreational mode, there is a setting indicating
the pressure at which the diver should be back at the surface. This
pressure was hardcoded to bar.
Fixes#1027
[Dirk Hohndel: small modifications, more reasonable step for psi,
more reasonable maxima]
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The unit for the depth parameters ain't meters, its 0.1 meters. This
caused the values stored to be out of range.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The function preprocessTemplate(), did not account well
for indexes in Grantlee variables, such as:
dive.weight# (where # is the index)
dive.cylinder#
To solve the issue the list (QList<QPair<QString, QString> >)
for variables to be replaced is populated will all possible
indexes:
0 - MAX_WEIGHTSYSTEM for weights
0 - MAX_CYLINDERS for cylinders
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The current Grantlee template loading scheme does not
allow a preprocessing layer. With the recent DiveObjectHelper
changes the layer is required if we don't want to add a set
of dummy methods and Q_PROPERTIES which will only inflate
the DiveObjectHelper class.
Use the already present helper readTemplate() to load the
raw HTML template and pass it to a static function which
does some variable replacement to accomudate DiveObjectHelper.
This change is done for the sake of not breaking the Grantlee
HTML variables on the user side!
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This attempts to detect the time format when initially importing a CSV
file. Well, only the minutes:seconds notation is detected currently.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This tries to detect the date format when initially reading a CSV file
for importing.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Cloud Storage is a non-gui based class, we currently use
two different approaches for cloud storage, one on the desktop
target and other on the mobile target, we should use only one.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
start of the QSettinsg Object Wrapper usage on the code
this first patch removes two macros that generated around
200 lines in runtime for something like a quarter of it
Basically, whenever we changed anything we called the
PreferencesDialog::settingsChanged and connected everythign
to that signal, now each setting has it's own changed signal
and we can call it directly.
The best thing about this approach is that we don't trigger
repaints for things that are not directly profile related. (
actually we still do, but the plan is to remove them in due time)
this commit breaks correct atualization of the profile (because
everything was connected to PreferencesDialog::settingsChanged)
and now I need to hunt a bit for the correct connections
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds the configure parameters for safety stops on the hwOS(OSTC3)
and OSTC computers.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The index in the fixpopup function was incorrect which caused the user to
need TWO cursor down presses to move to the second element. I changed the
index value so the user now needs only one key press to traverse up/dowm.
Fixes#954
Signed-off-by: krishan Chopra <choprakrishan61@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This hides the start time when viewing trip details.
See #964
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The date comes from the first dive in trip, thus no need to allow
editing (especially since the edited date seems to be discarded in any
case).
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As pointed by jwhferguson, I changed "show average depth" to "show
mean depth".
I modified file preferences_graph.ui and changed the text. This bug was
reported on fedora 22. i use ubuntu.layout and justification is nicely
displayed.
The patch also removes a no longer necessary include.
See #922
Signed-off-by: krisalpha <choprakrishan61@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We forgot to delete the Grantlee object before creating a new one
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We don't need a list of QFileInfo if we are not using it
much better to have a list of the files directly
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Set the values directly, seems much more sane.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
instead of duplicate the code that only chaged the QList that it
would access, create a temporary list and use it for dealing
with the code.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since we alreday have a Q_PROPERTY on the DiveObjectHelper,
grantlee introspection can use that directly to access it's
data, so there's no need for us to redeclare everything.
More QObject Introspection, Less handmade boilerplate for
Grantlee, QML, and a few other things.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
it was taking 3 - 4 secs here to open the print dialog,
first I tought it was a bug in our side, but it looks like
it's a Qt bug, and by lazy initializing it we don't actually
solve this, since it will still take 3 - 4 secs for the printer
to start, but the dialog will appear much quicker.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
and rename it to DiveObjectHelper, since it should be an QObject
based class to make it easier on the QML, grantlee and widgets
side to display the dive's internal data.
each Q_PROPERTY defined in the DiveObjectHelper.h file
can be acessed directly via it's name.
So, if you are on a model that returns a dive, acess it's name
by dive.name
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It no longer makes sense to lie about the version. If you are running a product
build, then the canonical version is the same version as the plain version used
to be. And in either case it makes much more sense to simply log the full
version information.
We used to have the differently styled versions for different OSs, but I don't
think this is needed anymore. Let's hope this doesn't go down as one of these
"famous last words" moments...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>