Element editor: changed the way scaling operations get rounded.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2058 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2013-03-06 18:51:29 +00:00
parent 62a59f5341
commit 5af8573960
7 changed files with 112 additions and 18 deletions

View File

@@ -1,6 +1,7 @@
#ifndef ELEMENTPRIMITIVEDECORATOR_H
#define ELEMENTPRIMITIVEDECORATOR_H
#include <QGraphicsObject>
#include "qet.h"
class ElementEditionCommand;
class ElementScene;
class CustomElementPart;
@@ -49,9 +50,11 @@ class ElementPrimitiveDecorator : public QGraphicsObject {
void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
void keyPressEvent(QKeyEvent *);
void keyReleaseEvent(QKeyEvent *);
QPointF deltaForRoundScaling(const QRectF &, const QRectF &, qreal);
QPointF snapConstPointToGrid(const QPointF &) const;
void snapPointToGrid(QPointF &) const;
bool mustSnapToGrid(QGraphicsSceneMouseEvent *);
QET::ScalingMethod scalingMethod(QGraphicsSceneMouseEvent *);
private:
void init();