Added startUserTransformation() and handleUserTransformation() methods to the CustomElementPart class and all of its subclasses.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2026 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2013-02-08 22:05:12 +00:00
parent c2b69dd6da
commit 73fa01c7b9
20 changed files with 269 additions and 0 deletions

View File

@@ -71,6 +71,14 @@ class CustomElementPart {
Typically, useless primitives are discarded when saving the element.
*/
virtual bool isUseless() const = 0;
/**
Inform this part a user-induced transformation is about to begin. This method can be used to save data required by handleUserTransformation().
*/
virtual void startUserTransformation(const QRectF &) = 0;
/**
Make this part fit into the provided rectangle.
*/
virtual void handleUserTransformation(const QRectF &, const QRectF &) = 0;
/// @return a pointer to the parent element editor
virtual QETElementEditor *elementEditor() const;
/**
@@ -86,5 +94,8 @@ class CustomElementPart {
virtual QString name() const = 0;
/// @return the name that will be used as XML tag when exporting the primitive
virtual QString xmlName() const = 0;
protected:
QList<QPointF> mapPoints(const QRectF &, const QRectF &, const QList<QPointF> &);
};
#endif