examples/qvdesigner0.2/facade/itemfactory.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 ITEMFACTORY_H
00023 #define ITEMFACTORY_H
00024 
00025 #include <QObject>
00026 #include <QList>
00027 #include <QString>
00028 #include "itemproperties.h"
00029 #include <qvippworkers.h>
00030 
00031 #ifndef DOXYGEN_IGNORE_THIS
00032 
00033 // Clase que se encargará de implemetar la obtención de los tipos de workers de que disponemos (parecido a un Factory)
00034 class ItemFactory: QObject
00035 {
00036         Q_OBJECT
00037         
00038         public:
00039                 ItemFactory();
00040 
00041                 // devuelve la lista de Items disponibles en el sistema, cada uno de estos items es un elemento del diseño de los programas de QVision
00042                 QList<QString> getItemTypes() const;
00043 
00044                 // devuelve la lista de Items de entrada disponibles en el sistema, cada uno de estos items es un elemento del diseño de los programas de QVision
00045                 QList<QString> getInputItemTypes() const;
00046 
00047                 // devuelve la lista de Items intermedios disponibles en el sistema, cada uno de estos items es un elemento del diseño de los programas de QVision
00048                 QList<QString> getMiddleItemTypes() const;
00049 
00050                 // devuelve la lista de Items de salida disponibles en el sistema, cada uno de estos items es un elemento del diseño de los programas de QVision
00051                 QList<QString> getOutputItemTypes() const;
00052 
00053                 QVPropertyContainer *createContainer(QString type, QString name) const;
00054 
00055                 QString containerType(QVPropertyContainer *cont) const;
00056 
00057         private:
00058                 QList<QString> inputItems, middleItems, outputItems;
00059 };
00060 
00061 #endif
00062 #endif