@@ -39,6 +39,25 @@ class CORE_EXPORT QgsSettingsEntryVariant : public QgsSettingsEntryByReference<Q
39
39
* The \a defaultValue argument specifies the default value for the settings entry.
40
40
* The \a description argument specifies a description for the settings entry.
41
41
* The \a options argument specifies the options for the settings entry.
42
+ * \since QGIS 3.30
43
+ */
44
+ QgsSettingsEntryVariant ( const QString &key,
45
+ QgsSettingsTreeElement *parent,
46
+ const QVariant &defaultValue = QVariant(),
47
+ const QString &description = QString(),
48
+ Qgis::SettingsOptions options = Qgis::SettingsOptions() )
49
+ : QgsSettingsEntryByReference( key, parent, defaultValue, description, options ) SIP_THROW( QgsSettingsException )
50
+ {}
51
+
52
+ /* *
53
+ * Constructor for QgsSettingsEntryVariant.
54
+ *
55
+ * The \a key argument specifies the final part of the settings key.
56
+ * The \a parent argument specifies the parent in the tree of settings.
57
+ * The \a defaultValue argument specifies the default value for the settings entry.
58
+ * The \a description argument specifies a description for the settings entry.
59
+ * The \a options argument specifies the options for the settings entry.
60
+ * \since QGIS 3.30
42
61
*/
43
62
QgsSettingsEntryVariant ( const QString &key,
44
63
const QString §ion,
@@ -64,9 +83,9 @@ class CORE_EXPORT QgsSettingsEntryVariant : public QgsSettingsEntryByReference<Q
64
83
const QString &pluginName,
65
84
const QVariant &defaultValue = QVariant(),
66
85
const QString &description = QString(),
67
- Qgis::SettingsOptions options = Qgis::SettingsOptions() );
86
+ Qgis::SettingsOptions options = Qgis::SettingsOptions() ) SIP_THROW( QgsSettingsException ) SIP_TRANSFER ;
68
87
% MethodCode
69
- sipCpp = new sipQgsSettingsEntryVariant( QgsSettingsEntryVariant( *a0, QStringLiteral( " plugins/%1 " ).arg ( *a1 ), *a2, *a3, *a4 ) );
88
+ sipCpp = new sipQgsSettingsEntryVariant( QgsSettingsEntryVariant( *a0, QgsSettings::createPluginTreeElement ( *a1 ), *a2, *a3, *a4 ) );
70
89
% End
71
90
#endif
72
91
@@ -88,6 +107,29 @@ class CORE_EXPORT QgsSettingsEntryString : public QgsSettingsEntryByReference<QS
88
107
{
89
108
public:
90
109
110
+ /* *
111
+ * Constructor for QgsSettingsEntryString.
112
+ *
113
+ * The \a key argument specifies the final part of the settings key.
114
+ * The \a parent argument specifies the parent in the tree of settings.
115
+ * The \a defaultValue argument specifies the default value for the settings entry.
116
+ * The \a description argument specifies a description for the settings entry.
117
+ * The \a options arguments specifies the options for the settings entry.
118
+ * The \a minLength argument specifies the minimal length of the string value. 0 means no limit.
119
+ * The \a maxLength argument specifies the maximal length of the string value. -1 means no limit.
120
+ */
121
+ QgsSettingsEntryString ( const QString &key,
122
+ QgsSettingsTreeElement *parent,
123
+ const QString &defaultValue = QString(),
124
+ const QString &description = QString(),
125
+ Qgis::SettingsOptions options = Qgis::SettingsOptions(),
126
+ int minLength = 0 ,
127
+ int maxLength = -1 ) SIP_THROW( QgsSettingsException )
128
+ : QgsSettingsEntryByReference<QString>( key, parent, defaultValue, description, options )
129
+ , mMinLength ( minLength )
130
+ , mMaxLength ( maxLength )
131
+ {}
132
+
91
133
/* *
92
134
* Constructor for QgsSettingsEntryString.
93
135
*
@@ -106,11 +148,10 @@ class CORE_EXPORT QgsSettingsEntryString : public QgsSettingsEntryByReference<QS
106
148
Qgis::SettingsOptions options = Qgis::SettingsOptions(),
107
149
int minLength = 0 ,
108
150
int maxLength = -1 ) SIP_MAKE_PRIVATE
109
- : QgsSettingsEntryByReference<QString>( key, section, defaultValue, description, options )
151
+ : QgsSettingsEntryByReference<QString>( key, section, defaultValue, description, options ) SIP_MAKE_PRIVATE
110
152
, mMinLength ( minLength )
111
153
, mMaxLength ( maxLength )
112
- {
113
- }
154
+ {}
114
155
115
156
#ifdef SIP_RUN
116
157
@@ -130,9 +171,9 @@ class CORE_EXPORT QgsSettingsEntryString : public QgsSettingsEntryByReference<QS
130
171
const QString &description = QString(),
131
172
Qgis::SettingsOptions options = Qgis::SettingsOptions(),
132
173
int minLength = 0,
133
- int maxLength = -1 );
174
+ int maxLength = -1 ) SIP_THROW( QgsSettingsException ) SIP_TRANSFER ;
134
175
% MethodCode
135
- sipCpp = new sipQgsSettingsEntryString( QgsSettingsEntryString( *a0, QStringLiteral( " plugins/%1 " ).arg ( *a1 ), *a2, *a3, *a4 ) );
176
+ sipCpp = new sipQgsSettingsEntryString( QgsSettingsEntryString( *a0, QgsSettings::createPluginTreeElement ( *a1 ), *a2, *a3, *a4 ) );
136
177
% End
137
178
#endif
138
179
@@ -183,6 +224,23 @@ class CORE_EXPORT QgsSettingsEntryStringList : public QgsSettingsEntryByReferenc
183
224
{
184
225
public:
185
226
227
+ /* *
228
+ * Constructor for QgsSettingsEntryStringList.
229
+ *
230
+ * The \a key argument specifies the final part of the settings key.
231
+ * The \a parent argument specifies the parent in the tree of settings.
232
+ * The \a defaultValue argument specifies the default value for the settings entry.
233
+ * The \a description argument specifies a description for the settings entry.
234
+ * The \a options arguments specifies the options for the settings entry.
235
+ */
236
+ QgsSettingsEntryStringList ( const QString &key,
237
+ QgsSettingsTreeElement *parent,
238
+ const QStringList &defaultValue = QStringList(),
239
+ const QString &description = QString(),
240
+ Qgis::SettingsOptions options = Qgis::SettingsOptions() )
241
+ : QgsSettingsEntryByReference( key, parent, defaultValue, description, options ) SIP_THROW( QgsSettingsException )
242
+ {}
243
+
186
244
/* *
187
245
* Constructor for QgsSettingsEntryStringList.
188
246
*
@@ -198,8 +256,8 @@ class CORE_EXPORT QgsSettingsEntryStringList : public QgsSettingsEntryByReferenc
198
256
const QString &description = QString(),
199
257
Qgis::SettingsOptions options = Qgis::SettingsOptions() ) SIP_MAKE_PRIVATE
200
258
: QgsSettingsEntryByReference( key, section, defaultValue, description, options )
201
- {
202
- }
259
+ {}
260
+
203
261
204
262
#ifdef SIP_RUN
205
263
@@ -217,9 +275,9 @@ class CORE_EXPORT QgsSettingsEntryStringList : public QgsSettingsEntryByReferenc
217
275
const QString &pluginName,
218
276
const QStringList &defaultValue = QStringList(),
219
277
const QString &description = QString(),
220
- Qgis::SettingsOptions options = Qgis::SettingsOptions() );
278
+ Qgis::SettingsOptions options = Qgis::SettingsOptions() ) SIP_THROW( QgsSettingsException ) SIP_TRANSFER ;
221
279
% MethodCode
222
- sipCpp = new sipQgsSettingsEntryStringList( QgsSettingsEntryStringList( *a0, QStringLiteral( " plugins/%1 " ).arg ( *a1 ), *a2, *a3, *a4 ) );
280
+ sipCpp = new sipQgsSettingsEntryStringList( QgsSettingsEntryStringList( *a0, QgsSettings::createPluginTreeElement ( *a1 ), *a2, *a3, *a4 ) );
223
281
% End
224
282
#endif
225
283
@@ -242,6 +300,23 @@ class CORE_EXPORT QgsSettingsEntryBool : public QgsSettingsEntryByValue<bool>
242
300
{
243
301
public:
244
302
303
+ /* *
304
+ * Constructor for QgsSettingsEntryBool.
305
+ *
306
+ * The \a key argument specifies the final part of the settings key.
307
+ * The \a parent argument specifies the parent in the tree of settings.
308
+ * The \a defaultValue argument specifies the default value for the settings entry.
309
+ * The \a description argument specifies a description for the settings entry.
310
+ * The \a options arguments specifies the options for the settings entry.
311
+ */
312
+ QgsSettingsEntryBool ( const QString &key,
313
+ QgsSettingsTreeElement *parent,
314
+ bool defaultValue = false ,
315
+ const QString &description = QString(),
316
+ Qgis::SettingsOptions options = Qgis::SettingsOptions() ) SIP_THROW( QgsSettingsException )
317
+ : QgsSettingsEntryByValue( key, parent, defaultValue, description, options )
318
+ {}
319
+
245
320
/* *
246
321
* Constructor for QgsSettingsEntryBool.
247
322
*
@@ -275,9 +350,9 @@ class CORE_EXPORT QgsSettingsEntryBool : public QgsSettingsEntryByValue<bool>
275
350
const QString &pluginName,
276
351
bool defaultValue = false ,
277
352
const QString &description = QString(),
278
- Qgis::SettingsOptions options = Qgis::SettingsOptions() );
353
+ Qgis::SettingsOptions options = Qgis::SettingsOptions() ) SIP_THROW( QgsSettingsException ) SIP_TRANSFER ;
279
354
% MethodCode
280
- sipCpp = new sipQgsSettingsEntryBool( QgsSettingsEntryBool( *a0, QStringLiteral( " plugins/%1 " ).arg ( *a1 ), a2, *a3, *a4 ) );
355
+ sipCpp = new sipQgsSettingsEntryBool( QgsSettingsEntryBool( *a0, QgsSettings::createPluginTreeElement ( *a1 ), a2, *a3, *a4 ) );
281
356
% End
282
357
#endif
283
358
@@ -304,6 +379,30 @@ class CORE_EXPORT QgsSettingsEntryInteger : public QgsSettingsEntryByValue<qlong
304
379
* Constructor for QgsSettingsEntryInteger.
305
380
*
306
381
* The \a key argument specifies the final part of the settings key.
382
+ * The \a parent argument specifies the parent in the tree of settings.
383
+ * The \a defaultValue argument specifies the default value for the settings entry.
384
+ * The \a description argument specifies a description for the settings entry.
385
+ * The \a options arguments specifies the options for the settings entry.
386
+ * The \a minValue argument specifies the minimal value.
387
+ * The \a maxValue argument specifies the maximal value.
388
+ */
389
+ QgsSettingsEntryInteger ( const QString &key,
390
+ QgsSettingsTreeElement *parent,
391
+ qlonglong defaultValue = 0 ,
392
+ const QString &description = QString(),
393
+ Qgis::SettingsOptions options = Qgis::SettingsOptions(),
394
+ qlonglong minValue = std::numeric_limits<qlonglong>::min(),
395
+ qlonglong maxValue = std::numeric_limits<qlonglong>::max() ) SIP_THROW( QgsSettingsException )
396
+ : QgsSettingsEntryByValue( key, parent, defaultValue, description, options )
397
+ , mMinValue ( minValue )
398
+ , mMaxValue ( maxValue )
399
+ { }
400
+
401
+ /* *
402
+ * Constructor for QgsSettingsEntryInteger.
403
+ *
404
+ * The \a parent argument specifies the parent in the tree of settings.
405
+ * The \a key argument specifies the final part of the settings key.
307
406
* The \a section argument specifies the section.
308
407
* The \a defaultValue argument specifies the default value for the settings entry.
309
408
* The \a description argument specifies a description for the settings entry.
@@ -343,9 +442,9 @@ class CORE_EXPORT QgsSettingsEntryInteger : public QgsSettingsEntryByValue<qlong
343
442
const QString &description = QString(),
344
443
Qgis::SettingsOptions options = Qgis::SettingsOptions(),
345
444
qlonglong minValue = std::numeric_limits<qlonglong>::min(),
346
- qlonglong maxValue = std::numeric_limits<qlonglong>::max() );
445
+ qlonglong maxValue = std::numeric_limits<qlonglong>::max() ) SIP_THROW( QgsSettingsException ) SIP_TRANSFER ;
347
446
% MethodCode
348
- sipCpp = new sipQgsSettingsEntryInteger( QgsSettingsEntryInteger( *a0, QStringLiteral( " plugins/%1 " ).arg ( *a1 ), a2, *a3, *a4, a5, a6 ) );
447
+ sipCpp = new sipQgsSettingsEntryInteger( QgsSettingsEntryInteger( *a0, QgsSettings::createPluginTreeElement ( *a1 ), a2, *a3, *a4, a5, a6 ) );
349
448
% End
350
449
#endif
351
450
@@ -398,6 +497,35 @@ class CORE_EXPORT QgsSettingsEntryDouble : public QgsSettingsEntryByValue<double
398
497
/* *
399
498
* Constructor for QgsSettingsEntryDouble.
400
499
*
500
+ * The \a parent argument specifies the parent in the tree of settings.
501
+ * The \a key argument specifies the final part of the settings key.
502
+ * The \a section argument specifies the section.
503
+ * The \a defaultValue argument specifies the default value for the settings entry.
504
+ * The \a description argument specifies a description for the settings entry.
505
+ * The \a options arguments specifies the options for the settings entry.
506
+ * The \a minValue argument specifies the minimal value.
507
+ * The \a maxValue argument specifies the maximal value.
508
+ * The \a displayDecimals specifies an hint for the gui about how much decimals to show
509
+ * for example for a QDoubleSpinBox.
510
+ */
511
+ QgsSettingsEntryDouble ( const QString &key,
512
+ QgsSettingsTreeElement *parent,
513
+ double defaultValue = 0.0 ,
514
+ const QString &description = QString(),
515
+ Qgis::SettingsOptions options = Qgis::SettingsOptions(),
516
+ double minValue = std::numeric_limits<double >::lowest(),
517
+ double maxValue = std::numeric_limits<double >::max(),
518
+ int displayDecimals = 1 ) SIP_THROW( QgsSettingsException )
519
+ : QgsSettingsEntryByValue( key, parent, defaultValue, description, options )
520
+ , mMinValue ( minValue )
521
+ , mMaxValue ( maxValue )
522
+ , mDisplayHintDecimals ( displayDecimals )
523
+ {}
524
+
525
+ /* *
526
+ * Constructor for QgsSettingsEntryDouble.
527
+ *
528
+ * The \a parent argument specifies the parent in the tree of settings.
401
529
* The \a key argument specifies the final part of the settings key.
402
530
* The \a section argument specifies the section.
403
531
* The \a defaultValue argument specifies the default value for the settings entry.
@@ -444,9 +572,9 @@ class CORE_EXPORT QgsSettingsEntryDouble : public QgsSettingsEntryByValue<double
444
572
Qgis::SettingsOptions options = Qgis::SettingsOptions(),
445
573
double minValue = std::numeric_limits<double>::lowest(),
446
574
double maxValue = std::numeric_limits<double>::max(),
447
- int displayDecimals = 1 );
575
+ int displayDecimals = 1 ) SIP_THROW( QgsSettingsException ) SIP_TRANSFER ;
448
576
% MethodCode
449
- sipCpp = new sipQgsSettingsEntryDouble( QgsSettingsEntryDouble( *a0, QStringLiteral( " plugins/%1 " ).arg ( *a1 ), a2, *a3, *a4, a5, a6, a7 ) );
577
+ sipCpp = new sipQgsSettingsEntryDouble( QgsSettingsEntryDouble( *a0, QgsSettings::createPluginTreeElement ( *a1 ), a2, *a3, *a4, a5, a6, a7 ) );
450
578
% End
451
579
#endif
452
580
@@ -512,6 +640,23 @@ class CORE_EXPORT QgsSettingsEntryColor : public QgsSettingsEntryByReference<QCo
512
640
{
513
641
public:
514
642
643
+ /* *
644
+ * Constructor for QgsSettingsEntryColor.
645
+ *
646
+ * The \a key argument specifies the final part of the settings key.
647
+ * The \a parent argument specifies the parent in the tree of settings.
648
+ * The \a defaultValue argument specifies the default value for the settings entry.
649
+ * The \a description argument specifies a description for the settings entry.
650
+ * The \a options arguments specifies the options for the settings entry.
651
+ */
652
+ QgsSettingsEntryColor ( const QString &key,
653
+ QgsSettingsTreeElement *parent,
654
+ const QColor &defaultValue = QColor(),
655
+ const QString &description = QString(),
656
+ Qgis::SettingsOptions options = Qgis::SettingsOptions() ) SIP_THROW( QgsSettingsException )
657
+ : QgsSettingsEntryByReference( key, parent, defaultValue, description, options )
658
+ {}
659
+
515
660
/* *
516
661
* Constructor for QgsSettingsEntryColor.
517
662
*
@@ -545,9 +690,9 @@ class CORE_EXPORT QgsSettingsEntryColor : public QgsSettingsEntryByReference<QCo
545
690
const QString &pluginName,
546
691
const QColor &defaultValue = QColor(),
547
692
const QString &description = QString(),
548
- Qgis::SettingsOptions options = Qgis::SettingsOptions() );
693
+ Qgis::SettingsOptions options = Qgis::SettingsOptions() ) SIP_THROW( QgsSettingsException ) SIP_TRANSFER ;
549
694
% MethodCode
550
- sipCpp = new sipQgsSettingsEntryColor( QgsSettingsEntryColor( *a0, QStringLiteral( " plugins/%1 " ).arg ( *a1 ), *a2, *a3, *a4 ) );
695
+ sipCpp = new sipQgsSettingsEntryColor( QgsSettingsEntryColor( *a0, QgsSettings::createPluginTreeElement ( *a1 ), *a2, *a3, *a4 ) );
551
696
% End
552
697
#endif
553
698
@@ -569,9 +714,29 @@ class CORE_EXPORT QgsSettingsEntryVariantMap : public QgsSettingsEntryByReferenc
569
714
{
570
715
public:
571
716
717
+
718
+ /* *
719
+ * Constructor for QgsSettingsEntryVariantMap.
720
+ *
721
+ * The \a key argument specifies the final part of the settings key.
722
+ * The \a parent argument specifies the parent in the tree of settings.
723
+ * The \a defaultValue argument specifies the default value for the settings entry.
724
+ * The \a description argument specifies a description for the settings entry.
725
+ * The \a options arguments specifies the options for the settings entry.
726
+ */
727
+ QgsSettingsEntryVariantMap ( const QString &key,
728
+ QgsSettingsTreeElement *parent,
729
+ const QVariantMap &defaultValue = QVariantMap(),
730
+ const QString &description = QString(),
731
+ Qgis::SettingsOptions options = Qgis::SettingsOptions() ) SIP_THROW( QgsSettingsException )
732
+ : QgsSettingsEntryByReference( key, parent, defaultValue, description, options )
733
+ {
734
+ }
735
+
572
736
/* *
573
737
* Constructor for QgsSettingsEntryVariantMap.
574
738
*
739
+ * The \a parent argument specifies the parent in the tree of settings.
575
740
* The \a key argument specifies the final part of the settings key.
576
741
* The \a section argument specifies the section.
577
742
* The \a defaultValue argument specifies the default value for the settings entry.
@@ -603,9 +768,9 @@ class CORE_EXPORT QgsSettingsEntryVariantMap : public QgsSettingsEntryByReferenc
603
768
const QString &pluginName,
604
769
const QVariantMap &defaultValue = QVariantMap(),
605
770
const QString &description = QString(),
606
- Qgis::SettingsOptions options = Qgis::SettingsOptions() );
771
+ Qgis::SettingsOptions options = Qgis::SettingsOptions() ) SIP_THROW( QgsSettingsException ) SIP_TRANSFER ;
607
772
% MethodCode
608
- sipCpp = new sipQgsSettingsEntryVariantMap( QgsSettingsEntryVariantMap( *a0, QStringLiteral( " plugins/%1 " ).arg ( *a1 ), *a2, *a3, *a4 ) );
773
+ sipCpp = new sipQgsSettingsEntryVariantMap( QgsSettingsEntryVariantMap( *a0, QgsSettings::createPluginTreeElement ( *a1 ), *a2, *a3, *a4 ) );
609
774
% End
610
775
#endif
611
776
0 commit comments