File tree Expand file tree Collapse file tree 6 files changed +23
-7
lines changed
python/gui/auto_generated Expand file tree Collapse file tree 6 files changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,16 @@ class QgsAttributeForm : QWidget
44
44
45
45
const QgsFeature &feature();
46
46
47
- void displayWarning( QString message );
47
+ void displayWarning( const QString& message );
48
+ %Docstring
49
+ Displays a warning message in the form message bar
50
+
51
+ :param message: message string
52
+
53
+ .. seealso:: :py:func:`mode`
54
+
55
+ .. versionadded:: 3.12
56
+ %End
48
57
49
58
50
59
void hideButtonBox();
Original file line number Diff line number Diff line change @@ -360,7 +360,7 @@ class GUI_EXPORT QgsEditorWidgetWrapper : public QgsWidgetWrapper
360
360
*/
361
361
bool setFormFeatureAttribute ( const QString &attributeName, const QVariant &attributeValue );
362
362
363
- protected :
363
+ private :
364
364
365
365
/* *
366
366
* Is called, when the value of the widget needs to be changed. Update the widget representation
Original file line number Diff line number Diff line change @@ -203,12 +203,12 @@ void QgsTextEditWrapper::setFeature( const QgsFeature &feature )
203
203
{
204
204
// Do nothing if the value has not changed
205
205
if ( mInvalidJSON )
206
- mForm ->displayWarning ( tr ( " Your JSON is invalid and will be reverted back to what was in the datastore before editing " ) );
206
+ mForm ->displayWarning ( tr ( " Your JSON is invalid and will be reverted back to the last valid edit or the original data " ) );
207
207
{
208
208
mInvalidJSON = false ;
209
209
}
210
210
setFormFeature ( feature );
211
- setValue ( feature.attribute ( mFieldIdx ) );
211
+ setValue ( feature.attribute ( fieldIdx () ) );
212
212
}
213
213
214
214
void QgsTextEditWrapper::updateValues ( const QVariant &val, const QVariantList & )
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ class GUI_EXPORT QgsTextEditWrapper : public QgsEditorWidgetWrapper
74
74
75
75
public slots:
76
76
void setEnabled ( bool enabled ) override ;
77
- void setFeature ( const QgsFeature &feature );
77
+ void setFeature ( const QgsFeature &feature ) override ;
78
78
79
79
private slots:
80
80
void textChanged ( const QString &text );
Original file line number Diff line number Diff line change @@ -591,7 +591,7 @@ void QgsAttributeForm::pushSelectedFeaturesMessage()
591
591
}
592
592
}
593
593
594
- void QgsAttributeForm::displayWarning ( QString message )
594
+ void QgsAttributeForm::displayWarning ( const QString& message )
595
595
{
596
596
mMessageBar ->pushMessage ( QString (),
597
597
message,
Original file line number Diff line number Diff line change @@ -75,7 +75,14 @@ class GUI_EXPORT QgsAttributeForm : public QWidget
75
75
76
76
const QgsFeature &feature () { return mFeature ; }
77
77
78
- void displayWarning ( QString message );
78
+ /* *
79
+ * Displays a warning message in the form message bar
80
+ * \param message message string
81
+ * \see mode()
82
+ * \since QGIS 3.12
83
+ *
84
+ */
85
+ void displayWarning ( const QString& message );
79
86
80
87
// TODO QGIS 4.0 - make private
81
88
You can’t perform that action at this time.
0 commit comments