From 3bd331df2fc2ba7b6b201cd3a5dfda326ffb262d Mon Sep 17 00:00:00 2001 From: Mateusz Piekos Date: Mon, 6 Aug 2012 08:45:58 +0200 Subject: Removed useless filledhandline icon diff --git a/Swift/QtUI/Whiteboard/GView.cpp b/Swift/QtUI/Whiteboard/GView.cpp index d9c94a9..b26f0bb 100644 --- a/Swift/QtUI/Whiteboard/GView.cpp +++ b/Swift/QtUI/Whiteboard/GView.cpp @@ -190,16 +190,6 @@ namespace Swift { item->lineTo(newPoint); } } - else if (mode == FilledHandLine) { -/* QGraphicsPathItem* item = qgraphicsitem_cast(lastItem); - QPainterPath path; - path = item->path(); - if (path.isEmpty()) - path.moveTo(item->data(0).toPointF()); - QPointF newPoint = this->mapToScene(event->pos()); - path.lineTo(newPoint); - item->setPath(path);*/ - } else if (mode == Polygon) { QGraphicsPolygonItem* item = qgraphicsitem_cast(lastItem); QPointF newPoint = this->mapToScene(event->pos()); @@ -279,17 +269,6 @@ namespace Swift { scene()->addItem(item); lastItem = item; } - else if (mode == FilledHandLine) { -/* QPointF point = this->mapToScene(event->pos()); - QPainterPath path; - QGraphicsPathItem* item = scene()->addPath(path, pen, brush); - QString id = getNewID(); - item->setZValue(10000000); - item->setData(0, point); - item->setData(100, id); - item->setData(101, items_.size()); - lastItem = item;*/ - } else if (mode == Text) { QPointF point = this->mapToScene(event->pos()); QGraphicsTextItem* item = scene()->addText(""); diff --git a/Swift/QtUI/Whiteboard/GView.h b/Swift/QtUI/Whiteboard/GView.h index 8f3fdeb..71c865c 100644 --- a/Swift/QtUI/Whiteboard/GView.h +++ b/Swift/QtUI/Whiteboard/GView.h @@ -20,7 +20,7 @@ namespace Swift { class GView : public QGraphicsView { Q_OBJECT; public: - enum Mode { Rubber, Line, Rect, Circle, HandLine, FilledHandLine, Text, Polygon, Select }; + enum Mode { Rubber, Line, Rect, Circle, HandLine, Text, Polygon, Select }; enum Type { New, Update, MoveUp, MoveDown }; GView(QGraphicsScene* scene, QWidget* parent = 0); void setLineWidth(int i); diff --git a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp index 2f7d544..ddbbd5c 100644 --- a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp +++ b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp @@ -88,12 +88,6 @@ namespace Swift { handLineButton->setAutoExclusive(true); connect(handLineButton, SIGNAL(clicked()), this, SLOT(setHandLineMode())); - filledHandLineButton = new QToolButton(this); - filledHandLineButton->setIcon(QIcon(":/icons/filledHandline.png")); - filledHandLineButton->setCheckable(true); - filledHandLineButton->setAutoExclusive(true); - connect(filledHandLineButton, SIGNAL(clicked()), this, SLOT(setFilledHandLineMode())); - textButton = new QToolButton(this); textButton->setIcon(QIcon(":/icons/text.png")); textButton->setCheckable(true); @@ -113,14 +107,14 @@ namespace Swift { connect(selectButton, SIGNAL(clicked()), this, SLOT(setSelectMode())); toolboxLayout->addWidget(rubberButton, 0, 0); - toolboxLayout->addWidget(lineButton, 0, 1); - toolboxLayout->addWidget(rectButton, 0, 2); + toolboxLayout->addWidget(selectButton, 0, 1); + toolboxLayout->addWidget(lineButton, 0, 2); toolboxLayout->addWidget(circleButton, 1, 0); toolboxLayout->addWidget(handLineButton, 1, 1); - toolboxLayout->addWidget(filledHandLineButton, 1, 2); + toolboxLayout->addWidget(rectButton, 1, 2); toolboxLayout->addWidget(textButton, 2, 0); toolboxLayout->addWidget(polygonButton, 2, 1); - toolboxLayout->addWidget(selectButton, 2, 2); + sidebarLayout->addLayout(toolboxLayout); sidebarLayout->addWidget(moveUpButton); @@ -202,11 +196,6 @@ namespace Swift { graphicsView->setMode(GView::HandLine); } - void QtWhiteboardWindow::setFilledHandLineMode() - { - graphicsView->setMode(GView::FilledHandLine); - } - void QtWhiteboardWindow::setTextMode() { graphicsView->setMode(GView::Text); diff --git a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.h b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.h index ed1bfa4..903487a 100644 --- a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.h +++ b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.h @@ -45,7 +45,6 @@ namespace Swift { void setRectMode(); void setCircleMode(); void setHandLineMode(); - void setFilledHandLineMode(); void setTextMode(); void setPolygonMode(); void setSelectMode(); @@ -75,7 +74,6 @@ namespace Swift { QToolButton* rectButton; QToolButton* circleButton; QToolButton* handLineButton; - QToolButton* filledHandLineButton; QToolButton* textButton; QToolButton* polygonButton; QToolButton* selectButton; -- cgit v0.10.2-6-g49f6