Skip to content
Permalink
Browse files

Sip says no

  • Loading branch information
nyalldawson committed May 11, 2020
1 parent f268356 commit 173e209a1544ced434752997de3ec509130ba9ae
Showing with 4 additions and 161 deletions.
  1. +0 −161 python/core/auto_generated/qgstextrenderer.sip.in
  2. +4 −0 src/core/qgstextrenderer.h
@@ -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
{
@@ -1634,6 +1634,8 @@ class CORE_EXPORT QgsTextFormat

};

#ifndef SIP_RUN

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

};

#endif

/**
* \class QgsTextRenderer
* \ingroup core

0 comments on commit 173e209

Please sign in to comment.
You can’t perform that action at this time.