From f944c34757baf145f7018e37bc732d061f0bbf7f Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 29 Apr 2015 09:54:50 +0200 Subject: Remove the old TabView implementation Change-Id: I8d8aa96f2f37f458577a5a3ec681e3c9174d0918 Reviewed-by: J-P Nurmi --- src/imports/controls/TabView.qml | 91 ------------------------- src/imports/controls/controls.pro | 1 - src/imports/controls/qmldir | 1 - src/imports/controls/qtquickcontrols2plugin.cpp | 3 - 4 files changed, 96 deletions(-) delete mode 100644 src/imports/controls/TabView.qml (limited to 'src/imports/controls') diff --git a/src/imports/controls/TabView.qml b/src/imports/controls/TabView.qml deleted file mode 100644 index 0fb6840b..00000000 --- a/src/imports/controls/TabView.qml +++ /dev/null @@ -1,91 +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 -import QtQml.Models 2.1 - -AbstractTabView { - id: control - - default property alias items: listView.items - readonly property alias currentItem: listView.currentItem - property alias spacing: listView.spacing - property alias count: listView.count - - contentWidth: listView.implicitWidth - contentHeight: listView.contentHeight - - implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) - - topPadding: tabBar && tabBar.parent === control ? tabBar.height : 0 - - tabBar: TabBar { } - - Accessible.role: Accessible.PageTabList - - Binding { target: tabBar; property: "items"; value: control.items } - - contentItem: ListView { - id: listView - - property list items - - Binding { target: control; property: "currentIndex"; value: listView.currentIndex } - Binding { target: listView; property: "currentIndex"; value: control.currentIndex } - - orientation: Qt.Horizontal - snapMode: ListView.SnapOneItem - boundsBehavior: Flickable.StopAtBounds - highlightRangeMode: ListView.StrictlyEnforceRange - preferredHighlightBegin: 0 - preferredHighlightEnd: 0 - highlightMoveDuration: 250 - - model: items - - delegate: Item { - id: delegate - width: listView.width - height: listView.height - visible: modelData.Tab.visible - Binding { target: modelData; property: "parent"; value: delegate } - Binding { target: modelData; property: "Tab.index"; value: index } - Binding { target: modelData; property: "Tab.view"; value: control } - } - } -} diff --git a/src/imports/controls/controls.pro b/src/imports/controls/controls.pro index f5636d2d..4ce56211 100644 --- a/src/imports/controls/controls.pro +++ b/src/imports/controls/controls.pro @@ -26,7 +26,6 @@ QML_FILES = \ Switch.qml \ TabBar.qml \ TabButton.qml \ - TabView.qml \ TextArea.qml \ TextField.qml \ ToggleButton.qml \ diff --git a/src/imports/controls/qmldir b/src/imports/controls/qmldir index eaedbbb5..5de9450a 100644 --- a/src/imports/controls/qmldir +++ b/src/imports/controls/qmldir @@ -18,7 +18,6 @@ StackView 2.0 StackView.qml Switch 2.0 Switch.qml TabBar 2.0 TabBar.qml TabButton 2.0 TabButton.qml -TabView 2.0 TabView.qml TextArea 2.0 TextArea.qml TextField 2.0 TextField.qml ToggleButton 2.0 ToggleButton.qml diff --git a/src/imports/controls/qtquickcontrols2plugin.cpp b/src/imports/controls/qtquickcontrols2plugin.cpp index 9bfc6652..8c8c2121 100644 --- a/src/imports/controls/qtquickcontrols2plugin.cpp +++ b/src/imports/controls/qtquickcontrols2plugin.cpp @@ -54,7 +54,6 @@ #include #include #include -#include #include #include #include @@ -99,7 +98,6 @@ void QtQuickControls2Plugin::registerTypes(const char *uri) qmlRegisterType(uri, 2, 0, "AbstractSwitch"); qmlRegisterType(uri, 2, 0, "AbstractTabBar"); qmlRegisterType(uri, 2, 0, "AbstractTabButton"); - qmlRegisterType(uri, 2, 0, "AbstractTabView"); qmlRegisterType(uri, 2, 0, "AbstractTextArea"); qmlRegisterType(uri, 2, 0, "AbstractTextField"); qmlRegisterType(uri, 2, 0, "AbstractToggleButton"); @@ -108,7 +106,6 @@ void QtQuickControls2Plugin::registerTypes(const char *uri) qmlRegisterUncreatableType(uri, 2, 0, "Exclusive", "Exclusive is an attached property"); qmlRegisterUncreatableType(uri, 2, 0, "Stack", "Stack is an attached property"); qmlRegisterUncreatableType(uri, 2, 0, "Theme", "Theme is an attached property"); - qmlRegisterUncreatableType(uri, 2, 0, "Tab", "Tab is an attached property"); qmlRegisterType(uri, 2, 0, "Control"); qmlRegisterType(uri, 2, 0, "ExclusiveGroup"); -- cgit v1.2.3