aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-05-24Updated build instructions for MacOSXGravatar Henrik Brautaset Aronsen
Added info about switching from the MacPorts +quartz packages to +x11, as well as adding the Marble and Qt dependencies. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-24Improve wording in askSaveChanges()Gravatar Henrik Brautaset Aronsen
Don't Save/Cancel/Save is less ambiguous than OK/Cancel/Save. Also being slightly more verbose when creating the QMessageBox. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-24Improve wording on buttons when editing a diveGravatar Henrik Brautaset Aronsen
Use the more familiar Save/Undo instead of OK/reset Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-24Align the trashbin icon to centerGravatar Henrik Brautaset Aronsen
The bin was slightly to the right Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-23Correctly add new weight / cylinder types, even when hitting 'tab'Gravatar Dirk Hohndel
We now detect if a weight / cylinder with this description exists and if not add it on the fly. We also remember the additional values (weight and size / workingpressure) for new entries and take the values for these fields into account when autocompleting. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-23Add weightsystem delegate to enable editing of weightsystemGravatar Dirk Hohndel
This is very much analogous to the way cylinders are implemented. That means that just like with cylinders, if the user enters a new type and hits 'tab' before hitting 'enter', Subsurface will crash. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-23Enable the weightsystem info and move the declarations to dive.hGravatar Dirk Hohndel
Having the tank_info declared in models.cpp seemed unintuitive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-23Remove a compile warningGravatar Dirk Hohndel
It's cleaner to make this a QString, anyeway. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-23Remove obsolete slotsGravatar Dirk Hohndel
The .ui components were removed in commit 0c7a575f7b3b ("Rework on the Equipment tab to make it look more Modern.") but the "automagic" slots were still here. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-23Allow the CylindersModel delegate to pass data in without unit conversionsGravatar Dirk Hohndel
With this we should have tank editing mostly done. See #122 (it's not quite fixed, we need the equivalent code for weight systems) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-23Also changes the size and working pressure of the cylindersGravatar Tomaz Canabrava
this is more a 'Well, this is how we do it' than an actuall good commit. I'm probably using the wrong conversion paradigm ( none ) to convert the data from psi / bar and such, it changes the model with wrong data. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-23Added support for Completing on the Cylinder Type delegateGravatar Tomaz Canabrava
I had to immprove the TankInfoModel with two new methods, insertRows and setData, because the delegate used this model to show what kind of Tanks we are offering. Since the user can enter a new type of Tank, it's important to add this tank to all lists using the delegates. I Also added two new methods on the delegate itself, to correctly shows the data, and set the data on the model. This also will help dirk with a working example on how to edit things while using a delegate. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22Implement default dive computer and deviceGravatar Dirk Hohndel
The data is saved in the settings and the correct dive computer (vendor and product) and device are picked when the download dialog is openend. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-22The never ending, futile fight for whitespace consistencyGravatar Dirk Hohndel
I just need to write a tool that does this... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-22Re-enable dive computer selectiomGravatar Dirk Hohndel
This had been disabled by some redraw optimizations in commit 81406b80c6ec ("Fix loading a second dive, after the first file was loaded."). We need to redraw the plot not only if the dive changed but also if the selected divecomputer changed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-22Start editing Dive Notes when clicking on Rating or VisibilityGravatar Dirk Hohndel
Those widgets respond to MouseButtonPress and not FocusIn. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-22Merge branch 'fixResizeEvent' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-05-22Small fixes to the modelGravatar Dirk Hohndel
Prevent a crash when no cylinder type description is set. Correctly calculate the cylinder volume. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-22Get the math right for cylinder model setData functionGravatar Dirk Hohndel
This is a fun one. We only want to mark the divelist changed if the user actually changed something. So we try really hard to compare what was entered with what was there and only if it is different do we overwrite existing values and record this as a change to the divelist. An additional challenge here is the fact that the user needs to enter a working pressure before they can enter a size (when in cuft mode). That is not really intuitive. We work around this by assuming working pressure is 3000psi if a size is given in cuft - but then if the user changes the working pressure, that changes the volume. Now going back and changing the volume again does the trick. Or enter the working pressure FIRST and then the volume... This also changes the incorrect MAXPRESSURE to WORKINGPRESSURE and uses the text WorkPress in English (Gtk code used MaxPress which was simply wrong - this is just the design pressure or working pressure, not some hard maximum. In fact, people quite commonly "overfill" these tanks. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-22Fixed update the plot as we resize the view.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22Merge branch 'comboBoxDelegate' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-05-22Removed the unused add cylinder and add weigthsystem dialogs.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22Removed unused debug, and set the correct data on the delegates.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22Merge branch 'comboBoxDelegate' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-05-22Added the trash.png file that was missing.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22Actually remove cylinders and weightsystems from the data structuresGravatar Dirk Hohndel
The UI had only stubbed this code out. This adds the implementation of the helpers and calls them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-22Added a Delegate for editing CylindersGravatar Tomaz Canabrava
Now when you edit 'Type', a drop-down list will appear and will enable you to choose from it's contents. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22Shorten the 'set location' textGravatar Dirk Hohndel
The old text was quite verbose and caused issues on smaller screens Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-22Merge branch 'randomFixes' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-05-22Added basic editing functionality for Cylinders and WeigthsystemsGravatar Tomaz Canabrava
This patch adds basic editing functionality for Cylinders and Weigthsystems, it still doesn't use delegates to show the data to the user in a better way, and it does not take in consideration user preferences yet, but it's a starting point. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22Extend a bit the skeleton 'removes' on cylinder and weigth to help dirk.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22Calm down the Globe widgetGravatar Dirk Hohndel
This addresses two issues: - the kMessageWidget did not word wrap, so if it was wider then the Globe widget the Globe would expand (and divelist shrink) when the user switched from a dive with location to a dive without location - the code was also too aggressive removing and redrawing the message widget when switching from dive to dive. with this change we only hide the widget if the next dive has a location (and only show it if it isn't shown already). We also hide the message if no dive is selected. Reported-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-22Added a 'trash' icon on the Cylinders and Weigthsystem modelsGravatar Tomaz Canabrava
So, the Cylinders and Weigthsystems got a new Trash icon, and the interface already intercepts the clicks ( on all columns ) and send this to the 'remove' method on boch models. On the model I'm just filtering the indexes that are not 'DELETE' and creating a stub method to be filled later. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22Disable some MacOSX GTK dependenciesGravatar Henrik Brautaset Aronsen
Now it's actually possible to build the Qt variant on MacOSX with MacPorts and marble support. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-22Only enable the add buttons when there's a dive loadedGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22Re Enable the option to add cylinders / weigthsystems.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22Rework on the Equipment tab to make it look more Modern.Gravatar Tomaz Canabrava
Note that this is a WIP and it does break functionality - ie, not possible to add Equipments, but this will be fixed in the next commit. Removed add / edit / remove buttons, only a single '+' icon appears on the widget now. the edit / delete will be done in place. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22Fixed the 'click in close doesn't close' on KMessageWidget.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-21Replace GError handling with a kMessageWidget based approachGravatar Dirk Hohndel
Instead of passing pointers to GError around we pass just pointers to error message texts around and use kMessageWidget to show those. Problem is that right now the close button on that doesn't do a thing - so the error stays around indefinitely. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-21Remove Gtk crudGravatar Dirk Hohndel
The DEBUGFILE logic isn't needed anymore. Nor are helpers dealing with model / datastructure updates. Nor conditional compiles to use Gtk instead of Qt. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-21Initialize QSettings earlier & change the Organization to "Subsurface"Gravatar Dirk Hohndel
The first change allows the default_filename to be found again. The second change switches us to .config/Subsurface/Subsurface.conf which I find much more useful. QtCreator also fixed a few indentation issues for me. How helpful. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-21Merge branch 'microFixes' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-05-21Removing an kinky settings that I forgot to.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-21Fixed the hide / show columns using the settings.Gravatar Tomaz Canabrava
This also changed a bit the behavior on how the QSettings are managed, till now, we used the QSettings constructor passing the name of the software and the 'company', but this is now default - so there's no need to pass anything by the QSettings contructor. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-21Correctly restore the column sizes in the dive listGravatar Dirk Hohndel
Ordering here is important - we can't resize the columns before they are created. On the other hand this now means that we explicitly need to expand to the first dive shown. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-21Merge branch 'microFixes' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-05-21Added code for handling of show / hide of columns.Gravatar Tomaz Canabrava
The code also remembers to save in the config file. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-21Correctly format the values shown for cylinders and weightsGravatar Dirk Hohndel
Make use of all the nice helpers that we have... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-21Correctly use the weightsystem_none / cylinder_none helpersGravatar Dirk Hohndel
Plus a couple of minor formatting changes Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-21Fixed memory leakGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>