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

#include <qwscommand_qws_p.h>

Inheritance diagram for QWSIdentifyCommand:
QWSCommand QWSProtocolItem

Classes

struct  SimpleData
 

Public Functions

 QWSIdentifyCommand ()
 
void setData (const char *d, int len, bool allocateMem)
 
void setId (const QString &i, int lock)
 
- 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 id
 
struct QWSIdentifyCommand::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 144 of file qwscommand_qws_p.h.

Constructors and Destructors

◆ QWSIdentifyCommand()

QWSIdentifyCommand::QWSIdentifyCommand ( )
inline

Definition at line 146 of file qwscommand_qws_p.h.

146  :
148  sizeof(simpleData), reinterpret_cast<char *>(&simpleData))
149  {
150  simpleData.idLen = 0;
151  simpleData.idLock = -1;
152  }
struct QWSIdentifyCommand::SimpleData simpleData
QWSCommand(int t, int len, char *ptr)

Functions

◆ setData()

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

Reimplemented from QWSProtocolItem.

Definition at line 154 of file qwscommand_qws_p.h.

154  {
155  QWSCommand::setData(d, len, allocateMem);
157  {
158  qWarning( "Identify command - name length %d - too big!", simpleData.idLen );
160  }
161  if ( simpleData.idLen * int(sizeof(QChar)) > len )
162  {
163  qWarning( "Identify command - name length %d - buffer size %d - buffer overrun!", simpleData.idLen, len );
164  }
165  else
166  {
167  id = QString(reinterpret_cast<const QChar*>(d), simpleData.idLen);
168  }
169  }
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 QWSIdentifyCommand::SimpleData simpleData

◆ setId()

void QWSIdentifyCommand::setId ( const QString i,
int  lock 
)
inline

Definition at line 171 of file qwscommand_qws_p.h.

Referenced by QWSDisplay::Data::init(), QWSDisplay::Data::reinit(), and QWSDisplay::setIdentity().

172  {
173  id = i;
174  simpleData.idLen = id.length();
176  setData(reinterpret_cast<const char*>(id.unicode()), simpleData.idLen*2, true);
177  }
void setData(const char *d, int len, bool allocateMem)
static QReadWriteLock lock
Definition: proxyconf.cpp:399
struct QWSIdentifyCommand::SimpleData simpleData

Properties

◆ id

QString QWSIdentifyCommand::id

Definition at line 183 of file qwscommand_qws_p.h.

Referenced by QWSServerPrivate::invokeIdentify().

◆ simpleData

struct QWSIdentifyCommand::SimpleData QWSIdentifyCommand::simpleData

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