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>
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>
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>
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>
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>
This backs off a little on what was added in commit c1102a38f3 ("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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
"'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>
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>
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>
- 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>
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>
The "Save" and "Cancel" buttons disappeared when scrolling to the
bottom of the notes widget.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>