QtGui/qregion.h Source File
Go to the documentation of this file.
49 #ifndef QT_NO_DATASTREAM
59 template <class T> class
QVector;
62 #if defined(Q_WS_QWS) || defined(Q_WS_QPA) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN)
63 struct QRegionPrivate;
74 QRegion(
int x,
int y,
int w,
int h, RegionType
t = Rectangle);
84 #ifdef Q_COMPILER_RVALUE_REFS
86 {
qSwap(d, other.d);
return *
this; }
90 inline QT3_SUPPORT
bool isNull()
const {
return isEmpty(); }
94 bool contains(
const QPoint &
p)
const;
95 bool contains(
const QRect &
r)
const;
97 void translate(
int dx,
int dy);
117 bool intersects(
const QRegion &
r)
const;
118 bool intersects(
const QRect &
r)
const;
120 QRect boundingRect()
const;
122 void setRects(
const QRect *rect,
int num);
124 QT_DEPRECATED
int numRects()
const;
126 int rectCount()
const;
145 operator QVariant()
const;
148 Handle handle()
const;
151 #if defined(Q_WS_WIN)
152 inline HRGN handle()
const { ensureHandle();
return d->rgn; }
153 #elif defined(Q_WS_X11)
154 inline Region handle()
const {
if(!d->rgn) updateX11Region();
return d->rgn; }
155 #elif defined(Q_WS_MAC)
156 #if defined Q_WS_MAC32
161 #ifdef QT_MAC_USE_COCOA
163 { Q_UNUSED(unused);
return toHIMutableShape(); }
165 inline RgnHandle handle()
const {
return handle(
false); }
166 inline RgnHandle handle(
bool)
const {
return toQDRgn(); }
170 #elif defined(Q_WS_QWS) || defined(Q_WS_QPA)
171 inline void *handle()
const {
return d->qt_rgn; }
175 #ifndef QT_NO_DATASTREAM
182 #if defined(Q_WS_WIN)
183 void ensureHandle()
const;
185 #elif defined(Q_WS_X11)
186 void updateX11Region()
const;
187 void *clipRectangles(
int &
num)
const;
188 friend void *qt_getClipRects(
const QRegion &
r,
int &
num);
189 #elif defined(Q_WS_MAC)
191 const CGRect *inRect,
void *inRefcon);
193 friend bool qt_region_strictContains(
const QRegion ®ion,
195 friend struct QRegionPrivate;
197 #ifndef QT_NO_DATASTREAM
202 #if defined(Q_WS_WIN)
204 #elif defined(Q_WS_X11)
207 #elif defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA)
210 #if defined(Q_WS_QWS) || defined(Q_WS_QPA) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN)
211 QRegionPrivate *qt_rgn;
214 #if defined(Q_WS_WIN)
215 friend class QETWidget;
217 struct QRegionData *d;
218 static struct QRegionData shared_empty;
219 static void cleanUp(QRegionData *
x);
226 #ifndef QT_NO_DATASTREAM
231 #ifndef QT_NO_DEBUG_STREAM
GLdouble GLdouble GLdouble r
QByteArray & operator+=(QByteArray &a, const QStringBuilder< A, B > &b)
bool operator!=(const QRegion &r) const
QRegion united(const QRect &r) const
struct __HIShape * HIMutableShapeRef
const struct __HIShape * HIShapeRef
QRegion intersected(const QRect &r) const
bool operator==(const Attribute &cA, const AttributeInstance< type > &cB)
This operator compares the two attributes and NOT their values.
Q_CORE_EXPORT QBitArray operator^(const QBitArray &, const QBitArray &)
Q_CORE_EXPORT QBitArray operator&(const QBitArray &, const QBitArray &)
QRegion translated(const QPoint &p) const
#define QT_BEGIN_NAMESPACE
Q_INLINE_TEMPLATE void qSwap(QScopedPointer< T, Cleanup > &p1, QScopedPointer< T, Cleanup > &p2)
QRegion intersected(const QRegion &r) const
QRegion subtracted(const QRegion &r) const
QRegion united(const QRegion &r) const
const QByteArray operator+(const QByteArray &a1, const QByteArray &a2)
struct OpaqueRgnHandle * RgnHandle
Q_GUI_EXPORT QDataStream & operator<<(QDataStream &, const QRegion &)
Q_GUI_EXPORT QDataStream & operator>>(QDataStream &, QRegion &)
int int int int int int h
QRegion xored(const QRegion &r) const
void translate(const QPoint &p)
const QPoint operator-(const QPoint &p1, const QPoint &p2)
Q_CORE_EXPORT QBitArray operator|(const QBitArray &, const QBitArray &)
GLubyte GLubyte GLubyte GLubyte w
void swap(QRegion &other)