diff options
author | jan Iversen <jani@apache.org> | 2018-08-15 11:56:17 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-15 16:11:39 -0700 |
commit | 0f68e0cc2e6e9c4d4e07b065888b9982086748e7 (patch) | |
tree | f1fc7bb8778bbac553f79a142099cace64f72aef /desktop-widgets/printer.cpp | |
parent | c6998ee92680f2724c2a6adbb4c7a06c9bae0633 (diff) | |
download | subsurface-0f68e0cc2e6e9c4d4e07b065888b9982086748e7.tar.gz |
desktop-widget: remove SettingsObjectWrapper and update qPref calls
remove use of SettingsObjectWrapper::
remove include of SettingsObjectWrapper.h
use qPrefFoo:: for setters and getters
replace prefs.foo with qPrefXYZ::foo() where feasible
(this expands to the same code, but gives us more control
over the variable).
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'desktop-widgets/printer.cpp')
-rw-r--r-- | desktop-widgets/printer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/desktop-widgets/printer.cpp b/desktop-widgets/printer.cpp index 64acf81c0..6d3af39e9 100644 --- a/desktop-widgets/printer.cpp +++ b/desktop-widgets/printer.cpp @@ -3,6 +3,7 @@ #include "templatelayout.h" #include "core/statistics.h" #include "core/qthelper.h" +#include "core/settings/qPrefAnimations.h" #include <algorithm> #include <QPainter> @@ -135,7 +136,7 @@ void Printer::render(int Pages = 0) // keep original preferences QPointer<ProfileWidget2> profile = MainWindow::instance()->graphics(); int profileFrameStyle = profile->frameStyle(); - int animationOriginal = prefs.animation_speed; + int animationOriginal = qPrefAnimations::animation_speed(); double fontScale = profile->getFontPrintScale(); double printFontScale = 1.0; @@ -143,7 +144,7 @@ void Printer::render(int Pages = 0) profile->setFrameStyle(QFrame::NoFrame); profile->setPrintMode(true, !printOptions->color_selected); profile->setToolTipVisibile(false); - prefs.animation_speed = 0; + qPrefAnimations::set_animation_speed(0); // render the Qwebview QPainter painter; @@ -201,7 +202,7 @@ void Printer::render(int Pages = 0) #else profile->resize(originalSize); #endif - prefs.animation_speed = animationOriginal; + qPrefAnimations::set_animation_speed(animationOriginal); //replot the dive after returning the settings profile->plotDive(0, true, true); |