| 
    QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
    
   | 
 
The QgsJsonEditWidget is a widget to display JSON data in a code highlighted text or tree form. More...
#include <qgsjsoneditwidget.h>

Public Types | |
| enum class | FormatJson : int { Indented = 0 , Compact = 1 , Disabled = 2 } | 
| Format mode in the text view.  More... | |
| enum class | View : int { Text = 0 , Tree = 1 } | 
| View mode, text or tree.  More... | |
Public Member Functions | |
| QgsJsonEditWidget (QWidget *parent=nullptr) | |
| Constructor for QgsJsonEditWidget.  More... | |
| QString | jsonText () const | 
| Returns the JSON text.  More... | |
| void | setControlsVisible (bool visible) | 
| Set the visibility of controls to visible.  More... | |
| void | setFormatJsonMode (FormatJson formatJson) | 
| Set the formatJson mode.  More... | |
| void | setJsonText (const QString &jsonText) | 
| Set the JSON text in the widget to jsonText.  More... | |
| void | setView (View view) const | 
| Set the view mode.  More... | |
The QgsJsonEditWidget is a widget to display JSON data in a code highlighted text or tree form.
Definition at line 31 of file qgsjsoneditwidget.h.
      
  | 
  strong | 
Format mode in the text view.
| Enumerator | |
|---|---|
| Indented | JSON data formatted with regular indentation.  | 
| Compact | JSON data formatted as a compact one line string.  | 
| Disabled | JSON data is not formatted.  | 
Definition at line 45 of file qgsjsoneditwidget.h.
      
  | 
  strong | 
View mode, text or tree.
| Enumerator | |
|---|---|
| Text | JSON data displayed as text.  | 
| Tree | JSON data displayed as tree. Tree view is disabled for invalid JSON data.  | 
Definition at line 38 of file qgsjsoneditwidget.h.
      
  | 
  explicit | 
Constructor for QgsJsonEditWidget.
| parent | parent widget | 
Definition at line 27 of file qgsjsoneditwidget.cpp.
| QString QgsJsonEditWidget::jsonText | ( | ) | const | 
Returns the JSON text.
Definition at line 95 of file qgsjsoneditwidget.cpp.
| void QgsJsonEditWidget::setControlsVisible | ( | bool | visible | ) | 
Set the visibility of controls to visible.
Definition at line 126 of file qgsjsoneditwidget.cpp.
| void QgsJsonEditWidget::setFormatJsonMode | ( | QgsJsonEditWidget::FormatJson | formatJson | ) | 
| void QgsJsonEditWidget::setJsonText | ( | const QString & | jsonText | ) | 
Set the JSON text in the widget to jsonText.
Definition at line 63 of file qgsjsoneditwidget.cpp.
| void QgsJsonEditWidget::setView | ( | QgsJsonEditWidget::View | view | ) | const |