aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-06-28Make calendar stay on topGravatar Joakim Bygdell
This patch makes tha calendar stay on top at all times. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28Planner: small fixes for the UIGravatar Dirk Hohndel
This way the calendar looks more "natural". And a typo fix. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28Merge branch 'fixPlannerStartTime'Gravatar Dirk Hohndel
2014-06-28Planner: implement sane way to set the start time of the planned diveGravatar Dirk Hohndel
This uses the same widgets we use on the maintab. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28Use date / time entry for start time of planned diveGravatar Dirk Hohndel
This is not hooked up, yet, just the UI change. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28Rename slot to get rid of auto-connect warningGravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28Fix date and time l10nGravatar Sergey Starosek
QDateTime::toString(const QString & format) uses system locale for month and day names. In order to get localized month and day names for user-choosen locale use QLocale::toString(const QDateTime & datetime, const QString & format) instead. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28Fallback to loading theme icons from resourcesGravatar Sergey Starosek
Since not all platforms support theme icons, we need to pack them into resources and fallback to that resource theme. There seems to be a bug in Qt (https://bugreports.qt-project.org/browse/QTBUG-16697), thus default theme name (hicolor) does not work. So we test for 'window-close' theme icon on startup and if not found, set theme name to 'subsurface' Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27Fix dive picture positionGravatar Tomaz Canabrava
I was messing with the origin point, making the dive picture be a tiny bit to the right. This removes the rotation, but that was also not very good. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27This is unecessary when calling methods.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27Open picture manager when clicking on the picture at the profileGravatar Tomaz Canabrava
This patch makes the click on pic == open picture browser works also on the profile instead of only on the list view.. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27Remove unused variableGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27Better date localizationGravatar Dirk Hohndel
Instead on relying on the translators to correctly format date and time we should be able to get all we need from QLocale. Sadly this takes a bit of hacky post-processing, but in my limited testing the results look good. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27Start external viewer on photo double-clickGravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27Emit signal on photo double-clickGravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27Care about drop_stone_mode in createSimpleDiveGravatar Anton Lundin
The checkbox is remembered as long as the program is still running, so if you planned one dive with drop_stone_mode and saved/aborted and then tried to plan another one we had a first "down" waypoint from createSimpleDive and drop_stone_mode was also enabled. This makes sure we don't add the first waypoint in createSimpleDive when drop_stone_mode is enabled and lets that add a implicit first waypoint. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27Close snprintf warningGravatar Anton Lundin
Gcc yells: warning: format not a string literal and no format arguments This closes that warning. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Make date widget easier to readGravatar Dirk Hohndel
At least on my screen this is much better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Correctly use our "localtime"Gravatar Dirk Hohndel
We use time stamps without timezone, so we need to correct for the current time zone offset before showing dates and times in time zone aware widgets. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Re-enable possibility to edit manually added dive.Gravatar Tomaz Canabrava
This one-liner re-adds the possibility to edit manually added dives. Tested because I didn't belived that it was going to be so easy, but it seems that it was. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Break really long lineGravatar Tomaz Canabrava
Hard to read on the editor. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Fix crash when trying to add a dive or plan when a filter is active.Gravatar Tomaz Canabrava
The planner used the selected dive on the dive list, and when there's a filtering in action it can be in a state where there's no dive selected. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Fixed changing dates with the new date widget.Gravatar Tomaz Canabrava
The maintab was connecting with an invalid slot on the new date widget, QDateTime instead of QDate Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Added code for TimeEditGravatar Tomaz Canabrava
This makes the TimeEdit work again. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Added a TimeEditGravatar Tomaz Canabrava
The thing that I was trying to do didn't worked, getting back to the original Qt timeEdit. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Better visualization of the maintab in the designerGravatar Tomaz Canabrava
The layout of the maintab differed a bit between the application and the designer because the designer didn't take into account that the divemaster, buddy and tags were one line widgets. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Headers cleanup.Gravatar Tomaz Canabrava
Too much noise on the headers, this commit remove uneeded headers when they are uneeded. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Make system proxy as defaultGravatar Sergey Starosek
On first start (no settings saved yet) system-wide proxy should be default. Proposed-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Implement proxy re-configurationGravatar Sergey Starosek
- application level proxy is reconfigured on settings saving - tested with direct connection (no proxy), local proxy without auth (tinyproxy) and SOCKS (ssh -D dynamic port forwarding) - not sure about QNetworkProxy reuse between invocations - consider using QNetworkProxyFactory (but since no plain TCP connections are used, QNetworkProxy seems to be good choice) Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Implement proxy settings loading/savingGravatar Sergey Starosek
- proxy settings are stored under [Network] group - default is "No proxy" - duplicate #def GET_TXT replaced with GET_INT_DEF Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Expose proxy settings into preferences structGravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26UI setup for "Network settings" pageGravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26New page "Network settings"Gravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Fix default widget.Gravatar Tomaz Canabrava
The default widget that was being shown was the planner widget where we needed to show the normal dive widget. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Make the dive planner dialog prettier.Gravatar Tomaz Canabrava
It was too much vertical and cluttered, making the usage of the application a bit strange. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26Rearrange planner UI elementsGravatar Robert Helling
This is my first attempt at grouping UI elements of the planner in a sensible way. It might still be sensible to combine the two bottom panes into one. In addition there is a new field "altutude" which is sychronized with the surface pressure as for planning we often know the altitude of the dive site rather than the atmospheric pressure. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25Fix keyboard shortcuts for user manualGravatar Sergey Starosek
Shortcuts for widgets without focus should have window context. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25Make gas mod be reasonable for users of imperial units as wellGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25Make pO2 settings functional in plannerGravatar Robert C. Helling
Spin boxes for pO2 are now hooked up to preference values. Adding new cylinders (or changing their fo2) computes the MOD accordin to the current value of decopo2. Note that chaning the limits for deco pO2 does _not_ automatically update the switch depth of all cylinders as those might have been manually entered. Furthermore, MOD has now to option of rounding to multiples of a given depth. That is used for the automatic switch depth which are now always multiples of 3m (so that EAN50 is switched to at 21m rather than 22m). Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25Connect prefs.descrate to drop_stone_mode pointsGravatar Anton Lundin
This enables so we can change the decent speed for drop like a stone mode. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25Fix typo in connecting ui.descRate to setDescRateGravatar Anton Lundin
Qt didn't find the right function without the type there. This also gets rid of the warning about that. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25Deco artefacts with low GFlowGravatar Robert C. Helling
In a dive, when you choose a very low GFlow (like 5 or 9) and a trimix with quite some He (12/48 in the example) and descend fast, the ceiling seems to do strange things in the first minutes of the dive (very very deep for example or jumping around). To understand what is going on we have to recall what gradient factors do in detail: Plain Buehlmann gives you for each tissue a maximal inert gas pressure that is a straight line when plotted against the ambient pressure. So for each depth (=ambient pressure) there is a maximally allowed over-pressure. The idea of gradient factors is that one does not use all the possible over-pressure that Buehlmann gives us but only a depth dependent fraction. GFhigh is the fraction of the possible over-pressure at the surface while GFlow is the fraction at the first deco stop. In between, the fraction is linearly interpolated. As the Buehlmann over-pressure is increasing with depth and typically also the allowed overpressure after applications of gradient factors increases with depth or said differently: the tissue saturation has to be lower if the diver wants to ascent. The main problem is: What is the first stop (where to apply GFlow)? In a planned dive, we could take the first deco stop, but in a real dive from a dive computer download it is impossible to say what constitutes a stop and what is only a slow ascent? What I have used so far is not exactly the first stop but rather the first theoretical stop: During all of the dive, I have calculated the ceiling under the assumption that GFlow applies everywhere (and not just at a single depth). The deepest of these ceilings I have used as the “first stop depth”, the depth at which GFlow applies. Even more, I only wanted to use the information that a diver has during the dive, so I actually only considered the ceilings in the past (and not in the future of a given sample). But this brings with it the problem that early in the dive, in particular during the descent the lowest ceiling so far is very shallow (as not much gas has built up in the body so far). This problem now interferes with a second one: If at the start of the dive when the all compartments have 790mbar N2 the diver starts breathing a He-heavy mix (like 12/48) and descents fast the He builds up in the tissues before the N2 can diffuse out. So right at the start, we already encounter high tissue loadings. If now we have a large difference between GFhigh and GFlow but they apply at very similar depth (the surface and a very shallow depth of the deepest ceiling (which for a non-decompression dive would be theoretically at negative depth) so far) it can happen that the linear interpolation as opposite slope then in the typical case above: The allowed over-pressure is degreasing with depth, shallower depth do not require lower gas loading in the tissue (i.e. can be reached after further off-gasing) but but tolerate higher loadings. In that situation the ceiling disappears (or is rather a floor). So far, I got rid of that problem, by stating that the minimum depth for GFlow was 20m (after all, GFlow is about deep stops, so it should better not be too shallow). Now the dive reported in ticket #549 takes values to an extreme in such away that 20m (which is determined by buehlmann_config.gf_low_position_min in deco.c) was not enough to prevent this inversion problem (or in a milder form that the interpolation of gradient factors is in fact an extrapolation with quite extreme values). This patch that gets rid of the problem for the dive described above but still it is possible to find (more extreme) parameter choices that lead to non-realistic ceilings. Let me close by pointing out that all this is only about the descent, as it is about too shallow depth for GFlow. So no real deco (i.e. later part of the dive) is inflicted. This is only about a theoretical ceiling displayed possibly in the first minutes of a dive. So this is more an aesthetically than a practical problem. Fixes #549 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25Add ability to reset the settingsGravatar Dirk Hohndel
This may be a bit crude and it doesn't actually FULLY reset the settings (as for example the column widths will still be maintained), but it's a good start, I think. Fixes #552 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25Add ALU7 to common cylindersGravatar Joakim Bygdell
Fixes #562 Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25Add missed xml-end tag in AndroidManifestGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25Template for subsurface android packageGravatar Venkatesh Shukla
For modifications to the final source code of built android package such as permission additions and inclusion of xml and java files, it is necessary to maintain a template. The template is copied without any modifications on top of qt android-template before building subsurface libraries. Refer: http://qt-project.org/doc/qt-5/deployment-android.html#qmake-variables Files that are required to be directly copied to android package would be included in directory android. Icons for subsurface on android and string.xml are included. Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in> Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25Hook up UI elements for ascent rates to plannerGravatar Robert C. Helling
That provides some UI elements that were recently introduced with function of allowing the ascent rates of the planner to be configured by the user. I tried to make it work both with senisble as well as with imperial units. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-24Look around DCs dive time for automatically fixed positions.Gravatar Salvador Cuñat
dive = find_dive_including(gpsfix->when); only finds dives which have a fix during the underwater time. If the positions have been fixed before or after the dive, fails quietly. So let's test this situation and, in case, pass the job to find_dive_n_near(). Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-24HTML: Overwrite all template files if existGravatar Gehad elrobey
Template HTML files must be overwritten when exporting if already exist. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-24HTML: Wide Javascript code cleaningGravatar Gehad elrobey
list_lib Javascript code cleaning, Now it looks like subsurface code. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>