Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Metadata class shell
  • Loading branch information
nyalldawson committed May 3, 2017
1 parent 18478ab commit 269bfe7
Show file tree
Hide file tree
Showing 5 changed files with 293 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/core/core.sip
Expand Up @@ -276,6 +276,8 @@
%Include layertree/qgslayertreeregistrybridge.sip
%Include layertree/qgslayertreeutils.sip

%Include metadata/qgslayermetadata.sip

%Include processing/qgsprocessingalgorithm.sip
%Include processing/qgsprocessingcontext.sip
%Include processing/qgsprocessingfeedback.sip
Expand Down
92 changes: 92 additions & 0 deletions python/core/metadata/qgslayermetadata.sip
@@ -0,0 +1,92 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/metadata/qgslayermetadata.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/




class QgsLayerMetadata
{

%TypeHeaderCode
#include "qgslayermetadata.h"
%End
public:

QgsLayerMetadata();

virtual ~QgsLayerMetadata();


QString identifier() const;
%Docstring
:rtype: str
%End
void setIdentifier( const QString &identifier );

QString parentIdentifier() const;
%Docstring
Returns an empty string if no parent identifier is set.
:rtype: str
%End


void setParentIdentifier( const QString &parentIdentifier );

QString type() const;
%Docstring
:rtype: str
%End
void setType( const QString &type );

QString title() const;
%Docstring
:rtype: str
%End
void setTitle( const QString &title );

QString abstract() const;
%Docstring
:rtype: str
%End
void setAbstract( const QString &abstract );

QString fees() const;
%Docstring
Returns an empty string if no fees are set.
:rtype: str
%End
void setFees( const QString &fees );

QStringList constraints() const;
%Docstring
:rtype: list of str
%End
void setConstraints( const QStringList &constraints );

QStringList rights() const;
%Docstring
:rtype: list of str
%End
void setRights( const QStringList &rights );

QString encoding() const;
%Docstring
Returns an empty string if no encoding is set.
:rtype: str
%End
void setEncoding( const QString &encoding );

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/metadata/qgslayermetadata.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
4 changes: 4 additions & 0 deletions src/core/CMakeLists.txt
Expand Up @@ -71,6 +71,8 @@ SET(QGIS_CORE_SRCS
layertree/qgslayertreeutils.cpp
layertree/qgslayertree.cpp

metadata/qgslayermetadata.cpp

auth/qgsauthcertutils.cpp
auth/qgsauthconfig.cpp
auth/qgsauthcrypto.cpp
Expand Down Expand Up @@ -855,6 +857,8 @@ SET(QGIS_CORE_HDRS
composer/qgscomposertexttable.h
composer/qgspaperitem.h

metadata/qgslayermetadata.h

processing/qgsprocessingalgorithm.h
processing/qgsprocessingcontext.h
processing/qgsprocessingutils.h
Expand Down
108 changes: 108 additions & 0 deletions src/core/metadata/qgslayermetadata.cpp
@@ -0,0 +1,108 @@
/***************************************************************************
qgslayermetadata.cpp
--------------------
begin : April 2017
copyright : (C) 2017 by Nyall Dawson
email : nyall dot dawson at gmail dot com
***************************************************************************/

/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

#include "qgslayermetadata.h"

QString QgsLayerMetadata::identifier() const
{
return mIdentifier;
}

void QgsLayerMetadata::setIdentifier( const QString &identifier )
{
mIdentifier = identifier;
}

QString QgsLayerMetadata::parentIdentifier() const
{
return mParentIdentifier;
}

void QgsLayerMetadata::setParentIdentifier( const QString &parentIdentifier )
{
mParentIdentifier = parentIdentifier;
}

QString QgsLayerMetadata::type() const
{
return mType;
}

void QgsLayerMetadata::setType( const QString &type )
{
mType = type;
}

QString QgsLayerMetadata::title() const
{
return mTitle;
}

void QgsLayerMetadata::setTitle( const QString &title )
{
mTitle = title;
}

QString QgsLayerMetadata::abstract() const
{
return mAbstract;
}

void QgsLayerMetadata::setAbstract( const QString &abstract )
{
mAbstract = abstract;
}

QString QgsLayerMetadata::fees() const
{
return mFees;
}

void QgsLayerMetadata::setFees( const QString &fees )
{
mFees = fees;
}

QStringList QgsLayerMetadata::constraints() const
{
return mConstraints;
}

void QgsLayerMetadata::setConstraints( const QStringList &constraints )
{
mConstraints = constraints;
}

QStringList QgsLayerMetadata::rights() const
{
return mRights;
}

void QgsLayerMetadata::setRights( const QStringList &rights )
{
mRights = rights;
}

QString QgsLayerMetadata::encoding() const
{
return mEncoding;
}

void QgsLayerMetadata::setEncoding( const QString &encoding )
{
mEncoding = encoding;
}
87 changes: 87 additions & 0 deletions src/core/metadata/qgslayermetadata.h
@@ -0,0 +1,87 @@
/***************************************************************************
qgslayermetadata.h
-------------------
begin : April 2017
copyright : (C) 2017 by Nyall Dawson
email : nyall dot dawson at gmail dot com
***************************************************************************/

/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

#ifndef QGSLAYERMETADATA_H
#define QGSLAYERMETADATA_H

#include "qgis.h"
#include "qgis_core.h"

class CORE_EXPORT QgsLayerMetadata
{
public:

QgsLayerMetadata() = default;

virtual ~QgsLayerMetadata() = default;


QString identifier() const;
void setIdentifier( const QString &identifier );

/**
* Returns an empty string if no parent identifier is set.
*/
QString parentIdentifier() const;


void setParentIdentifier( const QString &parentIdentifier );

QString type() const;
void setType( const QString &type );

QString title() const;
void setTitle( const QString &title );

QString abstract() const;
void setAbstract( const QString &abstract );

/**
* Returns an empty string if no fees are set.
*/
QString fees() const;
void setFees( const QString &fees );

QStringList constraints() const;
void setConstraints( const QStringList &constraints );

QStringList rights() const;
void setRights( const QStringList &rights );

/**
* Returns an empty string if no encoding is set.
*/
QString encoding() const;
void setEncoding( const QString &encoding );

private:

QString mIdentifier;
QString mParentIdentifier;
QString mType;
QString mTitle;
QString mAbstract;
QString mFees;
QStringList mConstraints;
QStringList mRights;
QString mEncoding;



};

#endif // QGSLAYERMETADATA_H

0 comments on commit 269bfe7

Please sign in to comment.