Skip to content
Permalink
Browse files
[sipify] Fix loss of class docstring if newline present between
class doxygen and class definition
  • Loading branch information
nyalldawson committed Apr 17, 2017
1 parent d6e3da6 commit 798c318288a963b36e3b355dc78914dbf27d0b45
@@ -14,6 +14,10 @@

class QgsHtmlAnnotation: QgsAnnotation
{
%Docstring
An annotation item that embeds HTML content.
.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgshtmlannotation.h"
@@ -14,6 +14,12 @@

class QgsActionManager
{
%Docstring
Storage and management of actions associated with a layer.

Actions can trigger custom code or applications to be executed
based on attributes of a given feature.
%End

%TypeHeaderCode
#include "qgsactionmanager.h"
@@ -11,6 +11,15 @@

class QgsAttributeEditorElement /Abstract/
{
%Docstring
This is an abstract base class for any elements of a drag and drop form.

This can either be a container which will be represented on the screen
as a tab widget or ca collapsible group box. Or it can be a field which will
then be represented based on the QgsEditorWidget type and configuration.
Or it can be a relation and embed the form of several children of another
layer.
%End

%TypeHeaderCode
#include "qgsattributeeditorelement.h"
@@ -12,6 +12,11 @@

class QgsAttributeTableConfig
{
%Docstring
This is a container for configuration of the attribute table.
The configuration is specific for one vector layer.
.. versionadded:: 2.16
%End

%TypeHeaderCode
#include "qgsattributetableconfig.h"
@@ -34,9 +34,21 @@ class QgsClipper


static const double MAX_X;
%Docstring
Maximum X-coordinate of the rectangular box used for clipping.
%End
static const double MIN_X;
%Docstring
Minimum X-coordinate of the rectangular box used for clipping.
%End
static const double MAX_Y;
%Docstring
Maximum Y-coordinate of the rectangular box used for clipping.
%End
static const double MIN_Y;
%Docstring
Minimum Y-coordinate of the rectangular box used for clipping.
%End


enum Boundary
@@ -12,6 +12,24 @@

class QgsCurveTransform
{
%Docstring
Handles scaling of input values to output values by using a curve created
from smoothly joining a number of set control points.

QgsCurveTransform assists in creation of curve type transforms, typically seen in
raster image editing software (eg the curves dialog in GIMP or Photoshop).
Transforms are created by passing a number of set control points through which
the transform curve must pass. The curve is guaranteed to exactly pass through
these control points. Between control points the curve is smoothly interpolated
so that no disjoint sections or "corners" are present.

If the first or last control point are not located at x = 0 and x = 1 respectively,
then values outside this range will be mapped to the y value of either the first
or last control point. In other words, the curve will have a flat segment
for values outside of the control point range.

.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgspropertytransformer.h"
@@ -297,6 +315,10 @@ class QgsPropertyTransformer

class QgsGenericNumericTransformer : QgsPropertyTransformer
{
%Docstring
QgsPropertyTransformer subclass for scaling an input numeric value into an output numeric value.
.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgspropertytransformer.h"
@@ -437,6 +459,11 @@ class QgsGenericNumericTransformer : QgsPropertyTransformer

class QgsSizeScaleTransformer : QgsPropertyTransformer
{
%Docstring
QgsPropertyTransformer subclass for scaling a value into a size according to various
scaling methods.
.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgspropertytransformer.h"
@@ -604,6 +631,11 @@ class QgsSizeScaleTransformer : QgsPropertyTransformer

class QgsColorRampTransformer : QgsPropertyTransformer
{
%Docstring
QgsPropertyTransformer subclass for transforming a numeric value into a color from a
color ramp.
.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgspropertytransformer.h"
@@ -15,6 +15,11 @@

class QgsCheckableComboBox : QComboBox
{
%Docstring
QComboBox subclass which allows selecting multiple items.
.. versionadded:: 3.0
*
%End

%TypeHeaderCode
#include "qgscheckablecombobox.h"
@@ -28,6 +28,9 @@ class QgsMessageLogViewer: QDialog
%End

public slots:
%Docstring
TODO QGIS 3.0: remove statusBar (it's unused)
%End
void logMessage( QString message, QString tag, QgsMessageLog::MessageLevel level );

protected:
@@ -180,6 +180,7 @@ sub processDoxygenLine

# SIP_SKIP
if ( $line =~ m/SIP_SKIP/ ){
$comment = '';
next;
}

@@ -292,6 +293,7 @@ sub processDoxygenLine
}
print $line;
# enums don't have Docstring apparently
$comment = '';
next;
}

@@ -424,7 +426,11 @@ sub processDoxygenLine
}

# write comment
if ( $line =~ m/^\s*$/ || $line =~ m/\/\// || $line =~ m/\s*typedef / || $line =~ m/\s*struct / ){
if ( $line =~ m/^\s*$/ )
{
next;
}
elsif ( $line =~ m/\/\// || $line =~ m/\s*typedef / || $line =~ m/\s*struct / ){
$comment = '';
}
elsif ( $comment !~ m/^\s*$/ || $return_type ne ''){
@@ -45,8 +45,6 @@ class CORE_EXPORT QgsClipper
{
public:

// Coordinates of the rectangular box that we trim to.
//
// These are the limits for X11 screen coordinates. The actual
// values are +/-32767, but we allow a little bit of space for
// rounding errors.
@@ -64,9 +62,13 @@ class CORE_EXPORT QgsClipper
// The limit is set to 30,000 instead of 32768 because that things
// still go wrong.

//! Maximum X-coordinate of the rectangular box used for clipping.
static const double MAX_X;
//! Minimum X-coordinate of the rectangular box used for clipping.
static const double MIN_X;
//! Maximum Y-coordinate of the rectangular box used for clipping.
static const double MAX_Y;
//! Minimum Y-coordinate of the rectangular box used for clipping.
static const double MIN_Y;


@@ -116,6 +116,8 @@ A multiline method signature
%End


void nonAnnotatedMethodFollowingSkip();

virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) /Factory/;
%Docstring
Factory annotation
@@ -264,6 +266,7 @@ A constructor with definition in header on several lines

};


class AbstractClass /Abstract/
{
%Docstring
@@ -154,6 +154,8 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas
// Adding SIP_SKIP at the end of a line will discard this MethodCode
bool thisShouldBeSkipped() const SIP_SKIP;

void nonAnnotatedMethodFollowingSkip();

//! Factory annotation
virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) override SIP_FACTORY;

@@ -286,6 +288,7 @@ class CORE_EXPORT ClassWithPrivateInheritanceOnly : private QgsBaseClass
* \ingroup core
* Documentation goes here
*/

class CORE_EXPORT AbstractClass SIP_ABSTRACT
{
public:

0 comments on commit 798c318

Please sign in to comment.