Commit graph

11 commits

Author SHA1 Message Date
Lubomir I. Ivanov
21585403db Printing: add 1 dive per page option
With this option there is an exception, which makes the notes section of
the profile table occupy half the page. This way dive plans can reasonably
be printed.

Fixes #636

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-24 11:33:28 -07:00
Lubomir I. Ivanov
6e4ebe3c54 Print: remove the height sliders from the PrintOptions class
These were hidden and we don't really support them because
our print layouting is not that flexible in Qt!

Note: printoptions.ui is now converted to UNIX line breaks.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-18 10:20:00 -07:00
Tomaz Canabrava
89816f64c2 Headers cleanup.
Too much noise on the headers, this commit remove uneeded
headers when they are uneeded.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26 15:47:02 -07:00
Dirk Hohndel
76e6420f6b Massive automated whitespace cleanup
I know everyone will hate it.
Go ahead. Complain. Call me names.
At least now things are consistent and reproducible.
If you want changes, have your complaint come with a patch to
scripts/whitespace.pl so that we can automate it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 20:09:57 -08:00
Boris Barbulovski
ccb1c33d02 Put include guard to every header
* ensure include guard to every header
* comment endif guard block

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-11 12:37:01 -08:00
Thiago Macieira
8e81d3f100 Make the classes generated by uic be real members of our classes
This means we don't have to new/delete them, which is a waste of
overhead.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-03 12:13:48 -07:00
Thiago Macieira
f0f76056ac Include the ui_*.h headers in the main headers.
This means we can also remove the forward declarations.

This is the first step in removing the memory allocation for the ui
sub-classes. Without the second step, this commit is just making the
compilation time increase for no good reason :-)

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-03 12:13:15 -07:00
Lubomir I. Ivanov
af1c55c29d Print: move some header includes to cpp files
We don't really need includes of display.h and dive.h in
printoptions.h and printlayout.h or forward declartions
of 'struct dive' and 'struct options' in there.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-07-11 00:45:29 +03:00
Lubomir I. Ivanov
74f989bc46 Print: connect all the options widgets to slots
By connecting to slots we always modify values at a previously
set 'struct options' pointer.

Also have the setup of slots and pre-set values in a
separate setup(struct options *) function.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-07-10 11:06:01 +03:00
Lubomir I. Ivanov
2c7a208bc1 Print: label update on height slider move
The PrintOptions widget has value labels next to the
horizontal sliders. Add slots to update these labels
when a slider moves.

Patch also makes a modification so that the PrintOptions
constructor requires a 'struct options' pointer. If
an options struct is not received we do not set predefined
values and do not connect signals to slots, where
options will be updated immediately.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-07-10 09:57:24 +03:00
Lubomir I. Ivanov
52534bfb68 Print: add UI for a print dialog
PrintOptions is a QWidget class to be used as an
addition to a future print dialog (possibly based on
QPrintDialog). Currently only contains a couple of
radio buttons.

PrintDialog (printdialog.cpp/h) which is a basic QDialog
is currently added for testing only and it holds
an instance of PrintOptions.

Calling File->Print opens this test dialog for now.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-07-09 21:01:42 +03:00