aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2014-06-20Added keyboard navigation to the calendar date picker.Gravatar Tomaz Canabrava
Wee. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20Added focus handling to the Date Picker.Gravatar Tomaz Canabrava
Added focus handling for the date picker, this way the user can use the keyboard to change the date. ( still not implemented ) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20Added the calendar widget to change the calendar date.Gravatar Tomaz Canabrava
Added a popup widget to change the calendar date, just like the old QDateTimeEdit. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20Correctly sets the minimum size of the calendar widget.Gravatar Tomaz Canabrava
The old code cutted the calendar by half. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20Added the new Date Widget on the MainTab.Gravatar Tomaz Canabrava
the new date widget still needs a bit of work, but the design is working already. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20Added a Partly Functional Date Picker widget.Gravatar Tomaz Canabrava
This widget shows a date in a better way that it was done in the old widget, much more elegantly. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20Simplify codeGravatar Tomaz Canabrava
If a class inherits QObject, it doesn't needs to call QObject::tr for the tr function. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20planner: Switch to QSpinBox for SACGravatar Anton Lundin
QSpinBox is nice to see how different sac rate would affect our dive plan. "Hey, What would happen if I would be stressed and my sac goes up by 50%?" Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-18Enable Info box in the planner again.Gravatar Anton Lundin
Its great to be able to see the planned "turn pressure", EADD at different points and so on. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-18Fix building with NO_MARBLE againGravatar Anton Lundin
Back in 708f19830e2a ("Planner: New plannerSettingsWidget") the Globe widget handling changed, and this updates the NO_MARBLE build option to work after that. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-18Don't use std::string in our codeGravatar Thiago Macieira
This also explicitly states the encoding. It's just a file name and it's always ASCII for us, but it's clear now. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-15HTML: remove theme file if already exist in the export directoryGravatar Gehad elrobey
as QFile:copy doesn't overwrite files by default, we must check before copying if file exist and remove it. We must be able to overwrite files here, user is already notified and choosed to replace them. 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-15HTML: fix the exporting dialogGravatar Gehad elrobey
export HTML into the file name choosen and export additional files into a subdirectoy beside the html file, called htmlfilename_files This is to follow the convension and doesn't create additional directories to wrap the exports. 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-14User survey: force running the survey from command lineGravatar Dirk Hohndel
This way people can test the dialog much easier. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-14User survey: small updatesGravatar Dirk Hohndel
Just make it behave a little more sanely - support Ctrl-W and Ctrl-Q - remove the silly placeholder text for system info - add language and version information Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-14OS DetectionGravatar Joseph W. Joshua
Implements automatic OS and architecture detection. This code has been taken from the Qt repositories for Qt 5.4 (LGPL) and slightly modified into the SubsurfaceSysInfo class. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-13Start a user survey dialogGravatar Dirk Hohndel
The idea is that a week after the user starts using Subsurface we ask them if they would like to submit a survey response. If you are running a development build, don't wait seven days. This patch doesn't do anything with the user's selections, doesn't submit anything to our server, etc. It's just a placeholder to tune what we should ask, etc. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-13Prevent using uninitialized variableGravatar Dirk Hohndel
numberOfPictures was be read before it is written. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-12Don't copy the current dive ontop of editedDive after edit has startedGravatar Dirk Hohndel
If you switch to edit mode by making a change to cylinders or weights, then the data in the editedDive was changed and afterwards the current dive was once again copied into the editedDive - even though we already did that earlier when setting up the display. Fixes #539 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-12Much needed clean on the HTML export dialog code.Gravatar Tomaz Canabrava
Correct usage of QFile, QString and code cleanup. [Dirk Hohndel: plus whitespace cleanup and removal of qDebug() calls] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-12Delay loading of some settings until laterGravatar Dirk Hohndel
This early in init_ui() the settings may not be available, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-12Planner: don't show the planner panes by defaultGravatar Dirk Hohndel
With commit 708f19830e2a ("Planner: New plannerSettingsWidget") we suddenly started out showing the planner widget. Not useful. So let's switch us back to the default screen :-) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-12Planner: update tabstop order againGravatar Dirk Hohndel
Robert's commit 708f19830e2a ("Planner: New plannerSettingsWidget") moved several of the widgets from the maintab area to the new planner settings widget. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-12Planner: New plannerSettingsWidgetGravatar Robert C. Helling
In planner mode, this replaces the globe with the dive plan and introduces a new plannerSettingsWidget in the diveListPane. All new fields are still disfunctional. This is WIP. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-11Change the QDialog for html export to getExistingFolderGravatar Tomaz Canabrava
The QDialog for html creates a folder, we need to choose a folder, not a file. getSaveFileName was wrong. ;p Fixes #533 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-11Fix layout of Dive ExportGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-11Fix layout of import CVSGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-11Fix uninitialized memory warningGravatar Dirk Hohndel
It's kinda bogus, but since we add it to the Vector, we might as well initialize all of it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-11Allow the user to delete a dive computer from a diveGravatar Dirk Hohndel
This can't be the only dive computer, of course. Goes nicely with the ability to reprder them. Fixes #551 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-11Profile: add a flag to force redrawing the profileGravatar Dirk Hohndel
This is needed if something has changed that requires a redraw, but the plotDives() function can't tell (for example when a dive computer has been deleted and there's now a different DC in the same spot, with the same number - see next commit). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-11Deal with some uninitialized variable warningsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-11Globe: do a better job detecting double clicks and setting GPS coordinatesGravatar Dirk Hohndel
For some reasons Marble appears to sometimes not detect double clicks and call the correct callback. With this commit we manually intercept the double clocks and route them to the right function. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-10Remove unused variableGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-10Planner: fix the tab orderGravatar Dirk Hohndel
I know this is being redone, but the messed up tab order was driving me insane when testing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-10More layout work for stats tabGravatar Dirk Hohndel
This finally gets me something that I like. The way the different boxes get resized seems pleasant and intuitive. And it appears to do the right thing on all platforms (I learned that having different levels of layout nested creates no vertical offset on Linux/KDE, but a very ugly offset on Mac, for example). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-10Improve statistic on used gasGravatar Dirk Hohndel
This raises the maximum number of gas mixes listed to 20 and also changes the layout / design of the stats tab to make it much more attractive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-10Picture handling: when zooming thumbnail, put it in the foregroundGravatar Dirk Hohndel
This just seems to look much better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-10Planner: don't reset GF when preferences changeGravatar Dirk Hohndel
The planner has its own view of the gradient factors. So replacing those with the ones set up for viewing dives in the preferences is wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-10Planner: show the GF used for planning on top of the profileGravatar Dirk Hohndel
Showing the GF in the preferences is just confusing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-10Planner: reset GFlow and GFhigh when we're doneGravatar Dirk Hohndel
While planning we might change the gradient factors. Make sure they are back to what's in the preferences when we're done planning. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-09Add gas consumption statistic for selected divesGravatar Dirk Hohndel
We already did a list of gases and volume consumed for the selected dive on the Dive Info tab, but did not provide that same data on the Stats tab for all the selected dives. I arbitrary limited this to eight gases (as the list can get quite long when you select a lot of dives). The gases are sorted by volume consumed. Fixes #535 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-09Don't show the average depth for the selected divesGravatar Dirk Hohndel
Being shown between the deepest and shallowest dive's max depth it confuses a lot of people - the average depth is frequently less than the shallowest of the dives, so at first glance it looks like the "average" is less than the "minimum". So having three numbers grouped like this that use different algorithms is just distracting. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-09profilewidget2: fix -Wreorder warningsGravatar Lubomir I. Ivanov
warning: 'ProfileWidget2::someVariableName' will be initialized after [-Wreorder] Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-09mainwindow.cpp: fix a warning about parenthesesGravatar Lubomir I. Ivanov
"warning: suggest parentheses around assignment used as truth value [-Wparentheses]" I think 4.8.2 is confused about this one, but we suppress it regardless by separating into two assignments. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-09Make sure Windows can find the user manualGravatar Dirk Hohndel
This worked before without the "file:///" prefix, but something else that I did broke that. Oh well, now it works again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-09Dive edit: do a better job noticing when the coordinates were changedGravatar Dirk Hohndel
Previously the code could get confused by edits (including trivial things like deleting the coordinates). It seems much more reliable to simply compare the coordinates of the edited dive with the ones in the current dive before the edits. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-09Picture handling: switch to stronger typed offsetGravatar Dirk Hohndel
Also change the on file XML to be even easier to read by making it a duration as well (which gets us '32:34 min' instead of un-typed seconds). This is backwards compatible, it will happily read what was written with the previous commit). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Change character for liter in SAC values as wellGravatar Dirk Hohndel
And fix the bug that in the info overlay SAC was always given in metric values. And try to reduce the number of places in which we calculate the unit conversions... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Really display liters with script elGravatar Dirk Hohndel
In commit 125ddd955c04 ("Display liters with script el") Robert only fixed the C routine we use to show units. Strangely, we had a separately implemented C++ function as well. Instead of implementing this in two spots I now simply have the C++ function use the C function to do the actual work and then wrap this into an easier to use (from UI code) QString output. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Simplify the code that checks if it's OK to close the current fileGravatar Dirk Hohndel
And make sure it gets called whenever it needs to get called - it was missing from the openRecentFile case. Fixes #530 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>