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

#include <qwscommand_qws_p.h>

Inheritance diagram for QWSPlaySoundCommand:
QWSCommand QWSProtocolItem

Classes

struct  SimpleData
 

Public Functions

 QWSPlaySoundCommand ()
 
void setData (const char *d, int len, bool allocateMem)
 
void setFileName (const QString &n)
 
- 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 filename
 
struct QWSPlaySoundCommand::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 571 of file qwscommand_qws_p.h.

Constructors and Destructors

◆ QWSPlaySoundCommand()

QWSPlaySoundCommand::QWSPlaySoundCommand ( )
inline

Definition at line 573 of file qwscommand_qws_p.h.

573  :
575  sizeof(simpleData), reinterpret_cast<char *>(&simpleData)) {}
struct QWSPlaySoundCommand::SimpleData simpleData
QWSCommand(int t, int len, char *ptr)

Functions

◆ setData()

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

Reimplemented from QWSProtocolItem.

Definition at line 577 of file qwscommand_qws_p.h.

577  {
578  QWSCommand::setData(d, len, allocateMem);
579  filename = QString(reinterpret_cast<QChar*>(rawDataPtr),len/2);
580  }
double d
Definition: qnumeric_p.h:62
virtual void setData(const char *data, int len, bool allocateMem=true)
The QString class provides a Unicode character string.
Definition: qstring.h:83

◆ setFileName()

void QWSPlaySoundCommand::setFileName ( const QString n)
inline

Definition at line 581 of file qwscommand_qws_p.h.

Referenced by QWSDisplay::playSoundFile().

582  {
583  setData(reinterpret_cast<const char*>(n.unicode()), n.length()*2, true);
584  }
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
void setData(const char *d, int len, bool allocateMem)

Properties

◆ filename

QString QWSPlaySoundCommand::filename

Definition at line 589 of file qwscommand_qws_p.h.

Referenced by QWSServerPrivate::invokePlaySound().

◆ simpleData

struct QWSPlaySoundCommand::SimpleData QWSPlaySoundCommand::simpleData

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