优化旋转操作

This commit is contained in:
duanshengchao 2024-08-27 19:56:21 +08:00
parent dd37676f2a
commit 7ba275fe0e
9 changed files with 24 additions and 3 deletions

View File

@ -1,8 +1,10 @@
<RCC>
<qresource prefix="/">
<file>images/checkerboard.png</file>
<file>images/icon_rotate_lb.png</file>
<file>images/icon_rotate_lt.png</file>
<file>images/icon_rotate_rb.png</file>
<file>images/icon_rotate_rt.png</file>
<file>images/icon_rotate.png</file>
<file>images/icon_rotate2.png</file>
<file>images/icon-rotate3.png</file>
</qresource>
</RCC>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 872 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

View File

@ -147,13 +147,32 @@ void BaseSelector::mouseMoveEvent(QGraphicsSceneMouseEvent* event, DesignerScene
setCursor(scene, Qt::SizeHorCursor);
break;
case H_rotate_leftTop:
{
int nSize = 24;
QCursor rotateCursor = QCursor(QPixmap(":/images/icon_rotate.png")/*.scaled(nSize, nSize, Qt::KeepAspectRatio, Qt::SmoothTransformation)*/);
setCursor(scene, rotateCursor);
break;
}
case H_rotate_rightTop:
{
int nSize = 24;
QCursor rotateCursor = QCursor(QPixmap(":/images/icon_rotate.png")/*.scaled(nSize, nSize, Qt::KeepAspectRatio, Qt::SmoothTransformation)*/);
setCursor(scene, rotateCursor);
break;
}
case H_rotate_rightBottom:
{
int nSize = 24;
QCursor rotateCursor = QCursor(QPixmap(":/images/icon_rotate.png")/*.scaled(nSize, nSize, Qt::KeepAspectRatio, Qt::SmoothTransformation)*/);
setCursor(scene, rotateCursor);
break;
}
case H_rotate_leftBottom:
{
int nSize = 24;
QCursor rotateCursor = QCursor(QPixmap(":/images/icon_rotate2.png").scaled(nSize, nSize, Qt::KeepAspectRatio, Qt::SmoothTransformation));
QCursor rotateCursor = QCursor(QPixmap(":/images/icon_rotate.png")/*.scaled(nSize, nSize, Qt::KeepAspectRatio, Qt::SmoothTransformation)*/);
setCursor(scene, rotateCursor);
break;
}
default:
break;