itom 1.3.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 ABSTRACTADDINCONFIGDIALOG_H 00029 #define ABSTRACTADDINCONFIGDIALOG_H 00030 00031 #include "retVal.h" 00032 #include "typeDefs.h" 00033 #include "sharedStructuresQt.h" 00034 #include "commonGlobal.h" 00035 00036 #if QT_VERSION < 0x050000 00037 #include <qdialog.h> 00038 #else 00039 #include <QtWidgets/qdialog.h> 00040 #endif 00041 #include <qmap.h> 00042 #include <qsharedpointer.h> 00043 00044 //forward declarations 00045 namespace ito 00046 { 00047 class AddInBase; //forward declaration 00048 class AbstractAddInConfigDialogPrivate; //forward declaration 00049 00050 //---------------------------------------------------------------------------------------------------------------------------------- 00075 class ITOMCOMMONQT_EXPORT AbstractAddInConfigDialog : public QDialog 00076 { 00077 Q_OBJECT 00078 00079 public: 00081 AbstractAddInConfigDialog(ito::AddInBase *plugin); 00082 00084 virtual ~AbstractAddInConfigDialog(); 00085 00090 enum MessageLevel 00091 { 00092 msgLevelNo = 0, 00093 msgLevelErrorOnly = 1, 00094 msgLevelWarningOnly = 2, 00095 msgLevelWarningAndError = msgLevelErrorOnly | msgLevelWarningOnly 00096 }; 00097 00099 00107 virtual ito::RetVal applyParameters() = 0; 00108 00109 protected: 00111 00123 virtual ito::RetVal setPluginParameter(QSharedPointer<ito::ParamBase> param, MessageLevel msgLevel = msgLevelWarningAndError); 00124 00126 00138 virtual ito::RetVal setPluginParameters(const QVector<QSharedPointer<ito::ParamBase> > params, MessageLevel msgLevel = msgLevelWarningAndError); 00139 00141 00155 virtual ito::RetVal observeInvocation(ItomSharedSemaphore *waitCond, MessageLevel msgLevel) const; 00156 00157 QMap<QString, ito::Param> m_currentParameters; 00159 private: 00160 AbstractAddInConfigDialogPrivate* d; 00162 public slots: 00164 00172 virtual void parametersChanged(QMap<QString, ito::Param> params) = 0; 00173 }; 00174 } //end namespace ito 00175 00176 #endif //ABSTRACTADDINCONFIGDIALOG_H