Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
sipify batch
  • Loading branch information
3nids committed May 18, 2017
1 parent 27f4b0e commit 40972f0
Show file tree
Hide file tree
Showing 18 changed files with 1,021 additions and 428 deletions.
1 change: 1 addition & 0 deletions cmake_templates/Doxyfile.in
Expand Up @@ -2059,6 +2059,7 @@ EXPAND_AS_DEFINED = "SIP_ABSTRACT" \
"SIP_IF_FEATURE" \
"SIP_INOUT" \
"SIP_KEEPREFERENCE" \
"SIP_NODEFAULTCTORS" \
"SIP_OUT" \
"SIP_PYARGDEFAULT" \
"SIP_PYARGREMOVE" \
Expand Down
9 changes: 0 additions & 9 deletions python/auto_sip.blacklist
Expand Up @@ -4,15 +4,6 @@ core/qgis.sip
core/qgspropertycollection.sip
core/qgspythonrunner.sip
core/qgsrange.sip
core/qgsrelationmanager.sip
core/qgsrenderchecker.sip
core/qgsrendercontext.sip
core/qgsrulebasedlabeling.sip
core/qgsrunprocess.sip
core/qgsruntimeprofiler.sip
core/qgsscalecalculator.sip
core/qgsscaleutils.sip
core/qgssimplifymethod.sip
core/qgssnappingutils.sip
core/qgsspatialindex.sip
core/qgssqlstatement.sip
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgslogger.sip
Expand Up @@ -80,7 +80,7 @@ the function returns 1 if QGISDEBUG is defined and 0 if not*
Logs the message passed in to the logfile defined in QGIS_LOG_FILE if any. *
%End

const QString logFile();
static const QString logFile();
%Docstring
Reads the environment variable QGIS_LOG_FILE. Returns NULL if the variable is not set,
otherwise returns a file name for writing log messages to.*
Expand Down
186 changes: 109 additions & 77 deletions python/core/qgsrelationmanager.sip
@@ -1,112 +1,144 @@
/**
* This class manages a set of relations between layers.
*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsrelationmanager.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/





class QgsRelationManager : QObject
{
%Docstring
This class manages a set of relations between layers.
%End

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

/** Constructor for QgsRelationManager.
* @param project associated project (used to notify project of changes)
*/
explicit QgsRelationManager( QgsProject *project = 0 );
%Docstring
Constructor for QgsRelationManager.
\param project associated project (used to notify project of changes)
%End

/**
* Will set the specified relations and remove any relation currently set.
*
* @param relations A list of relations to set.
*/
void setRelations( const QList<QgsRelation> &relations );
%Docstring
Will set the specified relations and remove any relation currently set.

\param relations A list of relations to set.
%End

/**
* Get access to the relations managed by this class.
*
* @return A QMap where the key is the relation id, the value the relation object.
*/
QMap<QString, QgsRelation> relations() const;
%Docstring
Get access to the relations managed by this class.

:return: A QMap where the key is the relation id, the value the relation object.
:rtype: QMap<str, QgsRelation>
%End

/**
* Add a relation.
*
* @param relation The relation to add.
*/
void addRelation( const QgsRelation &relation );
%Docstring
Add a relation.

\param relation The relation to add.
%End

/**
* Remove a relation.
*
* @param id The id of the relation to remove.
*/
void removeRelation( const QString &id );
%Docstring
Remove a relation.

\param id The id of the relation to remove.
%End

/**
* Remove a relation.
*
* @param relation The relation to remove.
*/
void removeRelation( const QgsRelation &relation );
%Docstring
Remove a relation.

\param relation The relation to remove.
%End

/**
* Get access to a relation by its id.
*
* @param id The id to search for
*
* @return A relation. Invalid if not found.
* @see relationsByName()
*/
QgsRelation relation( const QString &id ) const;
%Docstring
Get access to a relation by its id.

\param id The id to search for

:return: A relation. Invalid if not found.
.. seealso:: relationsByName()
:rtype: QgsRelation
%End

/** Returns a list of relations with matching names.
* @param name relation name to search for. Searching is case insensitive.
* @returns a list of matching relations
* @note added in QGIS 2.16
* @see relation()
*/
QList<QgsRelation> relationsByName( const QString &name ) const;
%Docstring
Returns a list of relations with matching names.
\param name relation name to search for. Searching is case insensitive.
:return: a list of matching relations
.. versionadded:: 2.16
.. seealso:: relation()
:rtype: list of QgsRelation
%End

/**
* Remove any relation managed by this class.
*/
void clear();
%Docstring
Remove any relation managed by this class.
%End

/**
* Get all relations where the specified layer (and field) is the referencing part (i.e. the child table with the foreign key).
*
* @param layer The layer which should be searched for.
* @param fieldIdx The field which should be part of the foreign key. If not set will return all relations.
*
* @return A list of relations matching the given layer and fieldIdx.
*/
QList<QgsRelation> referencingRelations( const QgsVectorLayer *layer = 0, int fieldIdx = -2 ) const;
%Docstring
Get all relations where the specified layer (and field) is the referencing part (i.e. the child table with the foreign key).

\param layer The layer which should be searched for.
\param fieldIdx The field which should be part of the foreign key. If not set will return all relations.

:return: A list of relations matching the given layer and fieldIdx.
:rtype: list of QgsRelation
%End

/**
* Get all relations where this layer is the referenced part (i.e. the parent table with the primary key being referenced from another layer).
*
* @param layer The layer which should be searched for.
*
* @return A list of relations where the specified layer is the referenced part.
*/
QList<QgsRelation> referencedRelations( QgsVectorLayer *layer = 0 ) const;
%Docstring
Get all relations where this layer is the referenced part (i.e. the parent table with the primary key being referenced from another layer).

/**
* Discover all the relations available from the current layers.
*
* @param existingRelations the existing relations to filter them out
* @param layers the current layers
* @return the list of discovered relations
* @note added in QGIS 3.0
*/
static QList<QgsRelation> discoverRelations( const QList<QgsRelation> &existingRelations, const QList<QgsVectorLayer*> &layers );
\param layer The layer which should be searched for.

:return: A list of relations where the specified layer is the referenced part.
:rtype: list of QgsRelation
%End

static QList<QgsRelation> discoverRelations( const QList<QgsRelation> &existingRelations, const QList<QgsVectorLayer *> &layers );
%Docstring
Discover all the relations available from the current layers.

\param existingRelations the existing relations to filter them out
\param layers the current layers
:return: the list of discovered relations
.. versionadded:: 3.0
:rtype: list of QgsRelation
%End

signals:
/** This signal is emitted when the relations were loaded after reading a project */
void relationsLoaded();
%Docstring
This signal is emitted when the relations were loaded after reading a project
%End

/**
* Emitted when relations are added or removed to the manager.
* @note added in QGIS 2.5
*/
void changed();
%Docstring
Emitted when relations are added or removed to the manager.
.. versionadded:: 2.5
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsrelationmanager.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

0 comments on commit 40972f0

Please sign in to comment.