aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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>
2013-05-21Added support for visualization the Weigthssystems on the Equipment Tab.Gravatar Tomaz Canabrava
This patch adds support showing and for editing weigthsystems in the equipment tab, so, now the two things that are missing are 'edit' and 'delete', wich are quite easy to do. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-21Added the code to show the cylinders from a dive.Gravatar Tomaz Canabrava
i Added the code to show the cylinders from a dive, this code also already permits additions from the interface, so the user can click 'add' and insert what he wants there. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-20Implement rudimentary divecomputer downloadGravatar Dirk Hohndel
Small changes to the names of elements the divecomputer download UI and very simplistic first stab at populating the device_data_t structure. This is lacking lots of things - it should remember the last vendor / product used - it should figure out which device (mount point) to offer - it needs proper error handling But it's a step in the right direction. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-20Populate the Vendor && Dive computer information.Gravatar Tomaz Canabrava
This uses the QStringListModel to populate the items of the QComboBoxes. I used a QHash to hold every Computer of a particular Vendor. so, products[vendor] gives me the full list of products from each vendor. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-20Added code to cancel the thread.Gravatar Tomaz Canabrava
I think it's self explanatory - When user clicks on 'Cancel', the interface will wait for the trhead to quit then will close itself. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-20Skeleton code for a non-blocking UI thread for downloading dives from the DCGravatar Tomaz Canabrava
This is the skeleton code for a non-blocking ui-thread It already creates the first-thread ( 'do not block the ui' ) and the second thread ('download from the dive computer') We can in the future merge both in the same place - I didn't want to do that now because the download function is written in the libdivecomputer.c code, and I cant just transform that to a QThread and use signals, so I used two threads for that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-20Detect libdivecomputer using pkg-config if possibleGravatar Miika Turkia
If libdivecomputer is managed by pkg-config, we should query it for the compiler parameters on Linux also. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-20Integrate visibility Star widget into editing flowGravatar Dirk Hohndel
This also removes some incorrect code from the clear() function for the DiveInfo tab. Putting the readOnly() calls for the DiveNotes tab there was wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-20Move visibility Star widget to the DiveNotes tabGravatar Dirk Hohndel
This looks much better and seems much more contextual. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Display the statisticsGravatar Dirk Hohndel
This would be correct if the current selection code wasn't broken. Right now we only add to our internal notion of what is selected - we never deselect anything. Once that is fixed, thestatistics should be correctly displayed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Try to add a StarWidget for visibilityGravatar Dirk Hohndel
It's not editable. And of course it continues to look like utter crap - even more so now since this is left aligned and everything else is centered. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Close needs to clear the Globe and the DiveNotesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19When no dive is displayed, the DiveNotes field should not be editableGravatar Dirk Hohndel
This also fixes a potential crash if no dives were loaded and the user started editing the fields and clicked OK. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Replace glib file/directory handling with equivalent Qt codeGravatar Dirk Hohndel
I hope this is indeed equivalent... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Implenent file_save and file_save_asGravatar Dirk Hohndel
This allows us to do the right thing at exit (and also connects to more of the menu actions to actually do something). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Show the correct question at exit when there are unsaved changesGravatar Dirk Hohndel
We want to give the user the option to 'cancel' and not exit the program, to 'save' the file, or to say I'm 'OK' with losing the unsaved data. This does NOT implement the actual save / save-as, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Figure out if the user changed anything when editingGravatar Dirk Hohndel
And mark the divelist changed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Rename buttons for dive editGravatar Dirk Hohndel
The old names made sense in the initial model (where you'd click on the edit button to start an edit). The new names seem much more natural given what we do now. Also a tiny code cleanup removing a redundant if statement. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Make direct edit the style of choiceGravatar Dirk Hohndel
Plus minor coding style fixes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Fix edit behaviorGravatar Dirk Hohndel
Commit 7b00668b400b ("Improve the Dirk edit mode.") had what looks like an "autocomplete" typo. This also stops us from changing the text on the button that in this edit mode is always just the "OK" button. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Merge branch 'chooseEditMode' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-05-19Continue populating the DiveInfo tabGravatar Dirk Hohndel
Pulled one more helper from statistics-gtk.c (but didn't modify the code there to use it as that code is no longer being compiled). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Improve the Dirk edit mode.Gravatar Tomaz Canabrava
The dirk edit mode will be triggered as soon as the user clicks on the field that he wants to edit. then he can edit all fields, till he press ok / reset. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-19Made possible to choose the edit style on compile timeGravatar Tomaz Canabrava
This is just a for choosing the default edit style in the future. I prefer the new edit style as the user is sure what the hell is going on ( ie - if he chooses to edit, he is editing, there's a message warning him that he is editing and everything else is blocked till he finishes editing. ) and the GTK version is 'edit whenever I feel like', wich I think is more unsafe but dirk asked me to put an option and let the others choose. e Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-19Removed unused GTK calls onto the Qt versionGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Make the Text on the DiveList be 30% smaller than other textGravatar Tomaz Canabrava
This makes the DiveList be similiar to the GTK one, comparing the size of the text. The current code makes text on the table be 30% smaller. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-18While editing the left button is renamed to "OK" to accept the changesGravatar Dirk Hohndel
This seemed more logical than keeping it as "edit" and basically having to hit "edit" a second time in order to save a change. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-18Make impossible to change dives while editing one.Gravatar Tomaz Canabrava
This is to prevent loss of data, so if the user is editing something, either cancel the edition or save it, to continue moving around on the Dive List. - Only the dive list is affected, user can still play with the globe and the profile. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-18Add a variable for the Marble library nameGravatar Thiago Macieira
I need that for a Marble installed somewhere other than the linker's default search path. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-18Detect the presence of the missing Marble header by compiling itGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-18Remove QT_NO_KEYWORDS for goodGravatar Thiago Macieira
We're now using external libraries that aren't keywords-clean (namely, Marble). Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-18Added option to edit the selected dive.Gravatar Tomaz Canabrava
Added option to edit the selected dive. Now the user can click on 'Edit', and a nice box will appear stating that the dive is in edit mode, and the user can edit all of the 'Notes' tab fields, including the rating. When the edition is finished, the user needs to click on 'edit' again to mark as accepted, or in reset to reset the fields to it's original state Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-18Work around broken Marble on DebianGravatar Dirk Hohndel
This is a major hack. Debian appears to be missing a necessary header file for Marble to work correctly. We include this header file for now and hack the Configure process to recognize that we are on Debian and force using our local copy of the header file in that case. This may be needed on Ubuntu as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-18Update README with warning about incomplete state of Qt portGravatar Dirk Hohndel
Also pointing out the issue with building on Debian / Ubuntu at this stage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-17Updates to the lists of supported dive computersGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>