00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00024
00025 #ifndef QVPROPERTYCONTAINERCHANGE_H
00026 #define QVPROPERTYCONTAINERCHANGE_H
00027
00028 #ifndef DOXYGEN_IGNORE_THIS
00029 #include <QObject>
00030 #include <QVariant>
00031
00042 class QVPropertyContainerChange : public QObject
00043 {
00044 Q_OBJECT
00045
00046 public:
00051
00061 typedef enum {None, Name, ContainerDel, PropertyAdd, PropertyDel, PropertyValue, PropertiesValues, LinkAdd, LinkDel, All} ChangeType;
00062
00065 QVPropertyContainerChange():
00066 QObject(), sourceName(""), origName(""), destName(""), sourceId(0), origId(0), destId(0), changeType(None), propName(""), destPropName(""),
00067 sinchronous(FALSE), sequential(FALSE), value()
00068 { }
00069
00074 QVPropertyContainerChange(const QVPropertyContainerChange &other):
00075 QObject(), sourceName(other.sourceName), origName(other.origName), destName(other.destName), sourceId(other.sourceId), origId(other.origId),
00076 destId(other.destId), changeType(other.changeType), propName(other.propName), destPropName(other.destPropName), sinchronous(other.sinchronous),
00077 sequential(other.sequential), value(other.value)
00078 { }
00079
00091 QVPropertyContainerChange( const QString source,
00092 const uint id,
00093 const ChangeType type,
00094 const QString prop = QString(),
00095 const QVariant variant = QVariant()):
00096 QObject(), sourceName(source), origName(""), destName(""), sourceId(id), origId(0), destId(0), changeType(type), propName(prop), destPropName(""),
00097 sinchronous(FALSE), sequential(FALSE), value(variant)
00098 { }
00099
00116 QVPropertyContainerChange( const QString source,
00117 const uint id,
00118 const ChangeType type,
00119 const QString contOrig,
00120 const uint contOrigId,
00121 const QString propOrig,
00122 const QString contDest,
00123 const uint contDestId,
00124 const QString propDest,
00125 const bool sinc = FALSE,
00126 const bool sequ = FALSE):
00127 QObject(), sourceName(source), origName(contOrig), destName(contDest), sourceId(id), origId(contOrigId), destId(contDestId), changeType(type),
00128 propName(propOrig), destPropName(propDest), sinchronous(sinc), sequential(sequ), value()
00129 { }
00130
00131
00135 const QString getSourceName() const { return sourceName; }
00136
00140 const QString getOrigName() const { return origName; }
00141
00145 const QString getDestName() const { return destName; }
00146
00150 uint getSourceId() const { return sourceId; }
00151
00155 uint getOrigId() const { return origId; }
00156
00160 uint getDestId() const { return destId; }
00161
00165 ChangeType getChangeType() const { return changeType; }
00166
00170 const QString getPropName() const { return propName; }
00171
00175 const QString getOrigProp() const { return propName; }
00176
00180 const QString getDestProp() const { return destPropName; }
00181
00185 const QVariant getValue() const { return value; }
00186
00190 bool isSinc() const { return sinchronous; }
00191
00195 bool isSequ() const { return sequential; }
00196
00200 QString toString() const;
00201
00202
00203 private:
00204 const QString sourceName, origName, destName;
00205 uint sourceId, origId, destId;
00206 const ChangeType changeType;
00207 const QString propName, destPropName;
00208 const bool sinchronous;
00209 const bool sequential;
00210 const QVariant value;
00211
00212 };
00213
00214 #endif
00215
00216 #endif
00217