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

#include <qwsevent_qws.h>

Inheritance diagram for QWSEmbedEvent:
QWSEvent QWSProtocolItem

Classes

struct  SimpleData
 

Public Types

enum  Type { StartEmbed = 1, StopEmbed = 2, Region = 4 }
 
- 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

 QWSEmbedEvent ()
 
void setData (const char *d, int len, bool allocateMem=true)
 
void setData (int winId, Type type, const QRegion &reg=QRegion())
 
- 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

QRegion region
 
struct QWSEmbedEvent::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 269 of file qwsevent_qws.h.

Enumerations

◆ Type

Enumerator
StartEmbed 
StopEmbed 
Region 

Definition at line 275 of file qwsevent_qws.h.

275 { StartEmbed = 1, StopEmbed = 2, Region = 4 };
struct _XRegion * Region
Definition: qwindowdefs.h:118

Constructors and Destructors

◆ QWSEmbedEvent()

QWSEmbedEvent::QWSEmbedEvent ( )
inline

Definition at line 271 of file qwsevent_qws.h.

272  reinterpret_cast<char*>(&simpleData))
273  {}
struct QWSEmbedEvent::SimpleData simpleData
QWSEvent(int t, int len, char *ptr)
Definition: qwsevent_qws.h:61

Functions

◆ setData() [1/2]

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

Reimplemented from QWSProtocolItem.

Definition at line 277 of file qwsevent_qws.h.

277  {
278  QWSEvent::setData(d, len, allocateMem);
279  region.setRects(reinterpret_cast<const QRect *>(rawDataPtr),
281  }
double d
Definition: qnumeric_p.h:62
virtual void setData(const char *data, int len, bool allocateMem=true)
struct QWSEmbedEvent::SimpleData simpleData
void setRects(const QRect *rect, int num)
Sets the region using the array of rectangles specified by rects and number.
Definition: qregion.cpp:4424
QRegion region
Definition: qwsevent_qws.h:299

◆ setData() [2/2]

void QWSEmbedEvent::setData ( int  winId,
Type  type,
const QRegion reg = QRegion() 
)
inline

Definition at line 283 of file qwsevent_qws.h.

283  {
284  simpleData.window = winId;
285  simpleData.nrectangles = reg.rects().size();
286  simpleData.type = type;
287  region = reg;
288  const QVector<QRect> rects = reg.rects();
289  QWSEvent::setData(reinterpret_cast<const char*>(rects.data()),
290  rects.size() * sizeof(QRect));
291  }
virtual void setData(const char *data, int len, bool allocateMem=true)
struct QWSEmbedEvent::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
T * data()
Returns a pointer to the data stored in the vector.
Definition: qvector.h:152
int size() const
Returns the number of items in the vector.
Definition: qvector.h:137
QRegion region
Definition: qwsevent_qws.h:299

Properties

◆ region

QRegion QWSEmbedEvent::region

Definition at line 299 of file qwsevent_qws.h.

◆ simpleData

struct QWSEmbedEvent::SimpleData QWSEmbedEvent::simpleData

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