These complete the ability to select languages from the preferences panel.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds a filter option to the Language Chooser.
if you choose filter, only the filtered options will appear.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This was Dirk's mistake when applying the patch.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
1) Several layout changes including banner.
2) Stylistic revision of part of textr.
3) Addition of text to dive computer upload section.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The code that should set the preferences was actually retrieving it,
this will correctly set it.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When the user first opens the application the default language is
selected; this can be changed to a hardcoded one by going to system
preferences and choosing the one you want.
Restart required.
Fixes#136
[Dirk Hohndel: whitespace fixes, removed qDebug() call, rephrased the
message displayed prompting the user to restart.]
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We do not support rows larger than a single page as the
PrintLayout algorithm will enter an infinite loop,
therefore we put a limit of 15 lines for the location text.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch improves the algorithm when estimating where
to put the new page header in the table and how we move
larger dive rows on a new page. It now performs a couple of
'passes', where the first one processes the table and the
second one is used to compensate for the lost space.
Fixes#326
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A first try on documenting the companion app and explanation on how to use
it combined with Subsurface.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Dirk had done most of the work already. I just needed to add some
trickery to install the system translations in case cross-mingw32
didn't provide it.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This was the easiest: all the file names are already in a variable and
we don't need to install the Qt translations since we're using a system
Qt.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The install rule that qmake generates was of the form:
-$(INSTALL_DIR) icons packaging/windows/icons
The first time you run make install, packaging/windows/icons doesn't
exist, so /usr/bin/install understands it as the name to be given to the
dir being installed. However, when you run make install a second time,
/usr/bin/install understands it as the target directory, so it copies
icons into the packaging/windows/icons dir.
We need to teach qmake not to add the dir name. Inspecting the source
code reveals:
if(fi.isDir() && project->isActiveConfig("copy_dir_files")) {
if(!dst_file.endsWith(Option::dir_sep))
dst_file += Option::dir_sep;
dst_file += fi.fileName();
}
This option is enabled by default on all the win32-* targets.
So if we remove the "copy_dir_files" config, it won't append the source
name. The qmake manual says this about that option: "Enables the install
rule to also copy directories, not just files.", which doesn't help us
much. Probably just stale documentation.
Fixes#325
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
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>
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>
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>