| 
    QGIS API Documentation 3.99.0-Master (f78f5286a64)
    
   | 
 
A wizard to edit metadata on a map layer. More...
#include <qgsmetadatawidget.h>

Public Types | |
| enum | Mode { LayerMetadata = 0 , ProjectMetadata } | 
| Widget modes.  More... | |
Public Slots | |
| void | setTitle (const QString &title) | 
| Sets the title field for the metadata.   | |
Signals | |
| void | titleChanged (const QString &title) | 
| Emitted when the title field is changed.   | |
Public Member Functions | |
| QgsMetadataWidget (QWidget *parent SIP_TRANSFERTHIS=nullptr, QgsMapLayer *layer=nullptr) | |
| Constructor for the wizard.   | |
| void | acceptMetadata () | 
| Saves the metadata to the layer.   | |
| bool | checkMetadata () | 
| Check if values in the wizard are correct.   | |
| void | crsChanged () | 
| If the CRS is updated.   | |
| QgsAbstractMetadataBase * | metadata () SIP_FACTORY | 
| Returns a QgsAbstractMetadataBase object representing the current state of the widget.   | |
| Mode | mode () const | 
| Returns the widget's current mode.   | |
| void | saveMetadata (QgsAbstractMetadataBase *metadata) | 
| Save all fields in a metadata object.   | |
| void | setMapCanvas (QgsMapCanvas *canvas) | 
| Sets a map canvas associated with the widget.   | |
| void | setMetadata (const QgsAbstractMetadataBase *metadata) | 
| Sets the metadata to display in the widget.   | |
| void | setMode (Mode mode) | 
| Sets the widget's current mode.   | |
| QString | title () const | 
| Returns the current title field for the metadata.   | |
Static Public Member Functions | |
| static QMap< QString, QString > | parseLanguages () | 
| Returns a list of languages available by default in the wizard.   | |
| static QStringList | parseLicenses () | 
| Returns a list of licences available by default in the wizard.   | |
| static QStringList | parseLinkTypes () | 
| Returns a list of link types available by default in the wizard.   | |
| static QStringList | parseMimeTypes () | 
| Returns a list of MIME types available by default in the wizard.   | |
| static QMap< QString, QString > | parseTypes () | 
| Returns a list of types available by default in the wizard.   | |
Properties | |
| QString | title | 
A wizard to edit metadata on a map layer.
Definition at line 40 of file qgsmetadatawidget.h.
Widget modes.
| Enumerator | |
|---|---|
| LayerMetadata | Show layer metadata.  | 
| ProjectMetadata | Show project metadata.  | 
Definition at line 50 of file qgsmetadatawidget.h.
| QgsMetadataWidget::QgsMetadataWidget | ( | QWidget *parent | SIP_TRANSFERTHIS = nullptr,  | 
        
| QgsMapLayer * | layer = nullptr  | 
        ||
| ) | 
Constructor for the wizard.
If layer is set, then this constructor automatically sets the widget's metadata() to match the layer's metadata..
Definition at line 35 of file qgsmetadatawidget.cpp.
| void QgsMetadataWidget::acceptMetadata | ( | ) | 
Saves the metadata to the layer.
Definition at line 1032 of file qgsmetadatawidget.cpp.
| bool QgsMetadataWidget::checkMetadata | ( | ) | 
Check if values in the wizard are correct.
Definition at line 830 of file qgsmetadatawidget.cpp.
| void QgsMetadataWidget::crsChanged | ( | ) | 
If the CRS is updated.
Definition at line 332 of file qgsmetadatawidget.cpp.
| QgsAbstractMetadataBase * QgsMetadataWidget::metadata | ( | ) | 
Returns a QgsAbstractMetadataBase object representing the current state of the widget.
Caller takes ownership of the returned object.
Definition at line 211 of file qgsmetadatawidget.cpp.
      
  | 
  inline | 
Returns the widget's current mode.
Definition at line 78 of file qgsmetadatawidget.h.
      
  | 
  static | 
Returns a list of languages available by default in the wizard.
Definition at line 876 of file qgsmetadatawidget.cpp.
      
  | 
  static | 
Returns a list of licences available by default in the wizard.
Definition at line 919 of file qgsmetadatawidget.cpp.
      
  | 
  static | 
Returns a list of link types available by default in the wizard.
Definition at line 943 of file qgsmetadatawidget.cpp.
      
  | 
  static | 
Returns a list of MIME types available by default in the wizard.
Definition at line 967 of file qgsmetadatawidget.cpp.
      
  | 
  static | 
Returns a list of types available by default in the wizard.
Definition at line 989 of file qgsmetadatawidget.cpp.
| void QgsMetadataWidget::saveMetadata | ( | QgsAbstractMetadataBase * | metadata | ) | 
Save all fields in a metadata object.
Definition at line 690 of file qgsmetadatawidget.cpp.
| void QgsMetadataWidget::setMapCanvas | ( | QgsMapCanvas * | canvas | ) | 
Sets a map canvas associated with the widget.
Definition at line 1012 of file qgsmetadatawidget.cpp.
| void QgsMetadataWidget::setMetadata | ( | const QgsAbstractMetadataBase * | metadata | ) | 
Sets the metadata to display in the widget.
This method can be called after constructing a QgsMetadataWidget in order to set the displayed metadata to custom, non-layer based metadata.
Calling this method will automatically setMode() to the correct mode corresponding to the specified metadata object.
Definition at line 197 of file qgsmetadatawidget.cpp.
| void QgsMetadataWidget::setMode | ( | QgsMetadataWidget::Mode | mode | ) | 
Sets the widget's current mode.
Definition at line 143 of file qgsmetadatawidget.cpp.
      
  | 
  slot | 
Sets the title field for the metadata.
Definition at line 1023 of file qgsmetadatawidget.cpp.
| QString QgsMetadataWidget::title | ( | ) | const | 
Returns the current title field for the metadata.
Definition at line 1018 of file qgsmetadatawidget.cpp.
      
  | 
  signal | 
      
  | 
  readwrite | 
Definition at line 43 of file qgsmetadatawidget.h.