ZG  "1.00
 All Classes Namespaces Files Functions Variables Enumerator Friends Macros Pages
Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
Quasimodo Class Reference

This object is in charge of actually ringing the local bells (using QAudioOutput and a mixer algorithm) This is done within a separate thread, so that the timing of the bell-ringing won't be affected GUI operations. More...

#include <Quasimodo.h>

Inheritance diagram for Quasimodo:
Inheritance graph
[legend]

Public Slots

void SetupTheBells ()
 Should be called once at startup, since setting them up in the constructor causes thread-warnings. More...
 
void SetLocalNoteAssignments (quint64 notesChord)
 Tells Quasimodo which bells he should actually play. More...
 
void RingSomeBells (quint64 notesChord, bool localNotesOnly)
 Causes a given bell-sound to be played. More...
 
void DestroyTheBells ()
 Should be called once at shutdown, since destroying the bells in the destructor causes more thread-warnings. More...
 

Signals

void RangLocalBells (quint64 notesChord)
 Emitted when we've played some bell sounds. More...
 

Public Member Functions

 Quasimodo (QObject *parent=NULL)
 Constructor. More...
 
 ~Quasimodo ()
 Destructor. More...
 

Protected Member Functions

virtual qint64 readData (char *data, qint64 maxSize)
 Overridden to fill (data) with audio samples from our internal sound-mixing-engine. More...
 
virtual qint64 writeData (const char *, qint64 maxSize)
 This method is a no-op and should never be called. More...
 

Detailed Description

This object is in charge of actually ringing the local bells (using QAudioOutput and a mixer algorithm) This is done within a separate thread, so that the timing of the bell-ringing won't be affected GUI operations.

Definition at line 16 of file Quasimodo.h.

Constructor & Destructor Documentation

Quasimodo ( QObject *  parent = NULL)

Constructor.

~Quasimodo ( )

Destructor.

Member Function Documentation

void DestroyTheBells ( )
slot

Should be called once at shutdown, since destroying the bells in the destructor causes more thread-warnings.

void RangLocalBells ( quint64  notesChord)
signal

Emitted when we've played some bell sounds.

This signal is connected to a slot in the main/GUI thread that will cause the little bell icon to vibrate, so that the user can visually see which bells are "ringing"

virtual qint64 readData ( char *  data,
qint64  maxSize 
)
protectedvirtual

Overridden to fill (data) with audio samples from our internal sound-mixing-engine.

Parameters
dataa buffer to fill with audio samples
maxSizethe number of bytes pointed to by (data)
Returns
the number of bytes actually written, or -1 on error.
void RingSomeBells ( quint64  notesChord,
bool  localNotesOnly 
)
slot

Causes a given bell-sound to be played.

Parameters
notesChorda bit-chord of CHOIR_NOTE_* values indicating which bell(s) to ring
localNotesOnlyIf true, we'll only ring those bells in (notesChord) that are currently assigned to us.
void SetLocalNoteAssignments ( quint64  notesChord)
inlineslot

Tells Quasimodo which bells he should actually play.

Definition at line 39 of file Quasimodo.h.

void SetupTheBells ( )
slot

Should be called once at startup, since setting them up in the constructor causes thread-warnings.

virtual qint64 writeData ( const char *  ,
qint64  maxSize 
)
inlineprotectedvirtual

This method is a no-op and should never be called.

It's only here because QIODevice requires it be implemented.

Definition at line 59 of file Quasimodo.h.


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