examples/qvdesigner0.2/facade/itemproperties.h

00001 /*
00002  *      Copyright (C) 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 
00021 
00022 #ifndef ITEMPROPERTIES_H
00023 #define ITEMPROPERTIES_H
00024 
00025 #include <QString>
00026 #include <QList>
00027 
00028 
00029 class QVPropertyContainer;
00030 
00031 #ifndef DOXYGEN_IGNORE_THIS
00032 
00033 // Clase que representa a un propertycontainer, de forma que podemos obtener el nombre de este, y su lista de propiedades y los parĂ¡metros de estas
00034 class ItemProperties
00035 {
00036 public:
00037         ItemProperties(QString type);
00038         ItemProperties(QString type, QVPropertyContainer *container);
00039 
00040         QString getType() const;
00041         QList<QString> getProperties() const;
00042         int propertyType(const uint i) const;
00043         bool isInput(const uint i) const;
00044         bool isOutput(const uint i) const;
00045 
00046         void insertProperty(int pos, QString name, int type, bool input, bool output);
00047         void deleteProperty(int pos);
00048         void deleteProperty(QString name);
00049 
00050 
00051 private:
00052         QString containerType;
00053 
00054         QList<QString> properties;
00055         QList<int> types;
00056         QList<bool> inputs;
00057         QList<bool> outputs;
00058 };
00059 
00060 #endif
00061 #endif