summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Piekos <mateuszpiekos@gmail.com>2012-07-17 09:59:17 (GMT)
committerMateusz Piekos <mateuszpiekos@gmail.com>2012-07-17 09:59:17 (GMT)
commit1f8e319e256ac15438d63080d11a860dfa16431c (patch)
treed20cfb5a3f290020f4e6ffc9052b7894f933fb8d /Swiften/Whiteboard
parentb2e11d7f32db65a6be001dfdf74b74f16f4c9ec3 (diff)
downloadswift-contrib-1f8e319e256ac15438d63080d11a860dfa16431c.zip
swift-contrib-1f8e319e256ac15438d63080d11a860dfa16431c.tar.bz2
Added handling of elements position updates
Diffstat (limited to 'Swiften/Whiteboard')
-rw-r--r--Swiften/Whiteboard/Elements/WhiteboardLineElement.h14
-rw-r--r--Swiften/Whiteboard/IncomingWhiteboardSession.cpp18
2 files changed, 7 insertions, 25 deletions
diff --git a/Swiften/Whiteboard/Elements/WhiteboardLineElement.h b/Swiften/Whiteboard/Elements/WhiteboardLineElement.h
index 85e6302..20455b6 100644
--- a/Swiften/Whiteboard/Elements/WhiteboardLineElement.h
+++ b/Swiften/Whiteboard/Elements/WhiteboardLineElement.h
@@ -37,19 +37,6 @@ namespace Swift {
return y2_;
}
- int getXShift() const {
- return xShift_;
- }
-
- int getYShift() const {
- return yShift_;
- }
-
- void setShift(int x, int y) {
- xShift_ = x;
- yShift_ = y;
- }
-
const Color& getColor() const {
return color_;
}
@@ -80,7 +67,6 @@ namespace Swift {
private:
int x1_, y1_, x2_, y2_;
- int xShift_, yShift_;
Color color_;
int penWidth_;
std::string id_;
diff --git a/Swiften/Whiteboard/IncomingWhiteboardSession.cpp b/Swiften/Whiteboard/IncomingWhiteboardSession.cpp
index 42f5934..568bed8 100644
--- a/Swiften/Whiteboard/IncomingWhiteboardSession.cpp
+++ b/Swiften/Whiteboard/IncomingWhiteboardSession.cpp
@@ -27,17 +27,13 @@ namespace Swift {
void IncomingWhiteboardSession::handleIncomingOperation(WhiteboardOperation::ref operation) {
// std::cout << "incoming pos: " << operation->getPos() << std::endl;
// WhiteboardInsertOperation::ref insertOp = boost::dynamic_pointer_cast<WhiteboardInsertOperation>(operation);
-// if (insertOp) {
- WhiteboardOperation::ref op = server.handleClientOperationReceived(operation);
- //std::cout << "in1: " << operation->getID() << " " << operation->getPos() << " " << operation->getParentID() << std::endl;
- //std::cout << "in2: " << op->getID() << " " << op->getPos() << " " << op->getParentID() << std::endl;
- onOperationReceived(op);
- WhiteboardPayload::ref payload = boost::make_shared<WhiteboardPayload>();
- payload->setOperation(op);
- sendPayload(payload);
-// } else {
-// std::cout << "unknown operation" << std::endl;
-// }
+ WhiteboardOperation::ref op = server.handleClientOperationReceived(operation);
+ //std::cout << "in1: " << operation->getID() << " " << operation->getPos() << " " << operation->getParentID() << std::endl;
+ //std::cout << "in2: " << op->getID() << " " << op->getPos() << " " << op->getParentID() << std::endl;
+ onOperationReceived(op);
+ WhiteboardPayload::ref payload = boost::make_shared<WhiteboardPayload>();
+ payload->setOperation(op);
+ sendPayload(payload);
}
void IncomingWhiteboardSession::sendOperation(WhiteboardOperation::ref operation) {