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