itom  4.1.0
paramCharWidget.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 PARAMCHARWIDGET_H
30 #define PARAMCHARWIDGET_H
31 
32 #include <QWidget>
33 
34 #include "common/param.h"
35 
36 #include "commonWidgets.h"
37 
38 namespace ito
39 {
40 
41 class ParamCharWidgetPrivate; // forward declare
42 
43 class ITOMWIDGETS_EXPORT ParamCharWidget : public QWidget
44 {
45  Q_OBJECT
46 
47  Q_PROPERTY(bool keyboardTracking READ keyboardTracking WRITE setKeyboardTracking);
48 
49 public:
50  explicit ParamCharWidget(QWidget *parent = 0);
51  virtual ~ParamCharWidget();
52 
53  ito::Param param() const;
54  bool keyboardTracking() const;
55  char value() const;
56  ito::CharMeta meta() const;
57 
58 Q_SIGNALS:
59  void valueChanged(char value);
60 
61 public Q_SLOTS:
62  void setParam(const ito::Param &param, bool forceValueChanged = false);
63  void setKeyboardTracking(bool tracking);
64  void setValue(char value);
65  void setMeta(const ito::CharMeta &meta);
66 
67 protected:
68  QScopedPointer<ParamCharWidgetPrivate> d_ptr; // QScopedPointer to forward declared class
69 
70 private:
71  Q_DECLARE_PRIVATE(ParamCharWidget);
72  Q_DISABLE_COPY(ParamCharWidget);
73 
74  Q_PRIVATE_SLOT(d_func(), void slotValueChanged(int))
75  Q_PRIVATE_SLOT(d_func(), void slotValueChanged(double))
76  Q_PRIVATE_SLOT(d_func(), void slotChecked(bool))
77 };
78 
79 } //end namespace ito
80 
81 #endif // ParamCharWidget_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
meta-information for Param of type Char.
Definition: paramMeta.h:132
Definition: paramCharWidget.h:43