itom  3.0.0
abstractAddInConfigDialog.h
1 /* ********************************************************************
2  itom software
3  URL: http://www.uni-stuttgart.de/ito
4  Copyright (C) 2016, Institut fuer Technische Optik (ITO),
5  Universitaet Stuttgart, Germany
6 
7  This file is part of itom and its software development toolkit (SDK).
8 
9  itom is free software; you can redistribute it and/or modify it
10  under the terms of the GNU Library General Public Licence as published by
11  the Free Software Foundation; either version 2 of the Licence, or (at
12  your option) any later version.
13 
14  In addition, as a special exception, the Institut fuer Technische
15  Optik (ITO) gives you certain additional rights.
16  These rights are described in the ITO LGPL Exception version 1.0,
17  which can be found in the file LGPL_EXCEPTION.txt in this package.
18 
19  itom is distributed in the hope that it will be useful, but
20  WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
22  General Public Licence for more details.
23 
24  You should have received a copy of the GNU Library General Public License
25  along with itom. If not, see <http://www.gnu.org/licenses/>.
26 *********************************************************************** */
27 
28 #ifndef ABSTRACTADDINCONFIGDIALOG_H
29 #define ABSTRACTADDINCONFIGDIALOG_H
30 
31 #include "retVal.h"
32 #include "typeDefs.h"
33 #include "sharedStructuresQt.h"
34 #include "commonGlobal.h"
35 #include "../common/interval.h"
36 #include "../common/qtMetaTypeDeclarations.h"
37 
38 #if QT_VERSION < 0x050000
39 #include <qdialog.h>
40 #else
41 #include <QtWidgets/qdialog.h>
42 #endif
43 #include <qmap.h>
44 #include <qsharedpointer.h>
45 
46 
47 
48 
49 
50 //forward declarations
51 namespace ito
52 {
53  class AddInBase; //forward declaration
54  class AbstractAddInConfigDialogPrivate; //forward declaration
55 
56  //----------------------------------------------------------------------------------------------------------------------------------
81  class ITOMCOMMONQT_EXPORT AbstractAddInConfigDialog : public QDialog
82  {
83  Q_OBJECT
84 
85  public:
88 
90  virtual ~AbstractAddInConfigDialog();
91 
97  {
98  msgLevelNo = 0,
99  msgLevelErrorOnly = 1,
100  msgLevelWarningOnly = 2,
101  msgLevelWarningAndError = msgLevelErrorOnly | msgLevelWarningOnly
102  };
103 
105 
113  virtual ito::RetVal applyParameters() = 0;
114 
115  protected:
117 
129  virtual ito::RetVal setPluginParameter(QSharedPointer<ito::ParamBase> param, MessageLevel msgLevel = msgLevelWarningAndError);
130 
132 
144  virtual ito::RetVal setPluginParameters(const QVector<QSharedPointer<ito::ParamBase> > params, MessageLevel msgLevel = msgLevelWarningAndError);
145 
147 
161  virtual ito::RetVal observeInvocation(ItomSharedSemaphore *waitCond, MessageLevel msgLevel) const;
162 
163  QMap<QString, ito::Param> m_currentParameters;
165  private:
168  public slots:
170 
178  virtual void parametersChanged(QMap<QString, ito::Param> params) = 0;
179  };
180 } //end namespace ito
181 
182 #endif //ABSTRACTADDINCONFIGDIALOG_H
MessageLevel
Definition: abstractAddInConfigDialog.h:96
Definition: abstractAddInConfigDialog.cpp:46
Class for managing status values (like errors or warning)
Definition: retVal.h:54
Base class for all plugins.
Definition: addInInterface.h:356
AbstractAddInConfigDialogPrivate * d
Definition: abstractAddInConfigDialog.h:166
Definition: apiFunctionsGraph.cpp:39
semaphore which can be used for asychronous thread communication. By using this class it is possible ...
Definition: sharedStructuresQt.h:57
abstract base class for configuration dialogs of plugins
Definition: abstractAddInConfigDialog.h:81