summaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2015-05-29Correctly set the dive site id on the diveGravatar Tomaz Canabrava
When changing the index of the combobox we were discarting the dive_site_id. This fixes it. Now I need to understand what's happening to the globe. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Fix the connections for the Location EditGravatar Tomaz Canabrava
The LocationEdit now correctly connects to the QComboBox signals, not the QLineEdit signals. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Update DiveLocationModel when thread finishesGravatar Tomaz Canabrava
This patch updates the DiveLocationModel when the GeoLoockupInformationThread finishes, and also selects the correct index for the displayed dive. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29LocationInformationModel moved to qt-modelsGravatar Tomaz Canabrava
I forgot about this one, and we are going to use it in the mobile version too. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Change the Location from a LineEdit to a ComboBoxGravatar Tomaz Canabrava
And hook up every method that was changed. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Fix border glow on OSXGravatar Tomaz Canabrava
The border was just too small for the glow. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move DivePlotDataModel to qt-modelsGravatar Tomaz Canabrava
I think with this one I'm finished. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move DivePictureModel to qt-modelsGravatar Tomaz Canabrava
This class will surely be used on the mobile version, and it was very tangled inside divepicturewidget. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Fewer rebuilds triggered by changes in models.hGravatar Tomaz Canabrava
Models.h now is quite minimal, I'll keep it like that for now, until it grows huge again. I've also cleaned a bit the headers that are using it so only the ones that actually need the stuff that I've left behind will actually include this file. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move ProfilePrintModel to qt-modelsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move TablePrintModel to Qt-modelsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move DiveTripModel to qt-modelsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move the YearlyStatisticsModel to qt-modelsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move DiveComputerModel to qt-modelsGravatar Tomaz Canabrava
Another attempt to make it easyer to create the mobile version of Subsurface. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move ExtraDataModel to qt-modelsGravatar Tomaz Canabrava
Another attempt to make it easyer to create the mobile version. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move WeightModel to qt-modelsGravatar Tomaz Canabrava
One more step to make it easyer to port the app to Mobile. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move WeigthSystem Info model to qt-modelsGravatar Tomaz Canabrava
This is another effort to make it easyer for the mobile interface of Subsurface. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move Tankinfomodel to its own fileGravatar Tomaz Canabrava
Another change to make it easier to program the mobile ui. This was a fairly easy patch: just moved the contents of the file and fixed the includes. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move DivePlannerModel and CylinderModel to qt-modelsGravatar Tomaz Canabrava
Still trying to make it easier for the Mobile Port: This patch is a bit bigger than I hopped, but it was the smallest that I could get. A lot of TODO items where added where I broke the code because the current implementation would break the QML implementtion on the designer. I'll most probably fix those myself when I finish the transition to the models to the new folder. I only moved both models at once because there's an interdependency between them (seems inevitable, tough, but I'll take a better look at it later). Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move the models to its own folderGravatar Tomaz Canabrava
This is an attempt to help share code between the desktop version of Subsurface and the mobile version. More code will be moved around and the models will be split in a way that will help recompile times and also creation of different interfaces for different form-factors. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Correctly save dive rating after changing itGravatar Salvador Cuñat
Corrects typo in ebaa7d1fd which impeded that changes in dive rating were saved after editing. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> 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 preferences UIGravatar Dirk Hohndel
This isn't hooked up at all right now. 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-27Wire gui for diagnostic logs from dc configurationGravatar Anton Lundin
This copies peaces from the downloadfromdivecomputer dialog into the configuredivecomputerdialog and connects them to be able to create a logfile form the configuration of the divecomputer. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27Strip the default suffix if saving to git branchGravatar Dirk Hohndel
For some reason the file selection dialog box now always adds a default suffix to the file name we pick - which results in our test for git storage to fail. So if the filename looks like "<path>[branch].ssrf" then remove the suffix that was added. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27Fix crash when rejecting dive site changesGravatar Dirk Hohndel
Emitting the stopFilterDiveSite signal caused us to clean up the UI which reset currentDs to NULL if this was a new dive site... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27Start editing new site regardless what the user does firstGravatar Dirk Hohndel
It doesn't matter if we first enter coordinates, name, description or notes. If there is no currentDs we need to handle that gracefully. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27Dive site management: make sure currentDs is validGravatar Dirk Hohndel
When double clicking on the globe on a dive with no dive site we did almost the right thing - except that we didn't create a dive site. Not 100% sure this is the right place to do this, but it seems to work and prevents the crash. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Expand trips that are filtered on dive_site_manageGravatar Tomaz Canabrava
While filtering we would have trips that were collapsed, but this doesn't really make much sense while managing dive_sites. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Filter out the dives that are not at dive_site.Gravatar Tomaz Canabrava
Untested code to filter out dives that are not at the active dive_site. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Create signals/slots for filtering the dive_site,Gravatar Tomaz Canabrava
The dive site management requires that we filter all the dives that are on the current dive_site, this is the preparatory work for that. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Only repopulate model when needed.Gravatar Tomaz Canabrava
The old way we set the location and *then* updated the model, so the very first location that we tried to show was empty. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Show the correct dive_site on the manage comboboxGravatar Tomaz Canabrava
When triggering the dive_site management, we need to get the uuid that was send to us and set it as the current dive_site on the combobox, the dialog can fill all required info for us. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Do not create a new dive site when curr is invalidGravatar Tomaz Canabrava
We will however create a new dive site when the user clicks on the add button - creating it here would led to strange behavior. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Don't setLocationId when accept/reject changesGravatar Tomaz Canabrava
setLocationId will filter the dives, so ignore the visual changes when accepting / rejecting, it will only be triggered again when we are showing this dialog again. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Do not set the dive_site when changing divesGravatar Tomaz Canabrava
We should only set the dive_site on the dive site management widget when we are going to use that information, this is because the dive_site management widget will filter all dives on the dive list. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix rating/visibility vs suitGravatar Dirk Hohndel
The suit field should take up all the remaining space and the stars should be vertically centered with the text. This looks much better Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix the Profile/ToolbarGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Do not connect null to a signalGravatar Tomaz Canabrava
The parent here should have been the mainwindow, but we create this dialog on the stack instead of the heap and because of that we don't set the parent to prevent a double free. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix planner layoutGravatar Tomaz Canabrava
Layout was wrong. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix DownloadFromDiveComputerGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix DiveShare export dialogGravatar Tomaz Canabrava
One more. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix the DiveImportDialogGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix the export dialogGravatar Tomaz Canabrava
This patch makes the export dialog more consistent with the rest of Subsurface. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Major rework on the MainTabGravatar Tomaz Canabrava
This seems almost perfect now. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix spacing for the filter dialogGravatar Tomaz Canabrava
This is the single filter dialog - the spacing is much better, but when activated it seems cluttered, this is because the outer layout (the one that encapsulates everything) has the wrong layouting - I need to find and fix that. I'll actually change that to a splitter, it will provide a more flexible resize of the widgets. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix issues in other places of the MainTabGravatar Tomaz Canabrava
Also, added tooltips to the Tab Texts. I need to fix the layout issues of the Equipments, but that's not inside the UI. Things are much more sane now. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix the layout ugliness on Mac & LinuxGravatar Tomaz Canabrava
I seem to have found a sane way to create layouts: If it's the 'outer' layout, the one that encapsulates everything: - Horizontal Spacing: 5 - Vertical Spacing: 5 If it's a vertical inner layout that is grouping items like label + control: - Spacing: 0 This way the label will be 'touching' the item, without empty space, so you know that the label refers to that widget. If it's an horizontal inner layout: - Spacing: 5 Different from the Vertical Layout, we don't want to make horizontal items touch each other, a bit of space is fundamental to the eyes. If it's a Grid Layout: - Vertical Space: 0 - Horizontal Space: 5 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Remove auto layout management from mainwindow.cppGravatar Tomaz Canabrava
While this worked for a bit, it was very error prone as it relied in layout having specific names, and layouts in the .ui files are treated as substandard items. Every time a 'break layout' command is issues (and it's issued quite a lot when trying to reorganize the items on the widget) all layout items are removed and new ones are added later, without any of the names. Since the new layout can be different the old names are not usefull anymore - and a clean compilation won't trigger a single warning either: the name resolution is done at runtime and not at compile time, so it would just fail silently. Instead of brute-forcing each layout to have 0,0 or 5,5 margins, we should put the correct values on the .ui files. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>