aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/printoptions.cpp
AgeCommit message (Collapse)Author
2020-09-03Set printer resolutionGravatar Robert C. Helling
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>
2019-04-12replace deprecated qSort() with std::sort()Gravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2018-06-04Cleanup: fold core/helpers.h into core/qthelper.hGravatar Berthold Stoeger
helpers.h included qthelper.h and all functions declared in helpers.h were defined in qthelper.h. Therefore fold the former into the latter, since the split seems completely arbitrary. While doing so, change the return-type of get_dc_nichname from "const QString" to "QString". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-28Fix typo connot > cannot.Gravatar Martin Měřinský
Signed-off-by: Martin Měřinský <mermar@centrum.cz>
2017-11-24printing: detect a 'statistics' template when editingGravatar Lubomir I. Ivanov
Prefix the path for 'statistics' templates when detecting if a template is read-only. Import / Export for statistic templates is not supported. So the user has to manually copy and chown a '/statistics' templates. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-24printing: handle overwriting in import / exportGravatar Lubomir I. Ivanov
Show an error message if trying to: 1) Import over an existing read-only template with the same name 2) Export to a read-only file with the same name 3) Delete a read-only template Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-24printing: make sure that exported templates are .htmlGravatar Lubomir I. Ivanov
Thus far the exported template did not had the .html extension. This patch makes sure that the extension is always added to the file if missing. Also handle the case where the user used ".htm" and replace that with ".html". Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-24printing: store the last import / export templateGravatar Lubomir I. Ivanov
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-24printing: improve messaging in printoptions.cppGravatar Lubomir I. Ivanov
1) on_deleteButton_clicked() show a proper message box with icon title and also quote the file name. 2) When exporting a file, make sure that the destination is not read-only even if the source is. 3) Do not allow editing of read-only templates (e.g. the bundled ones). Instruct the user to Export first. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-24printing: minor improvements to import / exportGravatar Lubomir I. Ivanov
1) Always open the user path on Import / Export 2) Update the list after Export, as the user might have exported to the user path Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-04Correct, cleanup, translate and unify file filtersGravatar Stefan Fuchs
Correct spelling and typos in file filters. Unify and translate file filter names. Don't pass a file filter to a directory open dialog - not needed. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-19printoptions.cpp: correctly remember the last selected templateGravatar Lubomir I. Ivanov
To find the last selected template index in the combo box, comparing against `printOptions->p_template` would work fine, except the `on_printTemplate_currentIndexChanged()` slot updates `printOptions->p_template` each time QComboBox::addItem() is called. This makes the `for` loop to add new combo box items and find the index of the last selected template not possible. To work around the issue, a local QString variable `storedTemplate` is introduced and it does not change during the `for` loop. Fixes #595 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-04-29Add SPDX header to desktop widgetsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05Fix include pathsGravatar Linus Torvalds
As expected, commit 7be962bfc287 ("Move subsurface-core to core and qt-mobile to mobile-widgets") caused some breakage. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08Don't if true then trueGravatar Tomaz Canabrava
Set the values directly, seems much more sane. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08Simplify code on the printingDialogGravatar Tomaz Canabrava
instead of duplicate the code that only chaged the QList that it would access, create a temporary list and use it for dealing with the code. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move qt-ui to desktop-widgetsGravatar Tomaz Canabrava
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>