diff options
Diffstat (limited to 'basicsuite/enterprise-gallery')
33 files changed, 4 insertions, 1774 deletions
diff --git a/basicsuite/enterprise-gallery/BlackButtonBackground.qml b/basicsuite/enterprise-gallery/BlackButtonBackground.qml deleted file mode 100644 index 008668f..0000000 --- a/basicsuite/enterprise-gallery/BlackButtonBackground.qml +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Rectangle { - property bool pressed: false - - gradient: Gradient { - GradientStop { - color: pressed ? "#222" : "#333" - position: 0 - } - GradientStop { - color: "#222" - position: 1 - } - } - Rectangle { - height: 1 - width: parent.width - anchors.top: parent.top - color: "#444" - visible: !pressed - } - Rectangle { - height: 1 - width: parent.width - anchors.bottom: parent.bottom - color: "#000" - } -} diff --git a/basicsuite/enterprise-gallery/BlackButtonStyle.qml b/basicsuite/enterprise-gallery/BlackButtonStyle.qml deleted file mode 100644 index 73f6373..0000000 --- a/basicsuite/enterprise-gallery/BlackButtonStyle.qml +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -ButtonStyle { - property color fontColor; - - background: BlackButtonBackground { - pressed: control.pressed - } - label: Item { - Text { - text: control.text - color: fontColor - font.pixelSize: control.height * 0.25 - font.family: openSans.name - horizontalAlignment: Text.AlignLeft - verticalAlignment: Text.AlignVCenter - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: 20 - } - } -} diff --git a/basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml b/basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml deleted file mode 100644 index 0de1180..0000000 --- a/basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Enterprise.Controls.Styles 1.1 - -CircularGaugeStyle { - id: root - tickmarkStepSize: 10 - minorTickmarkCount: 1 - labelStepSize: 20 - tickmarkInset: outerRadius * 0.06 - minorTickmarkInset: tickmarkInset - labelInset: outerRadius * 0.23 - - background: Image { - source: "images/background.png" - } - - needle: Image { - id: needleImage - transformOrigin: Item.Bottom - source: "images/needle.png" - scale: { - var distanceFromLabelToRadius = labelInset / 2; - var idealHeight = outerRadius - distanceFromLabelToRadius; - var originalImageHeight = needleImage.sourceSize.height; - idealHeight / originalImageHeight; - } - } - - foreground: Item { - Image { - anchors.centerIn: parent - source: "images/center.png" - scale: (outerRadius * 0.25) / sourceSize.height - } - } - - tickmark: Rectangle { - width: outerRadius * 0.02 - antialiasing: true - height: outerRadius * 0.05 - color: "#888" - } - - minorTickmark: Rectangle { - width: outerRadius * 0.01 - antialiasing: true - height: outerRadius * 0.02 - color: "#444" - } - - tickmarkLabel: Text { - font.pixelSize: Math.max(6, outerRadius * 0.1) - text: styleData.value - color: "white" - } -} diff --git a/basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml b/basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml deleted file mode 100644 index 23b25c4..0000000 --- a/basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Enterprise.Controls.Styles 1.1 - -CircularGaugeStyle { - labelStepSize: 20 -} diff --git a/basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml b/basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml deleted file mode 100644 index 87afa7d..0000000 --- a/basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Enterprise.Controls.Styles 1.1 - -CircularGaugeStyle { - id: root - tickmarkStepSize: 10 - minorTickmarkCount: 2 - labelStepSize: 40 - tickmarkInset: outerRadius * 0.06 - minorTickmarkInset: tickmarkInset - labelInset: outerRadius * 0.23 - - background: Image { - source: "images/background-light.png" - } - - needle: Image { - id: needleImage - source: "images/needle-light.png" - transformOrigin: Item.Bottom - scale: { - var distanceFromLabelToRadius = labelInset / 2; - var idealHeight = outerRadius - distanceFromLabelToRadius; - var originalImageHeight = needleImage.sourceSize.height; - idealHeight / originalImageHeight; - } - } - - foreground: Item { - Image { - anchors.centerIn: parent - source: "images/center-light.png" - scale: (outerRadius * 0.25) / sourceSize.height - } - } - - tickmark: Rectangle { - width: outerRadius * 0.01 - antialiasing: true - height: outerRadius * 0.04 - color: "#999" - } - - minorTickmark: Rectangle { - width: outerRadius * 0.01 - antialiasing: true - height: outerRadius * 0.02 - color: "#bbb" - } - - tickmarkLabel: Text { - font.family: "Helvetica neue" - font.pixelSize: Math.max(6, outerRadius * 0.1) - text: styleData.value - color: "#333" - } -} diff --git a/basicsuite/enterprise-gallery/CircularGaugeView.qml b/basicsuite/enterprise-gallery/CircularGaugeView.qml deleted file mode 100644 index a24b980..0000000 --- a/basicsuite/enterprise-gallery/CircularGaugeView.qml +++ /dev/null @@ -1,204 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 1.0 -import QtQuick.Enterprise.Controls 1.1 - -ControlView { - id: controlView - darkBackground: customizerItem.currentStyleDark - - property color fontColor: darkBackground ? "white" : "black" - - property bool accelerating: false - - Keys.onSpacePressed: accelerating = true - Keys.onReleased: { - if (event.key === Qt.Key_Space) { - accelerating = false; - event.accepted = true; - } - } - - Button { - id: accelerate - text: "Accelerate" - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottom: parent.bottom - height: root.height * 0.125 - - onPressedChanged: accelerating = pressed - - style: BlackButtonStyle { - background: BlackButtonBackground { - pressed: control.pressed - } - label: Text { - text: control.text - color: "white" - font.pixelSize: root.toPixels(0.04) - font.family: openSans.name - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - } - } - } - - control: CircularGauge { - id: gauge - minimumValue: customizerItem.minimumValue - maximumValue: customizerItem.maximumValue - width: controlBounds.width - height: controlBounds.height - - value: accelerating ? maximumValue : 0 - style: styleMap[customizerItem.currentStylePath] - - // This stops the styles being recreated when a new one is chosen. - property var styleMap: { - var styles = {}; - for (var i = 0; i < customizerItem.allStylePaths.length; ++i) { - var path = customizerItem.allStylePaths[i]; - styles[path] = Qt.createComponent(path, gauge); - } - styles; - } - - // Called to update the style after the user has edited a property. - Connections { - target: customizerItem - onMinimumValueAngleChanged: __style.minimumValueAngle = customizerItem.minimumValueAngle - onMaximumValueAngleChanged: __style.maximumValueAngle = customizerItem.maximumValueAngle - onLabelStepSizeChanged: __style.tickmarkStepSize = __style.labelStepSize = customizerItem.labelStepSize - } - - Behavior on value { - NumberAnimation { - easing.type: Easing.OutCubic - duration: 6000 - } - } - } - - customizer: Column { - readonly property var allStylePaths: { - var paths = []; - for (var i = 0; i < stylePicker.model.count; ++i) { - paths.push(stylePicker.model.get(i).path); - } - paths; - } - property alias currentStylePath: stylePicker.currentStylePath - property alias currentStyleDark: stylePicker.currentStyleDark - property alias minimumValue: minimumValueSlider.value - property alias maximumValue: maximumValueSlider.value - property alias minimumValueAngle: minimumAngleSlider.value - property alias maximumValueAngle: maximumAngleSlider.value - property alias labelStepSize: labelStepSizeSlider.value - - id: circularGaugeColumn - spacing: customizerPropertySpacing - - readonly property bool isDefaultStyle: stylePicker.model.get(stylePicker.currentIndex).name === "Default" - - StylePicker { - id: stylePicker - currentIndex: 1 - - model: ListModel { - ListElement { - name: "Default" - path: "CircularGaugeDefaultStyle.qml" - dark: true - } - ListElement { - name: "Dark" - path: "CircularGaugeDarkStyle.qml" - dark: true - } - ListElement { - name: "Light" - path: "CircularGaugeLightStyle.qml" - dark: false - } - } - } - - CustomizerLabel { - text: "Minimum angle" - } - - CustomizerSlider { - id: minimumAngleSlider - minimumValue: 0 - value: 215 - maximumValue: 360 - width: parent.width - } - - CustomizerLabel { - text: "Maximum angle" - } - - CustomizerSlider { - id: maximumAngleSlider - minimumValue: 0 - value: 145 - maximumValue: 360 - } - - CustomizerLabel { - text: "Minimum value" - } - - CustomizerSlider { - id: minimumValueSlider - minimumValue: 0 - value: 0 - maximumValue: 360 - stepSize: 1 - } - - CustomizerLabel { - text: "Maximum value" - } - - CustomizerSlider { - id: maximumValueSlider - minimumValue: 0 - value: 240 - maximumValue: 300 - stepSize: 1 - } - - CustomizerLabel { - text: "Label step size" - } - - CustomizerSlider { - id: labelStepSizeSlider - minimumValue: 10 - value: 20 - maximumValue: 100 - stepSize: 20 - } - } -} diff --git a/basicsuite/enterprise-gallery/ControlLabel.qml b/basicsuite/enterprise-gallery/ControlLabel.qml deleted file mode 100644 index 0335342..0000000 --- a/basicsuite/enterprise-gallery/ControlLabel.qml +++ /dev/null @@ -1,28 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Text { - font.pixelSize: Math.min(32, root.toPixels(0.045)) - color: "#4e4e4e" - styleColor: "#ffffff" - style: Text.Raised -} diff --git a/basicsuite/enterprise-gallery/ControlView.qml b/basicsuite/enterprise-gallery/ControlView.qml deleted file mode 100644 index 2c6a7cf..0000000 --- a/basicsuite/enterprise-gallery/ControlView.qml +++ /dev/null @@ -1,168 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 1.0 - -Rectangle { - id: view - color: darkBackground ? "transparent" : lightBackgroundColor - - Keys.onReleased: { - if (event.key === Qt.Key_Back) { - stackView.pop(); - event.accepted = true; - } - } - - property bool darkBackground: true - - property Component control - property Component customizer - - property alias controlItem: controlLoader.item - property alias customizerItem: customizerLoader.item - - property bool isCustomizerVisible: false - - property real margin: root.toPixels(0.05) - - property rect controlBounds: Qt.rect(largestControlItem.x + controlBoundsItem.x, - largestControlItem.y + controlBoundsItem.y, controlBoundsItem.width, controlBoundsItem.height) - - Item { - id: largestControlItem - x: margin - y: margin - width: isCustomizerVisible ? widthWhenCustomizing : widthWhenNotCustomizing - height: isCustomizerVisible ? heightWhenCustomizing : heightWhenNotCustomizing - - readonly property real widthWhenCustomizing: (!isScreenPortrait ? parent.width / 2 : parent.width) - margin * 2 - readonly property real heightWhenCustomizing: (isScreenPortrait ? parent.height / 2 : parent.height - toolbar.height) - margin * 2 - readonly property real widthWhenNotCustomizing: parent.width - margin * 2 - readonly property real heightWhenNotCustomizing: parent.height - toolbar.height - margin * 2 - - Item { - id: controlBoundsItem - x: parent.width / 2 - controlBoundsItem.width / 2 - y: customizer && customizerItem.visible ? 0 : (isScreenPortrait ? (parent.height / 2) - (controlBoundsItem.height / 2) : 0) - width: Math.min(parent.widthWhenCustomizing, parent.widthWhenNotCustomizing) - height: Math.min(parent.heightWhenCustomizing, parent.heightWhenNotCustomizing) - - Behavior on x { - id: controlXBehavior - enabled: false - NumberAnimation {} - } - - Behavior on y { - id: controlYBehavior - enabled: false - NumberAnimation {} - } - - Loader { - id: controlLoader - sourceComponent: control - anchors.centerIn: parent - - property alias view: view - } - } - } - - Flickable { - id: flickable - // Hide the customizer on the right of the screen if it's not visible. - x: (isScreenPortrait ? 0 : (isCustomizerVisible ? largestControlItem.x + largestControlItem.width + margin : view.width)) + margin - y: (isScreenPortrait ? largestControlItem.y + largestControlItem.height : 0) + margin - width: largestControlItem.width - height: parent.height - y - toolbar.height - margin - anchors.leftMargin: margin - anchors.rightMargin: margin - visible: customizerLoader.opacity > 0 - - flickableDirection: Flickable.VerticalFlick - - clip: true - contentWidth: width - contentHeight: customizerLoader.height - - Behavior on x { - id: flickableXBehavior - enabled: false - NumberAnimation {} - } - - Behavior on y { - id: flickableYBehavior - enabled: false - NumberAnimation {} - } - - Loader { - id: customizerLoader - sourceComponent: customizer - opacity: 0 - width: flickable.width - - property alias view: view - - Behavior on opacity { - NumberAnimation { - duration: 300 - } - } - } - } - - ControlViewToolbar { - id: toolbar - - onCustomizeClicked: { - controlXBehavior.enabled = !isScreenPortrait; - controlYBehavior.enabled = isScreenPortrait; - - isCustomizerVisible = !isCustomizerVisible; - - if (isScreenPortrait) { - flickableXBehavior.enabled = false; - flickableYBehavior.enabled = true; - } else { - flickableXBehavior.enabled = true; - flickableYBehavior.enabled = false; - } - - customizerLoader.opacity = isCustomizerVisible ? 1 : 0; - } - } - - FlickableMoreIndicator { - flickable: flickable - atTop: true - gradientColor: view.darkBackground ? darkBackgroundColor : lightBackgroundColor - } - - FlickableMoreIndicator { - flickable: flickable - atTop: false - gradientColor: view.darkBackground ? darkBackgroundColor : lightBackgroundColor - } -} diff --git a/basicsuite/enterprise-gallery/ControlViewToolbar.qml b/basicsuite/enterprise-gallery/ControlViewToolbar.qml deleted file mode 100644 index f3dd07b..0000000 --- a/basicsuite/enterprise-gallery/ControlViewToolbar.qml +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 1.0 - -BlackButtonBackground { - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - height: root.height * 0.125 - - signal customizeClicked - - gradient: Gradient { - GradientStop { - color: "#333" - position: 0 - } - GradientStop { - color: "#222" - position: 1 - } - } - - Button { - id: back - width: parent.height - height: parent.height - anchors.left: parent.left - anchors.bottom: parent.bottom - - onClicked: stackView.pop() - - style: BlackButtonStyle { - } - - Image { - source: "images/icon-go.png" - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - scale: -1 - } - } - - Button { - id: customize - width: parent.height - height: parent.height - anchors.right: parent.right - anchors.bottom: parent.bottom - visible: customizer - - style: BlackButtonStyle { - } - - onClicked: customizeClicked() - - Image { - source: "images/icon-settings.png" - anchors.centerIn: parent - } - } -} diff --git a/basicsuite/enterprise-gallery/CustomizerLabel.qml b/basicsuite/enterprise-gallery/CustomizerLabel.qml deleted file mode 100644 index c85807c..0000000 --- a/basicsuite/enterprise-gallery/CustomizerLabel.qml +++ /dev/null @@ -1,28 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Text { - color: darkBackground ? root.darkFontColor : root.lightFontColor - font.pixelSize: root.toPixels(0.04) - font.family: openSans.name - anchors.horizontalCenter: parent.horizontalCenter -} diff --git a/basicsuite/enterprise-gallery/CustomizerSlider.qml b/basicsuite/enterprise-gallery/CustomizerSlider.qml deleted file mode 100644 index fb09a17..0000000 --- a/basicsuite/enterprise-gallery/CustomizerSlider.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Slider { - id: slider - width: parent.width - height: root.toPixels(0.1) - - style: SliderStyle { - handle: Rectangle { - height: root.toPixels(0.06) - width: height - radius: width/2 - color: "#fff" - } - - groove: Rectangle { - implicitHeight: root.toPixels(0.015) - implicitWidth: 100 - radius: height/2 - border.color: "#333" - color: "#222" - Rectangle { - height: parent.height - width: styleData.handlePosition - implicitHeight: 6 - implicitWidth: 100 - radius: height/2 - color: "#555" - } - } - - } -} diff --git a/basicsuite/enterprise-gallery/CustomizerSwitch.qml b/basicsuite/enterprise-gallery/CustomizerSwitch.qml deleted file mode 100644 index 3048aae..0000000 --- a/basicsuite/enterprise-gallery/CustomizerSwitch.qml +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 1.1 - -Switch { - anchors.horizontalCenter: parent.horizontalCenter -} diff --git a/basicsuite/enterprise-gallery/FlickableMoreIndicator.qml b/basicsuite/enterprise-gallery/FlickableMoreIndicator.qml deleted file mode 100644 index c8b9fe5..0000000 --- a/basicsuite/enterprise-gallery/FlickableMoreIndicator.qml +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - anchors.top: atTop ? flickable.top : undefined - anchors.bottom: atTop ? undefined : flickable.bottom - anchors.left: isScreenPortrait ? parent.left : parent.horizontalCenter - anchors.right: parent.right - height: 30 - visible: flickable.visible - opacity: atTop - ? (flickable.contentY > showDistance ? 1 : 0) - : (flickable.contentY < flickable.contentHeight - showDistance ? 1 : 0) - scale: atTop ? 1 : -1 - - readonly property real showDistance: 0 - property Flickable flickable - property color gradientColor - /*! \c true if this indicator is at the top of the item */ - property bool atTop - - Behavior on opacity { - NumberAnimation { - } - } - - gradient: Gradient { - GradientStop { - position: 0.0 - color: gradientColor - } - GradientStop { - position: 1.0 - color: "transparent" - } - } -} diff --git a/basicsuite/enterprise-gallery/PieMenuControlView.qml b/basicsuite/enterprise-gallery/PieMenuControlView.qml deleted file mode 100644 index 2c06176..0000000 --- a/basicsuite/enterprise-gallery/PieMenuControlView.qml +++ /dev/null @@ -1,168 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtGraphicalEffects 1.0 -import QtQuick.Controls 1.0 -import QtQuick.Enterprise.Controls 1.1 - -Rectangle { - id: view - color: customizerItem.currentStyleDark ? "#111" : "#555" - - Behavior on color { - ColorAnimation {} - } - - Keys.onReleased: { - if (event.key === Qt.Key_Back) { - stackView.pop(); - event.accepted = true; - } - } - - property bool darkBackground: true - - property Component mouseArea - - property Component customizer: Column { - property alias currentStylePath: stylePicker.currentStylePath - property alias currentStyleDark: stylePicker.currentStyleDark - - StylePicker { - id: stylePicker - currentIndex: 0 - - model: ListModel { - ListElement { - name: "Default" - path: "PieMenuDefaultStyle.qml" - dark: false - } - ListElement { - name: "Dark" - path: "PieMenuDarkStyle.qml" - dark: true - } - } - } - } - - property alias controlItem: pieMenu - property alias customizerItem: customizerLoader.item - - Item { - id: controlBoundsItem - width: parent.width - height: parent.height - toolbar.height - visible: customizerLoader.opacity === 0 - - Image { - id: bgImage - anchors.centerIn: parent - height: 48 - Text { - id: bgLabel - anchors.top: parent.bottom - anchors.topMargin: 20 - anchors.horizontalCenter: parent.horizontalCenter - text: "Tap to open" - color: "#999" - font.pointSize: 20 - } - } - - MouseArea { - id: touchArea - anchors.fill: parent - - onClicked: { - pieMenu.popup(touchArea.mouseX, touchArea.mouseY); - } - } - - PieMenu { - id: pieMenu - activationMode: ActivationMode.ActivateOnClick - width: Math.min(controlBoundsItem.width, controlBoundsItem.height) * 0.5 - height: width - - style: Qt.createComponent(customizerItem.currentStylePath) - - MenuItem { - text: "Zoom In" - onTriggered: { - bgImage.source = iconSource - bgLabel.text = text + " selected" - } - iconSource: "images/zoom_in.png" - } - MenuItem { - text: "Zoom Out" - onTriggered: { - bgImage.source = iconSource - bgLabel.text = text + " selected" - } - iconSource: "images/zoom_out.png" - } - MenuItem { - text: "Info" - onTriggered: { - bgImage.source = iconSource - bgLabel.text = text + " selected" - } - iconSource: "images/info.png" - } - } - } - Loader { - id: customizerLoader - sourceComponent: customizer - opacity: 0 - anchors.left: parent.left - anchors.right: parent.right - anchors.leftMargin: 30 - anchors.rightMargin: 30 - y: parent.height / 2 - height / 2 - toolbar.height - visible: customizerLoader.opacity > 0 - - property alias view: view - - Behavior on y { - NumberAnimation { - duration: 300 - } - } - - Behavior on opacity { - NumberAnimation { - duration: 300 - } - } - } - - ControlViewToolbar { - id: toolbar - - onCustomizeClicked: { - customizerLoader.opacity = customizerLoader.opacity == 0 ? 1 : 0; - } - } -} diff --git a/basicsuite/enterprise-gallery/PieMenuDarkStyle.qml b/basicsuite/enterprise-gallery/PieMenuDarkStyle.qml deleted file mode 100644 index ab03701..0000000 --- a/basicsuite/enterprise-gallery/PieMenuDarkStyle.qml +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick.Enterprise.Controls.Styles 1.1 - -PieMenuStyle { - backgroundColor: "#222" - shadowColor: Qt.rgba(1, 1, 1, 0.26) -} diff --git a/basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml b/basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml deleted file mode 100644 index 4b0edb1..0000000 --- a/basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml +++ /dev/null @@ -1,24 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick.Enterprise.Controls.Styles 1.1 - -PieMenuStyle { -} diff --git a/basicsuite/enterprise-gallery/StylePicker.qml b/basicsuite/enterprise-gallery/StylePicker.qml deleted file mode 100644 index f4e097e..0000000 --- a/basicsuite/enterprise-gallery/StylePicker.qml +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 -import QtQuick.Enterprise.Controls 1.1 -import QtQuick.Enterprise.Controls.Styles 1.1 - -ListView { - id: stylePicker - width: parent.width - height: root.height * 0.06 - interactive: false - spacing: -1 - - orientation: ListView.Horizontal - - readonly property string currentStylePath: stylePicker.model.get(stylePicker.currentIndex).path - readonly property bool currentStyleDark: stylePicker.model.get(stylePicker.currentIndex).dark !== undefined - ? stylePicker.model.get(stylePicker.currentIndex).dark - : true - - ExclusiveGroup { - id: styleExclusiveGroup - } - - delegate: Button { - width: stylePicker.width / stylePicker.model.count - height: stylePicker.height - checkable: true - checked: index == ListView.view.currentIndex - exclusiveGroup: styleExclusiveGroup - - onCheckedChanged: { - if (checked) { - ListView.view.currentIndex = index; - } - } - - style: ButtonStyle { - background: Rectangle { - readonly property color checkedColor: currentStyleDark ? "#444" : "#777" - readonly property color uncheckedColor: currentStyleDark ? "#222" : "#bbb" - color: checked ? checkedColor : uncheckedColor - border.color: checkedColor - border.width: 1 - radius: 1 - } - - label: Text { - text: name - color: currentStyleDark ? "white" : (checked ? "white" : "black") - font.pixelSize: root.toPixels(0.04) - font.family: openSans.name - anchors.centerIn: parent - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - } - } - } -} diff --git a/basicsuite/enterprise-gallery/enterprise-gallery.pro b/basicsuite/enterprise-gallery/enterprise-gallery.pro index 3601432..32550a3 100644 --- a/basicsuite/enterprise-gallery/enterprise-gallery.pro +++ b/basicsuite/enterprise-gallery/enterprise-gallery.pro @@ -4,11 +4,11 @@ include(../shared/shared.pri) b2qtdemo_deploy_defaults() content.files = \ - *.qml \ + qml/*.qml \ fonts \ images content.path = $$DESTPATH OTHER_FILES += $${content.files} -INSTALLS += target content
\ No newline at end of file +INSTALLS += target content diff --git a/basicsuite/enterprise-gallery/fonts/LICENSE.txt b/basicsuite/enterprise-gallery/fonts/LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/basicsuite/enterprise-gallery/fonts/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/basicsuite/enterprise-gallery/fonts/OpenSans-Regular.ttf b/basicsuite/enterprise-gallery/fonts/OpenSans-Regular.ttf Binary files differdeleted file mode 100644 index db43334..0000000 --- a/basicsuite/enterprise-gallery/fonts/OpenSans-Regular.ttf +++ /dev/null diff --git a/basicsuite/enterprise-gallery/images/background-light.png b/basicsuite/enterprise-gallery/images/background-light.png Binary files differdeleted file mode 100644 index 2f76984..0000000 --- a/basicsuite/enterprise-gallery/images/background-light.png +++ /dev/null diff --git a/basicsuite/enterprise-gallery/images/background.png b/basicsuite/enterprise-gallery/images/background.png Binary files differdeleted file mode 100644 index a3f4302..0000000 --- a/basicsuite/enterprise-gallery/images/background.png +++ /dev/null diff --git a/basicsuite/enterprise-gallery/images/center-light.png b/basicsuite/enterprise-gallery/images/center-light.png Binary files differdeleted file mode 100644 index 75add20..0000000 --- a/basicsuite/enterprise-gallery/images/center-light.png +++ /dev/null diff --git a/basicsuite/enterprise-gallery/images/center.png b/basicsuite/enterprise-gallery/images/center.png Binary files differdeleted file mode 100644 index b18a5fa..0000000 --- a/basicsuite/enterprise-gallery/images/center.png +++ /dev/null diff --git a/basicsuite/enterprise-gallery/images/icon-go.png b/basicsuite/enterprise-gallery/images/icon-go.png Binary files differdeleted file mode 100644 index ed86c2d..0000000 --- a/basicsuite/enterprise-gallery/images/icon-go.png +++ /dev/null diff --git a/basicsuite/enterprise-gallery/images/icon-settings.png b/basicsuite/enterprise-gallery/images/icon-settings.png Binary files differdeleted file mode 100644 index 6f37083..0000000 --- a/basicsuite/enterprise-gallery/images/icon-settings.png +++ /dev/null diff --git a/basicsuite/enterprise-gallery/images/info.png b/basicsuite/enterprise-gallery/images/info.png Binary files differdeleted file mode 100644 index 5c7a9df..0000000 --- a/basicsuite/enterprise-gallery/images/info.png +++ /dev/null diff --git a/basicsuite/enterprise-gallery/images/needle-light.png b/basicsuite/enterprise-gallery/images/needle-light.png Binary files differdeleted file mode 100644 index d486d9e..0000000 --- a/basicsuite/enterprise-gallery/images/needle-light.png +++ /dev/null diff --git a/basicsuite/enterprise-gallery/images/needle.png b/basicsuite/enterprise-gallery/images/needle.png Binary files differdeleted file mode 100644 index 6b10c60..0000000 --- a/basicsuite/enterprise-gallery/images/needle.png +++ /dev/null diff --git a/basicsuite/enterprise-gallery/images/qt-logo.png b/basicsuite/enterprise-gallery/images/qt-logo.png Binary files differdeleted file mode 100644 index 14ddf2a..0000000 --- a/basicsuite/enterprise-gallery/images/qt-logo.png +++ /dev/null diff --git a/basicsuite/enterprise-gallery/images/zoom_in.png b/basicsuite/enterprise-gallery/images/zoom_in.png Binary files differdeleted file mode 100644 index 4128210..0000000 --- a/basicsuite/enterprise-gallery/images/zoom_in.png +++ /dev/null diff --git a/basicsuite/enterprise-gallery/images/zoom_out.png b/basicsuite/enterprise-gallery/images/zoom_out.png Binary files differdeleted file mode 100644 index 772d6ac..0000000 --- a/basicsuite/enterprise-gallery/images/zoom_out.png +++ /dev/null diff --git a/basicsuite/enterprise-gallery/main.qml b/basicsuite/enterprise-gallery/main.qml index de60f47..df2ec8a 100644 --- a/basicsuite/enterprise-gallery/main.qml +++ b/basicsuite/enterprise-gallery/main.qml @@ -1,356 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtQuick Enterprise Controls Add-on. -** -** $QT_BEGIN_LICENSE$ -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** $QT_END_LICENSE$ -** -****************************************************************************/ - import QtQuick 2.0 -import QtGraphicalEffects 1.0 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 -import QtQuick.Controls.Private 1.0 -import QtQuick.Dialogs 1.0 -import QtQuick.Enterprise.Controls 1.1 -import QtQuick.Enterprise.Controls.Styles 1.1 -import QtQuick.Layouts 1.0 -import QtQuick.Window 2.1 - -Rectangle { - id: root - objectName: "window" - visible: true - width: 480 - height: 800 - - color: "#161616" - //title: "QtQuick Enterprise Controls Demo" - - function toPixels(percentage) { - return percentage * Math.min(root.width, root.height); - } - - property bool isScreenPortrait: height > width - property color lightFontColor: "#222" - property color darkFontColor: "#e7e7e7" - readonly property color lightBackgroundColor: "#cccccc" - readonly property color darkBackgroundColor: "#161616" - property real customizerPropertySpacing: 10 - property real colorPickerRowSpacing: 8 - - property Component circularGauge: CircularGaugeView {} - - property Component dial: ControlView { - darkBackground: false - - control: Column { - id: dialColumn - width: controlBounds.width - height: controlBounds.height - spacing - spacing: root.toPixels(0.05) - - Column { - id: volumeColumn - width: parent.width - height: (dialColumn.height - dialColumn.spacing) / 2 - spacing: height * 0.025 - - Dial { - id: volumeDial - width: parent.width - height: volumeColumn.height - volumeText.height - volumeColumn.spacing - - /*! - Determines whether the dial animates its rotation to the new value when - a single click or touch is received on the dial. - */ - property bool animate: customizerItem.animate - - Behavior on value { - enabled: volumeDial.animate && !volumeDial.pressed - NumberAnimation { - duration: 300 - easing.type: Easing.OutSine - } - } - } - - ControlLabel { - id: volumeText - text: "Volume" - anchors.horizontalCenter: parent.horizontalCenter - } - } - - Column { - id: trebleColumn - width: parent.width - height: (dialColumn.height - dialColumn.spacing) / 2 - spacing: height * 0.025 - - Dial { - id: dial2 - width: parent.width - height: trebleColumn.height - trebleText.height - trebleColumn.spacing - - stepSize: 1 - maximumValue: 10 - - style: DialStyle { - labelInset: outerRadius * 0 - } - } - - ControlLabel { - id: trebleText - text: "Treble" - anchors.horizontalCenter: parent.horizontalCenter - } - } - } - - customizer: Column { - spacing: customizerPropertySpacing - - property alias animate: animateCheckBox.checked - - CustomizerLabel { - text: "Animate" - } - - CustomizerSwitch { - id: animateCheckBox - } - } - } - - property Component delayButton: ControlView { - darkBackground: false - - control: DelayButton { - text: "Alarm" - anchors.centerIn: parent - width: toPixels(0.3) - height: width - } - } - - property Component gauge: ControlView { - id: gaugeView - control: Gauge { - id: gauge - width: orientation === Qt.Vertical ? gaugeView.controlBounds.height * 0.3 : gaugeView.controlBounds.width - height: orientation === Qt.Vertical ? gaugeView.controlBounds.height : gaugeView.controlBounds.height * 0.3 - anchors.centerIn: parent - - minimumValue: 0 - value: customizerItem.value - maximumValue: 100 - orientation: customizerItem.orientationFlag ? Qt.Vertical : Qt.Horizontal - tickmarkAlignment: orientation === Qt.Vertical - ? (customizerItem.alignFlag ? Qt.AlignLeft : Qt.AlignRight) - : (customizerItem.alignFlag ? Qt.AlignTop : Qt.AlignBottom) - } - - customizer: Column { - spacing: customizerPropertySpacing - - property alias value: valueSlider.value - property alias orientationFlag: orientationCheckBox.checked - property alias alignFlag: alignCheckBox.checked - - CustomizerLabel { - text: "Value" - } - - CustomizerSlider { - id: valueSlider - minimumValue: 0 - value: 50 - maximumValue: 100 - } - - CustomizerLabel { - text: "Vertical orientation" - } - - CustomizerSwitch { - id: orientationCheckBox - checked: true - } - - CustomizerLabel { - text: controlItem.orientation === Qt.Vertical ? "Left align" : "Top align" - } - - CustomizerSwitch { - id: alignCheckBox - checked: true - } - } - } - - property Component toggleButton: ControlView { - darkBackground: false - - control: ToggleButton { - text: checked ? "On" : "Off" - width: toPixels(0.3) - height: width - anchors.centerIn: parent - } - } - - property Component pieMenu: PieMenuControlView {} - - property Component statusIndicator: ControlView { - id: statusIndicatorView - darkBackground: false - - Timer { - id: recordingFlashTimer - running: true - repeat: true - interval: 1000 - } - - ColumnLayout { - id: indicatorLayout - width: statusIndicatorView.controlBounds.width * 0.25 - height: statusIndicatorView.controlBounds.height * 0.75 - anchors.centerIn: parent - - Repeater { - model: ListModel { - id: indicatorModel - ListElement { - name: "Power" - indicatorColor: "green" - } - ListElement { - name: "Recording" - indicatorColor: "red" - } - } - - ColumnLayout { - Layout.preferredWidth: indicatorLayout.width -// Layout.preferredHeight: indicatorLayout.height * 0.25 - spacing: 0 - - StatusIndicator { - id: indicator - color: indicatorColor - Layout.preferredWidth: statusIndicatorView.controlBounds.width * 0.07 - Layout.preferredHeight: Layout.preferredWidth - Layout.alignment: Qt.AlignHCenter - on: true - - Connections { - target: recordingFlashTimer - onTriggered: if (name == "Recording") indicator.on = !indicator.on - } - } - ControlLabel { - id: indicatorLabel - text: name -// elide: Text.ElideRight - Layout.alignment: Qt.AlignHCenter - Layout.maximumWidth: parent.width - horizontalAlignment: Text.AlignHCenter - } - } - } - } - } - - FontLoader { - id: openSans - Component.onCompleted: { - // QTBUG-35909 - if (Qt.platform.os === "ios") - name = "Open Sans" - else - source = "fonts/OpenSans-Regular.ttf" - } - } - - property var componentMap: { - "CircularGauge": circularGauge, - "DelayButton": delayButton, - "Dial": dial, - "Gauge": gauge, - "PieMenu": pieMenu, - "StatusIndicator": statusIndicator, - "ToggleButton": toggleButton - } - - StackView { - id: stackView - anchors.fill: parent - - initialItem: ListView { - model: ListModel { - ListElement { - title: "CircularGauge" - } - ListElement { - title: "DelayButton" - } - ListElement { - title: "Dial" - } - ListElement { - title: "Gauge" - } -// ListElement { -// title: "PieMenu" -// } - ListElement { - title: "StatusIndicator" - } - ListElement { - title: "ToggleButton" - } - } - - delegate: Button { - width: stackView.width - height: root.height * 0.125 - text: title - - Image { - source: "images/icon-go.png" - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 30 - } - - style: BlackButtonStyle { - fontColor: root.darkFontColor - } - onClicked: { - if (stackView.depth == 1) { - // Only push the control view if we haven't already pushed it... - stackView.push({item: componentMap[title]}); - stackView.currentItem.forceActiveFocus(); - } - } - } - } - } +Loader { + source: "qml/gallery.qml" } |