aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/templatelayout.h
AgeCommit message (Collapse)Author
2017-05-26Creation of dive duration string and surface interval stringGravatar Stefan Fuchs
Update the function to create the dive duration string in a way that it can be used also in info and stats tab and added some more flexibility. Changed layout for <1h freedives to "0:05:35" (w/o units) or "5:35min" (with units and :) or "5min 35sec" (with units with space). Add a new function to create the surface interval string. Completely remove old function get_time_string() and get_time_string_s(). Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-29Add SPDX header to desktop widgetsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05Fix include pathsGravatar Linus Torvalds
As expected, commit 7be962bfc287 ("Move subsurface-core to core and qt-mobile to mobile-widgets") caused some breakage. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08Removed grantlee template code to deal with non-QobjectGravatar Tomaz Canabrava
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>
2016-01-08Move Dive class from qthelper.h/cpp to it's own fileGravatar Tomaz Canabrava
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>
2015-11-16qthelper: also support "maxcns" and "otu" in Grantlee HTMLGravatar Lubomir I. Ivanov
Fixes #962 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-16templatelayout.h: expose cylinders and weights in Grantlee HTMLGravatar Lubomir I. Ivanov
This patch adds the following HTML variables: "dive.cylinders" -> Dive::cylinders() "dive.cylinderX" -> Dive::cylinder(X) "dive.weights" -> Dive::weights() "dive.weightX" -> Dive::weight(X) The patch also creates some macros to ease the Dive variable lookup visually. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-16templatelayout.h: expose "dive.suit" as a Grantlee HTML variableGravatar Lubomir I. Ivanov
Having {{ dive.suit }} in the HTML will now return the suit as QString (from struct dive->suit). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move qt-ui to desktop-widgetsGravatar Tomaz Canabrava
Since we have now destkop and mobile versions, 'qt-ui' was a very poor name choice for a folder that contains only destkop-enabled widgets. Also, move the graphicsview-common.h/cpp to subsurface-core because it doesn't depend on qgraphicsview, it merely implements all the colors that we use throughout Subsurface, and we will use colors on both desktop and mobile versions Same thing applies for metrics.h/cpp Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>