]> git.zarvox.org Git - shareboard.git/blobdiff - shareboardcanvas.cpp
Reduce debugging output.
[shareboard.git] / shareboardcanvas.cpp
index 51e3e1a55da3928c00721be3df87ab4ee69e03f9..faebffad499a803435a0d85716206f12b99e9589 100644 (file)
@@ -3,6 +3,8 @@
 #include <QPaintEvent>
 #include <QPainter>
 #include <QPixmap>
+#include <QPen>
+#include <QColor>
 #include <QDebug>
 #include "shareboard.h"
 
@@ -53,10 +55,17 @@ void ShareboardCanvas::paintEvent(QPaintEvent* event) {
        QPainter p(this);
        // Paint the background from the saved state
        p.drawImage(0, 0, board->view());
-       //qDebug() << "ShareboardCanvas:" << board->view().rect();
-       //qDebug() << "ShareboardCanvas:" << board->viewIndex;
        // Now paint our local changes on top of it
        
        //p.set
        // Now paint the set of mouse cursors on top of that
+       QMap<int, QPointF>::const_iterator i;
+       for (i = board->viewCursors.constBegin(); i!=board->viewCursors.constEnd(); ++i) {
+               p.setPen(QPen(QColor(255,0,0,50)));
+               p.setBrush(QBrush(QColor(255,0,0,50)));
+               p.drawEllipse(i.value(),4,4);
+               p.setPen(Qt::black);
+               p.setBrush(Qt::black);
+               p.drawText(i.value(),board->viewUsers[i.key()]);
+       }
 }