PARP Research Group University of Murcia, Spain


src/qvcore/qvpropertycontainerchange.h

Go to the documentation of this file.
00001 /*
00002  *      Copyright (C) 2007, 2008, 2009. PARP Research Group.
00003  *      <http://perception.inf.um.es>
00004  *      University of Murcia, Spain.
00005  *
00006  *      This file is part of the QVision library.
00007  *
00008  *      QVision is free software: you can redistribute it and/or modify
00009  *      it under the terms of the GNU Lesser General Public License as
00010  *      published by the Free Software Foundation, version 3 of the License.
00011  *
00012  *      QVision is distributed in the hope that it will be useful,
00013  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *      GNU Lesser General Public License for more details.
00016  *
00017  *      You should have received a copy of the GNU Lesser General Public
00018  *      License along with QVision. If not, see <http://www.gnu.org/licenses/>.
00019  */
00020 
00024 
00025 #ifndef QVPROPERTYCONTAINERCHANGE_H
00026 #define QVPROPERTYCONTAINERCHANGE_H
00027 
00028 #include <QObject>
00029 #include <QVariant>
00030 
00031 
00042 class QVPropertyContainerChange : public QObject
00043 {
00044 Q_OBJECT
00045 
00046 public:
00051         // / ContainerAdd: a container has been add.
00061         typedef enum {None, Name, /*ContainerAdd, */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         const uint getSourceId() const { return sourceId; }
00151 
00155         const uint getOrigId() const { return origId; }
00156 
00160         const uint getDestId() const { return destId; }
00161 
00165         const 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         const bool isSinc() const { return sinchronous; }
00191 
00195         const 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 #endif
00214 



QVision framework. PARP research group, copyright 2007, 2008.