itom  4.1.0
abstractAddInConfigDialog.h
1 /* ********************************************************************
2  itom software
3  URL: http://www.uni-stuttgart.de/ito
4  Copyright (C) 2020, 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 #include <QtWidgets/qdialog.h>
39 #include <qmap.h>
40 #include <qsharedpointer.h>
41 
42 
43 
44 
45 
46 //forward declarations
47 namespace ito
48 {
49  class AddInBase; //forward declaration
50  class AbstractAddInConfigDialogPrivate; //forward declaration
51 
52  //----------------------------------------------------------------------------------------------------------------------------------
77  class ITOMCOMMONQT_EXPORT AbstractAddInConfigDialog : public QDialog
78  {
79  Q_OBJECT
80 
81  public:
84 
86  virtual ~AbstractAddInConfigDialog();
87 
93  {
94  msgLevelNo = 0,
95  msgLevelErrorOnly = 1,
96  msgLevelWarningOnly = 2,
97  msgLevelWarningAndError = msgLevelErrorOnly | msgLevelWarningOnly
98  };
99 
101 
109  virtual ito::RetVal applyParameters() = 0;
110 
111  protected:
113 
125  virtual ito::RetVal setPluginParameter(QSharedPointer<ito::ParamBase> param, MessageLevel msgLevel = msgLevelWarningAndError);
126 
128 
140  virtual ito::RetVal setPluginParameters(const QVector<QSharedPointer<ito::ParamBase> > params, MessageLevel msgLevel = msgLevelWarningAndError);
141 
143 
157  virtual ito::RetVal observeInvocation(ItomSharedSemaphore *waitCond, MessageLevel msgLevel) const;
158 
159  QMap<QString, ito::Param> m_currentParameters;
161  private:
164  public slots:
166 
174  virtual void parametersChanged(QMap<QString, ito::Param> params) = 0;
175  };
176 } //end namespace ito
177 
178 #endif //ABSTRACTADDINCONFIGDIALOG_H
MessageLevel
Definition: abstractAddInConfigDialog.h:92
Definition: abstractAddInConfigDialog.cpp:42
Class for managing status values (like errors or warning)
Definition: retVal.h:54
Base class for all plugins.
Definition: addInInterface.h:385
AbstractAddInConfigDialogPrivate * d
Definition: abstractAddInConfigDialog.h:162
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:77