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

preferencesAboutTextFull
Ivan Ilin 13 years ago
commit 4d196a038f
  1. 7
      src/board/UBBoardView.cpp
  2. 29
      src/domain/UBGraphicsDelegateFrame.cpp

@ -289,16 +289,9 @@ void UBBoardView::tabletEvent (QTabletEvent * event)
return; return;
} }
qDebug() << "tableEvent position " << event->pos();
qDebug() << "tableEvent global position " << event->globalPos();
UBDrawingController *dc = UBDrawingController::drawingController (); UBDrawingController *dc = UBDrawingController::drawingController ();
QPointF tabletPos = event->pos(); QPointF tabletPos = event->pos();
qDebug() << "tabletPos " << tabletPos;
UBStylusTool::Enum currentTool = (UBStylusTool::Enum)dc->stylusTool (); UBStylusTool::Enum currentTool = (UBStylusTool::Enum)dc->stylusTool ();
if (event->type () == QEvent::TabletPress || event->type () == QEvent::TabletEnterProximity) { if (event->type () == QEvent::TabletPress || event->type () == QEvent::TabletEnterProximity) {

@ -499,26 +499,27 @@ void UBGraphicsDelegateFrame::positionHandles()
mTopResizeGrip->setParentItem(this); mTopResizeGrip->setParentItem(this);
QRectF brRect = mBottomRightResizeGripSvgItem->mapRectToParent(mBottomRightResizeGripSvgItem->boundingRect()); QRectF brRect = mBottomRightResizeGripSvgItem->mapRectToParent(mBottomRightResizeGripSvgItem->boundingRect());
mBottomRightResizeGripSvgItem->setPos(rect().right() - brRect.width()
, rect().bottom() - brRect.height());
QRectF bRect = mBottomResizeGripSvgItem->mapRectToParent(mBottomResizeGripSvgItem->boundingRect()); QRectF bRect = mBottomResizeGripSvgItem->mapRectToParent(mBottomResizeGripSvgItem->boundingRect());
QRectF lRect = mLeftResizeGripSvgItem->mapRectToParent(mLeftResizeGripSvgItem->boundingRect());
QRectF rRect = mRightResizeGripSvgItem->mapRectToParent(mRightResizeGripSvgItem->boundingRect());
QRectF trRect = mTopResizeGripSvgItem->mapRectToParent(mTopResizeGripSvgItem->boundingRect());
mBottomResizeGripSvgItem->setPos(rect().center().x() - bRect.width() / 2 mBottomRightResizeGripSvgItem->setPos(rect().right() - brRect.width(), rect().bottom() - brRect.height());
, rect().bottom() - bRect.height()); mBottomResizeGripSvgItem->setPos(rect().center().x() - bRect.width() / 2, rect().bottom() - bRect.height());
QRectF lRect = mLeftResizeGripSvgItem->mapRectToParent(mLeftResizeGripSvgItem->boundingRect()); if(0 <= mScaleX){
mLeftResizeGripSvgItem->setPos(rect().left() mLeftResizeGripSvgItem->setPos(rect().left(), rect().center().y() - lRect.height() / 2);
, rect().center().y() - lRect.height() / 2); mRightResizeGripSvgItem->setPos(rect().right() - rRect.width(), rect().center().y() - rRect.height() / 2);
}else{
mLeftResizeGripSvgItem->setPos(rect().right() - rRect.width(), rect().center().y() - lRect.height() / 2);
mRightResizeGripSvgItem->setPos(rect().left() , rect().center().y() - rRect.height() / 2);
}
QRectF rRect = mRightResizeGripSvgItem->mapRectToParent(mRightResizeGripSvgItem->boundingRect()); if(0 < mScaleY){
mRightResizeGripSvgItem->setPos(rect().right() - rRect.width()
, rect().center().y() - rRect.height() / 2);
QRectF trRect = mTopResizeGripSvgItem->mapRectToParent(mTopResizeGripSvgItem->boundingRect()); }
mTopResizeGripSvgItem->setPos(rect().center().x() - trRect.width() / 2
, rect().y());
mTopResizeGripSvgItem->setPos(rect().center().x() - trRect.width() / 2, rect().y());
mRotateButton->setPos(rect().right() - mFrameWidth - 5, rect().top() + 5); mRotateButton->setPos(rect().right() - mFrameWidth - 5, rect().top() + 5);
mBottomRightResizeGrip->setRect(bottomRightResizeGripRect()); mBottomRightResizeGrip->setRect(bottomRightResizeGripRect());

Loading…
Cancel
Save