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

This widget displays the current table of note assignments, as contained in our NoteAssignmentsMap. More...

#include <RosterWidget.h>

Inheritance diagram for RosterWidget:
Inheritance graph
[legend]

Public Slots

void SetVerticalScrollOffset (int vso)
 Sets our vertical-scroll offset. More...
 
void AnimateLocalBells (quint64 notesChord)
 Causes the bells specified in the bit-chord to visually vibrate, as if they had been struck. More...
 
void SetLatenciesTable (Hashtable< ZGPeerID, uint64 > &latenciesTable)
 Sets the latency values we should display to the user at the right-hand side of the grid. More...
 

Signals

void BellPositionClicked (const zg::ZGPeerID &peerID, uint32 noteIdx)
 Emitted whenever a cell in the grid is clicked on by the user. More...
 
void TotalContentHeightChanged ()
 Emitted whenever rows are added or removed from this view's grid. More...
 
void WheelTurned (int dy)
 Emitted whenever the user turns his little mouse-wheel while hovering over this view. More...
 

Public Member Functions

 RosterWidget (const ZGPeerID &localPeerID, QWidget *parent=NULL)
 Constructor. More...
 
 ~RosterWidget ()
 Destructor. More...
 
virtual void showEvent (QShowEvent *)
 Called when the RosterWidget first appears on screen. More...
 
virtual void paintEvent (QPaintEvent *)
 Called when it's time to repaint the RosterWidget. More...
 
virtual void mousePressEvent (QMouseEvent *)
 Called when the user presses down on the mouse button while over the RosterWidget. More...
 
virtual void mouseMoveEvent (QMouseEvent *)
 Called when the user drags the mouse on the RosterWidget. More...
 
virtual void mouseReleaseEvent (QMouseEvent *)
 Called when the user releases the mouse button while over the RosterWidget. More...
 
virtual void leaveEvent (QEvent *)
 Called when the mouse pointer exits the RosterWidget's on-screen area. More...
 
virtual void wheelEvent (QWheelEvent *)
 Called when the user turns the mouse-wheel while the mouse is over the RosterWidget. More...
 
void SetNotesUsedInMusicSheet (uint64 notesChord)
 Called to tell the RosterWidget which notes are used in the current song. More...
 
void SetPeerIsOnline (const ZGPeerID &peerID, bool isOnline, const ConstMessageRef &optPeerInfo)
 Called when a peer comes online or goes offline. More...
 
void SetSeniorPeerID (const ZGPeerID &pid)
 Called whenever the senior-peer of the system changes. More...
 
void SetNoteAssignments (const ConstNoteAssignmentsMapRef &notesRef)
 Called to set the NotesAssignmentMap that the RosterWidget should consult to render handbell icons. More...
 
int GetVerticalScrollOffset () const
 Returns how many pixels we have scrolled down from the top of the view. More...
 
int GetTotalContentHeight () const
 Returns The total height of the view's contents. More...
 
void SetReadOnly (bool ro)
 Set whether this widget should allow user input via mouse-clicks or not. More...
 
bool IsReadOnl () const
 Returns true iff this view is currently in read-only mode. More...
 

Detailed Description

This widget displays the current table of note assignments, as contained in our NoteAssignmentsMap.

Definition at line 15 of file RosterWidget.h.

Constructor & Destructor Documentation

RosterWidget ( const ZGPeerID localPeerID,
QWidget *  parent = NULL 
)

Constructor.

Destructor.

Member Function Documentation

void AnimateLocalBells ( quint64  notesChord)
slot

Causes the bells specified in the bit-chord to visually vibrate, as if they had been struck.

Parameters
notesChorda bit-chord of CHOIR_NOTE_* values indicating which bells to vibrate.
void BellPositionClicked ( const zg::ZGPeerID peerID,
uint32  noteIdx 
)
signal

Emitted whenever a cell in the grid is clicked on by the user.

Parameters
peerIDthe ZGPeerID corresponding to the row that was clicked on
noteIdxThe CHOIR_NOTE_* value corresponding to the column that was clicked on
int GetTotalContentHeight ( ) const

Returns The total height of the view's contents.

int GetVerticalScrollOffset ( ) const
inline

Returns how many pixels we have scrolled down from the top of the view.

Definition at line 74 of file RosterWidget.h.

bool IsReadOnl ( ) const
inline

Returns true iff this view is currently in read-only mode.

Definition at line 85 of file RosterWidget.h.

virtual void leaveEvent ( QEvent *  )
virtual

Called when the mouse pointer exits the RosterWidget's on-screen area.

virtual void mouseMoveEvent ( QMouseEvent *  )
virtual

Called when the user drags the mouse on the RosterWidget.

virtual void mousePressEvent ( QMouseEvent *  )
virtual

Called when the user presses down on the mouse button while over the RosterWidget.

virtual void mouseReleaseEvent ( QMouseEvent *  )
virtual

Called when the user releases the mouse button while over the RosterWidget.

virtual void paintEvent ( QPaintEvent *  )
virtual

Called when it's time to repaint the RosterWidget.

void SetLatenciesTable ( Hashtable< ZGPeerID, uint64 > &  latenciesTable)
slot

Sets the latency values we should display to the user at the right-hand side of the grid.

Parameters
latenciesTablea table of ZGPeerIDs and their associated latencies (in microseconds)
void SetNoteAssignments ( const ConstNoteAssignmentsMapRef &  notesRef)
inline

Called to set the NotesAssignmentMap that the RosterWidget should consult to render handbell icons.

TheRosterWidget will place handbell icons in the grid according to the state of this object.

Parameters
notesRefa reference to a NotesAssignmentMap object.

Definition at line 71 of file RosterWidget.h.

void SetNotesUsedInMusicSheet ( uint64  notesChord)

Called to tell the RosterWidget which notes are used in the current song.

The RosterWidget will use this information to lay out the columns it displays.

Parameters
notesChorda bit-chord of CHOIR_NOTE_* values
void SetPeerIsOnline ( const ZGPeerID peerID,
bool  isOnline,
const ConstMessageRef &  optPeerInfo 
)

Called when a peer comes online or goes offline.

The RosterWidget will use this information to lay out the rows it displays.

Parameters
peerIDthe ZGPeerID of the peer we are being notified about
isOnlineTrue iff this peer just came online; false iff this peer just went offline.
optPeerInfoReference to some information about the peer (e.g. its on-screen name)
void SetReadOnly ( bool  ro)
inline

Set whether this widget should allow user input via mouse-clicks or not.

Parameters
roIff true, this view will become read-only (darkened and non-clickable)

Definition at line 82 of file RosterWidget.h.

void SetSeniorPeerID ( const ZGPeerID pid)

Called whenever the senior-peer of the system changes.

The RosterWidget uses this information to render the senior peer's name in italics.

Parameters
pidthe ZGPeerID of the new senior peer, or an invalid ZGPeerID if there is no senior peer(!?)
void SetVerticalScrollOffset ( int  vso)
inlineslot

Sets our vertical-scroll offset.

Parameters
vsoThe number of pixels down from the top of the grid we should be scrolled to.

Definition at line 106 of file RosterWidget.h.

virtual void showEvent ( QShowEvent *  )
virtual

Called when the RosterWidget first appears on screen.

void TotalContentHeightChanged ( )
signal

Emitted whenever rows are added or removed from this view's grid.

virtual void wheelEvent ( QWheelEvent *  )
virtual

Called when the user turns the mouse-wheel while the mouse is over the RosterWidget.

void WheelTurned ( int  dy)
signal

Emitted whenever the user turns his little mouse-wheel while hovering over this view.

Parameters
dyA value indicating how far and in what direction the mouse-wheel was turned.

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