itom 1.4.0
|
00001 /* ******************************************************************** 00002 itom software 00003 URL: http://www.uni-stuttgart.de/ito 00004 Copyright (C) 2013, Institut für Technische Optik (ITO), 00005 Universität Stuttgart, Germany 00006 00007 This file is part of itom and its software development toolkit (SDK). 00008 00009 itom is free software; you can redistribute it and/or modify it 00010 under the terms of the GNU Library General Public Licence as published by 00011 the Free Software Foundation; either version 2 of the Licence, or (at 00012 your option) any later version. 00013 00014 In addition, as a special exception, the Institut für Technische 00015 Optik (ITO) gives you certain additional rights. 00016 These rights are described in the ITO LGPL Exception version 1.0, 00017 which can be found in the file LGPL_EXCEPTION.txt in this package. 00018 00019 itom is distributed in the hope that it will be useful, but 00020 WITHOUT ANY WARRANTY; without even the implied warranty of 00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 00022 General Public Licence for more details. 00023 00024 You should have received a copy of the GNU Library General Public License 00025 along with itom. If not, see <http://www.gnu.org/licenses/>. 00026 *********************************************************************** */ 00027 00028 #ifndef HELPERCOMMON_H 00029 #define HELPERCOMMON_H 00030 00031 #include "typeDefs.h" 00032 #include "sharedStructures.h" 00033 00034 #include <qstring.h> 00035 #include <qvector.h> 00036 #include <qobject.h> 00037 #include <qhash.h> 00038 00039 #if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC) //only moc this file in itomCommonQtLib but not in other libraries or executables linking against this itomCommonQtLib 00040 00041 namespace ito 00042 { 00043 ito::RetVal ITOMCOMMONQT_EXPORT checkParamVector(QVector<ito::Param> *params); 00044 ito::RetVal ITOMCOMMONQT_EXPORT checkParamVectors(QVector<ito::Param> *paramsMand, QVector<ito::Param> *paramsOpt, QVector<ito::Param> *paramsOut); 00045 00046 ITOMCOMMONQT_EXPORT ito::Param* getParamByName(QVector<ito::Param> *paramVec, const char* name, ito::RetVal *retval = NULL); 00047 ITOMCOMMONQT_EXPORT ito::ParamBase* getParamByName(QVector<ito::ParamBase> *paramVec, const char* name, ito::RetVal *retval = NULL); 00048 ITOMCOMMONQT_EXPORT QHash<QString, ito::Param*> createParamHashTable(QVector<ito::Param> *paramVec); 00049 00050 bool ITOMCOMMONQT_EXPORT checkNumericParamRange(const ito::Param ¶m, double &value, bool *ok = NULL); 00051 00052 ito::RetVal ITOMCOMMONQT_EXPORT parseParamName(const QString &name, QString ¶mName, bool &hasIndex, int &index, QString &additionalTag); 00053 00054 ito::RetVal ITOMCOMMONQT_EXPORT getParamValue(const QMap<QString, Param> *m_params, const QString &key, ito::Param &value, QString &pkey, int &index); 00055 ito::RetVal ITOMCOMMONQT_EXPORT setParamValue(const QMap<QString, Param> *m_params, const QString &key, const ito::ParamBase &value, QString &pkey, int &index); 00056 }; // end namespace ito 00057 00058 #endif //#if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC) 00059 00060 #endif