Commit graph

9 commits

Author SHA1 Message Date
Robert C. Helling
e27653374d Add printing option for page orientation
Strangely enough, half of the infrastructure was
already there, it just wasn't hooked up to a UI
element

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2023-03-28 21:08:37 -07:00
Berthold Stoeger
0cbb448740 cleanup: make templateOptions and printOptions reference types
These two structs describe options used during printing.
They are passed through numerous classes as pointer. In this
case, reference semantics are preferred, as references:
 - can never be null
 - can not change during their lifetime
This not only helps the compiler, as it can optimize away null
checks, but also your fellow coder. Moreover, it prevents
unintentional creation of uninitialized references: one can't
create an instance of a class without initializing a reference
member. It does not prevent references from going dangling.
However, pointers have the same disadvantage.

Contains a few whitespace cleanups.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-17 13:03:56 -08:00
Robert C. Helling
8f6d054140 Set printer resolution
You need a better resolution to plot a picture with high resolution...

Connection done with a lambda expression thanks to @dirkhh.

Signed-off-by: Robert C. Helling <helling@atdotde.de> (+1 squashed commit)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-03 11:46:16 -07:00
Berthold Stoeger
30230dce10 Cleanup: remove all Q_NULLPTR instances
It expands to nullptr anyway and is inconsitent with the rest of the
code. Let's remove this anachronism.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-02 07:34:46 -07:00
Jan Mulder
9836f57598 cleanup: Uninitialized pointer field
CID 208292

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-12-29 09:14:20 -08:00
Lubomir I. Ivanov
a2ec791f2f printing: store the last import / export template
Store the last template file name which the user
imported / exported and then try to pre-select
it in the combo box.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-24 21:50:16 +02:00
Dirk Hohndel
9021a44ccc Add SPDX header to desktop widgets
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29 13:32:55 -07:00
Lubomir I. Ivanov
e8c918622f Printing: support the "Border width" setting for templates
Going to "Template -> Edit" now has a field to enter the
border width (in pixels as only that makes sense in CSS as a flexible
unit, TMK).

This field modifies the template_options.borderwidth Grantlee
property which is part of the bundled templates already
and allows the users to modify the borders of tables.

The C++ implementation was missing, while the HTML (template)
implementation was already in place. Overlooked during GSoC.

Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-06 20:08:39 -08:00
Tomaz Canabrava
e49d6213ad Move qt-ui to desktop-widgets
Since we have now destkop and mobile versions, 'qt-ui' was a very
poor name choice for a folder that contains only destkop-enabled
widgets.

Also, move the graphicsview-common.h/cpp to subsurface-core because
it doesn't depend on qgraphicsview, it merely implements all the
colors that we use throughout Subsurface, and we will use colors on both
desktop and mobile versions

Same thing applies for metrics.h/cpp

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30 10:36:49 -07:00
Renamed from qt-ui/printoptions.h (Browse further)