QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
qgssettingseditorwidgetregistry.h
Go to the documentation of this file.
1/***************************************************************************
2 qgssettingseditorwidgetregistry.h
3 ---------------------
4 begin : April 2023
5 copyright : (C) 2023 by Denis Rouzaud
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
16#ifndef QGSSETTINGSEDITORREGISTRY_H
17#define QGSSETTINGSEDITORREGISTRY_H
18
19#include <QObject>
20#include <QMap>
21
22#include "qgis_gui.h"
23#include "qgis_sip.h"
24
25class QWidget;
28
36{
37 public:
41
46 bool addWrapper( QgsSettingsEditorWidgetWrapper *wrapper SIP_TRANSFER );
47
52 void addWrapperForSetting( QgsSettingsEditorWidgetWrapper *wrapper SIP_TRANSFER, const QgsSettingsEntryBase *setting SIP_KEEPREFERENCE );
53
55 QgsSettingsEditorWidgetWrapper *createWrapper( const QString &id, QObject *parent ) const SIP_FACTORY;
56
58 QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList, QWidget *parent = nullptr ) const SIP_TRANSFERBACK;
59
60 private:
61 QMap<QString, QgsSettingsEditorWidgetWrapper *> mWrappers;
62 QMap<const QgsSettingsEntryBase *, QgsSettingsEditorWidgetWrapper *> mSpecificWrappers;
63};
64
65#endif // QGSSETTINGSEDITORREGISTRY_H
This class manages editor widgets for settings.
Base class for settings editor wrappers.
Represent settings entry and provides methods for reading and writing settings values.
#define SIP_KEEPREFERENCE
Definition qgis_sip.h:86
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_TRANSFERBACK
Definition qgis_sip.h:48
#define SIP_FACTORY
Definition qgis_sip.h:76