QGIS API Documentation 3.41.0-Master (af5edcb665c)
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 // copy values from old keys to new keys and delete the old ones
28 // for backward compatibility, old keys are recreated when the registry gets deleted
29
30 // single settings - added in 3.30
31 settingsRespectScreenDPI->copyValueFromKey( QStringLiteral( "gui/qgis/respect_screen_dpi" ), {}, true );
32}
33
35{
36 // TODO QGIS 4.0: Remove
37 // backward compatibility for settings
38 settingsRespectScreenDPI->copyValueToKeyIfChanged( QStringLiteral( "gui/qgis/respect_screen_dpi" ) );
39}
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