diff options
Diffstat (limited to 'Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp')
-rw-r--r-- | Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp index d89a7f6..b3f42a9 100644 --- a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp +++ b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp @@ -43,6 +43,7 @@ namespace Swift { widthBox = new QSpinBox(this); connect(widthBox, SIGNAL(valueChanged(int)), this, SLOT(changeLineWidth(int))); + connect(graphicsView, SIGNAL(lineWidthChanged(int)), widthBox, SLOT(setValue(int))); widthBox->setValue(1); moveUpButton = new QPushButton("Move Up", this); @@ -246,12 +247,10 @@ namespace Swift { QLine line = lineItem->line().toLine(); QColor color = lineItem->pen().color(); WhiteboardLineElement::ref element = boost::make_shared<WhiteboardLineElement>(line.x1()+lineItem->pos().x(), line.y1()+lineItem->pos().y(), line.x2()+lineItem->pos().x(), line.y2()+lineItem->pos().y()); -// element->setShift(lineItem->pos().x(), lineItem->pos().y()); element->setColor(Color(color.red(), color.green(), color.blue(), color.alpha())); element->setPenWidth(lineItem->pen().width()); element->setID(lineItem->data(100).toString().toStdString()); -// whiteboardSession_->sendElement(element); el = element; } FreehandLineItem* freehandLineItem = qgraphicsitem_cast<FreehandLineItem*>(item); @@ -269,7 +268,6 @@ namespace Swift { element->setPoints(points); element->setID(freehandLineItem->data(100).toString().toStdString()); -// whiteboardSession_->sendElement(element); el = element; } @@ -283,9 +281,9 @@ namespace Swift { element->setBrushColor(Color(brushColor.red(), brushColor.green(), brushColor.blue(), brushColor.alpha())); element->setPenColor(Color(penColor.red(), penColor.green(), penColor.blue(), penColor.alpha())); element->setPenWidth(rectItem->pen().width()); + std::cout << penColor.red() << " " << brushColor.red() << std::endl; element->setID(rectItem->data(100).toString().toStdString()); -// whiteboardSession_->sendElement(element); el = element; } @@ -299,7 +297,6 @@ namespace Swift { element->setColor(Color(color.red(), color.green(), color.blue(), color.alpha())); element->setID(textItem->data(100).toString().toStdString()); -// whiteboardSession_->sendElement(element); el = element; } @@ -322,7 +319,6 @@ namespace Swift { element->setPenWidth(polygonItem->pen().width()); element->setID(polygonItem->data(100).toString().toStdString()); -// whiteboardSession_->sendElement(element); el = element; } @@ -342,7 +338,6 @@ namespace Swift { element->setPenWidth(ellipseItem->pen().width()); element->setID(ellipseItem->data(100).toString().toStdString()); -// whiteboardSession_->sendElement(element); el = element; } |