style editor : use QPropertyUndoCommand instead of ChangePartCommand.

Remove ChangePartCommand class.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4073 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-07-24 13:41:51 +00:00
parent 58d247ced7
commit 871d50c014
6 changed files with 44 additions and 197 deletions

View File

@@ -169,36 +169,6 @@ class AddPartCommand : public ElementEditionCommand {
bool first_redo;
};
/**
This command changes a property of a primitive when editing an electrical
element.
*/
class ChangePartCommand : public ElementEditionCommand
{
// constructors, destructor
public:
ChangePartCommand(const QString &, CustomElementPart *, const char *, const QVariant &, const QVariant &, QUndoCommand * = 0);
ChangePartCommand(const QString &part_name, CustomElementPart *part, const char *property_name, const QVariant &old_value, QUndoCommand *parent = 0);
virtual ~ChangePartCommand();
void setNewValue(const QVariant &new_value);
private:
ChangePartCommand(const ChangePartCommand &);
// methods
public:
virtual void undo();
virtual void redo();
// attributes
private:
CustomElementPart *cep;
const char *property;
QVariant m_old_value;
QVariant m_new_value;
};
/**
This command changes the translated names of an electrical element.
*/