itom  4.1.0
paramStringWidget.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 
29 #ifndef PARAMSTRINGWIDGET_H
30 #define PARAMSTRINGWIDGET_H
31 
32 #include <QWidget>
33 
34 #include "common/param.h"
35 
36 #include "commonWidgets.h"
37 
38 namespace ito
39 {
40 
41 class ParamStringWidgetPrivate; // forward declare
42 
43 class ITOMWIDGETS_EXPORT ParamStringWidget : public QWidget
44 {
45  Q_OBJECT
46 
47 public:
48  explicit ParamStringWidget(QWidget *parent = 0);
49  virtual ~ParamStringWidget();
50 
51  ito::Param param() const;
52  QByteArray value() const;
53  ito::StringMeta meta() const;
54 
55 Q_SIGNALS:
56  void valueChanged(const QByteArray &value);
57 
58 public Q_SLOTS:
59  void setParam(const ito::Param &param, bool forceValueChanged = false);
60  void setValue(const QByteArray &value);
61  void setMeta(const ito::StringMeta &meta);
62 
63 protected:
64  QScopedPointer<ParamStringWidgetPrivate> d_ptr; // QScopedPointer to forward declared class
65 
66 private:
67  Q_DECLARE_PRIVATE(ParamStringWidget);
68  Q_DISABLE_COPY(ParamStringWidget);
69 
70  Q_PRIVATE_SLOT(d_func(), void slotValueChanged(QString))
71  Q_PRIVATE_SLOT(d_func(), void slotEditingFinished())
72 };
73 
74 } //end namespace ito
75 
76 #endif // PARAMINTWIDGET_H
PyObject * setParam(ito::AddInBase *addInObj, PyObject *args)
Definition: pythonPlugins.cpp:1347
class for parameter handling e.g. to pass paramters to plugins
Definition: param.h:283
Definition: apiFunctionsGraph.cpp:39
Definition: paramStringWidget.h:43
Meta-information for Param of type String.
Definition: paramMeta.h:354