aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/preferences.cpp
AgeCommit message (Collapse)Author
2015-07-25Move initialization of preferences to helper functionGravatar Dirk Hohndel
This way we can read the preferences without instantiating the PreferencesDialog class. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Make password change asynchronousGravatar Dirk Hohndel
This isn't perfect (if you make multiple requests things could go badly), but it's better than just slapping the new password into the settings, even if the update failed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Cloud storage: enable password updateGravatar Dirk Hohndel
This now allows the user to set a new password for the cloud service. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Add UI for cloud password changeGravatar Dirk Hohndel
This isn't hooked up yet, just the UI elements. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06Code cleanupGravatar Dirk Hohndel
Make precedence of && over || explicit. Explicitly convert between char * and unsigned char *. Don't assign potentially negative return code to an unsigend variable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06Cmake: make Facebook support an actual optionGravatar Dirk Hohndel
This way we can selectively turn off Facebook support. And turning off both Facebook support and support for the user manual allows us to not rely on QWebKit which once again allows debugging Subsurface with valgrind on Arch Linux. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-01Geo taxonomy: adjust the preferences to the new data structuresGravatar Dirk Hohndel
This allows us to pick which three categories of geo taxonomy will be shown in the UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-27Preferences dialog: yet another attempt to make it fitGravatar Dirk Hohndel
Designer is such an utter piece of crap I am at a lack for words. After a few hours with a real UI tool (i.e., vim) I have the preferences dialog reasonably close to where I want it. It's still not perfect, but at least it no longer contains tons of unused space, it fits fine on a 1024x768 screen and it is visually consistent across the different pages. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-22Preferences infrastructure for GeoManagementGravatar Tomaz Canabrava
Simple preferences infrastructure with default prefs, prefs and hooks for the Qt Settings system and our preferences ui. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-22Cloud storage: update File menu options once PIN is verifiedGravatar Dirk Hohndel
The code didn't trigger the update routine after PIN verification, only if just email/password were shown. A simple oversight. This is fixed now and so the visibility of cloud open and cloud save options should refelect whether verified credentials are in the preferences or not. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-22Preferences: don't show error when resetting cloud email / passwordGravatar Dirk Hohndel
Empty values won't work, of course, but they aren't an error, either. Fixes #887 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-15Cloud storage: create preference entry for base URLGravatar Dirk Hohndel
This just deals with the mechanics. There is no UI to enter / change this URL (and that's intentional), neither is it used, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Cloud storage: only offer cloud storage related options when verifiedGravatar Dirk Hohndel
If we don't have verified cloud credentials disable the menu options and disallow the use of cloud storage as default data file. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Cloud storage: show in preferences if cloud account was verifiedGravatar Dirk Hohndel
This should make it easier to figure out what's happening. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Cloud storage: clean up handling of cloud storage accountGravatar Dirk Hohndel
Correctly tracking the status of our authentication with the cloud service is non-trivial, especially since the user may quit Subsurface between registering and verifying an account, they might even register on one machine and verify on another. This tries to make sure that when in doubt we check with the cloud service backend. And we show errors in the UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Preferences: hook up default file behavior in the dialogGravatar Dirk Hohndel
This now sets the preference variable / config entry and keeps them in sync. Doesn't actually change the behavior at program start, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Cloud storage: Add preference option whether to sync in the backgroundGravatar Dirk Hohndel
This defaults to on as that's the most useful setting for the average user. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Cloud storage: don't clear out password by mistakeGravatar Dirk Hohndel
If the user didn't enable saving the password to the preferences, then the password was cleared out as the preferences got synced. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Cloud storage: deal with visibility of PIN entryGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Cloud storage: initial support for confirming the email PINGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Cloud storage: first stab at creating an account on the backendGravatar Dirk Hohndel
This triggers when the email address / password is changed in the preferences. It opens an https connection with the backend server (the URL is hardcoded) which should create an account with these credentials. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-31Cloud storage: rethink the terminology usedGravatar Dirk Hohndel
Cloud storage makes more sense that remote storage - at least I assume that more people are used to thinking about "storing things in the cloud". Don't use PIN or passphrase, call it a password everywhere. Don't use copy_string() to copy the password - the git credentials routine asserts that password is not NULL, so make sure we at least have a pointer to an empty string here. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Remote storage: collect email and PIN in preferencesGravatar Dirk Hohndel
This allows entering / storing the PIN (aka passphrase) for the ssh key. The email isn't used, yet - this will be used by the automated backend to create a unique git repository that will turn into the remote storage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Remote storage: add preference for the passphraseGravatar Dirk Hohndel
While we don't expose it as this to the user, we'll need an ssh key and potentially a passphrase in order to communicate with the git server in our infrastructure. This simply sets up a way to store the passphrase. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-20Add option to display GPS coordinates as decimalsGravatar Robert C. Helling
This adds a field to the units preferences to have GPS coordinates show as decimals (as for example Google maps does it). Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Remove the DiveList from the mainwindow.uiGravatar Tomaz Canabrava
It's now set up from the mainwindow.cpp file. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-02Fixed CMakeLists.txt to work with Qt5Gravatar Patrick Valsecchi
Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01Facebook integration: only set the URL onceGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30Try to make the Facebook interaction be more pleasantGravatar Dirk Hohndel
Show either the login screen or the disconnect button, plus some text that explains what the user is expected to do. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30Compile Facebook support when building with Qt5Gravatar Dirk Hohndel
Now that Facebook approved our use of the API, we can build this by default. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-21CCR option: display o2 sensor dataGravatar willem ferguson
This patch creates the possibility of viewing the individual sensor values when the po2 button on the profile toolbar is activated. This follows exactly the procedure for optionally displaying the setpoint values while viewing po2. A checkbox in the preferences panel determines whether sensor information is shown. By default it is set to OFF. When checked, and the po2 button is activated, sensor1 values are shown in grey, sensor2 in blue and sensor3 in brown. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-20UI for pSCR preferencesGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Clean up the header filesGravatar Dirk Hohndel
Lots and lots and lots of header files were being included without being needed. This attempts to clean some of that crud up. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Make Facebook support a config optionGravatar Dirk Hohndel
By default it is turned off, turn on by calling qmake with CONFIG+=FBSUPPORT. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-14Ignore QWebView in AndroidGravatar Joseph W. Joshua
Ignore QWebView instances in the preferences dialog when compiling under Android, as QWebView is not yet supported under Android. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-10Add preferences field for default set-pointGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-10Maintab combobox to set dive typeGravatar Robert C. Helling
still needs some work Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Remove unused headersGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05Display CCR setpoint values on the po2 graphGravatar Willem Ferguson
When a CCR dive is viewed and the toolbar button for PO2 is activated, both the PO2 (green line) and the O2 setpoint (red line) are shown. This allows evaluation of the PO2 in the CCR loop with respect to the pre-configured O2 setpoint. The setpoint graph can be disabled from the Preferences/Graphs tab by checking the appropriate checkbox. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-29Remove uneeded Facebook album settingGravatar Tomaz Canabrava
This now is chosen directly from the popup box that appears when you try to send a picture to facebook. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-24Changed Facebook stuff to socialnetworks.h/cppGravatar Tomaz Canabrava
All Facebook related stuff now is on SocialNetworks.h/cpp this makes it much easier to implement things and looking for bugs. working: - logging in - getting user id - getting album id ( or creating it ) *much* more testing is needed, of course. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-24Create a Facebook album for SubsurfaceGravatar Tomaz Canabrava
We still need to do a lot of stuff on that part. Currently when asking for sending a profile, it will just create a private album. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-24Save and restore Facebook Prefs.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-24Get and save the UserID for use with Facebook.Gravatar Tomaz Canabrava
Next: Publish something with the Graph API. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-24Ask for facebook permission to post to a user newsfeed.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-24Disconnect from facebook manually.Gravatar Tomaz Canabrava
Added a button to disconnect from facebook. This clears the webview cookies so it correctly disconnects us from facebook, and clears the access token. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-24State that you are connected on Facebook.Gravatar Tomaz Canabrava
TODO: Disconnect from facebook. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-24Connect to facebook, save the tokens for future use.Gravatar Tomaz Canabrava
We can now correctly connect to facebook endpoint. Nothing really fancy at the moment. =/ Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-24Allow subsurface to login with facebook.Gravatar Tomaz Canabrava
This piece of code allows subsurface to login with facebook using the 'Subsurface' app created within facebook for secure reasons. I'm the admin of it currently - but I'll pass it to Dirk as well. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-30Remove debug output in preference settingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>