mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +01:00
Element editor : add handler for modifie primitives
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4058 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -175,29 +175,30 @@ class AddPartCommand : public ElementEditionCommand {
|
||||
This command changes a property of a primitive when editing an electrical
|
||||
element.
|
||||
*/
|
||||
class ChangePartCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
class ChangePartCommand : public ElementEditionCommand
|
||||
{
|
||||
// constructors, destructor
|
||||
public:
|
||||
ChangePartCommand(const QString &, CustomElementPart *, const char *, const QVariant &, const QVariant &, QUndoCommand * = 0);
|
||||
virtual ~ChangePartCommand();
|
||||
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 &);
|
||||
ChangePartCommand(const ChangePartCommand &);
|
||||
|
||||
// methods
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
|
||||
// attributes
|
||||
// attributes
|
||||
private:
|
||||
/// Changed primitive
|
||||
CustomElementPart *cep;
|
||||
/// Changed property
|
||||
const char *property;
|
||||
/// Former value
|
||||
QVariant old_value;
|
||||
/// New value
|
||||
QVariant new_value;
|
||||
CustomElementPart *cep;
|
||||
const char *property;
|
||||
QVariant m_old_value;
|
||||
QVariant m_new_value;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user