Element text mover : use QPropertyUndoCommand instead of MoveElementsTextsCommand.

Remove class MoveElementsTextsCommand


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4089 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-08-07 19:45:00 +00:00
parent 3535ee8001
commit 65b27f411a
4 changed files with 88 additions and 191 deletions

View File

@@ -17,35 +17,35 @@
*/
#ifndef ELEMENT_TEXTS_MOVER_H
#define ELEMENT_TEXTS_MOVER_H
#include <QtWidgets>
#include "diagramcontent.h"
#include <QSet>
#include <QPointF>
class QGraphicsItem;
class ElementTextItem;
class Diagram;
/**
This class manages the interactive movement of element text items on a
particular diagram.
*/
class ElementTextsMover {
// constructors, destructor
class ElementTextsMover
{
public:
ElementTextsMover();
virtual ~ElementTextsMover();
ElementTextsMover();
private:
ElementTextsMover(const ElementTextsMover &);
ElementTextsMover(const ElementTextsMover &);
// methods
public:
bool isReady() const;
int beginMovement(Diagram *, QGraphicsItem * = 0);
void continueMovement(const QPointF &);
void endMovement();
bool isReady() const;
int beginMovement(Diagram *, QGraphicsItem * = 0);
void continueMovement(const QPointF &);
void endMovement();
// attributes
private:
bool movement_running_;
QPointF current_movement_;
Diagram *diagram_;
QGraphicsItem *movement_driver_;
QSet<ElementTextItem *> moved_texts_;
bool movement_running_;
Diagram *diagram_;
QGraphicsItem *movement_driver_;
QHash <ElementTextItem *, QPointF> m_texts_item_H;
};
#endif