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
RPropertyChange::getOldValue
QVariant getOldValue() const
Definition: RPropertyChange.h:47
RPropertyChange::newValue
QVariant newValue
Definition: RPropertyChange.h:68
RPropertyChange::RPropertyChange
RPropertyChange()
Definition: RPropertyChange.h:41
RPropertyChange::setNewValue
void setNewValue(const QVariant &v)
Definition: RPropertyChange.h:51
RPropertyChange::getPropertyTypeId
RPropertyTypeId getPropertyTypeId() const
Definition: RPropertyChange.h:61
_RMapIntPropertyChange
QMap< int, QList< RPropertyChange > > _RMapIntPropertyChange
Definition: RPropertyChange.h:73
RPropertyChange
Stores the change that was made to a property of an object.
Definition: RPropertyChange.h:39
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(RMath *)
RPropertyTypeId
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RPropertyTypeId.h:59
RPropertyChange::setPropertyTypeId
void setPropertyTypeId(const RPropertyTypeId &id)
Definition: RPropertyChange.h:58
RPropertyChange::getNewValue
QVariant getNewValue() const
Definition: RPropertyChange.h:54
RPropertyChange::setOldValue
void setOldValue(const QVariant &v)
Definition: RPropertyChange.h:44
core_global.h
RExporter
Abstract base class for exporters.
Definition: RExporter.h:72
RStorage
This is the abstract base class for all storage implementations.
Definition: RStorage.h:64
RObject.h
RPropertyTypeId.h
operator<<
QCADCORE_EXPORT QDebug operator<<(QDebug dbg, const RPropertyChange &p)
Definition: RPropertyChange.cpp:95
RPropertyChange::propertyTypeId
RPropertyTypeId propertyTypeId
Definition: RPropertyChange.h:66
QCADCORE_EXPORT
#define QCADCORE_EXPORT
Definition: core_global.h:10
RPropertyChange::oldValue
QVariant oldValue
Definition: RPropertyChange.h:67