aboutsummaryrefslogtreecommitdiffstats
path: root/qthelper.h
AgeCommit message (Collapse)Author
2014-02-27Massive automated whitespace cleanupGravatar Dirk Hohndel
I know everyone will hate it. Go ahead. Complain. Call me names. At least now things are consistent and reproducible. If you want changes, have your complaint come with a patch to scripts/whitespace.pl so that we can automate it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-23Improve GPS string handlingGravatar Dirk Hohndel
This adds support for two more GPS coordinate formats and also fixes a couple of issues with the previous implementation. We used to only support full degrees and decimal minutes. We now also support fully decimal and degrees, minutes and decimal seconds. The previous implementation would color the input field red if either it couldn't parse the string, or if it was able to parse it but it was the same as the previous location. That's misleading. The previous implementation also changed all gps coordinates to the new coordinates in a multi-dive edit - instead of just changing the ones that are the same as the master dive. Fixes #387 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26Remember Trip Selection.Gravatar Tomaz Canabrava
This patch remembers the trip selection across the Dive Tree Model. It's a tiny bit big because we used to have a variable 'selected trips' that's now calculed dynamically - this is more future proof. This is a start of Un-cluttering the view ( for 4.1 I hope to reduce the code in this class to nearly a half. ) Fixes #303 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-08Load translations at run timeGravatar Dirk Hohndel
This doesn't enable translation switching, but at least we try and load the correct translation at startup. We create two global pointers for the currently active translations. This also removes the remainders of the gettext()/glib based translation system. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Changes to make the glib-removal-hack branch build on MacOSXGravatar Henrik Brautaset Aronsen
Tested with the Homebrew packaging system Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Parse GPS text in C++ and re-implement GPS changed checkGravatar Dirk Hohndel
This is SO MUCH easier then the convoluted and fragile C / glib code it replaces. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-04Add a helper function to calculate weight display stringGravatar Benjamin
Add a helper function to unify the calculation of the weight display string, instead of having the same calculation in two places in the code. Signed-off-by: Benjamin Fogel <nystire@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-18Converting the device_info list into a Qt data structureGravatar Dirk Hohndel
This data structure was quite fragile and made 'undo' when editing rather hard to implement. So instead I decided to turn this into a QMultiMap which seemed like the ideal data structure for it. This map holds all the dive computer related data indexed by the model. As QMultiMap it allows multiple entries per key (model string) and disambiguates between them with the deviceId. This commit turned out much larger than I wanted. But I didn't manage to find a clean way to break it up and make the pieces make sense. So this brings back the Ok / Cancel button for the dive computer edit dialog. And it makes those two buttons actually do the right thing (which is what started this whole process). For this to work we simply copy the map to a working copy and do all edits on that one - and then copy that over the 'real' map when we accept the changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>