itom
Loading...
Searching...
No Matches
abstractAddInDockWidget.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität 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 für 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 ABSTRACTADDINDOCKWIDGET_H
29#define ABSTRACTADDINDOCKWIDGET_H
30
31#include "retVal.h"
32#include "typeDefs.h"
33#include "sharedStructuresQt.h"
34#include "commonGlobal.h"
35
36#include <QtWidgets/qwidget.h>
37#include <qmap.h>
38#include <qsharedpointer.h>
39
40//forward declarations
41namespace ito
42{
43 class AddInBase; //forward declaration
44 class AbstractAddInDockWidgetPrivate; //forward declaration
45
46 //----------------------------------------------------------------------------------------------------------------------------------
67 class ITOMCOMMONQT_EXPORT AbstractAddInDockWidget : public QWidget
68 {
69 Q_OBJECT
70
71 public:
74
77
83 {
84 msgLevelNo = 0,
85 msgLevelErrorOnly = 1,
86 msgLevelWarningOnly = 2,
87 msgLevelWarningAndError = msgLevelErrorOnly | msgLevelWarningOnly
88 };
89
90 protected:
92
102 ito::RetVal setPluginParameter(QSharedPointer<ito::ParamBase> param, MessageLevel msgLevel = msgLevelWarningAndError) const;
103
105
115 ito::RetVal setPluginParameters(const QVector<QSharedPointer<ito::ParamBase> > params, MessageLevel msgLevel = msgLevelWarningAndError) const;
116
118
132 ito::RetVal observeInvocation(ItomSharedSemaphore *waitCond, MessageLevel msgLevel) const;
133
135
149 ito::RetVal setActuatorPosition(QVector<int> axes, QVector<double> positions, bool relNotAbs, MessageLevel msgLevel = msgLevelWarningAndError) const;
150
152
166 ito::RetVal setActuatorPosition(int axis, double position, bool relNotAbs, MessageLevel msgLevel = msgLevelWarningAndError) const;
167
169
174 ito::RetVal setActuatorInterrupt() const;
175
177
183 ito::RetVal requestActuatorStatusAndPositions(bool sendCurrentPos, bool sendTargetPos, MessageLevel msgLevel = msgLevelWarningAndError) const;
184
185 private:
188 public slots:
190
197 virtual void parametersChanged(QMap<QString, ito::Param> params) = 0;
198
200
207 virtual void identifierChanged(const QString &identifier) = 0;
208
210
220 virtual void actuatorStatusChanged(QVector<int> status, QVector<double> actPosition);
221
223
231 virtual void targetChanged(QVector<double> targetPositions);
232 };
233} //end namespace ito
234
235#endif //ABSTRACTADDINDOCKWIDGET_H
semaphore which can be used for asynchronous thread communication. By using this class it is possible...
Definition sharedStructuresQt.h:58
abstract base class for dock widgets (toolboxes) of plugins
Definition abstractAddInDockWidget.h:68
virtual void identifierChanged(const QString &identifier)=0
slot invoked if identifier of plugin has been set using AddInBase::setIdentifier
virtual void parametersChanged(QMap< QString, ito::Param > params)=0
slot invoked if any parameter of the plugin has been changed.
MessageLevel
Definition abstractAddInDockWidget.h:83
Definition abstractAddInDockWidget.cpp:42
Base class for all plugins.
Definition addInInterface.h:386
Class for managing status values (like errors or warning)
Definition retVal.h:54
Definition apiFunctionsGraph.cpp:40