QGIS API Documentation  3.0.2-Girona (307d082)
Public Member Functions | Static Public Member Functions | List of all members
QgsMetadataWidget Class Reference

A wizard to edit metadata on a map layer. More...

#include <qgsmetadatawidget.h>

Inheritance diagram for QgsMetadataWidget:
Inheritance graph
[legend]

Public Member Functions

 QgsMetadataWidget (QWidget *parent, QgsMapLayer *layer=nullptr)
 Constructor for the wizard. More...
 
void acceptMetadata ()
 Saves the metadata to the layer. More...
 
bool checkMetadata ()
 Check if values in the wizard are correct. More...
 
void crsChanged ()
 If the CRS is updated. More...
 
QgsLayerMetadata metadata ()
 Returns a QgsLayerMetadata object representing the current state of the widget. More...
 
void saveMetadata (QgsLayerMetadata &layerMetadata)
 Save all fields in a QgsLayerMetadata object. More...
 
void setMapCanvas (QgsMapCanvas *canvas)
 Sets a map canvas associated with the widget. More...
 
void setMetadata (const QgsLayerMetadata &metadata)
 Sets the metadata to display in the widget. More...
 

Static Public Member Functions

static QMap< QString, QString > parseLanguages ()
 Returns a list of languages available by default in the wizard. More...
 
static QStringList parseLicenses ()
 Returns a list of licences available by default in the wizard. More...
 
static QStringList parseLinkTypes ()
 Returns a list of link types available by default in the wizard. More...
 
static QStringList parseMimeTypes ()
 Returns a list of MIME types available by default in the wizard. More...
 
static QMap< QString, QString > parseTypes ()
 Returns a list of types available by default in the wizard. More...
 

Detailed Description

A wizard to edit metadata on a map layer.

Since
QGIS 3.0

Definition at line 38 of file qgsmetadatawidget.h.

Constructor & Destructor Documentation

◆ QgsMetadataWidget()

QgsMetadataWidget::QgsMetadataWidget ( QWidget *  parent,
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..

See also
setMetadata()

Definition at line 33 of file qgsmetadatawidget.cpp.

Member Function Documentation

◆ acceptMetadata()

void QgsMetadataWidget::acceptMetadata ( )

Saves the metadata to the layer.

Definition at line 841 of file qgsmetadatawidget.cpp.

◆ checkMetadata()

bool QgsMetadataWidget::checkMetadata ( )

Check if values in the wizard are correct.

See also
saveMetadata()

Definition at line 664 of file qgsmetadatawidget.cpp.

◆ crsChanged()

void QgsMetadataWidget::crsChanged ( )

If the CRS is updated.

Definition at line 228 of file qgsmetadatawidget.cpp.

◆ metadata()

QgsLayerMetadata QgsMetadataWidget::metadata ( )

Returns a QgsLayerMetadata object representing the current state of the widget.

See also
saveMetadata()

Definition at line 128 of file qgsmetadatawidget.cpp.

◆ parseLanguages()

QMap< QString, QString > QgsMetadataWidget::parseLanguages ( )
static

Returns a list of languages available by default in the wizard.

Definition at line 699 of file qgsmetadatawidget.cpp.

◆ parseLicenses()

QStringList QgsMetadataWidget::parseLicenses ( )
static

Returns a list of licences available by default in the wizard.

Definition at line 742 of file qgsmetadatawidget.cpp.

◆ parseLinkTypes()

QStringList QgsMetadataWidget::parseLinkTypes ( )
static

Returns a list of link types available by default in the wizard.

See also
https://github.com/OSGeo/Cat-Interop/blob/master/LinkPropertyLookupTable.csv

Definition at line 766 of file qgsmetadatawidget.cpp.

◆ parseMimeTypes()

QStringList QgsMetadataWidget::parseMimeTypes ( )
static

Returns a list of MIME types available by default in the wizard.

See also
https://fr.wikipedia.org/wiki/Type_MIME

Definition at line 790 of file qgsmetadatawidget.cpp.

◆ parseTypes()

QMap< QString, QString > QgsMetadataWidget::parseTypes ( )
static

Returns a list of types available by default in the wizard.

Definition at line 812 of file qgsmetadatawidget.cpp.

◆ saveMetadata()

void QgsMetadataWidget::saveMetadata ( QgsLayerMetadata layerMetadata)

Save all fields in a QgsLayerMetadata object.

See also
metadata()
acceptMetadata()
checkMetadata()

Definition at line 551 of file qgsmetadatawidget.cpp.

◆ setMapCanvas()

void QgsMetadataWidget::setMapCanvas ( QgsMapCanvas canvas)

Sets a map canvas associated with the widget.

Definition at line 835 of file qgsmetadatawidget.cpp.

◆ setMetadata()

void QgsMetadataWidget::setMetadata ( const QgsLayerMetadata 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.

See also
metadata()

Definition at line 122 of file qgsmetadatawidget.cpp.


The documentation for this class was generated from the following files: