QetShapeItem: improve code.

Other improvement related to the refactoring of QetShapeItem


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3134 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-06-14 16:04:34 +00:00
parent 22db245e6b
commit f5ca3114d1
14 changed files with 508 additions and 488 deletions

View File

@@ -598,11 +598,11 @@ class ChangeSeveralConductorsPropertiesCommand : public QUndoCommand {
Diagram *diagram;
};
class ImageResizerCommand : public QUndoCommand {
class ItemResizerCommand : public QUndoCommand {
//constructor and destructor
public:
ImageResizerCommand (DiagramImageItem *image, qreal &old_, qreal &new_, QUndoCommand *parent = 0);
virtual ~ImageResizerCommand();
ItemResizerCommand (QetGraphicsItem *qgi, qreal &old_, qreal &new_,const QString &text, QUndoCommand *parent = 0);
virtual ~ItemResizerCommand();
//methods
public:
@@ -611,9 +611,10 @@ class ImageResizerCommand : public QUndoCommand {
//attributes
private:
DiagramImageItem *image_;
QetGraphicsItem *m_qgi;
qreal old_size, new_size;
Diagram *diagram;
QString m_text;
};
@@ -635,24 +636,6 @@ class ChangeShapeStyleCommand : public QUndoCommand {
Diagram *diagram;
};
class ChangeShapeScaleCommand : public QUndoCommand {
//constructor and destructor
public:
ChangeShapeScaleCommand (QetShapeItem *shape, double scale_factor, QUndoCommand *parent = 0);
virtual ~ChangeShapeScaleCommand();
//methods
public:
virtual void undo();
virtual void redo();
//attributes
private:
QetShapeItem *shape_;
double factor;
Diagram *diagram;
};
class LinkElementsCommand : public QUndoCommand {
public:
// constructor destructor