From ef50012e316c48780c96c8fe0b0a47cbb52a07ee Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 21 Feb 2017 16:33:42 +0100 Subject: [PATCH] QmlDesigner: Add specifics for Popups Change-Id: I7fa3e606bec17e1b5cfc6cd002515a1704083fef Reviewed-by: Thomas Hartmann --- .../QtQuick/Controls/DialogSpecifics.qml | 72 ++++++++ .../QtQuick/Controls/DrawerSpecifics.qml | 90 ++++++++++ .../QtQuick/Controls/PopupSection.qml | 169 ++++++++++++++++++ .../QtQuick/Controls/PopupSpecifics.qml | 50 ++++++ 4 files changed, 381 insertions(+) create mode 100644 share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/DialogSpecifics.qml create mode 100644 share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/DrawerSpecifics.qml create mode 100644 share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PopupSection.qml create mode 100644 share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PopupSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/DialogSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/DialogSpecifics.qml new file mode 100644 index 00000000000..40f30e7c120 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/DialogSpecifics.qml @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Column { + anchors.left: parent.left + anchors.right: parent.right + + PopupSection { + anchors.left: parent.left + anchors.right: parent.right + } + + Section { + anchors.left: parent.left + anchors.right: parent.right + caption: qsTr("Dialog") + + SectionLayout { + Label { + text: qsTr("Title") + } + + SecondColumnLayout { + LineEdit { + backendValue: backendValues.title + Layout.fillWidth: true + } + + ExpandingSpacer { + } + } + } + } + + MarginSection { + anchors.left: parent.left + anchors.right: parent.right + } + + PaddingSection { + anchors.left: parent.left + anchors.right: parent.right + } + + FontSection { + } +} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/DrawerSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/DrawerSpecifics.qml new file mode 100644 index 00000000000..b3944a1ea38 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/DrawerSpecifics.qml @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Column { + anchors.left: parent.left + anchors.right: parent.right + + PopupSection { + anchors.left: parent.left + anchors.right: parent.right + } + + Section { + anchors.left: parent.left + anchors.right: parent.right + caption: qsTr("Drawer") + + SectionLayout { + Label { + text: qsTr("Edge") + tooltip: qsTr("Defines the edge of the window the drawer will open from.") + } + + SecondColumnLayout { + ComboBox { + Layout.fillWidth: true + backendValue: backendValues.edge + scope: "Qt" + model: ["TopEdge", "LeftEdge", "RightEdge", "BottomEdge"] + } + } + + Label { + text: qsTr("Drag Margin") + tooltip: qsTr("Defines the distance from the screen edge within which drag actions will open the drawer.") + } + SecondColumnLayout { + SpinBox { + backendValue: backendValues.dragMargin + hasSlider: true + Layout.preferredWidth: 80 + minimumValue: 0 + maximumValue: 400 + stepSize: 1 + decimals: 0 + } + ExpandingSpacer { + } + } + } + } + + MarginSection { + anchors.left: parent.left + anchors.right: parent.right + } + + PaddingSection { + anchors.left: parent.left + anchors.right: parent.right + } + + FontSection { + } +} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PopupSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PopupSection.qml new file mode 100644 index 00000000000..0f2cb21b306 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PopupSection.qml @@ -0,0 +1,169 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Section { + caption: qsTr("Popup") + + SectionLayout { + Label { + text: qsTr("Size") + } + + SecondColumnLayout { + Label { + text: "W" + width: 12 + } + + SpinBox { + backendValue: backendValues.width + minimumValue: 0 + maximumValue: 10000 + decimals: 0 + } + + Label { + text: "H" + width: 12 + } + + SpinBox { + backendValue: backendValues.height + minimumValue: 0 + maximumValue: 10000 + decimals: 0 + } + + ExpandingSpacer { + } + } + + Label { + text: qsTr("Visibility") + } + + SecondColumnLayout { + + CheckBox { + text: qsTr("Is visible") + backendValue: backendValues.visible + Layout.preferredWidth: 100 + } + + Item { + width: 10 + height: 10 + } + + CheckBox { + text: qsTr("Clip") + backendValue: backendValues.clip + } + Item { + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Behavior") + } + + SecondColumnLayout { + + CheckBox { + text: qsTr("Modal") + backendValue: backendValues.modal + tooltip: qsTr("Defines the modality of the popup.") + + Layout.preferredWidth: 100 + } + + Item { + width: 10 + height: 10 + } + + CheckBox { + text: qsTr("Dim") + tooltip: qsTr("Defines whether the popup dims the background.") + backendValue: backendValues.dim + } + Item { + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Opacity") + } + SecondColumnLayout { + SpinBox { + backendValue: backendValues.opacity + hasSlider: true + Layout.preferredWidth: 80 + minimumValue: 0 + maximumValue: 1 + stepSize: 0.1 + decimals: 2 + } + ExpandingSpacer { + } + } + + Label { + text: qsTr("Scale") + } + SecondColumnLayout { + SpinBox { + backendValue: backendValues.scale + hasSlider: true + Layout.preferredWidth: 80 + minimumValue: 0 + maximumValue: 1 + stepSize: 0.1 + decimals: 2 + } + ExpandingSpacer { + } + } + + Label { + text: qsTr("Spacing") + tooltip: qsTr("Spacing between internal elements of the control.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.spacing + Layout.fillWidth: true + } + } + } +} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PopupSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PopupSpecifics.qml new file mode 100644 index 00000000000..ca19cbec940 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PopupSpecifics.qml @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Column { + anchors.left: parent.left + anchors.right: parent.right + + PopupSection { + anchors.left: parent.left + anchors.right: parent.right + } + + MarginSection { + anchors.left: parent.left + anchors.right: parent.right + } + + PaddingSection { + anchors.left: parent.left + anchors.right: parent.right + } + + FontSection { + } +}