1 #ifndef __SHAREBOARD_H__
2 #define __SHAREBOARD_H__
11 class ShareboardCanvas;
14 typedef QList<Action*> History;
16 class Shareboard : public QWidget {
19 Shareboard(QWidget* parent = 0);
25 void handleMouseMoved(QPointF pos);
26 void handleSegmentDrawn(QPointF start, QPointF end);
27 void handleInsertImage(QPointF pos);
28 void postAction(Action* action);
29 void postLocalAction(Action* action);
31 void switchToPrompt();
32 void setUserID(int id);
33 void jumpToIndex(int index);
34 //void jumpToTime(QDateTime time);
35 void setDrawState(int newstate);
36 void setInsertImage(QImage newimage);
39 void rangeChanged(int max);
40 void indexChanged(int index);
41 void connectToServer(QString, QString);
42 void actionHappened(Action* action);
45 QStackedLayout* layout;
46 ConnectWidget* prompt;
47 ShareboardCanvas* canvas;
51 int drawState; // if > 0, line width. If < 0, eraser size. If == 0, image tool.
53 // These items represent the present state of the view.
56 int viewIndex; // The index of the first action we haven't applied.
57 QMap<int, QPointF> viewCursors;
58 QMap<int, QString> viewUsers;
60 // QPixmap renderAtTime(QDateTime time);
61 // QPixmap renderOneChange();
62 friend class ShareboardCanvas;
65 #endif // __SHAREBOARD_H__