aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-12-05Updates to user manualGravatar Willem Ferguson
1) Inserted section on Information Box on dive profile 2) Iserted short section on import from Mares Dive Organiser 3) Corrections to spelling and style not included in previous commits. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05MainWindow: fix setTitle() callsGravatar Lubomir I. Ivanov
setTitle() works with an enum that can be fed different values, and other we may have eventually. For example not only "app title", or "app title: filename", but others, like dates, certain app status and so on. Patch fixes an issue where deleting a single dive in the divelist resets the title to "Subsurface" only. clearUpEmpty() should only call setTitle(MWTF_DEFAULT) if no file is currently open. It also adds a safe-guard to revert back to MWTF_DEFAULT if no file is open but setTitle is called with MWTF_FILENAME. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05Print: fix truncated table in "Table print" modeGravatar Lubomir I. Ivanov
The whole procedure here is quite confusing. Once we have our model populated, we need to estimate where to put page headers (each page has one) and to do that we store a list of indexes, where a page would begin (pageIndexes). But since a row can end up being chopped at the end of a page we move it to a new page and this particular part was lacking compensation for the moved row's height, when storing the *last* pageIndex. For N number of pages we are losing N - 1 dives, or such that were previously transferred on a new page. See #326 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05Open external links in default browserGravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05User manual spelling fixesGravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04Different Icon for a Bookmark Event.Gravatar Tomaz Canabrava
This patch adds a different icon for a Bookmark Event, and it also cleaned a lot of code. :) See #300 [Dirk Hohndel: made the two icons slightly bigger] Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04Fixes positioning of the legend in View and Print modes.Gravatar Tomaz Canabrava
This patch makes a better assumption of the location for the legend in both View and Print modes. It also fixes a few oddities that we used to have ( like hardcoded spacing ). We are taking the scene().sceneRect() now into consideration to better place it on canvas. Fixes: #322 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04Compile fixGravatar Dirk Hohndel
Otherwise errno is undefined (at least for me on Linux). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04Merge branch 'improve-subsurfaceweb' of ↵Gravatar Dirk Hohndel
git://github.com/thiagomacieira/subsurface
2013-12-04Cleanup some uninitialized variablesGravatar Anton Lundin
I can't really see any point in passing a local loop variable around, and copying a uninitialized pointer. Better use local variables there and let the compiler optimize them away if it feels for doing that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04Add some limits to the GF'sGravatar Anton Lundin
Sets the limit for GF's in the preferences panel to 1<=x<=150 and color it read if gf > 100. Remove the % in the diveplanner view that was rejected for the preferences view. The 150 maximum is needed because QSpinBox defaults to maximum 99. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04Webservices: fix QString argument for zip_open()Gravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-04Allow comma separated CSV filesGravatar Dirk Hohndel
The separator selector in the CSV import dialog was unused. This passes the value into the xslt and adds ',' as possible value. I'm sure this could be done much better (pass the actual character instead of the index), but I couldn't get that to work and this does seem to do the trick. Also added a test dive to test this feature. Fixes #321 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04Improve labeling for partial pressure graphsGravatar Dirk Hohndel
This backs off a little on what was added in commit c1102a38f359 ("More gradient on the partial pressure graph.") - the numbers simply got too busy. I also slightly changed the positioning of the numbers to be a little more "natural looking". Fixes #323 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04Make Gnome3 be bearableGravatar Tomaz Canabrava
The layout of Subsurface on Gnome 3 had a few flaws, since Qt and Gtk are not really compatible. This implements a CSS that makes the use of Gnome 3 more pleasant to the eyes. Fixes #318 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04subsurface user manual updateGravatar Willem Ferguson
References to literature on gradient factors changed (see dive profile section, also preferences section) Section on preference settings added. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04Divelist: fix a crash when updating the preferencesGravatar Lubomir I. Ivanov
Hitting apply in the preferences dialog causes a QList assert. This led to DiveListView::reloadHeaderActions(), where we have an out of range access. Patch makes the column count match the header action count. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04PrintDialog: reset the progress bar each time the dialog opensGravatar Lubomir I. Ivanov
This requires us to expose the progressBar as a private class member. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04Print: fix some forward declarationsGravatar Lubomir I. Ivanov
In the PrintLayout constructor we receive a pointer of PrintDialog, but the type is incomplete, as we only forward declare it in the class header. If we decide to eventually call a method from PrintDialog we also need to include printdialog.h in printlayout.cpp. The patch also fixes a similar issue in printdialog.h. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04PrintLayout: emit progress from printTable()Gravatar Lubomir I. Ivanov
printTable() now emits a 'signalProgress' to the PrintDialog's progress bar, but it has 3 stages (loops): - pupulate a model - process all rows - render the table in pages This requires that we also separate the progress in 3 stages of 33%. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04PrintLayout: emit progress from printProfileDives()Gravatar Lubomir I. Ivanov
printProfileDives() now emits a 'signalProgress' each time a dive is done processing. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04PrintLayout: add estimateTotalDives()Gravatar Lubomir I. Ivanov
estimateTotalDives() is used to calculate the total dives to be printed, it requires a 'struct dive' pointer and a couple of 'int' pointers for the iterator 'i' and 'total' return. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04PrintDialog: add a 'Close' buttonGravatar Lubomir I. Ivanov
The dialog was missing a 'Close' button so we add it. Also change the mnemonic of the 'Preview' button, as it was the same as the one for print 'Print'. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04PrintDialog: make the dialog slightly largerGravatar Lubomir I. Ivanov
I don't recall why but this dialog ended with a fixed size (setFixedSize()), so it has to be re-adjusted each time a change is made in there. We resize it to compensate for the addition of the progress bar. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04PrintDialog: add separate Preview/Print buttonsGravatar Lubomir I. Ivanov
We rename our old 'Print' button to 'Preview' (as it did just that), and add a new one called 'Print' which does the direct printing, by creating a QPrintDialog instance. Both buttons are located on top of the dialog for now in a QHBoxLayout. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04PrintDialog: change a commentGravatar Lubomir I. Ivanov
The entire dialog is 'temporary' and should be replaced, so we slightly modify the comment about the PrintOptions widget. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04PrintDialog: add a progress bar in the dialogGravatar Lubomir I. Ivanov
This dialog will be eventually replaced by a better one, but for now we can add a progress bar to it. Next step would be to add separate Print/Preview buttons and emit progress bar updates from the PrintLayout class. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-03Correct parameter namesGravatar Dirk Hohndel
It's very confusing when a parameter is called "minutes" but holds seconds... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03Fix bug in creating dive plan from diveGravatar Dirk Hohndel
We don't want to add the last sample - the dive plan functions want to figure out the path to the surface by themselves and get confused by this. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03Attempt to fix the 'click goes to 0,0' thing on the globe.Gravatar Tomaz Canabrava
This patch attempts to fix the 'click goes to 0,0' bug on the globe. it moves a bit of code around and I particulary don't like the way that we are dealing with 'EditMode', I think I'll refactor that for 4.1. We are alredy dealing with a bunch of states, maybe a State Machine will help on removing code-complexity. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03Select the newly added dive after adding it.Gravatar Tomaz Canabrava
Selects the newly added dive after adding it, it uses a rather ugly hack that forced a unselected dive to be marked as 'selected' so we can remember what was the newly added dive, and select it after. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03Disable calc_ndl_tts for printGravatar Anton Lundin
NDL and TTS doesn't show up in the printed profiles, and it takes significant time to calculate, so just don't do it. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03Don't call fixup_dive when editing a tripGravatar Dirk Hohndel
When editing a trip the key for the notesBackup is NULL. Don't call fixup_dive() on that... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03Implement the network part of the support for divelogs.deGravatar Thiago Macieira
This implements support for: * uploading a zip file containing dives - untested (the zip file must have been prepared elsewhere) * downloading the dive list and the dive XML files The networking part is finished, but it's missing the actual import of the XML files sent by divelogs.de. Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03Make the text in the download status selectableGravatar Thiago Macieira
So I can copy any URLs it shows there in order to test elsewhere... Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03Add support for timing the download outGravatar Thiago Macieira
The time out is 30 seconds from the start of the request or from the last time we got any data from the server. Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03Set the download reply pointer to NULL after dismissing itGravatar Thiago Macieira
QNetworkReply might emit signals after it's been told to go away. We don't want to change the status after that. Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03Properly reset the state of the download dialog before dismissingGravatar Thiago Macieira
Re-enable buttons that should be enabled by default, disable the others, set the status to empty, make the progress bar go back to zero. Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03Improve the status message in the download dialogGravatar Thiago Macieira
This also fixes a typo (untill -> until). Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03webservices: Move the static functions to the top of the fileGravatar Thiago Macieira
Just my OCD asserting itself. It looks cleaner this way, if the static functions aren't interleaved in the middle of the WebServices class. Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03Make the QNetworkAccessManager a singleton available to allGravatar Thiago Macieira
One of the rules of using QNetworkAccessManager is to share it among all users, since sockets and other state can be shared. Looks like Marble doesn't allow us to set it, though, and it creates multiple instances. I'll prepare an upstream patch to fix that sometime. Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03General fixes and improvementsGravatar Thiago Macieira
2013-12-03Whitespace: fix indentation in subsurfacewebservices.* to use tabsGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-03Update to user manualGravatar Willem Ferguson
Made changes to dive profile section. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03qmake: use real tabs for all .pri filesGravatar Lubomir I. Ivanov
subsurface.pro already useses that. For consistency with the app, we use swap 4 spaces with a tab character for indentation. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03qmake: fix a 'GIT_DIR' issueGravatar Lubomir I. Ivanov
"'GIT_DIR' is not recognized as an internal or external command", is reported if qmake is runned on Win32. To solve that we set a explicit syntax for Win32 that uses "Set.." Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03qmake: Fix unescaped backslashes issuesGravatar Lubomir I. Ivanov
We need to espace the backslash with '\\' on win32. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03Make sure the save/cancel message is always shownGravatar Henrik Brautaset Aronsen
An addition to the "Move dive notes edit message above the scrollable widget" commit: Make sure the save/cancel message is always displayed on top, regardless of which tab is selected. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03Text cleanup to amend lacking consistencyGravatar Henrik Brautaset Aronsen
- Removed the "Visible:" header on the column selector. It doesn't have to be there, and it's not in the similar equipment column selector - PO2 --> pO₂ (and others) - Use same initial case in the units selector in preferences Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03Add legend for the Partial Gass Pressure if active.Gravatar Tomaz Canabrava
This patch adds legend for the partial gass pressures if the graphs are active. when enabling / disabling the square that represents the color of a gas will also appear / disappear. Fixes: #272 [Dirk Hohndel: minor changes to layout and whitespace] Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>