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

#include <qwscommand_qws_p.h>

Inheritance diagram for QWSQCopRegisterChannelCommand:
QWSCommand QWSProtocolItem

Classes

struct  SimpleData
 

Public Functions

 QWSQCopRegisterChannelCommand ()
 
void setChannel (const QString &n)
 
void setData (const char *d, int len, bool allocateMem)
 
- 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

QString channel
 
struct QWSQCopRegisterChannelCommand::SimpleData 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 595 of file qwscommand_qws_p.h.

Constructors and Destructors

◆ QWSQCopRegisterChannelCommand()

QWSQCopRegisterChannelCommand::QWSQCopRegisterChannelCommand ( )
inline

Definition at line 597 of file qwscommand_qws_p.h.

597  :
599  sizeof(simpleData), reinterpret_cast<char *>(&simpleData)) {}
struct QWSQCopRegisterChannelCommand::SimpleData simpleData
QWSCommand(int t, int len, char *ptr)

Functions

◆ setChannel()

void QWSQCopRegisterChannelCommand::setChannel ( const QString n)
inline

Definition at line 618 of file qwscommand_qws_p.h.

Referenced by QWSDisplay::registerChannel().

619  {
620  channel = n;
622  setData(reinterpret_cast<const char*>(channel.unicode()), simpleData.chLen*2, true);
623  }
void setData(const char *d, int len, bool allocateMem)
int length() const
Returns the number of characters in this string.
Definition: qstring.h:696
const QChar * unicode() const
Returns a &#39;\0&#39;-terminated Unicode representation of the string.
Definition: qstring.h:706
struct QWSQCopRegisterChannelCommand::SimpleData simpleData

◆ setData()

void QWSQCopRegisterChannelCommand::setData ( const char *  d,
int  len,
bool  allocateMem 
)
inlinevirtual

Reimplemented from QWSProtocolItem.

Definition at line 601 of file qwscommand_qws_p.h.

601  {
602  QWSCommand::setData(d, len, allocateMem);
604  {
605  qWarning( "Command channel name too large!" );
607  }
608  if( simpleData.chLen * int(sizeof(QChar)) > len )
609  {
610  qWarning( "register qcop channel command - channel name length %d - buffer size %d - buffer overrun!", simpleData.chLen, len );
611  }
612  else
613  {
614  channel = QString(reinterpret_cast<const QChar*>(d), simpleData.chLen);
615  }
616  }
double d
Definition: qnumeric_p.h:62
virtual void setData(const char *data, int len, bool allocateMem=true)
#define MAX_COMMAND_SIZE
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QChar class provides a 16-bit Unicode character.
Definition: qchar.h:72
Q_CORE_EXPORT void qWarning(const char *,...)
struct QWSQCopRegisterChannelCommand::SimpleData simpleData

Properties

◆ channel

QString QWSQCopRegisterChannelCommand::channel

◆ simpleData

struct QWSQCopRegisterChannelCommand::SimpleData QWSQCopRegisterChannelCommand::simpleData

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