diff options
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp index 3ea09ef..80c4447 100644 --- a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp +++ b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp @@ -9,9 +9,11 @@ #include <iostream> #include <boost/bind.hpp> +#include <boost/smart_ptr/make_shared.hpp> #include <Swiften/Whiteboard/WhiteboardSession.h> #include <Swiften/Elements/WhiteboardPayload.h> +#include <Swiften/Whiteboard/Elements/WhiteboardLineElement.h> #include <QMessageBox> using namespace std; @@ -245,10 +247,13 @@ namespace Swift { QGraphicsLineItem* lineItem = qgraphicsitem_cast<QGraphicsLineItem*>(item); if (lineItem != 0) { QLine line = lineItem->line().toLine(); - std::stringstream stream; +/* std::stringstream stream; stream << "L"; stream << line.x1() << "," << line.y1() << "," << line.x2() << "," << line.y2(); - stream >> serialized; + stream >> serialized;*/ + WhiteboardLineElement::ref element = boost::make_shared<WhiteboardLineElement>(line.x1(), line.y1(), line.x2(), line.y2()); + whiteboardSession_->sendElement(element); + } FreehandLineItem* freehandLineItem = qgraphicsitem_cast<FreehandLineItem*>(item); if (freehandLineItem != 0) { |