From a11a952212c776b28ca33ab5200ea33c05f3721f Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 16 Jul 2013 15:14:40 +0200 Subject: [PATCH] unused comments removed --- src/domain/UBGraphicsGroupContainerItem.cpp | 18 +++--------------- src/domain/UBGraphicsItemDelegate.cpp | 5 ----- src/domain/UBSelectionFrame.cpp | 18 ------------------ 3 files changed, 3 insertions(+), 38 deletions(-) diff --git a/src/domain/UBGraphicsGroupContainerItem.cpp b/src/domain/UBGraphicsGroupContainerItem.cpp index 69686aff..35e46a0e 100644 --- a/src/domain/UBGraphicsGroupContainerItem.cpp +++ b/src/domain/UBGraphicsGroupContainerItem.cpp @@ -139,7 +139,7 @@ void UBGraphicsGroupContainerItem::removeFromGroup(QGraphicsItem *item) UBCoreGraphicsScene *groupScene = corescene(); if (groupScene) - { + { groupScene->addItemToDeletion(item); } @@ -164,7 +164,7 @@ void UBGraphicsGroupContainerItem::deselectCurrentItem() { dynamic_cast(mCurrentItem)->Delegate()->getToolBarItem()->hide(); } - break; + break; } mCurrentItem->setSelected(false); @@ -183,16 +183,6 @@ void UBGraphicsGroupContainerItem::paint(QPainter *painter, const QStyleOptionGr Q_UNUSED(painter); Q_UNUSED(option); -// we would not use paint smth for the moment -// if (option->state & QStyle::State_Selected) { -// painter->setBrush(Qt::NoBrush); -// QPen tmpPen; -// qreal tmpPenWidth = 1.0; -// tmpPen.setWidth(tmpPenWidth); -// tmpPen.setColor(Qt::lightGray); -// painter->setPen(tmpPen); -// painter->drawRect(itemsBoundingRect.adjusted(tmpPenWidth / 2, tmpPenWidth / 2, -tmpPenWidth / 2, -tmpPenWidth / 2)); -// } Delegate()->postpaint(painter, option, widget); } @@ -211,8 +201,6 @@ UBGraphicsGroupContainerItem *UBGraphicsGroupContainerItem::deepCopy() const copyItemParameters(copy); -// copy->resize(this->size()); - return copy; } @@ -353,7 +341,7 @@ void UBGraphicsGroupContainerItem::pRemoveFromGroup(QGraphicsItem *item) UBGraphicsScene *Scene = dynamic_cast(item->scene()); if (Scene) - { + { Scene->addItem(item); } diff --git a/src/domain/UBGraphicsItemDelegate.cpp b/src/domain/UBGraphicsItemDelegate.cpp index 91fc6252..0e015cc2 100644 --- a/src/domain/UBGraphicsItemDelegate.cpp +++ b/src/domain/UBGraphicsItemDelegate.cpp @@ -851,11 +851,6 @@ void UBGraphicsToolBarItem::paint(QPainter *painter, const QStyleOptionGraphicsI setBrush(QBrush(UBSettings::paletteColor)); -// QPainter newPainter; - -// newPaiter->setBrush(QBrush(Qt::red)); - - painter->fillPath(path, brush()); } diff --git a/src/domain/UBSelectionFrame.cpp b/src/domain/UBSelectionFrame.cpp index 6de5d187..c253b197 100644 --- a/src/domain/UBSelectionFrame.cpp +++ b/src/domain/UBSelectionFrame.cpp @@ -133,12 +133,6 @@ void UBSelectionFrame::mousePressEvent(QGraphicsSceneMouseEvent *event) } else { mOperationMode = om_moving; } - -// foreach (UBGraphicsItemDelegate *curDelegate, mEnclosedtems) { -// qDebug() << "TransformBefore" << curDelegate->delegated()->transform(); -// } - -// QGraphicsRectItem::mousePressEvent(event); } void UBSelectionFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event) @@ -191,9 +185,6 @@ void UBSelectionFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event) item->update(); item->setTransform(ownTransform, false); -// int resultAngle = (int)mRotationAngle % 360; -// setCursorFromAngle(QString::number(resultAngle)); - qDebug() << "curAngle" << mRotationAngle; } break; @@ -219,11 +210,6 @@ void UBSelectionFrame::mouseReleaseEvent(QGraphicsSceneMouseEvent */*event*/) } mOperationMode = om_idle; - -// foreach (UBGraphicsItemDelegate *curDelegate, mEnclosedtems) { -// qDebug() << "TransformBefore" << curDelegate->delegated()->transform(); -// } -// QGraphicsRectItem::mouseReleaseEvent(event); } void UBSelectionFrame::onZoomChanged(qreal pZoom) @@ -232,11 +218,7 @@ void UBSelectionFrame::onZoomChanged(qreal pZoom) qDebug() << "Board current zoom" << UBApplication::boardController->currentZoom(); qDebug() << "UBApplication::boardController->systemScaleFactor()" << UBApplication::boardController->systemScaleFactor(); mAntiscaleRatio = 1 / (UBApplication::boardController->systemScaleFactor() * pZoom); -// updateScale(); -// QTransform tr; -// tr.scale(mAntiscaleRatio, mAntiscaleRatio); -// this->setTransform(tr); } void UBSelectionFrame::remove()