Warning, /frameworks/kquickcharts/examples/charts/RangeEditor.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  * This file is part of KQuickCharts
0003  * SPDX-FileCopyrightText: 2019 Arjen Hiemstra <ahiemstra@heimr.nl>
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006  */
0007 
0008 import QtQuick
0009 import QtQuick.Controls
0010 import QtQuick.Layouts
0011 import org.kde.kirigami as Kirigami
0012 
0013 import org.kde.quickcharts as Charts
0014 
0015 RowLayout {
0016     property alias label: labelItem.text;
0017     property Charts.Range range;
0018 
0019     spacing: Kirigami.Units.smallSpacing
0020 
0021     Label {
0022         id: labelItem;
0023     }
0024     CheckBox {
0025         id: automaticCheckbox;
0026         checked: range.automatic;
0027         text: "Automatic";
0028         onToggled: range.automatic = checked
0029     }
0030     Label {
0031         text: "From"
0032     }
0033     SpinBox {
0034         from: -10000;
0035         to: 10000;
0036         value: range.from;
0037         editable: true;
0038         enabled: !automaticCheckbox.checked;
0039         onValueModified: range.from = value;
0040     }
0041     Label {
0042         text: "To"
0043     }
0044     SpinBox {
0045         from: -10000;
0046         to: 10000;
0047         value: range.to;
0048         editable: true;
0049         enabled: !automaticCheckbox.checked;
0050         onValueModified: range.to = value;
0051     }
0052     Label {
0053         text: "Minimum"
0054     }
0055     SpinBox {
0056         from: 0
0057         to: 10000
0058         value: range.minimum
0059         editable: true
0060         onValueModified: range.minimum = value
0061     }
0062     Label {
0063         text: "Increment"
0064     }
0065     SpinBox {
0066         from: 0
0067         to: 10000
0068         value: range.increment
0069         editable: true
0070         onValueModified: range.increment = value
0071     }
0072 }