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