aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-07-03UI restructure: plotDive: plot current dive by default & use displayed_diveGravatar Dirk Hohndel
No longer use the dive structure that is passed in but instead always use the displayed_dive to display things. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-03UI restructure: add helper function to copy and clear a diveGravatar Dirk Hohndel
This way we can safely copy around dives (specifically, copy the dive to be displayed / edited into the displayed_dive). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-02UI restructure: fix get_divenr to do the right thing on a copy of a diveGravatar Dirk Hohndel
We should not care if the dive has the same address in memory. We care if it is the same dive (by using the unique ID). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-02UI restructure: plotDive should just take one diveGravatar Dirk Hohndel
We don't have a concept of what to do when plotting multiple dives, so let's not pretend and remove all the messing around with lists. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-02UI restructure: use a global variable to hold the dive we show / editGravatar Dirk Hohndel
There is massive confusion about what we display when and where and which dive structure (or pointer to a dive structure) contains which information at which stage. This is the first step towards restructuring all of this. This creates a global variable displayed_dive which at any point in time should be what is displayed on screen (both in the profile and in the maintab). It removes the editedDive concept from MainTab. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01HTML: use Right/Left arrows to switch between divesGravatar Gehad Elrobey
Use arrows to switch between dives in dive detailed view. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01Don't show gaschange events at the beginning of a diveGravatar Linus Torvalds
The initial gas change event is really special - it just specifies the gas mix from the dive computer. So don't show it as an event if that already matches the initial gas. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01Add dive: remove cylinder pressures from samplesGravatar Dirk Hohndel
These cylinder pressures are actually just artefacts of the way we track gas consumption in the code shared between planner and add dive. We don't want them in the actual dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01Equipment edit: for some reason we need a local copy of indexGravatar Dirk Hohndel
Calling enableEdition appears to corrupt the index that is passed into this slot. This doesn't fix the problem that we can't edit the cylinder start and end pressure of a manually added dive, but at least we no longer try to edit and invalid index. See #582 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01Maintab: fix tab stop orderGravatar Dirk Hohndel
This keeps getting screwed up. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01Planner: use the traditional date widgetGravatar Dirk Hohndel
Much as I love the calendar, that meeds a little more tuning, so switch back as we did for the maintab. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01Use gas_mod helper instead of local versionGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01Picture loading: only add the pictures to "reasonable" divesGravatar Dirk Hohndel
If the picture has a timestamp that was within 30 minutes of the start and finish of the dive, we take it. Otherwise we don't. If the timestamps of the images are off, the time shift dialog allows the user to fix this. And with this patch the user can select all the dives of a trip and all the pictures they took on the trip and the "right thing" will happen. Fixes #578 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01Small whitespace fixGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01Implement a cache for the scaled imagesGravatar Dirk Hohndel
No point in scaling them every time the user looks at the dive. Over time this may waste some memory (especially if people have a ton of pictures and let the process run a very long time). For now I won't worry about that. Fixes #577 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01Clarify the gaschange iconGravatar Anton Lundin
This removes the white circle in the backround of the gaschange icon. This makes it stand out a bit less but looks better to me. This also fills in the black part on the cylinder neck. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01Show subsurface logo in dive plan print outGravatar Robert C. Helling
A little bit of CI: Print our logo on the print out dive plan. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01Show ascent gas consumption separately in plannerGravatar Robert C. Helling
In the worst gase you have to provide gas for your buddy during all the ascent. So you should have the amount of gas used in ascent as a reserve. This patch makes the planner notes display that value separately. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-01fix tab step order in planner settings.Gravatar Joakim Bygdell
--f46d04426a604016a404fd1cd218 Content-Type: text/plain; charset=UTF-8 Tab step order should follow a logical order, top to bottom, left to right and not jump around. -- //Jocke <div dir="ltr">Tab step order should follow a logical order, top to bottom, left to right and not jump around.<br><br clear="all"><div><br>-- <br><div>//Jocke</div> </div></div> From e8ff7986f858403fb4f5277741c9fa528962f9bc Mon Sep 17 00:00:00 2001 From: Joakim Bygdell <j.bygdell@gmail.com> Date: Tue, 1 Jul 2014 09:28:23 +0200 Subject: [PATCH] Fix tab step order in planner settings. Tab step order should follow a logical order, top to bottom left to right. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30Main Window: start showing dive list and globeGravatar Dirk Hohndel
Fixes #571 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30Only replot the dive if maxDepth > oldMaxDepth on plan / add mode.Gravatar Tomaz Canabrava
This fixes the "impossible to work with" planner with the mouse now the dive will only grow and not shrink untill you release the mouse. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30Better colors for Add and Plan modes.Gravatar Tomaz Canabrava
Those are ligther colors and it should be a better choice a way better choice is to ask for a designer wich color to use but most of my minions are busy. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30Revert Date widget to default in QtGravatar Tomaz Canabrava
The new one, while it's prettier, doesn't fit into the current layout in a good way, we need a better layout for it. So it's code will continue as dead code for a while. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30Selects the dive date before showing it up.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30Added a shortcut 'ESC' to close the calendar widgetGravatar Tomaz Canabrava
This hides the calendar widget when the user press esc when it's running. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30Calendar widget should hide when clicking somewhere elseGravatar Tomaz Canabrava
This patch adds a event filter to hide the calendar widget when it loses focus Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30Fixed SearchBar layout and iconsGravatar Tomaz Canabrava
This is almost a rewrite of the Search function on the WebView the old code had a few uneeded things, mostly being a subclass of QMainWindow instead of the QWebView - this makes the code use a tiny bit less ram. The SearchBox was also moved to an own class ( we can use it later to filter the contents of the DiveList for instance ) and a forced use of the pixmaps for the Mac and Windows platform was added. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30Align the texts on the Left inside of Right for the DiveListGravatar Tomaz Canabrava
The Qt Framework adds a visual 'tab' on the children of a node, but if we forced a right alignment on them, it will lose that. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30User survey: detect the machine the app is running onGravatar Dirk Hohndel
We build 32bit Windows binaries - but we really want to know if the OS is x86_64 or i386. This little hack should give us that information. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30User survey: don't ask more than once per invocationGravatar Dirk Hohndel
Otherwise when the user selects "Ask Again" they will get asked when they change preferences. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30Merge branch 'survey'Gravatar Dirk Hohndel
2014-06-30Fix Qt4 buildGravatar Dirk Hohndel
Strangely no problems on Qt5 without those declarations. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30User survey: actually collect and send the data to the backendGravatar Dirk Hohndel
This switches the QTextEdit fields to QPlainTextEdit (I don't see a reason why we should allow HTML here), no longer tries to have a default text but instead adds labels for the two fields, connects the UI so th data is collected and uses a bastardized WebServices subclass to send the data to our backend. Fixes #546 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30Small white space tune-up on JS fileGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30HTML: Show nice values when pressure is not availableGravatar Gehad elrobey
Show nice values instead of the undefined when the pressure is not available. 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-30HTML: Fix listlib whitespace errors.Gravatar Gehad elrobey
Fix some code style and whitespace errors. [Dirk Hohndel: one hunk didn't apply as there was no such 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>
2014-06-30HTML: Use jqplot to draw profile.Gravatar Gehad elrobey
Use jqplot to draw dive profile, Depth and pressure curves. add the library Javascript files under the theme directory and editing the exporter. Load them to the HTML template dynamically with synchronization as they are dependant on each other. Also Adding min version of JQuery that is needed by the library. 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-30HTML: some css enhancmentGravatar Gehad elrobey
Detailed dive view needs more padding just to view normally. 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-30HTML: Add temperature and pressure curves to the JSON data.Gravatar Gehad elrobey
Add more dive sample details to the JSON data. This is not so optimized some zero values can be ignored. 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-30HTML: dive list must remember the last dive in displayGravatar Gehad elrobey
When switching between dives in detailed view, The dive list must be switched too. 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-30HTML: export dive events to detailed viewGravatar Gehad elrobey
Add table of dive events to the dive detailed view. This should view each event, its type and the time this event took place. 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-30Make the planner settings respond well to unit system changes.Gravatar Robert C. Helling
[Dirk Hohndel: removed printf/qDebug() debug output] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30User manual: Spelling, typosGravatar Willem Ferguson
The user manual was spell-checked against the Oxford Dictionary. Almost all the joined words, e.g. checkbox, dropdown, were kept, but divelog was changed to dive log. Quite a few tyops and spelling errors corrected. A short section on dive plan evaluation was deleted on Robert's suggestion. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29Image time shift dialog: remove the silly AMGravatar Dirk Hohndel
This is a time offset, not a time of day. Fixes #579 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29Globe: don't show the location edit message after aborting planGravatar Dirk Hohndel
For some reason the isVisible() check failed, even though the message is, indeed, visible. But it doesn't seem to hurt to unconditionally hide the message, so I'm doing that instead. Fixes #576 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29Parse git-format picture dataGravatar Linus Torvalds
This adds the loading of picture data from git repositories too. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29git-format: save dive picture dataGravatar Linus Torvalds
This doesn't actually parse the data at load time yet, but I need a save file to do that.. The diff looks larger than it is because this moves the "mktree()" function up earlier to be used by the picture saving code. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29Only calculate deco stops, TTS and NDL every 30sGravatar Anton Lundin
This introduces a limiter that we only calculate deco stop, TTS and NDL with a minimum of 30s intervall and just reused the values from the previous sample in other cases. I run my OSTC3 at 2s sample intervall so this is a 15x speedup in that case. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29Calculate approx gas bill on divesGravatar Anton Lundin
This uses a bit of naive gas computations to figure out how much of different base gases you used up on the dives the statistics is done for. It's quite useful to get a minimum line about how big your gas bill is going to be after a dive trip. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29Update of user manualGravatar Willem Ferguson
Several updates are implemented here. 1) Updates to the dive planner section, following excellent suggestions from Rob. 2) Updates reflecting the date picker, including hitting ESC to close the calendar. 3) The edit of device names. 4) Several small or typographic edits Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>