itom
Loading...
Searching...
No Matches
itomParamFactory.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 ITOMPARAMFACTORY_H
29#define ITOMPARAMFACTORY_H
30
31#include "itomParamManager.h"
32
33#include "common/paramMeta.h"
34#include "../commonWidgets.h"
35
36namespace ito
37{
38
39class ParamIntPropertyFactoryPrivate;
40
41class ITOMWIDGETS_EXPORT ParamIntPropertyFactory : public QtAbstractEditorFactory<ParamIntPropertyManager>
42{
43 Q_OBJECT
44public:
45 ParamIntPropertyFactory(QObject *parent = 0);
47protected:
48 void connectPropertyManager(ParamIntPropertyManager *manager);
49 QWidget *createEditor(ParamIntPropertyManager *manager, QtProperty *property, QWidget *parent);
50 void disconnectPropertyManager(ParamIntPropertyManager *manager);
51private:
53 Q_DECLARE_PRIVATE(ParamIntPropertyFactory)
54 Q_DISABLE_COPY(ParamIntPropertyFactory)
55 Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int))
56 Q_PRIVATE_SLOT(d_func(), void slotMetaChanged(QtProperty *, const ito::IntMeta &))
57 Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
58 Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
59};
60
61
62
64
65class ITOMWIDGETS_EXPORT ParamDoublePropertyFactory : public QtAbstractEditorFactory<ParamDoublePropertyManager>
66{
67 Q_OBJECT
68public:
69 ParamDoublePropertyFactory(QObject *parent = 0);
71protected:
72 void connectPropertyManager(ParamDoublePropertyManager *manager);
73 QWidget *createEditor(ParamDoublePropertyManager *manager, QtProperty *property, QWidget *parent);
74 void disconnectPropertyManager(ParamDoublePropertyManager *manager);
75private:
77 Q_DECLARE_PRIVATE(ParamDoublePropertyFactory)
78 Q_DISABLE_COPY(ParamDoublePropertyFactory)
79 Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, double))
80 Q_PRIVATE_SLOT(d_func(), void slotMetaChanged(QtProperty *, const ito::DoubleMeta &))
81 Q_PRIVATE_SLOT(d_func(), void slotSetValue(double))
82 Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
83};
84
85
87
88class ITOMWIDGETS_EXPORT ParamCharPropertyFactory : public QtAbstractEditorFactory<ParamCharPropertyManager>
89{
90 Q_OBJECT
91public:
92 ParamCharPropertyFactory(QObject *parent = 0);
94protected:
95 void connectPropertyManager(ParamCharPropertyManager *manager);
96 QWidget *createEditor(ParamCharPropertyManager *manager, QtProperty *property, QWidget *parent);
97 void disconnectPropertyManager(ParamCharPropertyManager *manager);
98private:
100 Q_DECLARE_PRIVATE(ParamCharPropertyFactory)
101 Q_DISABLE_COPY(ParamCharPropertyFactory)
102 Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, char))
103 Q_PRIVATE_SLOT(d_func(), void slotMetaChanged(QtProperty *, const ito::CharMeta &))
104 Q_PRIVATE_SLOT(d_func(), void slotSetValue(char))
105 Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
106};
107
108
110
111class ITOMWIDGETS_EXPORT ParamStringPropertyFactory : public QtAbstractEditorFactory<ParamStringPropertyManager>
112{
113 Q_OBJECT
114public:
115 ParamStringPropertyFactory(QObject *parent = 0);
117protected:
118 void connectPropertyManager(ParamStringPropertyManager *manager);
119 QWidget *createEditor(ParamStringPropertyManager *manager, QtProperty *property, QWidget *parent);
120 void disconnectPropertyManager(ParamStringPropertyManager *manager);
121private:
123 Q_DECLARE_PRIVATE(ParamStringPropertyFactory)
124 Q_DISABLE_COPY(ParamStringPropertyFactory)
125 Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QByteArray &))
126 Q_PRIVATE_SLOT(d_func(), void slotMetaChanged(QtProperty *, const ito::StringMeta &))
127 Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QByteArray &))
128 Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
129};
130
132
133class ITOMWIDGETS_EXPORT ParamIntervalPropertyFactory : public QtAbstractEditorFactory<ParamIntervalPropertyManager>
134{
135 Q_OBJECT
136public:
137 ParamIntervalPropertyFactory(QObject *parent = 0);
139protected:
140 void connectPropertyManager(ParamIntervalPropertyManager *manager);
141 QWidget *createEditor(ParamIntervalPropertyManager *manager, QtProperty *property, QWidget *parent);
142 void disconnectPropertyManager(ParamIntervalPropertyManager *manager);
143private:
145 Q_DECLARE_PRIVATE(ParamIntervalPropertyFactory)
146 Q_DISABLE_COPY(ParamIntervalPropertyFactory)
147 Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int, int))
148 Q_PRIVATE_SLOT(d_func(), void slotMetaChanged(QtProperty *, const ito::IntervalMeta &))
149 Q_PRIVATE_SLOT(d_func(), void slotSetValue(int, int))
150 Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
151};
152
153} //end namespace ito
154
155#endif
The QtAbstractEditorFactory is the base template class for editor factories.
Definition qtpropertybrowser.h:154
The QtProperty class encapsulates an instance of a property.
Definition qtpropertybrowser.h:61
meta-information for Param of type Char.
Definition paramMeta.h:160
Meta-information for ito::Param of type Double.
Definition paramMeta.h:346
Meta-information for Param of type Int.
Definition paramMeta.h:253
Meta-information for Param of type IntArrayMeta that represent an interval [minimum,...
Definition paramMeta.h:957
Definition itomParamFactory.h:89
Definition itomParamFactory.cpp:390
Definition itomParamManager.h:104
The ParamDoublePropertyFactory class provides QSpinBox widgets for properties created by QtIntPropert...
Definition itomParamFactory.h:66
Definition itomParamFactory.cpp:244
Definition itomParamManager.h:131
Definition itomParamFactory.h:42
Definition itomParamFactory.cpp:104
Definition itomParamManager.h:77
The ParamIntervalPropertyFactory class provides RangeWidget widgets for properties created by ParamIn...
Definition itomParamFactory.h:134
Definition itomParamFactory.cpp:669
Definition itomParamManager.h:190
The ParamStringPropertyFactory class provides QLineEdit widgets for properties created by ParamString...
Definition itomParamFactory.h:112
Definition itomParamFactory.cpp:533
Definition itomParamManager.h:164
Meta-information for Param of type String.
Definition paramMeta.h:527
Definition apiFunctionsGraph.cpp:40