mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Forget file from previous comit
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4025 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -1053,44 +1053,3 @@ void ChangeSeveralConductorsPropertiesCommand::redo() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief ChangeShapeStyleCommand::ChangeShapeStyleCommand Constructor
|
|
||||||
* @param shape
|
|
||||||
* @param old_ old style of shape
|
|
||||||
* @param new_ new style of shape
|
|
||||||
* @param parent undocommand parent
|
|
||||||
*/
|
|
||||||
ChangeShapeStyleCommand::ChangeShapeStyleCommand(QetShapeItem *shape, Qt::PenStyle &old_, Qt::PenStyle &new_, QUndoCommand *parent):
|
|
||||||
QUndoCommand(parent),
|
|
||||||
shape_(shape),
|
|
||||||
old_style (old_),
|
|
||||||
new_style (new_),
|
|
||||||
diagram(shape->diagram())
|
|
||||||
{
|
|
||||||
setText(QObject::tr("Changer le style d'une shape"));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief ChangeShapeStyleCommand::~ChangeShapeStyleCommand destructor
|
|
||||||
*/
|
|
||||||
ChangeShapeStyleCommand::~ChangeShapeStyleCommand() {}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief ChangeShapeStyleCommand::undo set the old style
|
|
||||||
*/
|
|
||||||
void ChangeShapeStyleCommand::undo() {
|
|
||||||
shape_ -> setStyle(old_style);
|
|
||||||
diagram -> showMe();
|
|
||||||
QUndoCommand::undo();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief ChangeShapeStyleCommand::redo set the new style
|
|
||||||
*/
|
|
||||||
void ChangeShapeStyleCommand::redo() {
|
|
||||||
shape_ -> setStyle(new_style);
|
|
||||||
diagram -> showMe();
|
|
||||||
QUndoCommand::redo();
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -509,23 +509,4 @@ class ChangeSeveralConductorsPropertiesCommand : public QUndoCommand {
|
|||||||
/// track whether post-change properties were set
|
/// track whether post-change properties were set
|
||||||
bool new_settings_set;
|
bool new_settings_set;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class ChangeShapeStyleCommand : public QUndoCommand {
|
|
||||||
//constructor and destructor
|
|
||||||
public:
|
|
||||||
ChangeShapeStyleCommand (QetShapeItem *shape, Qt::PenStyle &old_, Qt::PenStyle &new_, QUndoCommand *parent = 0);
|
|
||||||
virtual ~ChangeShapeStyleCommand();
|
|
||||||
|
|
||||||
//methods
|
|
||||||
public:
|
|
||||||
virtual void undo();
|
|
||||||
virtual void redo();
|
|
||||||
|
|
||||||
//attributes
|
|
||||||
private:
|
|
||||||
QetShapeItem *shape_;
|
|
||||||
Qt::PenStyle old_style, new_style;
|
|
||||||
Diagram *diagram;
|
|
||||||
};
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user