QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
qgssettingsregistrygui.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgssettingsregistrygui.cpp
3 --------------------------------------
4 Date : July 2021
5 Copyright : (C) 2021 by Damiano Lombardi
6 Email : damiano at opengis dot ch
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
17
18#include "qgsapplication.h"
21
23
26{
27
28 // copy values from old keys to new keys and delete the old ones
29 // for backward compatibility, old keys are recreated when the registry gets deleted
30
31 // single settings - added in 3.30
32 settingsRespectScreenDPI->copyValueFromKey( QStringLiteral( "gui/qgis/respect_screen_dpi" ), {}, true );
33
34
35}
36
38{
39 // TODO QGIS 4.0: Remove
40 // backward compatibility for settings
41 settingsRespectScreenDPI->copyValueToKeyIfChanged( QStringLiteral( "gui/qgis/respect_screen_dpi" ) );
42
43}
44
bool copyValueFromKey(const QString &key, bool removeSettingAtKey=false) const
Copies the value from a given key if it exists.
void copyValueToKeyIfChanged(const QString &key, const QStringList &dynamicKeyPartList=QStringList()) const
Copies the settings to the given key, if it has changed during the current QGIS session (see hasChang...
A boolean settings entry.
static const QgsSettingsEntryBool * settingsRespectScreenDPI
Settings entry respect screen dpi.
QgsSettingsRegistry is used for settings introspection and collects a list of child QgsSettingsRegist...
static QgsSettingsTreeNode * sTreeGui