aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/controls/SpinBox.qml132
-rw-r--r--src/imports/controls/controls.pro1
-rw-r--r--src/imports/controls/qmldir1
-rw-r--r--src/imports/controls/qtquickcontrols2plugin.cpp2
4 files changed, 0 insertions, 136 deletions
diff --git a/src/imports/controls/SpinBox.qml b/src/imports/controls/SpinBox.qml
deleted file mode 100644
index 06b5629e..00000000
--- a/src/imports/controls/SpinBox.qml
+++ /dev/null
@@ -1,132 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Quick Controls module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.6
-import QtQuick.Controls 2.0
-
-AbstractSpinBox {
- id: control
-
- implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (upButton ? upButton.implicitWidth : 0) +
- (downButton ? downButton.implicitWidth : 0) +
- (input ? input.implicitWidth : 0) + Style.padding * 2)
- implicitHeight: Math.max(background ? background.implicitHeight : 0,
- (upButton ? upButton.implicitHeight : 0),
- (downButton ? downButton.implicitHeight : 0),
- (input ? input.implicitHeight : 0) + Style.padding * 2)
-
- Accessible.role: Accessible.SpinBox
-
- input: TextInput {
- x: upButton.width
- width: parent.width - upButton.width - downButton.width
- height: parent.height
-
- color: control.Style.textColor
- selectionColor: control.Style.selectionColor
- selectedTextColor: control.Style.selectedTextColor
- horizontalAlignment: Qt.AlignHCenter
- verticalAlignment: Qt.AlignVCenter
- Keys.forwardTo: control
- }
-
- validator: IntValidator { }
-
- upButton: Item {
- implicitWidth: 26
- height: parent.height
- x: parent.width - width
-
- opacity: enabled ? 1.0 : control.Style.disabledOpacity
- clip: true
- Rectangle {
- x: -radius
- width: parent.width + radius
- height: parent.height
- radius: control.Style.roundness
- color: Qt.tint(Qt.tint(control.Style.accentColor,
- control.activeFocus ? control.Style.focusColor : "transparent"),
- pressed === AbstractSpinBox.UpButton ? control.Style.pressColor : "transparent")
- }
- Rectangle {
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: parent.width / 3
- height: 2
- color: control.Style.selectedTextColor
- }
- Rectangle {
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: 2
- height: parent.height / 3
- color: control.Style.selectedTextColor
- }
- }
-
- downButton: Item {
- implicitWidth: 26
- height: parent.height
-
- opacity: enabled ? 1.0 : control.Style.disabledOpacity
- clip: true
- Rectangle {
- width: parent.width + radius
- height: parent.height
- radius: control.Style.roundness
- color: Qt.tint(Qt.tint(control.Style.accentColor,
- control.activeFocus ? control.Style.focusColor : "transparent"),
- pressed === AbstractSpinBox.DownButton ? control.Style.pressColor : "transparent")
- }
- Rectangle {
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: parent.width / 3
- height: 2
- color: control.Style.selectedTextColor
- }
- }
-
- background: Rectangle {
- implicitWidth: 120
- radius: control.Style.roundness
- border.width: control.activeFocus ? 2 : 1
- border.color: control.activeFocus ? control.Style.focusColor : control.Style.frameColor
- opacity: enabled ? 1.0 : control.Style.disabledOpacity
- color: input.acceptableInput ? "white" : "lightpink"
- }
-}
diff --git a/src/imports/controls/controls.pro b/src/imports/controls/controls.pro
index 98472d9f..06a947dd 100644
--- a/src/imports/controls/controls.pro
+++ b/src/imports/controls/controls.pro
@@ -22,7 +22,6 @@ QML_FILES = \
ScrollBar.qml \
ScrollIndicator.qml \
Slider.qml \
- SpinBox.qml \
StackView.js \
StackView.qml \
StackViewDelegate.qml \
diff --git a/src/imports/controls/qmldir b/src/imports/controls/qmldir
index fcd8700d..b54df22c 100644
--- a/src/imports/controls/qmldir
+++ b/src/imports/controls/qmldir
@@ -14,7 +14,6 @@ RadioButton 2.0 RadioButton.qml
ScrollBar 2.0 ScrollBar.qml
ScrollIndicator 2.0 ScrollIndicator.qml
Slider 2.0 Slider.qml
-SpinBox 2.0 SpinBox.qml
StackView 2.0 StackView.qml
StackViewDelegate 2.0 StackViewDelegate.qml
StackViewTransition 2.0 StackViewTransition.qml
diff --git a/src/imports/controls/qtquickcontrols2plugin.cpp b/src/imports/controls/qtquickcontrols2plugin.cpp
index 22622c9f..9f232c55 100644
--- a/src/imports/controls/qtquickcontrols2plugin.cpp
+++ b/src/imports/controls/qtquickcontrols2plugin.cpp
@@ -50,7 +50,6 @@
#include <QtQuickControls/private/qquickabstractscrollbar_p.h>
#include <QtQuickControls/private/qquickabstractscrollindicator_p.h>
#include <QtQuickControls/private/qquickabstractslider_p.h>
-#include <QtQuickControls/private/qquickabstractspinbox_p.h>
#include <QtQuickControls/private/qquickabstractstackview_p.h>
#include <QtQuickControls/private/qquickabstractswitch_p.h>
#include <QtQuickControls/private/qquickabstracttabbar_p.h>
@@ -96,7 +95,6 @@ void QtQuickControls2Plugin::registerTypes(const char *uri)
qmlRegisterType<QQuickAbstractScrollBar>(uri, 2, 0, "AbstractScrollBar");
qmlRegisterType<QQuickAbstractScrollIndicator>(uri, 2, 0, "AbstractScrollIndicator");
qmlRegisterType<QQuickAbstractSlider>(uri, 2, 0, "AbstractSlider");
- qmlRegisterType<QQuickAbstractSpinBox>(uri, 2, 0, "AbstractSpinBox");
qmlRegisterType<QQuickAbstractStackView>(uri, 2, 0, "AbstractStackView");
qmlRegisterType<QQuickAbstractSwitch>(uri, 2, 0, "AbstractSwitch");
qmlRegisterType<QQuickAbstractTabBar>(uri, 2, 0, "AbstractTabBar");