QGIS API Documentation
3.0.2-Girona (307d082)
|
A wizard to edit metadata on a map layer. More...
#include <qgsmetadatawidget.h>
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... | |
A wizard to edit metadata on a map layer.
Definition at line 38 of file qgsmetadatawidget.h.
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..
Definition at line 33 of file qgsmetadatawidget.cpp.
void QgsMetadataWidget::acceptMetadata | ( | ) |
Saves the metadata to the layer.
Definition at line 841 of file qgsmetadatawidget.cpp.
bool QgsMetadataWidget::checkMetadata | ( | ) |
Check if values in the wizard are correct.
Definition at line 664 of file qgsmetadatawidget.cpp.
void QgsMetadataWidget::crsChanged | ( | ) |
If the CRS is updated.
Definition at line 228 of file qgsmetadatawidget.cpp.
QgsLayerMetadata QgsMetadataWidget::metadata | ( | ) |
Returns a QgsLayerMetadata object representing the current state of the widget.
Definition at line 128 of file qgsmetadatawidget.cpp.
|
static |
Returns a list of languages available by default in the wizard.
Definition at line 699 of file qgsmetadatawidget.cpp.
|
static |
Returns a list of licences available by default in the wizard.
Definition at line 742 of file qgsmetadatawidget.cpp.
|
static |
Returns a list of link types available by default in the wizard.
Definition at line 766 of file qgsmetadatawidget.cpp.
|
static |
Returns a list of MIME types available by default in the wizard.
Definition at line 790 of file qgsmetadatawidget.cpp.
|
static |
Returns a list of types available by default in the wizard.
Definition at line 812 of file qgsmetadatawidget.cpp.
void QgsMetadataWidget::saveMetadata | ( | QgsLayerMetadata & | layerMetadata | ) |
Save all fields in a QgsLayerMetadata object.
Definition at line 551 of file qgsmetadatawidget.cpp.
void QgsMetadataWidget::setMapCanvas | ( | QgsMapCanvas * | canvas | ) |
Sets a map canvas associated with the widget.
Definition at line 835 of file qgsmetadatawidget.cpp.
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.
Definition at line 122 of file qgsmetadatawidget.cpp.