Qt 4.8
Public Functions | Public Variables | List of all members
QWSEmbedCommand Struct Reference

#include <qwscommand_qws_p.h>

Inheritance diagram for QWSEmbedCommand:
QWSCommand QWSProtocolItem

Public Functions

 QWSEmbedCommand ()
 
void setData (const char *d, int len, bool allocateMem=true)
 
void setData (WId embedder, WId embedded, QWSEmbedEvent::Type type, const QRegion reg=QRegion())
 
- Public Functions inherited from QWSCommand
 QWSCommand (int t, int len, char *ptr)
 
- 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 {
   WId   embedded
 
   WId   embedder
 
   int   rects
 
   QWSEmbedEvent::Type   type
 
simpleData
 
- Public Variables inherited from QWSProtocolItem
int bytesRead
 
bool deleteRaw
 
char * rawDataPtr
 
int rawLen
 
char * simpleDataPtr
 
int simpleLen
 
int type
 

Additional Inherited Members

- Public Types inherited from QWSCommand
enum  Type {
  Unknown = 0, Create, Shutdown, Region,
  RegionMove, RegionDestroy, SetProperty, AddProperty,
  RemoveProperty, GetProperty, SetSelectionOwner, ConvertSelection,
  RequestFocus, ChangeAltitude, SetOpacity, DefineCursor,
  SelectCursor, PositionCursor, GrabMouse, PlaySound,
  QCopRegisterChannel, QCopSend, RegionName, Identify,
  GrabKeyboard, RepaintRegion, IMMouse, IMUpdate,
  IMResponse, Embed, Font, ScreenTransform
}
 
- Static Public Functions inherited from QWSCommand
static QWSCommandfactory (int type)
 

Detailed Description

Definition at line 753 of file qwscommand_qws_p.h.

Constructors and Destructors

◆ QWSEmbedCommand()

QWSEmbedCommand::QWSEmbedCommand ( )
inline

Definition at line 755 of file qwscommand_qws_p.h.

756  sizeof(simpleData),
757  reinterpret_cast<char*>(&simpleData))
758  {}
struct QWSEmbedCommand::@168 simpleData
QWSCommand(int t, int len, char *ptr)

Functions

◆ setData() [1/2]

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

Reimplemented from QWSProtocolItem.

Definition at line 760 of file qwscommand_qws_p.h.

Referenced by QWSEmbedWidgetPrivate::resize(), QWSEmbedWidgetPrivate::updateWindow(), and QWSEmbedWidget::~QWSEmbedWidget().

761  {
762  QWSCommand::setData(d, len, allocateMem);
763 
764  if( simpleData.rects * int(sizeof(QRect)) > len )
765  {
766  qWarning( "embed command - region rectangle count %d - buffer size %d - buffer overrun!",
767  simpleData.rects, len );
768  }
769  else
770  {
771  region.setRects(reinterpret_cast<QRect*>(rawDataPtr),
772  simpleData.rects);
773  }
774  }
double d
Definition: qnumeric_p.h:62
virtual void setData(const char *data, int len, bool allocateMem=true)
Q_CORE_EXPORT void qWarning(const char *,...)
struct QWSEmbedCommand::@168 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
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58

◆ setData() [2/2]

void QWSEmbedCommand::setData ( WId  embedder,
WId  embedded,
QWSEmbedEvent::Type  type,
const QRegion  reg = QRegion() 
)
inline

Definition at line 776 of file qwscommand_qws_p.h.

778  {
779  simpleData.embedder = embedder;
780  simpleData.embedded = embedded;
781  simpleData.type = type;
782 
783  region = reg;
784  const QVector<QRect> rects = reg.rects();
785  simpleData.rects = rects.count();
786 
787  QWSCommand::setData(reinterpret_cast<const char*>(rects.constData()),
788  rects.count() * sizeof(QRect));
789  }
int count(const T &t) const
Returns the number of occurrences of value in the vector.
Definition: qvector.h:742
virtual void setData(const char *data, int len, bool allocateMem=true)
QWSEmbedEvent::Type type
struct QWSEmbedCommand::@168 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

Properties

◆ embedded

WId QWSEmbedCommand::embedded

Definition at line 793 of file qwscommand_qws_p.h.

Referenced by QWSServerPrivate::invokeEmbed().

◆ embedder

WId QWSEmbedCommand::embedder

Definition at line 792 of file qwscommand_qws_p.h.

Referenced by QWSServerPrivate::invokeEmbed().

◆ rects

int QWSEmbedCommand::rects

Definition at line 795 of file qwscommand_qws_p.h.

◆ region

QRegion QWSEmbedCommand::region

Definition at line 798 of file qwscommand_qws_p.h.

Referenced by QWSServerPrivate::invokeEmbed().

◆ simpleData

struct { ... } QWSEmbedCommand::simpleData

◆ type

QWSEmbedEvent::Type QWSEmbedCommand::type

Definition at line 794 of file qwscommand_qws_p.h.

Referenced by QWSServerPrivate::invokeEmbed().


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