Qt 4.8
Classes | Public Types | Public Functions | Public Variables | List of all members
QWSRegionEvent Struct Reference

#include <qwsevent_qws.h>

Inheritance diagram for QWSRegionEvent:
QWSEvent QWSProtocolItem

Classes

struct  SimpleData
 

Public Types

enum  Type { Allocation }
 
- Public Types inherited from QWSEvent
enum  Type {
  NoEvent, Connected, Mouse, Focus,
  Key, Region, Creation, PropertyNotify,
  PropertyReply, SelectionClear, SelectionRequest, SelectionNotify,
  MaxWindowRect, QCopMessage, WindowOperation, IMEvent,
  IMQuery, IMInit, Embed, Font,
  ScreenTransformation, NEvent
}
 This enum describes the origin of the event. More...
 

Public Functions

 QWSRegionEvent ()
 
void setData (const char *d, int len, bool allocateMem=true)
 
void setData (int winId, const QRegion &region, uint type)
 
- Public Functions inherited from QWSEvent
QWSMouseEventasMouse ()
 
 QWSEvent (int t, int len, char *ptr)
 
int window ()
 
int window () const
 
- Public Functions inherited from QWSProtocolItem
void copyFrom (const QWSProtocolItem *item)
 
 QWSProtocolItem (int t, int len, char *ptr)
 
bool read (QIODevice *s)
 
void write (QIODevice *s)
 
virtual ~QWSProtocolItem ()
 

Public Variables

QRectrectangles
 
struct QWSRegionEvent::SimpleData simpleData
 
- Public Variables inherited from QWSProtocolItem
int bytesRead
 
bool deleteRaw
 
char * rawDataPtr
 
int rawLen
 
char * simpleDataPtr
 
int simpleLen
 
int type
 

Additional Inherited Members

- Static Public Functions inherited from QWSEvent
static QWSEventfactory (int type)
 

Detailed Description

Definition at line 228 of file qwsevent_qws.h.

Enumerations

◆ Type

Enumerator
Allocation 

Definition at line 251 of file qwsevent_qws.h.

251  {Allocation
252 #ifdef QT_QWS_CLIENTBLIT
253  , DirectPaint
254 #endif
255  };

Constructors and Destructors

◆ QWSRegionEvent()

QWSRegionEvent::QWSRegionEvent ( )
inline

Definition at line 229 of file qwsevent_qws.h.

231  reinterpret_cast<char*>(&simpleData))
232  { memset(reinterpret_cast<char*>(&simpleData),0,sizeof(simpleData)); }
struct QWSRegionEvent::SimpleData simpleData
QWSEvent(int t, int len, char *ptr)
Definition: qwsevent_qws.h:61

Functions

◆ setData() [1/2]

void QWSRegionEvent::setData ( const char *  d,
int  len,
bool  allocateMem = true 
)
inlinevirtual

Reimplemented from QWSProtocolItem.

Definition at line 234 of file qwsevent_qws.h.

234  {
235  QWSEvent::setData(d, len, allocateMem);
236  rectangles = reinterpret_cast<QRect*>(rawDataPtr);
237  }
double d
Definition: qnumeric_p.h:62
virtual void setData(const char *data, int len, bool allocateMem=true)
QRect * rectangles
Definition: qwsevent_qws.h:265
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58

◆ setData() [2/2]

void QWSRegionEvent::setData ( int  winId,
const QRegion region,
uint  type 
)
inline

Definition at line 239 of file qwsevent_qws.h.

239  {
240  const QVector<QRect> rects = region.rects();
241  setData(reinterpret_cast<const char*>(rects.constData()),
242  rects.size() * sizeof(QRect));
243  simpleData.window = winId;
244  simpleData.nrectangles = rects.size();
245  simpleData.type = type;
246 #ifdef QT_QWS_CLIENTBLIT
247  simpleData.id = 0;
248 #endif
249  }
void setData(const char *d, int len, bool allocateMem=true)
Definition: qwsevent_qws.h:234
struct QWSRegionEvent::SimpleData simpleData
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
Definition: qregion.cpp:4412
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
const T * constData() const
Returns a const pointer to the data stored in the vector.
Definition: qvector.h:154
int size() const
Returns the number of items in the vector.
Definition: qvector.h:137

Properties

◆ rectangles

QRect* QWSRegionEvent::rectangles

◆ simpleData

struct QWSRegionEvent::SimpleData QWSRegionEvent::simpleData

The documentation for this struct was generated from the following file: