summaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2014-09-18Futher capitalisation standardisationGravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18TyposGravatar Salvo Tomaselli
This fixes two typos found by lintian. I guess a bunch of translations will need to be updated or something, I am not sure how they work so I didn't touch them. I presume in the worst case they will need to be re-translated at the next iteration -- Salvo Tomaselli "Io non mi sento obbligato a credere che lo stesso Dio che ci ha dotato di senso, ragione ed intelletto intendesse che noi ne facessimo a meno." -- Galileo Galilei http://ltworf.github.io/ltworf/ From a0e5f48349557fcccd82ba8c7555043de140835c Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it> Signed-off-by: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it> Date: Fri, 12 Sep 2014 18:25:20 +0200 Subject: [PATCH] Fix typos reported by lintian Fixes two typos reported by lintian. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18Helper function for partial pressure calculationGravatar Robert C. Helling
This patch introduces a new structure holding partial pressures (doubles in bar) for all three gases and a helper function to compute them from gasmix (which holds fractions) and ambient pressure. Currentlty this works for OC and CCR, to be extended later to PSCR. Currently the dive_comp_type argument is unused. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18Report CNS in dive info tabGravatar Gaetan Bisson
This adds a maxcnsText widget under infoTab and populates it. Note that I manually edited maintab.ui to display CNS and OTU next to each other and right after gas data. Signed-off-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Fix crash at startupGravatar Dirk Hohndel
Not sure this is the right fix, but at least it doesn't crash any more. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Random whitespace updateGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Unused signature removed.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Show everything by default.Gravatar Tomaz Canabrava
We should show all dives by default. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Better filtering of dives with no tags.Gravatar Tomaz Canabrava
New rules for them, a new item on the model with the text "Empty Tags" should be marked if the user wants it to be displayed. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Implement trip-filtering.Gravatar Tomaz Canabrava
Trips will be filtered if it doesn't find any tags for dives. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Correctly filter dives. (trips are always shown)Gravatar Tomaz Canabrava
This patch correctly filter dives based on tags, but it will also keep showing all the empty trips. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Create the sorting method.Gravatar Tomaz Canabrava
This method should remove a row on the dive list model visualization if none of the tags that it have are marked as 'visible'. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Implement the TagFilter model.Gravatar Tomaz Canabrava
This model accepts check / unchedk. Now, I need to also plug the result of the check / uncheck to the list model. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Trigger the log->filter by tag to open the tag filter.Gravatar Tomaz Canabrava
You can't really close it for now. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Add the Tag Widget on the MainWindowGravatar Tomaz Canabrava
Place the TagWidget on the correct place on the main window. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Remove unused method signature.Gravatar Tomaz Canabrava
This was declared on a class definition, but never implemented. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Add skeleton to the Tag Filtering.Gravatar Tomaz Canabrava
Just the ui file and a empty class to start playing with it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-11Use US spelling of colo(u)r in Config DC dialogGravatar Tim Wootton
Application's default lang is US english, translation to UK spelling should be done in transifex. Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-11Makes new DC config dialog follow existing UI txt styleGravatar Tim Wootton
Sets text strings to follow the style of existing UI components in use of capitalisation and use of : Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-11Undo unintentional string changesGravatar Dirk Hohndel
Previous commits undid these by mistake Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-11Fix typosGravatar Florian Klink
Reported-by: Davide DB <dbdavide@gmail.com> Signed-off-by: Florian Klink <flokli@flokli.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-02Redesign Dive Computer configuration dialogGravatar Joseph W. Joshua
The dive computer configuration dialog was a bit cluttered. This change adds a tabbed interface separating the basic settings from the gas, dilutent and set point settings Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-29Revert hacks now that we use Qt5 on MacGravatar Dirk Hohndel
Commits a24eb8ac120bf and 0b0860d24a81b introduced a nasty hack that was needed back then to make tank and weight selection work on the Mac. But it caused other unpleasant issues (as mentioned in the commit messages). I re-tested this with the current Qt5.3 based builds on Mac and this hack is no longer needed. Fixes #638 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-28HTML: Changing the files extensions to jsGravatar Gehad elrobey
These are actually javascript files containing js objects and not json files. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-27Define PATH_MAX if it's not definedGravatar Salvo 'LtWorf' Tomaselli
Fixes FTBFS on Hurd. [Dirk Hohndel: changed PATH_MAX to 4096 for consistency with Linux] Signed-off-by: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-27Preferences: only save settings that are changedGravatar Dirk Hohndel
This continues the effort started earlier to only save things that aren't the default. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-27Use one consistent font size throughout the appGravatar Dirk Hohndel
Let's see how much people notice it / hate it. Fixes #712 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-27Don't set up fonts twiceGravatar Dirk Hohndel
Turns out that the mainwindow reads the settings and sets up things - except that this has already happened in the constructor of the static PreferencesDialog. So only keep those parts that aren't handled there. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-27Default font: more fine tuningGravatar Dirk Hohndel
In order to get rid of the old default font on Windows (Calibri) we are going to near ridiculous length. The reason for this is that we in the past always saved the default font in the settings (how stupid was that!) and so now even with a new default font in place, since there is an explicit font in the settings we take that instead of the default. Instead of requiring our existing users to use a registry cleaner to get the correct default font on Windows 7 and later (the VAST majority of our Windows users at this stage), we simply explicitly ignore that old default font. There is one very nasty side effect. A user cannot set Calibri as their font of choice on Windows 7 or later (because we always force them back onto Segoe). Given how much nicer Segoe looks I think this is an acceptable flaw - let's hope this doesn't come back to bite me in the future. At the same time this changes the default font size handling. We try to get the default font size of the OS so the app looks "right". This seems to not give me the expected result on Linux with KDE, but maybe I'm doing it wrong? Looks good when testing on Windows. See #712 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-26Small whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-26TableWidgets: change default column width and don't save unchanged widthsGravatar Dirk Hohndel
Similar change to the dive list. The idea is to not save things that are the default. This way Subsurface will do the right thing when defaults change. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-26DiveList: don't save default column widthGravatar Dirk Hohndel
This is an elegant way around our problem with people who have the horrible old "100px" column width in their settings. The first time they run Subsurface after this fix things won't get better, but the offending keys will be deleted at exit. And the second time they run, they'll get the much more sensible new default widths. Thanks to Thiago for this idea. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-26Fix planner gas consumptionGravatar Dirk Hohndel
We need to start out with valid SAC rates in the diveplan. Thanks to Gaetan for finding this and suggesting a different fix - this seems cleaner to me. Reported-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-26Fix missing translations for webservice responsesGravatar Dirk Hohndel
The webservice backend sends responses in English. Let's do a better job presenting those in the users preferred language. Fixes #714 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Implement the modelDataChanged to repopulate the widget on StatisticsGravatar Tomaz Canabrava
The modelDataChanged method will remove all items and recreate everything *right* now we will never use it, because we are not triggering any changes on the model, but simply deleting and recreating it everytime we open the dialog. to be changed in the future. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Use scene()->clear() instead of manually clearing the scene.Gravatar Tomaz Canabrava
When there's a rowsAboutToBeRemoevd, remove all items from the scene() by calling scene()->clear(), instead of creating a method just for that. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Use aboutToBeRemoved instead of removedGravatar Tomaz Canabrava
If we used removed things from the interface we could hit a dangling pointer, so first delete the items, then let the system delete the rows. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Implement the resizeEvent to make the statistics always visible.Gravatar Tomaz Canabrava
Always fit the whole scene in the view. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Create stub methods and connects the model with the new statisticsGravatar Tomaz Canabrava
Connects the YearlyStatistics model with the YearlyStatisticsWidget nothing is shown right now, mostly because I need to do everything but now it's easyer to add the things that are missing. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Add the old Statistics to have a reference view while programmingGravatar Tomaz Canabrava
Added the old statistics panel at the botton of the new one to have a reference view of the statistics while programming the new one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Remove a lot of non-necessary boilerplate code.Gravatar Tomaz Canabrava
We used to have a very sad way of controlling the statistics, now we will create the model when there's a need for it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Add initial skeleton for the Statistics RedesignGravatar Tomaz Canabrava
The statistics widget is a beast, one of the parts that I dislike most on the current subsurface implementation. This is the initial work to change that to something amazing. This first commit adds the first bunch of files that I think are needed, and the correct setup for the qmake and cmake buildsystems. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Fix NO_USERMANUAL building for androidGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-23Re-enable the edition of the Date after editing a trip.Gravatar Tomaz Canabrava
Since we can't edit the trip date, we need to remember to re-enable it after we disable it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-23A much better Toolbar for the profile.Gravatar Tomaz Canabrava
Using QToolBar I was able to remove much of the dead code from the mainwindow.ui xml file by transforming the QToolButtons into actions and loading them dynamically in the .cpp code. I couldn't use the designer for this ( as I wanted ) because Qt has no notion of ToolBars outside of the areas where the MainWindow should have one, and we use it in a very different area. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-23TankBar: don't risk dereferencing stale pointersGravatar Dirk Hohndel
Basically we could end up in a situation where the plotInfo is no longer valid, yet the model changes and triggers a redraw before the new data is passed into the TankBar. Instead of chasing that race condition it seemed much easier to just copy the plot_data entries and the gas information in the dive. Fixes #716 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-22Divelist: Use more sensible default column widthsGravatar Dirk Hohndel
Having 100px wide columns was simplistic and stupid. It was never intended to stay that way. See #712 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-22Divelist: switch to better column headersGravatar Dirk Hohndel
And move the units there. This is a long going back and forth. What we want is narrow columns. But what we need is something that's easy to understand for our users. I'm open to other suggestions, but I think this moves us in the right direction. See #712 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-21Fix selection logic when manually adding a diveGravatar Dirk Hohndel
This was an interesting bug. When adding a dive that would end up in the middle of the dive list, the newest dive in the dive list would end up marked in the dive structure as selected - even though it wasn't visualized as selected by Qt. Bad things happen if the user then made changes to that dive without selecting something else first, for example by either editing the dive or doing things to it like removing it from or adding it to a trip. The same operation would also be applied to the newest dive in the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-21Planner: Control-Click removes divedatapoint and all following onesGravatar Robert C. Helling
In order to offer a simple way to remove a calculated deco, if Control is pressed while clicking on the trash can in the dive plan, that point and all following are removed. This way the user can Ctrl-click on the first calculated waypoint. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>