Skip to content

Commit

Permalink
Code shuffle and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 5, 2018
1 parent 159986f commit d8af098
Show file tree
Hide file tree
Showing 14 changed files with 754 additions and 498 deletions.
3 changes: 3 additions & 0 deletions python/core/core_auto.sip
Expand Up @@ -175,6 +175,9 @@
%Include layout/qgslayoutsnapper.sip
%Include layout/qgslayoutundocommand.sip
%Include layout/qgslayoututils.sip
%Include layout/qgsreport.sip
%Include layout/qgsreportsectionfieldgroup.sip
%Include layout/qgsreportsectionlayout.sip
%Include metadata/qgslayermetadata.sip
%Include metadata/qgslayermetadatavalidator.sip
%Include metadata/qgslayermetadataformatter.sip
Expand Down
182 changes: 13 additions & 169 deletions python/core/layout/qgsabstractreportsection.sip
Expand Up @@ -10,8 +10,18 @@



class QgsReportContext
class QgsReportSectionContext
{
%Docstring
Current context for a report section.

.. warning::

This is not considered stable API, and may change in future QGIS releases. It is
exposed to the Python bindings for unit testing purposes only.

.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsabstractreportsection.h"
Expand Down Expand Up @@ -250,14 +260,14 @@ Removes the child section at the specified ``index``, deleting it.
.. seealso:: :py:func:`children()`
%End

void setContext( const QgsReportContext &context );
void setContext( const QgsReportSectionContext &context );
%Docstring
Sets the current ``context`` for this section.

.. seealso:: :py:func:`context()`
%End

const QgsReportContext &context() const;
const QgsReportSectionContext &context() const;
%Docstring
Returns the current context for this section.

Expand Down Expand Up @@ -290,172 +300,6 @@ Sets the ``parent`` report section.
QgsAbstractReportSection( const QgsAbstractReportSection &other );
};

class QgsReportSectionLayout : QgsAbstractReportSection
{
%Docstring
A report section consisting of a single QgsLayout body.

.. warning::

This is not considered stable API, and may change in future QGIS releases. It is
exposed to the Python bindings for unit testing purposes only.

.. versionadded:: 3.0
%End

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

QgsReportSectionLayout( QgsAbstractReportSection *parent = 0 );
%Docstring
Constructor for QgsReportSectionLayout, attached to the specified ``parent`` section.
Note that ownership is not transferred to ``parent``.
%End

QgsLayout *body();
%Docstring
Returns the body layout for the section.

.. seealso:: :py:func:`setBody()`
%End

void setBody( QgsLayout *body /Transfer/ );
%Docstring
Sets the ``body`` layout for the section. Ownership of ``body``
is transferred to the report section.

.. seealso:: :py:func:`body()`
%End

virtual QgsReportSectionLayout *clone() const /Factory/;

virtual bool beginRender();

virtual QgsLayout *nextBody( bool &ok );


};

class QgsReportSectionFieldGroup : QgsAbstractReportSection
{
%Docstring
A report section consisting of a features

.. warning::

This is not considered stable API, and may change in future QGIS releases. It is
exposed to the Python bindings for unit testing purposes only.

.. versionadded:: 3.0
%End

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

QgsReportSectionFieldGroup( QgsAbstractReportSection *parent = 0 );
%Docstring
Constructor for QgsReportSectionFieldGroup, attached to the specified ``parent`` section.
Note that ownership is not transferred to ``parent``.
%End

QgsLayout *body();
%Docstring
Returns the body layout for the section.

.. seealso:: :py:func:`setBody()`
%End

void setBody( QgsLayout *body /Transfer/ );
%Docstring
Sets the ``body`` layout for the section. Ownership of ``body``
is transferred to the report section.

.. seealso:: :py:func:`body()`
%End

QgsVectorLayer *layer();
%Docstring
Returns the vector layer associated with this section.

.. seealso:: :py:func:`setLayer()`
%End

void setLayer( QgsVectorLayer *layer );
%Docstring
Sets the vector ``layer`` associated with this section.

.. seealso:: :py:func:`layer()`
%End

QString field() const;
%Docstring
Returns the field associated with this section.

.. seealso:: :py:func:`setField()`
%End

void setField( const QString &field );
%Docstring
Sets the ``field`` associated with this section.

.. seealso:: :py:func:`field()`
%End

virtual QgsReportSectionFieldGroup *clone() const /Factory/;

virtual bool beginRender();

virtual QgsLayout *nextBody( bool &ok );

virtual void reset();


};


class QgsReport : QgsAbstractReportSection
{
%Docstring
Represents a report for use with the QgsLayout engine.

Reports consist of multiple sections, represented by :py:class:`QgsAbstractReportSection`
subclasses.

.. warning::

This is not considered stable API, and may change in future QGIS releases. It is
exposed to the Python bindings for unit testing purposes only.

.. versionadded:: 3.0
%End

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

QgsReport( QgsProject *project );
%Docstring
Constructor for QgsReport, associated with the specified
``project``.

Note that ownership is not transferred to ``project``.
%End

QgsProject *project();
%Docstring
Returns the associated project.
%End

virtual QgsReport *clone() const /Factory/;


};


/************************************************************************
* This file has been generated automatically from *
Expand Down
59 changes: 59 additions & 0 deletions python/core/layout/qgsreport.sip
@@ -0,0 +1,59 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgsreport.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/





class QgsReport : QgsAbstractReportSection
{
%Docstring
Represents a report for use with the QgsLayout engine.

Reports consist of multiple sections, represented by QgsAbstractReportSection
subclasses.

.. warning::

This is not considered stable API, and may change in future QGIS releases. It is
exposed to the Python bindings for unit testing purposes only.

.. versionadded:: 3.0
%End

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

QgsReport( QgsProject *project );
%Docstring
Constructor for QgsReport, associated with the specified
``project``.

Note that ownership is not transferred to ``project``.
%End

QgsProject *project();
%Docstring
Returns the associated project.
%End

virtual QgsReport *clone() const /Factory/;


};


/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgsreport.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
99 changes: 99 additions & 0 deletions python/core/layout/qgsreportsectionfieldgroup.sip
@@ -0,0 +1,99 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgsreportsectionfieldgroup.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/





class QgsReportSectionFieldGroup : QgsAbstractReportSection
{
%Docstring
A report section consisting of a features

.. warning::

This is not considered stable API, and may change in future QGIS releases. It is
exposed to the Python bindings for unit testing purposes only.

.. versionadded:: 3.0
%End

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

QgsReportSectionFieldGroup( QgsAbstractReportSection *parent = 0 );
%Docstring
Constructor for QgsReportSectionFieldGroup, attached to the specified ``parent`` section.
Note that ownership is not transferred to ``parent``.
%End

QgsLayout *body();
%Docstring
Returns the body layout for the section.

.. seealso:: :py:func:`setBody()`
%End

void setBody( QgsLayout *body /Transfer/ );
%Docstring
Sets the ``body`` layout for the section. Ownership of ``body``
is transferred to the report section.

.. seealso:: :py:func:`body()`
%End

QgsVectorLayer *layer();
%Docstring
Returns the vector layer associated with this section.

.. seealso:: :py:func:`setLayer()`
%End

void setLayer( QgsVectorLayer *layer );
%Docstring
Sets the vector ``layer`` associated with this section.

.. seealso:: :py:func:`layer()`
%End

QString field() const;
%Docstring
Returns the field associated with this section.

.. seealso:: :py:func:`setField()`
%End

void setField( const QString &field );
%Docstring
Sets the ``field`` associated with this section.

.. seealso:: :py:func:`field()`
%End

virtual QgsReportSectionFieldGroup *clone() const /Factory/;

virtual bool beginRender();

virtual QgsLayout *nextBody( bool &ok );

virtual void reset();


};



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

0 comments on commit d8af098

Please sign in to comment.