Commit graph

987 commits

Author SHA1 Message Date
Lubomir I. Ivanov
a60475d336 Print: adjustments to font sizes and alignment
The new profile table requires different alignment and
different font sizes for specific cells.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-11-30 15:41:18 +02:00
Lubomir I. Ivanov
f85b434ef1 Print: update drawing of the profile table grid
The new table layout requires that we draw the vertical
and horizontal lines differently.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-11-30 15:32:14 +02:00
Lubomir I. Ivanov
3b7500fd33 Print: setup for a new profile table layout
- Adjust the new rows and column count
- Set new row and column spans

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-11-30 15:32:14 +02:00
Dirk Hohndel
d668f5dc8e Turn off dive location edit hint when cancelling dive edit
Simply clear the edited dive (regardless of whether it's set) and hide the
message if visible. The previous code was a little too convoluted...

Fixes #305

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 13:12:44 -08:00
Dirk Hohndel
499554e799 Removed another unused text
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 12:11:12 -08:00
Dirk Hohndel
ff5fa70a88 Editing air or water temperature should modify dive computer, not dive
The dive fields are summary fields, the actual data needs to be in the
divecomputer specific fields.

Fixes #307
2013-11-29 12:05:21 -08:00
Dirk Hohndel
d936c55a01 Make sure Subsurface will find Marble theme when installed on Linux
We need the marble data to go into a subdirectory of /usr/share/subsurface
and we need to search for both data and marbledata when trying to find the
theme.

Fixes #310

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 11:46:41 -08:00
Dirk Hohndel
766b6b3e52 Don't call deleteLater on ui elements
I'll admit that I don't fully understand this part of Qt.
But commenting out the deleteLater (like we already do for another one)
fixes the crash - and shouldn't do more than add a potential small memory
leak.

Fixes #309

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 11:39:36 -08:00
Dirk Hohndel
7c28cb989b Make sure Subsurface webservice user id is always uppercase
Otherwise the download will fail.

Fixes #308

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 11:36:06 -08:00
Dirk Hohndel
82ac264815 Remove more unused windowTitle properties
These just create pointless source strings for translations.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 11:02:15 -08:00
Dirk Hohndel
adf6d1e22d Units should be lower case
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 10:20:10 -08:00
Dirk Hohndel
b76a947878 Don't use lowercase 'o' for O2
That just looks odd

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 10:16:47 -08:00
Dirk Hohndel
f1cfaa6c08 Fix incorrect string for PPO2
It's easy to miss 02 vs O2 (I guess that's depending on your screen font).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 10:09:14 -08:00
Dirk Hohndel
a4e6826d15 Remove pointless window title
Otherwise it shows up in the strings to be translated

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 10:06:55 -08:00
Sergey Starosek
f24748253c Redesign CSV import dialog.
This fixes groupbox alignment and dialog resize issues.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 08:10:50 -08:00
Sergey Starosek
0f7037a92f Remove duplicate verb in 'SAC' label
'Show' verb is already shown in the groupbox title and no other
labels have it.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 08:10:12 -08:00
Sergey Starosek
b57b36e662 Fix dialog titles
Use proper names instead of "Dialog"

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 08:07:26 -08:00
Tomaz Canabrava
f8c2efe1ce Fixes ToolTip Item showing out of boundaries tooltips
This patch fixes ToolTip Item showing out of boundaries
Tooltips when in resizing animation.

Fixes #294

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28 15:29:01 -08:00
Tomaz Canabrava
3264255a7a Make it possible to hide some columns on the Cylinders Equipment pane.
This patch makes it possible to hide some columns on the Cylinders
Equipment pane. The 'remove' and 'type' are impossible to hide,
since they are the most important ones for a non-tech diver.

Fixes #281

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28 15:28:15 -08:00
Tomaz Canabrava
c1102a38f3 More gradient on the partial pressure graph.
This patch adds a bit more of gradient on the lines for the partal
pressure graph grid, it also moves a tiny bit to the side the
even numbers so it's easyer to read when they are too near each other.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28 15:27:18 -08:00
Anton Lundin
57fb878b41 Show/save weights up to and including last valid
Previous show and save code would have aborted at the first invalid
weight system. This makes sure we save and show all weight systems up
until and including the last valid.

If we had:
integrated: 1kg
belt: 2kg
ankle: 3kg

And changed belt to 0 kg, we would have only saved integrated 1kg, and
nothing about the belt or the ankle weights. This will save all of them,
and show all of them.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 14:13:47 -08:00
Anton Lundin
ab4115791b Show cylinders up to and including the last valid
Previous code aborted at the first invalid cylinder. This instead finds
the last valid and prints all the ones up until that one.

Fixes #295

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 14:13:02 -08:00
Dirk Hohndel
579c566bbe Rephrase tooltip
This seems to better explain what the button does.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 10:06:30 -08:00
Dirk Hohndel
cc91cad890 Make sure we keep our notion of what's selected in sync with the UI
When editing a dive, a group of dives or a trip we need to make sure that
we don't lose track of which dives and trips were selected. Otherwise we
might act on dives that DON'T appear selected in the UI but that we think
are still selected.

Fixes #304

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 08:39:47 -08:00
Anton Lundin
3fd39a7a87 Remove some constants and use helpers instead
We have allot of helpers, use them instead of local variants.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 08:30:12 -08:00
Tomaz Canabrava
c94101dd4f Changing the preferences should update the Add Dive interface
Since all internal units are in mm we needed to only update what's shown
on the interface.

Fixes #299

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26 12:28:16 -08:00
Tomaz Canabrava
97fd22b1be Fixes the positioning of the ToolBar
This is a workaround, I plan to remove that toolbar from inside
of the Profile for the next version, but since it's there for now,
let's keep it.

This patch hides the toolbar when the zoomLevel != 0, since the
profile is unclickable while zoomed...

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26 11:25:50 -08:00
Tomaz Canabrava
e175b1d1ab Remember Trip Selection.
This patch remembers the trip selection across the Dive Tree Model.
It's a tiny bit big because we used to have a variable 'selected
trips' that's now calculed dynamically - this is more future proof.

This is a start of Un-cluttering the view ( for 4.1 I hope to reduce the
code in this class to nearly a half. )

Fixes #303

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26 11:25:50 -08:00
Tomaz Canabrava
e91a1fc26c Fix ToolTip disappeared when resizing the ProfileWindow
When resizing the ProfileWindow and the tooltip was out of
boundaries, it was really out of boundaries and there was
no way to get it back ( besides re-expanding the window. )
this patch moves the tooltip to (0,0) and don't save that
position, so when the window is re-expanded, it will move to
the correct location again

Fixes #237

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26 11:25:50 -08:00
Vinicius Machado
45f716f857 Re-enable adding a location to selected dive via double-click on the map
The fix for 'double click on the map shouldn't zoom' had broken the
selection of the current location for the selected dive, this patch
fixes that.

See #291

Signed-off-by: Vinicius Machado <vsmachado@gmail.com>
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26 11:25:16 -08:00
Dirk Hohndel
eec732548b Switch tab title to Trip Notes when handling a trip
And switch back to Dive Notes when back to looking at a dive. This makes
things more consistent...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-25 11:05:09 -08:00
Anton Lundin
d0fbfc7a9c Create a drop down to choose default cylinder
This also renames the ui element to match.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-24 15:07:25 -08:00
Miika Turkia
ce525bd285 Adding trip based statistics
This adds trip based statistics to the Yearly Statistics
view.

Signed-off-by: Miika Turkia <miika.turkia@nixu.fi>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-23 22:07:18 -08:00
Dirk Hohndel
904c20feef Use the default cylinder if defined
With this every cylinder downloaded from a divecomputer that doesn't
provide cylinder data, and every cylinder manually added anywhere will
default to the default cylinder that is set in the preferences.

For people who most of the time dive with the same equipment (always on
dive boats with AL80, or almost always diving their personal HP119) this
should be a nice improvement.

If you don't like this behavior, simply leave the default cylinder setting
in the preferences empty.

This commit also fixes the incorrect s->value call (should be
s->setValue). I wonder what this did to the default filename before...

Fixes #145

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-23 22:01:11 -08:00
Dirk Hohndel
8e5c222e98 Create a text entry for default cylinder in preferences
We don't do anything with this just yet.
And frankly, a drop down of the cylinders that we know of would be even
better. But hey, it's a start.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-23 22:01:11 -08:00
Taiane Ramos
450fd9c7bd Save button on menu calls InfoWidget save
When editing a dive and clicking save button on menu bar, it saved
dive information but didn't mark dive as not being edited anymore.
For closing file, user should always click on the save button on
the bottom of the page and then saving it.
Now when clicking save button on menu bar, it will call the
accept_changes before saving to disk.

Signed-off-by: exhora <exhora.tat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 21:39:20 -08:00
Dirk Hohndel
781266bf18 Work around QPlainTextEdit / QPainter bug on Mac
Actually, it's not so much "work around", it's just "disable our eye candy" for
tags on Mac. This is quite frustrating. When we do anything that has the
QPainter touch the widget from our GroupedLineEdit::paintEvent() path then the
QPlainTextEdit::paintEvent() doesn't render the text of the tags.

Fixes #298

Sort of.
But I guess tag text without eye candy is better than eye candy without tag text.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 09:44:28 -08:00
Tomaz Canabrava
a3ddb16d88 Hide everything 'floatable' by default on the globe.
Later we spacifically enable the scale, but Dirk asked me to
use the bare minimum of marble.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:40:56 -08:00
Tomaz Canabrava
abc81fbd01 Disables zooming by double click and context menu on marble.
Marble is a weird piece of Qt software, it seems that it wasn't
thought of being a library when first written. Most of its features
are not achieved by subclassing && overriding one of Qt default methods,
instead we need to eventFilter for almost everything ( which is a pain,
and a bit error prone - see our combo box delegate *puke*. )

This one's ready,  only one thing though - if we want to implement
our own context menu, we will need to use the eventFilter, and not
the contextMenuEvent.

Fixes #291

[Dirk Hohndel: this does not disable the context menu for me...]

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:40:32 -08:00
Tomaz Canabrava
6fd0087a27 Show user-hidden widget when choosing Show All
A user could have hiddden and lost any of the four panels
on the interface. Now when he chooses 'show all', if a
part of the interface is hidden, it will be shown again.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:35:10 -08:00
Tomaz Canabrava
7ed2fde778 Small code cleanup on the CylindersModel
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:35:03 -08:00
Tomaz Canabrava
cdac737925 Better positioning of the text on Weightsystems table.
Same as the cylinder, but for weightsystem.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:34:45 -08:00
Tomaz Canabrava
bc461d091c Added a bunch of tooltips where I thought it was sane.
I think we should actually fill the app with tooltips and
whatsthis hints. justsain ;p

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:34:24 -08:00
Tomaz Canabrava
cee021ddd3 Better positioning of the text on the table cells.
Better positioning of the text on the table cells. On KDE systems the
text got too near the line that divided the cells, this way the text is
placed on the middle of the cell.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:33:49 -08:00
Tomaz Canabrava
0f85243cf3 Fixes the correct sizes of the tables when first open.
This patch fixes the correct sizes of the tables when first opened. It was
defaulting to 'resizeToContents', but most of the cases when first opened
we got no content, and this was bad. Now I'm defaulting to 30 when on the
'REMOVE' column and 80 on other columns.

Fixes #189

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:32:53 -08:00
Anton Lundin
891892cde4 Cleanup and bugfix gaschange event printing
When a gaschange to air happened, the code did
name += name=+ tr("air") which probably was due to the block being just
confusing with all the ?:
Unrolls to proper if statements, and fixes the bug.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:54:34 -08:00
Anton Lundin
26656310ab Add optional support for stopdepth import from csv
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:54:28 -08:00
Anton Lundin
5eccd73a30 Add optional support for cns import from csv files
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:54:21 -08:00
Anton Lundin
8dde12fa35 Add optional support for po2 import from csv files
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:54:16 -08:00
Anton Lundin
8e60f3bb44 Give room for more options in csv dialog
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:54:00 -08:00