diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-02-15 15:30:52 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-02-21 13:26:06 +0000 |
commit | 334c76fd31f98d95dff94f059da90a118c4ea6be (patch) | |
tree | 0d1fd04a7e5630644dc9d4903d61ea22769c3e51 /src/plugins/help/localhelpmanager.cpp | |
parent | 9e965409d1cbe6270c6a994bfe41d61a154d1d77 (diff) |
Help viewer: Add option for scroll wheel zooming
Fixes: QTCREATORBUG-14154
Change-Id: Ia6c4aedb78954614477f0228ba82c4dc476a2525
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/help/localhelpmanager.cpp')
-rw-r--r-- | src/plugins/help/localhelpmanager.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/help/localhelpmanager.cpp b/src/plugins/help/localhelpmanager.cpp index 3f698f2f284..140aa4a9350 100644 --- a/src/plugins/help/localhelpmanager.cpp +++ b/src/plugins/help/localhelpmanager.cpp @@ -65,6 +65,7 @@ static const char kFontSizeKey[] = "Help/FallbackFontSize"; static const char kStartOptionKey[] = "Help/StartOption"; static const char kContextHelpOptionKey[] = "Help/ContextHelpOption"; static const char kReturnOnCloseKey[] = "Help/ReturnOnClose"; +static const char kUseScrollWheelZooming[] = "Help/UseScrollWheelZooming"; static const char kLastShownPagesKey[] = "Help/LastShownPages"; static const char kLastShownPagesZoomKey[] = "Help/LastShownPagesZoom"; static const char kLastSelectedTabKey[] = "Help/LastSelectedTab"; @@ -225,6 +226,17 @@ void LocalHelpManager::setReturnOnClose(bool returnOnClose) emit m_instance->returnOnCloseChanged(); } +bool LocalHelpManager::isScrollWheelZoomingEnabled() +{ + return Core::ICore::settings()->value(kUseScrollWheelZooming, true).toBool(); +} + +void LocalHelpManager::setScrollWheelZoomingEnabled(bool enabled) +{ + Core::ICore::settings()->setValue(kUseScrollWheelZooming, enabled); + emit m_instance->scrollWheelZoomingEnabledChanged(enabled); +} + QStringList LocalHelpManager::lastShownPages() { const QVariant value = Core::ICore::settings()->value(kLastShownPagesKey, QVariant()); |