aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2015-02-10Create the method that changes the state of the applicationGravatar Tomaz Canabrava
Not used yet. The idea is to call 'setApplicationState("plan");' and all widgegts for plan will be magically setup because we added the plan state with registerApplicationState. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Change splitter names to something more meaningfullGravatar Tomaz Canabrava
listGlobe and infoProfileSplitters weren't good names as now we will be able to create more types of widgets there Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Add the PlannerDetails classGravatar Tomaz Canabrava
This is the last of the current dialogs to be ported to the new widgets system. now we need to clean the mainwindow of the old code. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Add a new file, plannerDetails.uiGravatar Tomaz Canabrava
This new file is the interface for the Details of the planned dive removed from the mainwindow. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Add the modes for ADD and PLANGravatar Tomaz Canabrava
The Plan mode still misses a widget that was done directly inside the mainwindow. I'll extract it from there and create a proper class in the next commit. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Add the first call to registerApplicationStateGravatar Tomaz Canabrava
This will be used to set the 'default' state. The other two possible states right now are plan and add; those will be created right next. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Simplify a bit of codeGravatar Tomaz Canabrava
two #ifdef NO_PRINTING one over the other, merged them together. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Implement the registerApplicationState functionGravatar Tomaz Canabrava
This function registers the different widget layouts that we will have in subsurface. Currently we have three layouts (default, plan, add) and a few more are comming (for instance location) and the code is scattered around. It was making me unconfortable. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Add a new struct that will hold the widgets for each cornerGravatar Tomaz Canabrava
The combination of the map / struct will change based on the state of the application. Currently a lot of different widgets change what is shown on the main window, and it's very messy. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Only update tags in the selected dives if they were changedGravatar Dirk Hohndel
If current_dive and displayed_dive still have the same tags then we shouldn't touch the tags of other selected dives. Fixes #826 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-09Add ability to undo deleted divesGravatar Grace Karanja
Before the dive is deleted, a copy is made and passed to the undo buffer. When edit->undo is clicked, this dive is restored to the dive list. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-09Add UndoCommand classGravatar Grace Karanja
Add a class to handle all undo/redo events. Whenever a user action affects a dive, an undo command will be created. A list of these commands will be stored in the UndoBuffer, to allow for moving forwards/backwards in the list. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-09Add menu entries for undo/redoGravatar Grace Karanja
Add an edit menu with undo and redo submenus, and connect them to the UndoBuffer class. The submenus are only enabled when needed. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-09Create UndoBuffer classGravatar Grace Karanja
Add an empty UndoBuffer class. This will be built up on to implement a working undo/redo mechanism. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-07Select the known import for APD automaticallyGravatar Miika Turkia
If the filename has extension of .apd, then set the known import automatically. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-07Add the .apd file extension to be treated as CSV fileGravatar Miika Turkia
Adding support for importing .apd files (APD Log Viewer). They are CSV files and already supported in CSV import, but the file extension .apd is added here. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-07Change the tooltip for bailoutGravatar Dirk Hohndel
While this text makes sense if this is a CCR dive and the diver does bail out, the more neutral text "Manual switch to OC" works in all use cases for this event, e.g. at the beginning of a dive when we manually set this dive to be OC. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-07Don't show a setpoint switch event at t=0Gravatar Dirk Hohndel
When using that to indicate the dive type at the start of the dive, it's visually strange to have an event marker. See #826 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-06Delete dives using delete keyGravatar Grace Karanja
Allow users to delete dives using the delete key. [Dirk Hohndel: small whitespace fix; removed an unnecessary include file] Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-05CCR gas composition and gas pressure labels on dive profile: revisitedGravatar willem ferguson
This patch cleans up code for achieving the above with respect to CCR dives. The code is simplified and shortened. The display of gas lables on the profile is made consistent with the cylinder pressure closest to the graph and the gas composition above/below the cylinder pressure. The patch significantly improves the maintainability of this code. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-03Do not set default bg to white on the modelsGravatar Tomaz Canabrava
The user may have a different theme, as i did, and it looked very wrong. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-03Don't allow the Cylinder option be edited in PLAN / ADD modeGravatar Tomaz Canabrava
This sets the combobox to disabled if the profile is in any mode besides PROFILE. Fixes #824 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-03Fix crash when removing an out-of-profile divepointsGravatar Miika Turkia
We can end up having a divepoint that is outside the dive profile. In this case, we used to crash, but this hack prevents the index out of range issue. Fixes #784 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-03Fix crash when moving divepoints rigorouslyGravatar Miika Turkia
I have no idea how the index ends up outside the range, but at least this prevents a crash in this case. See #784 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-03Disable dive component copy/paste shortcuts when no profile showGravatar Dirk Hohndel
Instead of inventing another way to do this (and inevitably forgetting a path where this should be re-enabled) I renamed the DcShortcup related function and made them enable/disable the copy and paste shortcuts as well. Of course there now is one exception (isn't there always?): in "ADD" state we don't want to be able to switch DCs, but we do want to be able to paste. Fixes #825 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-02Don't show the plot_info table in every debug buildGravatar Dirk Hohndel
Instead add a new define SHOW_PLOT_INFO_TABLE that triggers if this debugging aid is shown. 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-02Do not go to edit mode if nothing changedGravatar Miika Turkia
Fixes #804 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01Fix Ubuntu glitch with completer popupGravatar Miika Turkia
On Ubuntu, the completer often prevents applying/discarding the changes on the dive info pane and disrupts editing of other fields as well. This patch prevents the completer popup from appearing when not in edit mode (apply or discard is pressed) or when the string is still empty. Fixes #818 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01Facebook integration: recognize when user didn't allow us to postGravatar Dirk Hohndel
Why someone would log in but then not allow us to post I don't know... but it seems useful to at least handle it... 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-02-01Clean up all the debug messages from Facebook integrationv4.3.970Gravatar Dirk Hohndel
Even for a beta this was a bit too verbose for my liking. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01Get ready for Beta 3Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01Fix crash if one selects incorrectly Seabear CSVGravatar Miika Turkia
Fixes #814 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31Update ceiling when changing dive modeGravatar Robert C. Helling
Without this patch, the user effectively cannot change the dive mode as any change is overwritten by replot copying current_dive over displayed_dive. The way out is not to call replot but only update the deco ceiling directly. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31Don't call replot when exiting cylinder combo boxGravatar Robert C. Helling
Commit b72c32da7 turned off replotting while the cylinder combo box was active to speed up editing. After leaving the combo box, replotting was enabled again and a replot was called. This replot is too agressive, as it overwrites the displayed dive with the current dive and thereby resets the cyinder change. This eliminates the replot call. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31Don't store the Facebook credentials between multiple runs of SubsurfaceGravatar Dirk Hohndel
They stay valid while Subsurface is running, but once you quit, the credentials are gone. This way no one can steal them from our settings. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31Correctly quote a double quote in the messageGravatar Dirk Hohndel
Otherwise the message on Facebook will end at the first double quote. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31Hide tooltip when posting a profile to FacebookGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31Export the XSLT based exports in a new thread.Gravatar Gehad elrobey
The XSLT based exports can consume long time while applying the xml format. This time can make the GUI unresponsive. Simply call the export functions in a new Thread. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31Fix maximum depth on CSV importGravatar Miika Turkia
Commit d329420d5549e02e32ff4673513329f9dc30650f changed the name of the header from "Max depth" to "Max. depth", so we need to use that in the code as well. (The dive profile is not drawn if we do not have max depth.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31DiveMeanDepthItem: fix bad translated depth unitsGravatar Lubomir I. Ivanov
probably just a typo; taking the value of a (char *) will return the first char (or byte). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30Include iPhone companion app to user surveyGravatar Miika Turkia
We should mention the iPhone companion app either alongside the Android app or at its own line if more precise information is wanted. I suppose this text change should be enough as we should get more precise statistics of usage of these apps from the server logs. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> 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-30Use the 'popup' style Facebook login windowGravatar Dirk Hohndel
This fits much better in the preferences dialog. 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-30Minor whitespace change - this line was getting longGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30Fix update message popping up when there is no new versionGravatar Dirk Hohndel
I was just missing one key phrase to check for. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30Don't go to edit mode if the dive notes field didn't change.Gravatar Gehad elrobey
The maintab view should be consistent; some fields just go to edit mode whenever they acquire focus and most of them wait till their values are changed. Change the dive notes field to be consistent with the other fields and only enter edit mode if its value is changed. [Dirk Hohndel: changed to use same_string()] Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30Prevent crash on shutdownGravatar Anton Lundin
We always call reply->deleteLater(), so we where actually calling delete on a stale pointer, that caused subsurface to crash on shutdown. Reported-by: Sergey Starosek <sergey-starosek@yandex.ru> Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>