itom
Loading...
Searching...
No Matches
paramCharWidget.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
29#ifndef PARAMCHARWIDGET_H
30#define PARAMCHARWIDGET_H
31
32#include <QWidget>
33
34#include "common/param.h"
35
36#include "commonWidgets.h"
37
38namespace ito
39{
40
41class ParamCharWidgetPrivate; // forward declare
42
43class ITOMWIDGETS_EXPORT ParamCharWidget : public QWidget
44{
45 Q_OBJECT
46
47 Q_PROPERTY(bool keyboardTracking READ keyboardTracking WRITE setKeyboardTracking);
48
49public:
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
58Q_SIGNALS:
59 void valueChanged(char value);
60
61public 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
67protected:
68 QScopedPointer<ParamCharWidgetPrivate> d_ptr; // QScopedPointer to forward declared class
69
70private:
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
meta-information for Param of type Char.
Definition paramMeta.h:160
Definition paramCharWidget.h:44
class for parameter handling e.g. to pass parameters to plugins
Definition param.h:477
Definition apiFunctionsGraph.cpp:40
PyObject * setParam(ito::AddInBase *addInObj, PyObject *args)
Definition pythonPlugins.cpp:1249