mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 00:30:53 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user