PARP Research Group University of Murcia, Spain


src/qvcore/qvpropertycontainerchange.h

Go to the documentation of this file.
00001 /*
00002  *      Copyright (C) 2007, 2008. 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:
00061         typedef enum {None, Name, /*ContainerAdd, */ContainerDel, PropertyAdd, PropertyDel, PropertyValue, PropertiesValues, LinkAdd, LinkDel, All} ChangeType;
00062 
00065         QVPropertyContainerChange():
00066                         QObject(), sourceName(""), origName(""), destName(""), changeType(None), propName(""), destPropName(""), sinchronous(FALSE), sequential(FALSE), value()
00067                 { }
00068 
00073         QVPropertyContainerChange(const QVPropertyContainerChange &other):
00074                         QObject(), sourceName(other.sourceName), origName(other.origName), destName(other.destName), changeType(other.changeType),
00075                         propName(other.propName), destPropName(other.destPropName), sinchronous(other.sinchronous), sequential(other.sequential), value(other.value)
00076                 { }
00077 
00087         QVPropertyContainerChange(const QString source, const ChangeType type, const QString prop = QString(), const QVariant variant = QVariant()):
00088                         QObject(), sourceName(source), origName(""), destName(""), changeType(type), propName(prop), destPropName(""), sinchronous(FALSE), sequential(FALSE),
00089                         value(variant)
00090                 { }
00091 
00104         QVPropertyContainerChange(      const QString source,
00105                                                                 const ChangeType type,
00106                                                                 const QString contOrig,
00107                                                                 const QString propOrig,
00108                                                                 const QString contDest,
00109                                                                 const QString propDest,
00110                                                                 const bool sinc = FALSE,
00111                                                                 const bool sequ = FALSE):
00112                         QObject(), sourceName(source), origName(contOrig), destName(contDest), changeType(type), propName(propOrig), destPropName(propDest),
00113                         sinchronous(sinc), sequential(sequ), value()
00114                 { }
00115 
00116 
00120         const QString getSourceName() const { return sourceName; }
00121 
00125         const QString getOrigName() const { return origName; }
00126 
00130         const QString getDestName() const { return destName; }
00131 
00135         const ChangeType getChangeType() const { return changeType; }
00136 
00140         const QString getPropName() const { return propName; }
00141 
00145         const QString getOrigProp() const { return propName; }
00146 
00150         const QString getDestProp() const { return destPropName; }
00151 
00155         const QVariant getValue() const { return value; }
00156 
00160         const bool isSinc() const { return sinchronous; }
00161 
00165         const bool isSequ() const { return sequential; }
00166 
00170         QString toString() const;
00171 
00172 
00173 private:
00174         const QString sourceName, origName, destName;
00175         const ChangeType changeType;
00176         const QString propName, destPropName;
00177         const bool sinchronous;
00178         const bool sequential;
00179         const QVariant value;
00180 
00181 };
00182 #endif
00183 



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