aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2014-04-25Closing shortcuts for shift times windowsGravatar Gehad elrobey
Adding the ability to close the shift times window, also Quit subsurface with this window in front. See #489 Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25Ctrl-W and -Q support for GPS, divelogs.de, divecomputer and CVS importGravatar Dirk Hohndel
Getting closer to consistent behavior. See #489 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25Print dialog: make Ctrl-Q and Ctlr-W workGravatar Dirk Hohndel
All these recent commits should have included: See #489 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25Quit Subsurface with about window in frontGravatar Dirk Hohndel
Add ability to quit Subsurface with a Ctrl-Q shortcut even if the about window is active. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25Closing about window by shortcutGravatar Gehad
This adds the ability to close the about window with the ctrl + w shortcut. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25Quit Subsurface with yearly stats window in frontGravatar Miika Turkia
Add ability to quit Subsurface with a Ctrl-Q shortcut even if the yearly statistics window is active. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25Close yearly statistics with shortcutv4.0.96Gravatar Miika Turkia
This enables closing the yearly statistics window with esc or ctrl+w keys. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25Quit Subsurface with user manual window in frontGravatar Dirk Hohndel
Add ability to quit Subsurface with a Ctrl-Q shortcut even if the user manual window is active. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25Close user manual window shortcutGravatar Robert C. Helling
Add ability to close the user manual window with a Ctrl-W shortcut. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25Better handling of mouse on the delegates ( Equipment Edition )Gravatar Tomaz Canabrava
This adds more handling of missing actions for the mouse on the equipment edition. It complements the stuff talked about on bug 359, but it's a different issue. 359 seems already fixed. See #359 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25Fix 'cancelling divecomputer download'Gravatar Tomaz Canabrava
When a download is canceled, discard the partially downloaded dives. Fixes #341 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-23Fix a minor bug in the tags widget.Gravatar Gehad
Using the auto-completer while the tags widget is 'empty', always picked the first choice. Write some letters and remove them in an empty tags widget, the complete list of tags will appear - now if you try to choose any tag with the keyboard arrows it will choose the first one. also if you tried choosing it by mouse it will be inserted twice. This is fixed by removing the unneeded else part. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-18Remove unused variables and fix signed/unsigned mismatchGravatar Dirk Hohndel
The depth types are unsigned for dive plan datapoints. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-18Fix crash when manually adding a diveGravatar Dirk Hohndel
When a manually added dive is saved we cancel the plan. In that process we throw away the cylinders which triggers a redraw of the profile. Which tries to access the diveplan and its data points that have already been freed. BOOM. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-18Comments added to plannerGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17Fixed mismatched connectionsGravatar Lakshman
Fixed connections to call drawProfile() in diveplanner whenever cylinder table widget is edited. Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17Correctly edit air/water temp in dive structGravatar Yosef Hamza
When changing the values of air/water temp after the first time and save, it will be reset the intial value. This is fixed by removing the "select_dc" (which makes the change to the dive struct instead). Fixes #457 Signed-off-by: Yousef Hamza <jo.adama.93@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17Removed the globals 'userid' and 'save_userid_local' variablesGravatar Tomaz Canabrava
This is a preferences setting, it should belong to the preferences structure. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17Mark a lot of TODO's where I think it should be moved to C code.Gravatar Tomaz Canabrava
This marks a lot of todo's where I think there's core stuff being mangled on the interface - we should remove this from the interface to make testing and maintenability easier. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17Quick whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17Improvement for various bits of the plannerGravatar Robert Helling
Rewrite of the actual planner logic. Now ascend to the next potential stop depth. There the state is cached and we try to ascend to the next stop depth. If we hit the ceiling while doing that we go back to the cached state and wait there for a minute. Then we try again. Then loop. Converted all depth related variables from unsigned int to int. During planning, in a time step the current depth can temporarily be negative and comparisons of a negative int with an unsigned it have not the result I expected ( (int) -2 < (unsigned int) 3 turns out to be false). And we don’t really need the 32nd bit that unsigned buys us for depths. Deco stops are now shown in the same table as manually entered stops in boldface (I removed the second table to save screen estate). The gas shown in the table is still misleading as it means the gas used on the segment leading up to that event. The update of the profile only works partially upon changes in the list of available gases. Treatment of various gases is basically there but needs some more love. The ascent velocity is now provided by a function that takes the current depth as argument. Currently it always returns 10m/min but that will later be variable (and hopefully user configurable). The profile is not redrawn while deco is computed (avoiding an infinite recursion). The table got a new column for the duration of a segment while the old “duration” column was renamed “Runtime” to reflect what it actually shows. Currently, only the run time but not the duration are editable. All deco gases are used from the depth where their pO2 is 1.4bar. This should become more flexible. Calculation of the pressure drop in cylinders without configured volumes is suppressed. This solves a problem with the planner crashing when saving a dive where not all cylinders had been manually given a volume. [Short rant break: Treating 0/0 as air bites back at so many places. E.g. Cylinder data is initialized with memsetting the whole structures to 0. Then later suddenly this totally unconfigured cylinder is being treated as it would contain air. Maybe at some point this was a feature. But it lead to a naughty bug which took me over an hour to resolve. We should seriously reconsider this choice and better move to 209/0 being air if changing this everywhere is not too much trouble] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-16Renaming the prefs struct members to be consistent with the QSettings.Gravatar Gehad Elrobey
-Renaming prefs members for consistency. -Changing references of QSettings to the prefs structure instead. -Removing unused functions in pref.h were left over from an old version. -Changing the data-type of bool members to short for consistency with other members. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-16UI adjustments in Print Dialog WindowGravatar Andrey Zhdanov
- move buttons to the bottom of the window - use QDialogButtonBox that allows to follow platform-dependent button layout - enlarge window size to not to crop content - change "Close" button action from "accept" to "reject" Signed-off-by: Andrey Zhdanov <andrjufka@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-16Use Luisa's new iconsGravatar Willem Ferguson
Move the heart rate graph icon up in the toolbox with the cluster of buttons that control graphs Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-14Simplify codeGravatar Dirk Hohndel
This seems like a rather obvious optimization... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-14Make red ceiling workGravatar Dirk Hohndel
The existing code for toggling the DC reported ceiling in red or "surface color" clearly had never been tested. This seems to create a reasonably attractive implementation - not exactly what we had in the past, but good enough. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-14Add option to save userid in data filesGravatar Venkatesh Shukla
The userid of Subsurface Webservice can be included in locally saved xml files and git repository. For xml files, it is stored in userid tag. For git repo, it is stored in 00-Subsurface file present in the repo. Preference dialog and webservice dialog modified to include option for saving userid locally. In case of difference in default userid and userid in local file, some semantics are followed. These can be referred to here: http://lists.hohndel.org/pipermail/subsurface/2014-April/011422.html Fixes #473 Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-14Mark Air/Water temp field red for wrong input.Gravatar Yosef Hamza
As a warining for the user mark the field red. If the user inputs invalid input that will be ignored while parsing. But with adding a one character error margin to prevent it from toggling between Red and Yellow while editing existing values, for example "After Deleting unit and last number after '.'" Signed-off-by: Yousef Hamza <jo.adam.93@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-11Remove some unneeded explicit paths in includesGravatar Gehad
The include path is set up correctly so we don't need these explicit paths in includes. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-11Change some references of QSettings to the pref struct.Gravatar Gehad elrobey
After adding the animation member in the preference struct, it is very resonable to change these references of QSettings to the preference structure instead. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-10Feature to show or hide heart rate graphGravatar Lakshman
Adds new push button "HR" to the button bar on the dive profile to toggle display of heart rate. TODO: New icon for the heart rate button is needed. Fixes #485 Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-07Change position of heart rate labels on y-axisGravatar Willem Ferguson
The lettering of the heart rate numbers on the lefthand exis "fall off" the left hand of the profile panel when the panel is a bit narrow. This minute change moves the letters a bit closer to the Y-axis so that their left-hand extreme is more or less in line with those of the depth-labels on the Y-axis. This is a partial response to Ticket # 484. See #484 Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-07Fix incorrect behavior in preference windowGravatar Gehad
When doing some changes in the preference window and clicking "Apply", the 'Close without saving' button is supposed to restore the previous values. However some fields were not restored correctly. - The Animations Slider was never restored to its initial value. (A new member in the pref struct was added - pref.animation) - The 'Font' and 'Font size' were restored correctly to the previous values but their effects weren't restored to the UI and that required to open the prefrences window again and press ok. Fixes #481 Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-07Preferences: Change of text for unused cylinders.Gravatar Willem Ferguson
The present text for configuring the display of unused cylinders simply reads: "unused cylinders". This is now changed to "Show non-used cylinders in Equipment Tab". The latter wording is much clearer to the average user. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-05Rely on ENABLE_PLANNER to enable the plannerGravatar Anton Lundin
The removal of the planner menu entry was erroneously commented out. Other parts of the code rely on ENABLE_PLANNER to know if the planner is enabled or not so rely on it here to. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-05Fix divelogs.de upload errorGravatar Venkatesh Shukla
The order of arguments to fread was incorrect. In case of arguments "streamsize, 1" the returning value is 1, and hence due to membuf[streamsize] = 0; line, membuf ends up being one character long. Fixed it by exchanging arguments to "1, streamsize". This way, streamsize has the correct value. Fixes #483 Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in> Acked-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-05Remove check option to show units in text labelGravatar Lakshman
Currently the feature to show temperature units while adding dive is provided through checkbox in preferences->units section. This patch disables this checkbox and always enables this feature. Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-03Random small whitespace cleanupsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-03Edit name option for bookmarksGravatar Yosef Hamza
Add the option to edit the name of a bookmark to be more meaningful for the user they prefer. It works just as simple bookmarks and can be removed and hidden. It won't accept names longer than 22 characters because longer names will display as garbage text. Also changed the code from displaying flag depending on event name to depending on event type. Signed-off-by: Yousef Hamza <jo.adama.93@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-03Correctly handle dive selection after editing divesGravatar Dirk Hohndel
It's a tricky problem as we need to remember this across a divelist sort (as the user might have edited the date / time). The old code made not one but two incorrect assumptions. a) it assumed that the added or edited (but previously manually added) dive was the last one in the dive list (clearly wrong when adding a dive that has an earlier date) b) it ignored the fact that refreshDisplay() would select the top dive in the list if no dive was selected This patch addresses both of them and makes the code easier to understand. Fixes #480 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-02Adding shortcut key sequence to the worldmap exporterGravatar Gehad
Adding Shortcut (Ctrl+H) to the worldmap exporter for consistency with the other commands in the file menu Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-02Only create UpdateManager once it is neededGravatar Dirk Hohndel
Instead of unconditionally creating the object at program start let's create it the first time we need it. That should avoid adding more and more delays at program start (not to mention the usually unnecessary memory use). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-02Update manager: report Linux separatelyGravatar Dirk Hohndel
I know the plan is to do much better OS detection - but at least Linux in general should be called out and not be treated as "unknown". Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-02Add "Check for updates" FeatureGravatar Joshua Joseph
This patch adds a check for updates feature. It connects to http://subsurface.hohndel.org/updatecheck.html to check for any new versions. It then prompts the user with a download link if an update is available. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-02Make divelist header corrections Mac specificGravatar Anton Lundin
The +10 pixels fix was introduced to fix some layout issue on Mac ways back, but it breaks things on Android. This makes sure this only gets applied when build for mac. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-02Add missing REMOVE slotGravatar Lakshman
Model derived from tableview is expected to have remove slot, which is missing in DivePlannerDisplay currently. This patch fixes the annoying warning message while starting Subsurface because of not including remove slot. Currently there is lot of work to do, that either requires modifying the model to skip 'remove' slot or find a way to make them inactive. Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-02Make compute waypoints content uneditableGravatar Lakshman
Currently user can edit content in compute waypoints table (in PLAN mode), ofcourse this does not trigger any calculations in the code, but user cannot see the content he needs to see after edit. This patch makes the content uneditable. Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-01Use term cylinder not tank to be consistant.Gravatar Tim Wootton
The terms tank and cylinder are used interchangably both in diving and in the code, but in the UI we should be consistant in what we display to the user. Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-31Merge branch 'planner-mods'Gravatar Dirk Hohndel
Nothing exciting here, just a few independent changes close to each other. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-31Diveplan with entered and computed waypoints to UIGravatar Lakshman Anumolu
Recently Robert Helling provided a patch "Distinguish between entered and calculated waypoints" in an attempt to distinguish between entered and calculated stops. This patch is an independent (content wise) extension of the above patch and is built relative to it which adds new table to display computed waypoints in plan mode. Currently table includes only two columns "Comp. Depth" and "Comp. Duration", which can extended to show further information. This is only a start to the UI interaction in PLAN mode. In addition to this there are many TODO things that diveplan feature demands TODO: 1. Show more details through "Computed Waypoints" table. 2. Remove tooltip from "Computed Waypoints" table widget. 3. Make contents in "Computed Waypoints" table widget non-editable. 4. Fix error when trying to save dive plan without using cylinder data. 5. Make dive plan editable after saving it. 6. Improvise dive planner graphics window. Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>