API reference - Class QTextFormat

Notation used in Ruby API documentation

Description: Binding of QTextFormat

Sub-classes: PageBreakFlag

Public constructors

new QTextFormatnewConstructor QTextFormat::QTextFormat()
new QTextFormatnew(int type)Constructor QTextFormat::QTextFormat(int type)
new QTextFormatnew(const QTextFormat rhs)Constructor QTextFormat::QTextFormat(const QTextFormat &rhs)

Public methods

[const]bool!=(const QTextFormat rhs)Method bool QTextFormat::operator!=(const QTextFormat &rhs)
[const]bool==(const QTextFormat rhs)Method bool QTextFormat::operator==(const QTextFormat &rhs)
void_assign(const QTextFormat other)Assigns another object to self
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
QTextFormatassign(const QTextFormat rhs)Method QTextFormat &QTextFormat::operator=(const QTextFormat &rhs)
[const]QBrushbackgroundMethod QBrush QTextFormat::background()
voidbackground=(const QBrush brush)Method void QTextFormat::setBackground(const QBrush &brush)
[const]boolboolProperty(int propertyId)Method bool QTextFormat::boolProperty(int propertyId)
[const]QBrushbrushProperty(int propertyId)Method QBrush QTextFormat::brushProperty(int propertyId)
voidclearBackgroundMethod void QTextFormat::clearBackground()
voidclearForegroundMethod void QTextFormat::clearForeground()
voidclearProperty(int propertyId)Method void QTextFormat::clearProperty(int propertyId)
[const]QColorcolorProperty(int propertyId)Method QColor QTextFormat::colorProperty(int propertyId)
[const]doubledoubleProperty(int propertyId)Method double QTextFormat::doubleProperty(int propertyId)
[const]new QTextFormat ptrdupCreates a copy of self
[const]QBrushforegroundMethod QBrush QTextFormat::foreground()
voidforeground=(const QBrush brush)Method void QTextFormat::setForeground(const QBrush &brush)
[const]boolhasProperty(int propertyId)Method bool QTextFormat::hasProperty(int propertyId)
[const]intintProperty(int propertyId)Method int QTextFormat::intProperty(int propertyId)
[const]boolisBlockFormat?Method bool QTextFormat::isBlockFormat()
[const]boolisCharFormat?Method bool QTextFormat::isCharFormat()
[const]boolisFrameFormat?Method bool QTextFormat::isFrameFormat()
[const]boolisImageFormat?Method bool QTextFormat::isImageFormat()
[const]boolisListFormat?Method bool QTextFormat::isListFormat()
[const]boolisTableCellFormat?Method bool QTextFormat::isTableCellFormat()
[const]boolisTableFormat?Method bool QTextFormat::isTableFormat()
[const]boolisValid?Method bool QTextFormat::isValid()
[const]Qt_LayoutDirectionlayoutDirectionMethod Qt::LayoutDirection QTextFormat::layoutDirection()
voidlayoutDirection=(const Qt_LayoutDirection direction)Method void QTextFormat::setLayoutDirection(Qt::LayoutDirection direction)
[const]QTextLengthlengthProperty(int propertyId)Method QTextLength QTextFormat::lengthProperty(int propertyId)
[const]QTextLength[]lengthVectorProperty(int propertyId)Method QVector<QTextLength> QTextFormat::lengthVectorProperty(int propertyId)
voidmerge(const QTextFormat other)Method void QTextFormat::merge(const QTextFormat &other)
[const]intobjectIndexMethod int QTextFormat::objectIndex()
voidobjectIndex=(int object)Method void QTextFormat::setObjectIndex(int object)
[const]intobjectTypeMethod int QTextFormat::objectType()
voidobjectType=(int type)Method void QTextFormat::setObjectType(int type)
[const]QPenpenProperty(int propertyId)Method QPen QTextFormat::penProperty(int propertyId)
[const]QVariantproperty(int propertyId)Method QVariant QTextFormat::property(int propertyId)
[const]intpropertyCountMethod int QTextFormat::propertyCount()
voidsetBackground(const QBrush brush)Method void QTextFormat::setBackground(const QBrush &brush)
voidsetForeground(const QBrush brush)Method void QTextFormat::setForeground(const QBrush &brush)
voidsetLayoutDirection(const Qt_LayoutDirection direction)Method void QTextFormat::setLayoutDirection(Qt::LayoutDirection direction)
voidsetObjectIndex(int object)Method void QTextFormat::setObjectIndex(int object)
voidsetObjectType(int type)Method void QTextFormat::setObjectType(int type)
voidsetProperty(int propertyId,
const QVariant value)
Method void QTextFormat::setProperty(int propertyId, const QVariant &value)
voidsetProperty(int propertyId,
QTextLength[] lengths)
Method void QTextFormat::setProperty(int propertyId, const QVector<QTextLength> &lengths)
[const]stringstringProperty(int propertyId)Method QString QTextFormat::stringProperty(int propertyId)
[const]QTextBlockFormattoBlockFormatMethod QTextBlockFormat QTextFormat::toBlockFormat()
[const]QTextCharFormattoCharFormatMethod QTextCharFormat QTextFormat::toCharFormat()
[const]QTextFrameFormattoFrameFormatMethod QTextFrameFormat QTextFormat::toFrameFormat()
[const]QTextImageFormattoImageFormatMethod QTextImageFormat QTextFormat::toImageFormat()
[const]QTextListFormattoListFormatMethod QTextListFormat QTextFormat::toListFormat()
[const]QTextTableCellFormattoTableCellFormatMethod QTextTableCellFormat QTextFormat::toTableCellFormat()
[const]QTextTableFormattoTableFormatMethod QTextTableFormat QTextFormat::toTableFormat()
[const]inttypeMethod int QTextFormat::type()

Public static methods and constants

[static,const]new QTextFormat_PageBreakFlag ptrPageBreak_AlwaysAfterEnum constant QTextFormat::PageBreak_AlwaysAfter
[static,const]new QTextFormat_PageBreakFlag ptrPageBreak_AlwaysBeforeEnum constant QTextFormat::PageBreak_AlwaysBefore
[static,const]new QTextFormat_PageBreakFlag ptrPageBreak_AutoEnum constant QTextFormat::PageBreak_Auto

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

[const] bool !=(const QTextFormat rhs)

Description: Method bool QTextFormat::operator!=(const QTextFormat &rhs)

[const] bool ==(const QTextFormat rhs)

Description: Method bool QTextFormat::operator==(const QTextFormat &rhs)

[static,const] new QTextFormat_PageBreakFlag ptr PageBreak_AlwaysAfter

Description: Enum constant QTextFormat::PageBreak_AlwaysAfter

[static,const] new QTextFormat_PageBreakFlag ptr PageBreak_AlwaysBefore

Description: Enum constant QTextFormat::PageBreak_AlwaysBefore

[static,const] new QTextFormat_PageBreakFlag ptr PageBreak_Auto

Description: Enum constant QTextFormat::PageBreak_Auto

void _assign(const QTextFormat other)

Description: Assigns another object to self

void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

[const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

QTextFormat assign(const QTextFormat rhs)

Description: Method QTextFormat &QTextFormat::operator=(const QTextFormat &rhs)

[const] QBrush background

Description: Method QBrush QTextFormat::background()

Python specific notes:

The object exposes a readable attribute 'background'. This is the getter.

void background=(const QBrush brush)

Description: Method void QTextFormat::setBackground(const QBrush &brush)

Python specific notes:

The object exposes a writable attribute 'background'. This is the setter.

[const] bool boolProperty(int propertyId)

Description: Method bool QTextFormat::boolProperty(int propertyId)

[const] QBrush brushProperty(int propertyId)

Description: Method QBrush QTextFormat::brushProperty(int propertyId)

void clearBackground

Description: Method void QTextFormat::clearBackground()

void clearForeground

Description: Method void QTextFormat::clearForeground()

void clearProperty(int propertyId)

Description: Method void QTextFormat::clearProperty(int propertyId)

[const] QColor colorProperty(int propertyId)

Description: Method QColor QTextFormat::colorProperty(int propertyId)

void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

[const] double doubleProperty(int propertyId)

Description: Method double QTextFormat::doubleProperty(int propertyId)

[const] new QTextFormat ptr dup

Description: Creates a copy of self

[const] QBrush foreground

Description: Method QBrush QTextFormat::foreground()

Python specific notes:

The object exposes a readable attribute 'foreground'. This is the getter.

void foreground=(const QBrush brush)

Description: Method void QTextFormat::setForeground(const QBrush &brush)

Python specific notes:

The object exposes a writable attribute 'foreground'. This is the setter.

[const] bool hasProperty(int propertyId)

Description: Method bool QTextFormat::hasProperty(int propertyId)

[const] int intProperty(int propertyId)

Description: Method int QTextFormat::intProperty(int propertyId)

[const] bool isBlockFormat?

Description: Method bool QTextFormat::isBlockFormat()

[const] bool isCharFormat?

Description: Method bool QTextFormat::isCharFormat()

[const] bool isFrameFormat?

Description: Method bool QTextFormat::isFrameFormat()

[const] bool isImageFormat?

Description: Method bool QTextFormat::isImageFormat()

[const] bool isListFormat?

Description: Method bool QTextFormat::isListFormat()

[const] bool isTableCellFormat?

Description: Method bool QTextFormat::isTableCellFormat()

[const] bool isTableFormat?

Description: Method bool QTextFormat::isTableFormat()

[const] bool isValid?

Description: Method bool QTextFormat::isValid()

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

[const] Qt_LayoutDirection layoutDirection

Description: Method Qt::LayoutDirection QTextFormat::layoutDirection()

Python specific notes:

The object exposes a readable attribute 'layoutDirection'. This is the getter.

void layoutDirection=(const Qt_LayoutDirection direction)

Description: Method void QTextFormat::setLayoutDirection(Qt::LayoutDirection direction)

Python specific notes:

The object exposes a writable attribute 'layoutDirection'. This is the setter.

[const] QTextLength lengthProperty(int propertyId)

Description: Method QTextLength QTextFormat::lengthProperty(int propertyId)

[const] QTextLength[] lengthVectorProperty(int propertyId)

Description: Method QVector<QTextLength> QTextFormat::lengthVectorProperty(int propertyId)

void merge(const QTextFormat other)

Description: Method void QTextFormat::merge(const QTextFormat &other)

[static] new QTextFormat new

Description: Constructor QTextFormat::QTextFormat()

This method creates an object of class QTextFormat.

Python specific notes:

This method is the default initializer of the object

[static] new QTextFormat new(int type)

Description: Constructor QTextFormat::QTextFormat(int type)

This method creates an object of class QTextFormat.

Python specific notes:

This method is the default initializer of the object

[static] new QTextFormat new(const QTextFormat rhs)

Description: Constructor QTextFormat::QTextFormat(const QTextFormat &rhs)

This method creates an object of class QTextFormat.

Python specific notes:

This method is the default initializer of the object

[const] int objectIndex

Description: Method int QTextFormat::objectIndex()

Python specific notes:

The object exposes a readable attribute 'objectIndex'. This is the getter.

void objectIndex=(int object)

Description: Method void QTextFormat::setObjectIndex(int object)

Python specific notes:

The object exposes a writable attribute 'objectIndex'. This is the setter.

[const] int objectType

Description: Method int QTextFormat::objectType()

Python specific notes:

The object exposes a readable attribute 'objectType'. This is the getter.

void objectType=(int type)

Description: Method void QTextFormat::setObjectType(int type)

Python specific notes:

The object exposes a writable attribute 'objectType'. This is the setter.

[const] QPen penProperty(int propertyId)

Description: Method QPen QTextFormat::penProperty(int propertyId)

[const] QVariant property(int propertyId)

Description: Method QVariant QTextFormat::property(int propertyId)

[const] int propertyCount

Description: Method int QTextFormat::propertyCount()

void setBackground(const QBrush brush)

Description: Method void QTextFormat::setBackground(const QBrush &brush)

Python specific notes:

The object exposes a writable attribute 'background'. This is the setter.

void setForeground(const QBrush brush)

Description: Method void QTextFormat::setForeground(const QBrush &brush)

Python specific notes:

The object exposes a writable attribute 'foreground'. This is the setter.

void setLayoutDirection(const Qt_LayoutDirection direction)

Description: Method void QTextFormat::setLayoutDirection(Qt::LayoutDirection direction)

Python specific notes:

The object exposes a writable attribute 'layoutDirection'. This is the setter.

void setObjectIndex(int object)

Description: Method void QTextFormat::setObjectIndex(int object)

Python specific notes:

The object exposes a writable attribute 'objectIndex'. This is the setter.

void setObjectType(int type)

Description: Method void QTextFormat::setObjectType(int type)

Python specific notes:

The object exposes a writable attribute 'objectType'. This is the setter.

void setProperty(int propertyId,const QVariant value)

Description: Method void QTextFormat::setProperty(int propertyId, const QVariant &value)

void setProperty(int propertyId,QTextLength[] lengths)

Description: Method void QTextFormat::setProperty(int propertyId, const QVector<QTextLength> &lengths)

[const] string stringProperty(int propertyId)

Description: Method QString QTextFormat::stringProperty(int propertyId)

[const] QTextBlockFormat toBlockFormat

Description: Method QTextBlockFormat QTextFormat::toBlockFormat()

[const] QTextCharFormat toCharFormat

Description: Method QTextCharFormat QTextFormat::toCharFormat()

[const] QTextFrameFormat toFrameFormat

Description: Method QTextFrameFormat QTextFormat::toFrameFormat()

[const] QTextImageFormat toImageFormat

Description: Method QTextImageFormat QTextFormat::toImageFormat()

[const] QTextListFormat toListFormat

Description: Method QTextListFormat QTextFormat::toListFormat()

[const] QTextTableCellFormat toTableCellFormat

Description: Method QTextTableCellFormat QTextFormat::toTableCellFormat()

[const] QTextTableFormat toTableFormat

Description: Method QTextTableFormat QTextFormat::toTableFormat()

[const] int type

Description: Method int QTextFormat::type()