Navigation Menu

Skip to content

Commit

Permalink
Sip says no
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 12, 2020
1 parent f268356 commit 173e209
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 161 deletions.
161 changes: 0 additions & 161 deletions python/core/auto_generated/qgstextrenderer.sip.in
Expand Up @@ -1903,167 +1903,6 @@ Returns a pixmap preview for a text ``format``.

};

class QgsTextCharacterFormat
{
%Docstring
Stores information relating to individual character formatting.

These options encapsulate formatting options which override the default
settings from a QgsTextFormat for individual characters (or sets of characters).

.. versionadded:: 3.14
%End

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

QgsTextCharacterFormat();

QgsTextCharacterFormat( const QTextCharFormat &format );
%Docstring
Constructor for QgsTextCharacterFormat, based on the specified QTextCharFormat ``format``.
%End

QColor textColor() const;
%Docstring
Returns the character's text color, or an invalid color if no color override
is set and the default format color should be used.

.. seealso:: :py:func:`setTextColor`
%End

void setTextColor( const QColor &textColor );
%Docstring
Sets the character's text ``color``.

Set ``color`` to an invalid color if no color override
is desired and the default format color should be used.

.. seealso:: :py:func:`textColor`
%End

};

class QgsTextFragment
{
%Docstring
Stores a fragment of text along with formatting overrides to be used when rendering the fragment.

.. versionadded:: 3.14
%End

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

explicit QgsTextFragment( const QString &text, const QgsTextCharacterFormat &format = QgsTextCharacterFormat() );
%Docstring
Constructor for QgsTextFragment, with the specified ``text`` and optional character ``format``.
%End

QString text() const;
%Docstring
Returns the text content of the fragment.

.. seealso:: :py:func:`setText`
%End

void setText( const QString &text );
%Docstring
Sets the ``text`` content of the fragment.

.. seealso:: :py:func:`text`
%End

const QgsTextCharacterFormat &characterFormat() const;
%Docstring
Returns the character formatting for the fragment.

.. seealso:: :py:func:`setCharacterFormat`
%End

void setCharacterFormat( const QgsTextCharacterFormat &format );
%Docstring
Sets the character ``format`` for the fragment.

.. seealso:: :py:func:`characterFormat`
%End

};


typedef QVector<QgsTextFragment> QVectorQgsTextFragmentBase;

class QgsTextBlock : QVectorQgsTextFragmentBase
{
%Docstring

Represents a block of text consisting of one or more QgsTextFragment objects.

.. versionadded:: 3.14
%End

%TypeHeaderCode
#include "qgstextrenderer.h"
#include "qvector.h"
typedef QVector<QgsTextFragment> QVectorQgsTextFragmentBase;
%End
public:

QgsTextBlock();

explicit QgsTextBlock( const QgsTextFragment &fragment );
%Docstring
Constructor for a QgsTextBlock consisting of a single text ``fragment``.
%End

};


typedef QVector<QgsTextBlock> QVectorQgsTextBlockBase;

class QgsTextDocument : QVectorQgsTextBlockBase
{
%Docstring

Represents a document consisting of one or more QgsTextBlock objects.

.. versionadded:: 3.14
%End

%TypeHeaderCode
#include "qgstextrenderer.h"
#include "qvector.h"
typedef QVector<QgsTextBlock> QVectorQgsTextBlockBase;
%End
public:

QgsTextDocument();

explicit QgsTextDocument( const QgsTextBlock &block );
%Docstring
Constructor for a QgsTextDocument consisting of a single text ``block``.
%End

explicit QgsTextDocument( const QgsTextFragment &fragment );
%Docstring
Constructor for a QgsTextDocument consisting of a single text ``fragment``.
%End

explicit QgsTextDocument( const QStringList &lines );
%Docstring
Constructor for QgsTextDocument consisting of a set of plain text ``lines``.
%End

QStringList toPlainText() const;
%Docstring
Returns a list of plain text lines of text representing the document.
%End

};

class QgsTextRenderer
{
Expand Down
4 changes: 4 additions & 0 deletions src/core/qgstextrenderer.h
Expand Up @@ -1634,6 +1634,8 @@ class CORE_EXPORT QgsTextFormat

};

#ifndef SIP_RUN

/**
* \class QgsTextCharacterFormat
* \ingroup core
Expand Down Expand Up @@ -1786,6 +1788,8 @@ class CORE_EXPORT QgsTextDocument : public QVector< QgsTextBlock >

};

#endif

/**
* \class QgsTextRenderer
* \ingroup core
Expand Down

0 comments on commit 173e209

Please sign in to comment.