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:
blacksun
2015-07-20 17:45:37 +00:00
parent effa4e9997
commit c885ce3d7a
18 changed files with 543 additions and 42 deletions

View File

@@ -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;
};
/**