itom
Loading...
Searching...
No Matches
autoIntervalProperty.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2021, 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 AUTOINTERVALPROPERTY_H
29#define AUTOINTERVALPROPERTY_H
30
31#include <qvariant.h>
32#include "Property.h"
33
34class Property;
35class QObject;
36
37
38namespace ito
39{
40 class QPROPERTYEDITOR_TEST_EXPORT AutoIntervalProperty : public Property
41 {
42 Q_OBJECT
43 Q_PROPERTY(double minimum READ minimum WRITE setMinimum DESIGNABLE true USER true)
44 Q_PROPERTY(double maximum READ maximum WRITE setMaximum DESIGNABLE true USER true)
45 Q_PROPERTY(bool autoScaling READ autoScaling WRITE setAutoScaling DESIGNABLE true USER true)
46
47 public:
48 AutoIntervalProperty(const QString& name = QString(), QObject* propertyObject = 0, QObject* parent = 0);
49
50 QVariant value(int role = Qt::UserRole) const;
51 virtual void setValue(const QVariant& value);
52
53 void setEditorHints(const QString& hints);
54
55 double minimum() const;
56 void setMinimum(double minimum);
57
58 double maximum() const;
59 void setMaximum(double maximum);
60
61 bool autoScaling() const;
62 void setAutoScaling(bool autoScaling);
63
64 private:
65 QString parseHints(const QString& hints, const QChar component);
66
67 Property* m_minimum;
68 Property* m_maximum;
69 Property* m_autoScaling;
70 };
71
72}
73#endif //AUTOINTERVALPROPERTY_H
Definition Property.h:41
Definition autoIntervalProperty.h:41
Definition apiFunctionsGraph.cpp:40