KLayout 0.29.8 (2024-11-26 926dac96c) [master]

API reference - Class QRegion

Notation used in Ruby API documentation

Module: QtGui

Description: Binding of QRegion

Sub-classes: RegionType, QFlags_RegionType

Public constructors

new QRegionnewConstructor QRegion::QRegion()
new QRegionnew(int x,
int y,
int w,
int h,
const QRegion_RegionType t = QRegion::Rectangle)
Constructor QRegion::QRegion(int x, int y, int w, int h, QRegion::RegionType t)
new QRegionnew(const QRect r,
const QRegion_RegionType t = QRegion::Rectangle)
Constructor QRegion::QRegion(const QRect &r, QRegion::RegionType t)
new QRegionnew(const QPolygon pa,
const Qt_FillRule fillRule = Qt::OddEvenFill)
Constructor QRegion::QRegion(const QPolygon &pa, Qt::FillRule fillRule)
new QRegionnew(const QRegion region)Constructor QRegion::QRegion(const QRegion &region)
new QRegionnew(const QBitmap bitmap)Constructor QRegion::QRegion(const QBitmap &bitmap)

Public methods

[const]bool!=(const QRegion r)Method bool QRegion::operator!=(const QRegion &r)
[const]QRegion&(const QRegion r)Method QRegion QRegion::operator&(const QRegion &r)
[const]QRegion&(const QRect r)Method QRegion QRegion::operator&(const QRect &r)
QRegion&=(const QRegion r)Method QRegion &QRegion::operator&=(const QRegion &r)
QRegion&=(const QRect r)Method QRegion &QRegion::operator&=(const QRect &r)
[const]QRegion*(const QMatrix m)Operator QRegion ::operator *(const QRegion &r, const QMatrix &m)
[const]QRegion*(const QTransform m)Operator QRegion ::operator *(const QRegion &r, const QTransform &m)
[const]QRegion+(const QRegion r)Method QRegion QRegion::operator+(const QRegion &r)
[const]QRegion+(const QRect r)Method QRegion QRegion::operator+(const QRect &r)
QRegion+=(const QRegion r)Method QRegion &QRegion::operator+=(const QRegion &r)
QRegion+=(const QRect r)Method QRegion &QRegion::operator+=(const QRect &r)
[const]QRegion-(const QRegion r)Method QRegion QRegion::operator-(const QRegion &r)
QRegion-=(const QRegion r)Method QRegion &QRegion::operator-=(const QRegion &r)
[const]bool==(const QRegion r)Method bool QRegion::operator==(const QRegion &r)
[const]QRegion^(const QRegion r)Method QRegion QRegion::operator^(const QRegion &r)
QRegion^=(const QRegion r)Method QRegion &QRegion::operator^=(const QRegion &r)
void_assign(const QRegion other)Assigns another object to self
[const]QRegion ptr_const_castReturns a non-const reference 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.
QRegionassign(const QRegion arg1)Method QRegion &QRegion::operator=(const QRegion &)
[const]const QRect ptrbeginMethod const QRect *QRegion::begin()
[const]QRectboundingRectMethod QRect QRegion::boundingRect()
[const]const QRect ptrcbeginMethod const QRect *QRegion::cbegin()
[const]const QRect ptrcendMethod const QRect *QRegion::cend()
[const]boolcontains(const QPoint p)Method bool QRegion::contains(const QPoint &p)
[const]boolcontains(const QRect r)Method bool QRegion::contains(const QRect &r)
[const]new QRegion ptrdupCreates a copy of self
[const]const QRect ptrendMethod const QRect *QRegion::end()
[const]QRegionintersected(const QRegion r)Method QRegion QRegion::intersected(const QRegion &r)
[const]QRegionintersected(const QRect r)Method QRegion QRegion::intersected(const QRect &r)
[const]boolintersects(const QRegion r)Method bool QRegion::intersects(const QRegion &r)
[const]boolintersects(const QRect r)Method bool QRegion::intersects(const QRect &r)
[const]boolisEmpty?Method bool QRegion::isEmpty()
[const]boolisNull?Method bool QRegion::isNull()
[const]intrectCountMethod int QRegion::rectCount()
[const]QRect[]rectsMethod QVector<QRect> QRegion::rects()
voidsetRects(QRect[] arg1)Adaption of setRects without pointer.
[const]QRegionsubtracted(const QRegion r)Method QRegion QRegion::subtracted(const QRegion &r)
voidswap(QRegion other)Method void QRegion::swap(QRegion &other)
voidtranslate(int dx,
int dy)
Method void QRegion::translate(int dx, int dy)
voidtranslate(const QPoint p)Method void QRegion::translate(const QPoint &p)
[const]QRegiontranslated(int dx,
int dy)
Method QRegion QRegion::translated(int dx, int dy)
[const]QRegiontranslated(const QPoint p)Method QRegion QRegion::translated(const QPoint &p)
[const]QRegionunited(const QRegion r)Method QRegion QRegion::united(const QRegion &r)
[const]QRegionunited(const QRect r)Method QRegion QRegion::united(const QRect &r)
[const]QRegionxored(const QRegion r)Method QRegion QRegion::xored(const QRegion &r)
[const]QRegion|(const QRegion r)Method QRegion QRegion::operator|(const QRegion &r)
QRegion|=(const QRegion r)Method QRegion &QRegion::operator|=(const QRegion &r)

Public static methods and constants

[static,const]QRegion_RegionTypeEllipseEnum constant QRegion::Ellipse
[static,const]QRegion_RegionTypeRectangleEnum constant QRegion::Rectangle

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

!=

Signature: [const] bool != (const QRegion r)

Description: Method bool QRegion::operator!=(const QRegion &r)

&

(1) Signature: [const] QRegion & (const QRegion r)

Description: Method QRegion QRegion::operator&(const QRegion &r)

(2) Signature: [const] QRegion & (const QRect r)

Description: Method QRegion QRegion::operator&(const QRect &r)

&=

(1) Signature: QRegion &= (const QRegion r)

Description: Method QRegion &QRegion::operator&=(const QRegion &r)

(2) Signature: QRegion &= (const QRect r)

Description: Method QRegion &QRegion::operator&=(const QRect &r)

*

(1) Signature: [const] QRegion * (const QMatrix m)

Description: Operator QRegion ::operator *(const QRegion &r, const QMatrix &m)

This is the mapping of the global operator to the instance method.

Python specific notes:
This method also implements '__rmul__'.

(2) Signature: [const] QRegion * (const QTransform m)

Description: Operator QRegion ::operator *(const QRegion &r, const QTransform &m)

This is the mapping of the global operator to the instance method.

Python specific notes:
This method also implements '__rmul__'.

+

(1) Signature: [const] QRegion + (const QRegion r)

Description: Method QRegion QRegion::operator+(const QRegion &r)

(2) Signature: [const] QRegion + (const QRect r)

Description: Method QRegion QRegion::operator+(const QRect &r)

+=

(1) Signature: QRegion += (const QRegion r)

Description: Method QRegion &QRegion::operator+=(const QRegion &r)

(2) Signature: QRegion += (const QRect r)

Description: Method QRegion &QRegion::operator+=(const QRect &r)

-

Signature: [const] QRegion - (const QRegion r)

Description: Method QRegion QRegion::operator-(const QRegion &r)

-=

Signature: QRegion -= (const QRegion r)

Description: Method QRegion &QRegion::operator-=(const QRegion &r)

==

Signature: [const] bool == (const QRegion r)

Description: Method bool QRegion::operator==(const QRegion &r)

Ellipse

Signature: [static,const] QRegion_RegionType Ellipse

Description: Enum constant QRegion::Ellipse

Python specific notes:
The object exposes a readable attribute 'Ellipse'. This is the getter.

Rectangle

Signature: [static,const] QRegion_RegionType Rectangle

Description: Enum constant QRegion::Rectangle

Python specific notes:
The object exposes a readable attribute 'Rectangle'. This is the getter.

^

Signature: [const] QRegion ^ (const QRegion r)

Description: Method QRegion QRegion::operator^(const QRegion &r)

^=

Signature: QRegion ^= (const QRegion r)

Description: Method QRegion &QRegion::operator^=(const QRegion &r)

_assign

Signature: void _assign (const QRegion other)

Description: Assigns another object to self

_const_cast

Signature: [const] QRegion ptr _const_cast

Description: Returns a non-const reference to self.

Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects.

This method has been introduced in version 0.29.6.

_create

Signature: 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.

_destroy

Signature: 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.

_destroyed?

Signature: [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.

_is_const_object?

Signature: [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.

_manage

Signature: 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.

_unmanage

Signature: 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.

assign

Signature: QRegion assign (const QRegion arg1)

Description: Method QRegion &QRegion::operator=(const QRegion &)

begin

Signature: [const] const QRect ptr begin

Description: Method const QRect *QRegion::begin()

boundingRect

Signature: [const] QRect boundingRect

Description: Method QRect QRegion::boundingRect()

cbegin

Signature: [const] const QRect ptr cbegin

Description: Method const QRect *QRegion::cbegin()

cend

Signature: [const] const QRect ptr cend

Description: Method const QRect *QRegion::cend()

contains

(1) Signature: [const] bool contains (const QPoint p)

Description: Method bool QRegion::contains(const QPoint &p)

(2) Signature: [const] bool contains (const QRect r)

Description: Method bool QRegion::contains(const QRect &r)

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

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.

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

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.

destroyed?

Signature: [const] bool destroyed?

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

Use of this method is deprecated. Use _destroyed? instead

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.

dup

Signature: [const] new QRegion ptr dup

Description: Creates a copy of self

Python specific notes:
This method also implements '__copy__' and '__deepcopy__'.

end

Signature: [const] const QRect ptr end

Description: Method const QRect *QRegion::end()

intersected

(1) Signature: [const] QRegion intersected (const QRegion r)

Description: Method QRegion QRegion::intersected(const QRegion &r)

(2) Signature: [const] QRegion intersected (const QRect r)

Description: Method QRegion QRegion::intersected(const QRect &r)

intersects

(1) Signature: [const] bool intersects (const QRegion r)

Description: Method bool QRegion::intersects(const QRegion &r)

(2) Signature: [const] bool intersects (const QRect r)

Description: Method bool QRegion::intersects(const QRect &r)

isEmpty?

Signature: [const] bool isEmpty?

Description: Method bool QRegion::isEmpty()

isNull?

Signature: [const] bool isNull?

Description: Method bool QRegion::isNull()

is_const_object?

Signature: [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

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

new

(1) Signature: [static] new QRegion new

Description: Constructor QRegion::QRegion()

This method creates an object of class QRegion.

Python specific notes:
This method is the default initializer of the object.

(2) Signature: [static] new QRegion new (int x, int y, int w, int h, const QRegion_RegionType t = QRegion::Rectangle)

Description: Constructor QRegion::QRegion(int x, int y, int w, int h, QRegion::RegionType t)

This method creates an object of class QRegion.

Python specific notes:
This method is the default initializer of the object.

(3) Signature: [static] new QRegion new (const QRect r, const QRegion_RegionType t = QRegion::Rectangle)

Description: Constructor QRegion::QRegion(const QRect &r, QRegion::RegionType t)

This method creates an object of class QRegion.

Python specific notes:
This method is the default initializer of the object.

(4) Signature: [static] new QRegion new (const QPolygon pa, const Qt_FillRule fillRule = Qt::OddEvenFill)

Description: Constructor QRegion::QRegion(const QPolygon &pa, Qt::FillRule fillRule)

This method creates an object of class QRegion.

Python specific notes:
This method is the default initializer of the object.

(5) Signature: [static] new QRegion new (const QRegion region)

Description: Constructor QRegion::QRegion(const QRegion &region)

This method creates an object of class QRegion.

Python specific notes:
This method is the default initializer of the object.

(6) Signature: [static] new QRegion new (const QBitmap bitmap)

Description: Constructor QRegion::QRegion(const QBitmap &bitmap)

This method creates an object of class QRegion.

Python specific notes:
This method is the default initializer of the object.

rectCount

Signature: [const] int rectCount

Description: Method int QRegion::rectCount()

rects

Signature: [const] QRect[] rects

Description: Method QVector<QRect> QRegion::rects()

Python specific notes:
The object exposes a readable attribute 'rects'. This is the getter.

setRects

Signature: void setRects (QRect[] arg1)

Description: Adaption of setRects without pointer.

subtracted

Signature: [const] QRegion subtracted (const QRegion r)

Description: Method QRegion QRegion::subtracted(const QRegion &r)

swap

Signature: void swap (QRegion other)

Description: Method void QRegion::swap(QRegion &other)

translate

(1) Signature: void translate (int dx, int dy)

Description: Method void QRegion::translate(int dx, int dy)

(2) Signature: void translate (const QPoint p)

Description: Method void QRegion::translate(const QPoint &p)

translated

(1) Signature: [const] QRegion translated (int dx, int dy)

Description: Method QRegion QRegion::translated(int dx, int dy)

(2) Signature: [const] QRegion translated (const QPoint p)

Description: Method QRegion QRegion::translated(const QPoint &p)

united

(1) Signature: [const] QRegion united (const QRegion r)

Description: Method QRegion QRegion::united(const QRegion &r)

(2) Signature: [const] QRegion united (const QRect r)

Description: Method QRegion QRegion::united(const QRect &r)

xored

Signature: [const] QRegion xored (const QRegion r)

Description: Method QRegion QRegion::xored(const QRegion &r)

|

Signature: [const] QRegion | (const QRegion r)

Description: Method QRegion QRegion::operator|(const QRegion &r)

|=

Signature: QRegion |= (const QRegion r)

Description: Method QRegion &QRegion::operator|=(const QRegion &r)