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>
This commit is contained in:
Eike Ziller
2019-02-15 15:30:52 +01:00
parent 9e965409d1
commit 334c76fd31
12 changed files with 90 additions and 11 deletions

View File

@@ -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());