diff --git a/sources/diagramcommands.cpp b/sources/diagramcommands.cpp index 4d43dff5c..ae932ce23 100644 --- a/sources/diagramcommands.cpp +++ b/sources/diagramcommands.cpp @@ -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(); -} diff --git a/sources/diagramcommands.h b/sources/diagramcommands.h index 369b032d7..74d42397a 100644 --- a/sources/diagramcommands.h +++ b/sources/diagramcommands.h @@ -509,23 +509,4 @@ class ChangeSeveralConductorsPropertiesCommand : public QUndoCommand { /// track whether post-change properties were 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