QCAD
Open Source 2D CAD
RPropertyChange.h
Go to the documentation of this file.
1 
20 #ifndef RPROPERTYCHANGE_H
21 #define RPROPERTYCHANGE_H
22 
23 #include "core_global.h"
24 
25 #include <QVariant>
26 
27 #include "RObject.h"
28 #include "RPropertyTypeId.h"
29 
30 class RStorage;
31 class RExporter;
32 
40 public:
42  RPropertyChange(RPropertyTypeId propertyTypeId, QVariant oldValue, QVariant newValue);
43 
44  void setOldValue(const QVariant& v) {
45  oldValue = v;
46  }
47  QVariant getOldValue() const {
48  return oldValue;
49  }
50 
51  void setNewValue(const QVariant& v) {
52  newValue = v;
53  }
54  QVariant getNewValue() const {
55  return newValue;
56  }
57 
59  propertyTypeId = id;
60  }
62  return propertyTypeId;
63  }
64 
65 public:
67  QVariant oldValue;
68  QVariant newValue;
69 };
70 
71 QCADCORE_EXPORT QDebug operator<<(QDebug dbg, const RPropertyChange& p);
72 
73 typedef QMap<int, QList<RPropertyChange> > _RMapIntPropertyChange;
78 
79 #endif
void setOldValue(const QVariant &v)
Definition: RPropertyChange.h:44
Stores the change that was made to a property of an object.
Definition: RPropertyChange.h:39
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RPropertyTypeId.h:57
QMap< int, QList< RPropertyChange > > _RMapIntPropertyChange
Definition: RPropertyChange.h:73
#define QCADCORE_EXPORT
Definition: core_global.h:10
QVariant getNewValue() const
Definition: RPropertyChange.h:54
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RStorage.h:55
QVariant getOldValue() const
Definition: RPropertyChange.h:47
RPropertyTypeId getPropertyTypeId() const
Definition: RPropertyChange.h:61
QVariant newValue
Definition: RPropertyChange.h:68
RPropertyTypeId propertyTypeId
Definition: RPropertyChange.h:66
Q_DECLARE_METATYPE(RMath *)
QVariant oldValue
Definition: RPropertyChange.h:67
void setNewValue(const QVariant &v)
Definition: RPropertyChange.h:51
QCADCORE_EXPORT QDebug operator<<(QDebug dbg, const RPropertyChange &p)
Definition: RPropertyChange.cpp:86
void setPropertyTypeId(const RPropertyTypeId &id)
Definition: RPropertyChange.h:58
Abstract base class for exporters.
Definition: RExporter.h:63
RPropertyChange()
Definition: RPropertyChange.h:41