Merge branch 'master' of github.com:Sankore/Sankore-3.1

preferencesAboutTextFull
Claudio Valerio 12 years ago
commit ed9c64afba
  1. 4
      src/adaptors/UBCFFSubsetAdaptor.cpp
  2. 4
      src/board/UBBoardController.cpp
  3. 4
      src/board/UBBoardView.cpp
  4. 17
      src/domain/UBGraphicsScene.cpp
  5. 3
      src/domain/UBGraphicsScene.h

@ -1049,10 +1049,6 @@ void UBCFFSubsetAdaptor::UBCFFSubsetReader::repositionSvgItem(QGraphicsItem *ite
QTransform rTransform;
QPointF newVector = rTransform.map(oldVector);
QRectF sr = mCurrentScene->sceneRect();
QRectF sr1 = mCurrentSceneRect;
QRectF sr2 = mCurrentScene->normalizedSceneRect();
QTransform tr = item->sceneTransform();
item->setTransform(rTransform.scale(fullScaleX, fullScaleY), true);
tr = item->sceneTransform();

@ -1484,8 +1484,12 @@ void UBBoardController::boardViewResized(QResizeEvent* event)
mControlView->centerOn(0,0);
if (mDisplayView)
mDisplayView->centerOn(0,0);
mPaletteManager->containerResized();
UBApplication::boardController->controlView()->scene()->moveMagnifier();
}

@ -1013,7 +1013,6 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event)
if (bReleaseIsNeed)
{
qDebug() << "mre";
QGraphicsView::mouseReleaseEvent (event);
}
}
@ -1033,9 +1032,8 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event)
delete suspendedMousePressEvent;
suspendedMousePressEvent = NULL;
}
QGraphicsView::mouseReleaseEvent (event);
}
QGraphicsView::mouseReleaseEvent (event);
}
else if (currentTool == UBStylusTool::Text)
{

@ -1979,7 +1979,16 @@ void UBGraphicsScene::addMagnifier(UBMagnifierParams params)
setModified(true);
}
void UBGraphicsScene::moveMagnifier(QPoint newPos)
void UBGraphicsScene::moveMagnifier()
{
if (magniferControlViewWidget)
{
QPoint magnifierPos = QPoint(magniferControlViewWidget->pos().x() + magniferControlViewWidget->size().width() / 2, magniferControlViewWidget->pos().y() + magniferControlViewWidget->size().height() / 2 );
moveMagnifier(magnifierPos, true);
}
}
void UBGraphicsScene::moveMagnifier(QPoint newPos, bool forceGrab)
{
QWidget *cContainer = (QWidget*)(UBApplication::boardController->controlContainer());
QGraphicsView *cView = (QGraphicsView*)UBApplication::boardController->controlView();
@ -1987,6 +1996,8 @@ void UBGraphicsScene::moveMagnifier(QPoint newPos)
QPoint dvZeroPoint = dView->mapToGlobal(QPoint(0,0));
QRect qcr = cView->geometry();
QRect qdr = dView->geometry();
int cvW = cView->width();
int dvW = dView->width();
qreal wCoeff = (qreal)dvW / (qreal)cvW;
@ -1999,8 +2010,8 @@ void UBGraphicsScene::moveMagnifier(QPoint newPos)
QPoint cvPoint = cView->mapFromGlobal(globalPoint);
QPoint dvPoint( cvPoint.x() * wCoeff + dvZeroPoint.x(), cvPoint.y() * hCoeff + dvZeroPoint.y());
magniferControlViewWidget->grabNMove(globalPoint, globalPoint, false, false);
magniferDisplayViewWidget->grabNMove(globalPoint, dvPoint, false, true);
magniferControlViewWidget->grabNMove(globalPoint, globalPoint, forceGrab, false);
magniferDisplayViewWidget->grabNMove(globalPoint, dvPoint, forceGrab, true);
setModified(true);
}

@ -326,7 +326,8 @@ public slots:
void selectionChangedProcessing();
void updateGroupButtonState();
void moveMagnifier(QPoint newPos);
void moveMagnifier();
void moveMagnifier(QPoint newPos, bool forceGrab = false);
void closeMagnifier();
void zoomInMagnifier();
void zoomOutMagnifier();

Loading…
Cancel
Save