71 void SetNoteAssignments(
const ConstNoteAssignmentsMapRef & notesRef) {_assigns = notesRef; update();}
82 void SetReadOnly(
bool ro) {
if (_readOnly != ro) {_readOnly = ro; update();}}
119 void ClearAnimatedLocalBells();
122 QString GetPeerNickname(
const ZGPeerID & pid)
const;
124 int GetYForRow(uint32 rowIdx)
const;
125 uint32 GetRowForY(
int y)
const;
127 int GetXForColumn(uint32 colIdx)
const;
128 uint32 GetColumnForX(
int x)
const;
130 uint32 GetRowForPeerID(
const ZGPeerID & pid)
const {
return (uint32) _onlinePeers.IndexOfKey(pid);}
131 const ZGPeerID & GetPeerIDForRow(uint32 row)
const {
return _onlinePeers.GetKeyAtWithDefault(row);}
133 uint32 GetColumnForNoteIndex(uint32 noteIdx)
const {
return _noteIndexToColumnIndex.GetWithDefault(noteIdx, MUSCLE_NO_LIMIT);}
134 uint32 GetNoteIndexForColumn(uint32 colIdx)
const {
return _columnIndexToNoteIndex.GetWithDefault(colIdx, MUSCLE_NO_LIMIT);}
136 int GetYForPeerID(
const ZGPeerID & peerID)
const {
return GetYForRow(GetRowForPeerID(peerID));}
137 const ZGPeerID & GetPeerIDForY(
int y)
const {
return GetPeerIDForRow(GetRowForY(y));}
139 int GetXForNoteIndex(uint32 noteIndex)
const {
return GetXForColumn(GetColumnForNoteIndex(noteIndex));}
140 uint32 GetNoteIndexForX(
int x)
const {
return GetNoteIndexForColumn(GetColumnForX(x));}
142 void DrawShadedRow(QPainter & p,
const ZGPeerID & peerID,
const QColor & c);
143 void DrawBell(QPainter & p, uint32 rowIdx, uint32 colIdx,
bool shakeIt)
const;
144 void DrawBellAt(QPainter & p,
int x,
int y)
const;
146 void HandleMouseEvent(QMouseEvent * e,
bool isPress);
148 const ZGPeerID _localPeerID;
149 const QPixmap _bellPixmap;
151 OrderedKeysHashtable<ZGPeerID, ConstMessageRef> _onlinePeers;
152 Hashtable<ZGPeerID, uint64> _peerNoteAssignments;
155 uint64 _currentNotesChord;
156 Queue<uint32> _columnIndexToNoteIndex;
157 Hashtable<uint32, uint32> _noteIndexToColumnIndex;
159 ConstNoteAssignmentsMapRef _assigns;
163 int _draggingNoteIdx;
165 int _draggingNoteYStart;
166 int _draggingNoteYOffset;
169 uint64 _animatedBells;
171 Hashtable<ZGPeerID, uint64> _peerIDToLatency;
172 ZGPeerID _seniorPeerID;
175 QFont _italicizedFont;
A ZGPeerID is a 128-bit integer that uniquely represents a particular peer in a ZG system...
The choir namespace contains the code specific to the ZGChoir demonstration application.