2017-09-23 11:08:32 +07:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsmetadatawidget.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-19 17:34:52 +10:00
|
|
|
class QgsMetadataWidget : QWidget
|
2017-09-23 11:08:32 +07:00
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
A wizard to edit metadata on a map layer.
|
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmetadatawidget.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
2018-03-19 17:34:52 +10:00
|
|
|
enum Mode
|
|
|
|
{
|
|
|
|
LayerMetadata,
|
|
|
|
ProjectMetadata,
|
|
|
|
};
|
|
|
|
|
|
|
|
QgsMetadataWidget( QWidget *parent /TransferThis/ = 0, QgsMapLayer *layer = 0 );
|
2017-09-23 11:08:32 +07:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for the wizard.
|
2018-02-05 12:57:04 +01:00
|
|
|
|
2018-02-20 09:59:39 +10:00
|
|
|
If ``layer`` is set, then this constructor automatically sets the widget's metadata() to match
|
|
|
|
the layer's metadata..
|
2018-02-05 12:57:04 +01:00
|
|
|
|
|
|
|
.. seealso:: :py:func:`setMetadata`
|
|
|
|
%End
|
|
|
|
|
2018-03-19 17:34:52 +10:00
|
|
|
void setMode( Mode mode );
|
|
|
|
%Docstring
|
|
|
|
Sets the widget's current ``mode``.
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`mode`
|
|
|
|
%End
|
|
|
|
|
|
|
|
Mode mode() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the widget's current mode.
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setMode`
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setMetadata( const QgsAbstractMetadataBase *metadata );
|
2018-02-05 12:57:04 +01:00
|
|
|
%Docstring
|
2018-02-20 09:59:39 +10:00
|
|
|
Sets the ``metadata`` to display in the widget.
|
|
|
|
|
2018-03-20 08:21:55 +10:00
|
|
|
This method can be called after constructing a QgsMetadataWidget in order
|
2018-02-20 09:59:39 +10:00
|
|
|
to set the displayed metadata to custom, non-layer based metadata.
|
2018-02-05 12:57:04 +01:00
|
|
|
|
2018-03-19 17:34:52 +10:00
|
|
|
Calling this method will automatically setMode() to the correct mode corresponding
|
|
|
|
to the specified ``metadata`` object.
|
|
|
|
|
2018-02-05 12:57:04 +01:00
|
|
|
.. seealso:: :py:func:`metadata`
|
|
|
|
%End
|
|
|
|
|
2018-03-19 17:34:52 +10:00
|
|
|
QgsAbstractMetadataBase *metadata() /Factory/;
|
2018-02-05 12:57:04 +01:00
|
|
|
%Docstring
|
2018-03-19 17:34:52 +10:00
|
|
|
Returns a QgsAbstractMetadataBase object representing the current state of the widget.
|
|
|
|
|
|
|
|
Caller takes ownership of the returned object.
|
2018-02-05 12:57:04 +01:00
|
|
|
|
|
|
|
.. seealso:: :py:func:`saveMetadata`
|
2017-09-23 11:08:32 +07:00
|
|
|
%End
|
|
|
|
|
2018-03-19 17:34:52 +10:00
|
|
|
void saveMetadata( QgsAbstractMetadataBase *metadata );
|
2017-09-23 11:08:32 +07:00
|
|
|
%Docstring
|
2018-03-19 17:34:52 +10:00
|
|
|
Save all fields in a metadata object.
|
2018-02-05 12:57:04 +01:00
|
|
|
|
2018-02-20 09:59:39 +10:00
|
|
|
.. seealso:: :py:func:`metadata`
|
2018-02-05 12:57:04 +01:00
|
|
|
|
|
|
|
.. seealso:: :py:func:`acceptMetadata`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`checkMetadata`
|
2017-09-23 11:08:32 +07:00
|
|
|
%End
|
|
|
|
|
2018-02-14 08:24:33 +11:00
|
|
|
bool checkMetadata();
|
2017-09-23 11:08:32 +07:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Check if values in the wizard are correct.
|
2018-02-05 12:57:04 +01:00
|
|
|
|
|
|
|
.. seealso:: :py:func:`saveMetadata`
|
2017-12-20 09:35:49 +01:00
|
|
|
%End
|
|
|
|
|
2018-02-14 08:24:33 +11:00
|
|
|
void crsChanged();
|
2017-12-20 09:35:49 +01:00
|
|
|
%Docstring
|
|
|
|
If the CRS is updated.
|
2017-09-23 11:08:32 +07:00
|
|
|
%End
|
|
|
|
|
|
|
|
void acceptMetadata();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Saves the metadata to the layer.
|
2017-09-23 11:08:32 +07:00
|
|
|
%End
|
|
|
|
|
|
|
|
static QMap<QString, QString> parseLanguages();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns a list of languages available by default in the wizard.
|
2017-09-23 11:08:32 +07:00
|
|
|
%End
|
|
|
|
|
|
|
|
static QStringList parseLicenses();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns a list of licences available by default in the wizard.
|
2017-09-23 11:08:32 +07:00
|
|
|
%End
|
|
|
|
|
|
|
|
static QStringList parseLinkTypes();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns a list of link types available by default in the wizard.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`https`
|
2017-09-23 11:08:32 +07:00
|
|
|
%End
|
|
|
|
|
|
|
|
static QStringList parseMimeTypes();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns a list of MIME types available by default in the wizard.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`https`
|
2017-09-23 11:08:32 +07:00
|
|
|
%End
|
|
|
|
|
|
|
|
static QMap<QString, QString> parseTypes();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns a list of types available by default in the wizard.
|
2018-01-03 09:28:08 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setMapCanvas( QgsMapCanvas *canvas );
|
|
|
|
%Docstring
|
|
|
|
Sets a map ``canvas`` associated with the widget.
|
2018-03-20 09:36:07 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QString title() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the current title field for the metadata.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setTitle`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`titleChanged`
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
void setTitle( const QString &title );
|
|
|
|
%Docstring
|
|
|
|
Sets the ``title`` field for the metadata.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`title`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`titleChanged`
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
void titleChanged( const QString &title );
|
|
|
|
%Docstring
|
|
|
|
Emitted when the ``title`` field is changed.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`title`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setTitle`
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
2017-09-23 11:08:32 +07:00
|
|
|
%End
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsmetadatawidget.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|