aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/dialogs')
-rw-r--r--src/imports/dialogs/DefaultColorDialog.qml362
-rw-r--r--src/imports/dialogs/DefaultFileDialog.qml394
-rw-r--r--src/imports/dialogs/DefaultFontDialog.qml483
-rw-r--r--src/imports/dialogs/DefaultMessageDialog.qml330
-rw-r--r--src/imports/dialogs/WidgetColorDialog.qml44
-rw-r--r--src/imports/dialogs/WidgetFileDialog.qml44
-rw-r--r--src/imports/dialogs/WidgetFontDialog.qml44
-rw-r--r--src/imports/dialogs/WidgetMessageDialog.qml44
-rw-r--r--src/imports/dialogs/dialogs.pro97
-rw-r--r--src/imports/dialogs/doc/images/critical.pngbin253 -> 0 bytes
-rw-r--r--src/imports/dialogs/doc/images/information.pngbin254 -> 0 bytes
-rw-r--r--src/imports/dialogs/doc/images/question.pngbin257 -> 0 bytes
-rw-r--r--src/imports/dialogs/doc/images/replacefile.pngbin4304 -> 0 bytes
-rw-r--r--src/imports/dialogs/doc/images/warning.pngbin224 -> 0 bytes
-rw-r--r--src/imports/dialogs/doc/qtquickdialogs.qdocconf41
-rw-r--r--src/imports/dialogs/doc/src/qtquickdialogs-examples.qdoc36
-rw-r--r--src/imports/dialogs/doc/src/qtquickdialogs-index.qdoc58
-rw-r--r--src/imports/dialogs/images/checkers.pngbin149 -> 0 bytes
-rw-r--r--src/imports/dialogs/images/checkmark.pngbin809 -> 0 bytes
-rw-r--r--src/imports/dialogs/images/copy.pngbin1338 -> 0 bytes
-rw-r--r--src/imports/dialogs/images/critical.pngbin253 -> 0 bytes
-rw-r--r--src/imports/dialogs/images/crosshairs.pngbin876 -> 0 bytes
-rw-r--r--src/imports/dialogs/images/folder.pngbin1841 -> 0 bytes
-rw-r--r--src/imports/dialogs/images/information.pngbin254 -> 0 bytes
-rw-r--r--src/imports/dialogs/images/question.pngbin257 -> 0 bytes
-rw-r--r--src/imports/dialogs/images/slider_handle.pngbin1551 -> 0 bytes
-rw-r--r--src/imports/dialogs/images/sunken_frame.pngbin623 -> 0 bytes
-rw-r--r--src/imports/dialogs/images/up.pngbin662 -> 0 bytes
-rw-r--r--src/imports/dialogs/images/warning.pngbin224 -> 0 bytes
-rw-r--r--src/imports/dialogs/images/window_border.pngbin588 -> 0 bytes
-rw-r--r--src/imports/dialogs/plugin.cpp214
-rw-r--r--src/imports/dialogs/plugins.qmltypes654
-rw-r--r--src/imports/dialogs/qml/Button.qml86
-rw-r--r--src/imports/dialogs/qml/CheckBox.qml96
-rwxr-xr-xsrc/imports/dialogs/qml/ColorSlider.qml138
-rw-r--r--src/imports/dialogs/qml/DefaultWindowDecoration.qml71
-rw-r--r--src/imports/dialogs/qml/EdgeFade.qml63
-rw-r--r--src/imports/dialogs/qml/TextField.qml89
-rw-r--r--src/imports/dialogs/qml/qmldir5
-rw-r--r--src/imports/dialogs/qmldir4
-rw-r--r--src/imports/dialogs/qquickabstractcolordialog.cpp134
-rw-r--r--src/imports/dialogs/qquickabstractcolordialog_p.h113
-rw-r--r--src/imports/dialogs/qquickabstractdialog.cpp337
-rw-r--r--src/imports/dialogs/qquickabstractdialog_p.h145
-rw-r--r--src/imports/dialogs/qquickabstractfiledialog.cpp194
-rw-r--r--src/imports/dialogs/qquickabstractfiledialog_p.h122
-rw-r--r--src/imports/dialogs/qquickabstractfontdialog.cpp150
-rw-r--r--src/imports/dialogs/qquickabstractfontdialog_p.h113
-rw-r--r--src/imports/dialogs/qquickabstractmessagedialog.cpp179
-rw-r--r--src/imports/dialogs/qquickabstractmessagedialog_p.h165
-rw-r--r--src/imports/dialogs/qquickcolordialog.cpp119
-rw-r--r--src/imports/dialogs/qquickcolordialog_p.h80
-rw-r--r--src/imports/dialogs/qquickdialogassets_p.h65
-rw-r--r--src/imports/dialogs/qquickfiledialog.cpp172
-rw-r--r--src/imports/dialogs/qquickfiledialog_p.h93
-rw-r--r--src/imports/dialogs/qquickfontdialog.cpp120
-rw-r--r--src/imports/dialogs/qquickfontdialog_p.h80
-rw-r--r--src/imports/dialogs/qquickmessagedialog.cpp181
-rw-r--r--src/imports/dialogs/qquickmessagedialog_p.h86
-rw-r--r--src/imports/dialogs/qquickplatformcolordialog.cpp254
-rw-r--r--src/imports/dialogs/qquickplatformcolordialog_p.h78
-rw-r--r--src/imports/dialogs/qquickplatformfiledialog.cpp314
-rw-r--r--src/imports/dialogs/qquickplatformfiledialog_p.h78
-rw-r--r--src/imports/dialogs/qquickplatformfontdialog.cpp252
-rw-r--r--src/imports/dialogs/qquickplatformfontdialog_p.h78
-rw-r--r--src/imports/dialogs/qquickplatformmessagedialog.cpp398
-rw-r--r--src/imports/dialogs/qquickplatformmessagedialog_p.h78
67 files changed, 0 insertions, 7575 deletions
diff --git a/src/imports/dialogs/DefaultColorDialog.qml b/src/imports/dialogs/DefaultColorDialog.qml
deleted file mode 100644
index 4913e332d7..0000000000
--- a/src/imports/dialogs/DefaultColorDialog.qml
+++ /dev/null
@@ -1,362 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.1
-import QtQuick.Window 2.1
-import QtQuick.Dialogs 1.0
-import "qml"
-
-AbstractColorDialog {
- id: root
- property bool __valueSet: true // guard to prevent binding loops
- function __setControlsFromColor() {
- __valueSet = false
- hueSlider.value = root.currentHue
- saturationSlider.value = root.currentSaturation
- lightnessSlider.value = root.currentLightness
- alphaSlider.value = root.currentAlpha
- crosshairs.x = root.currentLightness * paletteMap.width
- crosshairs.y = (1.0 - root.currentSaturation) * paletteMap.height
- __valueSet = true
- }
- onCurrentColorChanged: __setControlsFromColor()
- onSelectionAccepted: root.color = root.currentColor
-
- Rectangle {
- id: content
- property int maxSize: 0.9 * Math.min(Screen.desktopAvailableWidth, Screen.desktopAvailableHeight)
- implicitHeight: Math.min(maxSize, Screen.pixelDensity * (usePaletteMap ? 100 : 50))
- implicitWidth: usePaletteMap ? implicitHeight - bottomMinHeight : implicitHeight * 1.5
- color: palette.window
- focus: root.visible
- property real bottomMinHeight: sliders.height + buttonRow.height + outerSpacing * 3
- property real spacing: 8
- property real outerSpacing: 12
- property bool usePaletteMap: true
-
- Keys.onPressed: {
- event.accepted = true
- switch (event.key) {
- case Qt.Key_Return:
- case Qt.Key_Select:
- accept()
- break
- case Qt.Key_Escape:
- case Qt.Key_Back:
- reject()
- break
- case Qt.Key_C:
- if (event.modifiers & Qt.ControlModifier)
- colorField.copyAll()
- break
- case Qt.Key_V:
- if (event.modifiers & Qt.ControlModifier) {
- colorField.paste()
- root.currentColor = colorField.text
- }
- break
- default:
- // do nothing
- event.accepted = false
- break
- }
- }
-
- // set the preferred width based on height, to avoid "letterboxing" the paletteMap
- onHeightChanged: implicitHeight = Math.max((usePaletteMap ? 480 : bottomMinHeight), height)
-
- SystemPalette { id: palette }
-
- Item {
- id: paletteFrame
- visible: content.usePaletteMap
- anchors {
- top: parent.top
- left: parent.left
- right: parent.right
- margins: content.outerSpacing
- }
- height: Math.min(content.height - content.bottomMinHeight, content.width - content.outerSpacing * 2)
-
- Image {
- id: paletteMap
- x: (parent.width - width) / 2
- width: height
- onWidthChanged: root.__setControlsFromColor()
- height: parent.height
- source: "images/checkers.png"
- fillMode: Image.Tile
-
- // note we smoothscale the shader from a smaller version to improve performance
- ShaderEffect {
- id: map
- width: 64
- height: 64
- opacity: alphaSlider.value
- scale: paletteMap.width / width;
- layer.enabled: true
- layer.smooth: true
- anchors.centerIn: parent
- property real hue: hueSlider.value
-
- fragmentShader: "
- varying mediump vec2 qt_TexCoord0;
- uniform highp float qt_Opacity;
- uniform highp float hue;
-
- highp float hueToIntensity(highp float v1, highp float v2, highp float h) {
- h = fract(h);
- if (h < 1.0 / 6.0)
- return v1 + (v2 - v1) * 6.0 * h;
- else if (h < 1.0 / 2.0)
- return v2;
- else if (h < 2.0 / 3.0)
- return v1 + (v2 - v1) * 6.0 * (2.0 / 3.0 - h);
-
- return v1;
- }
-
- highp vec3 HSLtoRGB(highp vec3 color) {
- highp float h = color.x;
- highp float l = color.z;
- highp float s = color.y;
-
- if (s < 1.0 / 256.0)
- return vec3(l, l, l);
-
- highp float v1;
- highp float v2;
- if (l < 0.5)
- v2 = l * (1.0 + s);
- else
- v2 = (l + s) - (s * l);
-
- v1 = 2.0 * l - v2;
-
- highp float d = 1.0 / 3.0;
- highp float r = hueToIntensity(v1, v2, h + d);
- highp float g = hueToIntensity(v1, v2, h);
- highp float b = hueToIntensity(v1, v2, h - d);
- return vec3(r, g, b);
- }
-
- void main() {
- lowp vec4 c = vec4(1.0);
- c.rgb = HSLtoRGB(vec3(hue, 1.0 - qt_TexCoord0.t, qt_TexCoord0.s));
- gl_FragColor = c * qt_Opacity;
- }
- "
- }
-
- MouseArea {
- id: mapMouseArea
- anchors.fill: parent
- onPositionChanged: {
- if (pressed && containsMouse) {
- var xx = Math.max(0, Math.min(mouse.x, parent.width))
- var yy = Math.max(0, Math.min(mouse.y, parent.height))
- saturationSlider.value = 1.0 - yy / parent.height
- lightnessSlider.value = xx / parent.width
- // TODO if we constrain the movement here, can avoid the containsMouse test
- crosshairs.x = mouse.x - crosshairs.radius
- crosshairs.y = mouse.y - crosshairs.radius
- }
- }
- onPressed: positionChanged(mouse)
- }
-
- Image {
- id: crosshairs
- property int radius: width / 2 // truncated to int
- source: "images/crosshairs.png"
- }
-
- BorderImage {
- anchors.fill: parent
- anchors.margins: -1
- anchors.leftMargin: -2
- source: "images/sunken_frame.png"
- border.left: 8
- border.right: 8
- border.top: 8
- border.bottom: 8
- }
- }
- }
-
- Column {
- id: sliders
- anchors {
- top: paletteFrame.bottom
- left: parent.left
- right: parent.right
- margins: content.outerSpacing
- }
- spacing: content.spacing
-
- ColorSlider {
- id: hueSlider
- value: 0.5
- onValueChanged: if (__valueSet) root.currentColor = Qt.hsla(hueSlider.value, saturationSlider.value, lightnessSlider.value, alphaSlider.value)
- text: qsTr("Hue")
- trackDelegate: Rectangle {
- rotation: -90
- transformOrigin: Item.TopLeft
- gradient: Gradient {
- GradientStop {position: 0.000; color: Qt.rgba(1, 0, 0, 1)}
- GradientStop {position: 0.167; color: Qt.rgba(1, 1, 0, 1)}
- GradientStop {position: 0.333; color: Qt.rgba(0, 1, 0, 1)}
- GradientStop {position: 0.500; color: Qt.rgba(0, 1, 1, 1)}
- GradientStop {position: 0.667; color: Qt.rgba(0, 0, 1, 1)}
- GradientStop {position: 0.833; color: Qt.rgba(1, 0, 1, 1)}
- GradientStop {position: 1.000; color: Qt.rgba(1, 0, 0, 1)}
- }
- }
- }
-
- ColorSlider {
- id: saturationSlider
- visible: !content.usePaletteMap
- value: 0.5
- onValueChanged: if (__valueSet) root.currentColor = Qt.hsla(hueSlider.value, saturationSlider.value, lightnessSlider.value, alphaSlider.value)
- text: qsTr("Saturation")
- trackDelegate: Rectangle {
- rotation: -90
- transformOrigin: Item.TopLeft
- gradient: Gradient {
- GradientStop { position: 0; color: Qt.hsla(hueSlider.value, 0.0, lightnessSlider.value, 1.0) }
- GradientStop { position: 1; color: Qt.hsla(hueSlider.value, 1.0, lightnessSlider.value, 1.0) }
- }
- }
- }
-
- ColorSlider {
- id: lightnessSlider
- visible: !content.usePaletteMap
- value: 0.5
- onValueChanged: if (__valueSet) root.currentColor = Qt.hsla(hueSlider.value, saturationSlider.value, lightnessSlider.value, alphaSlider.value)
- text: qsTr("Luminosity")
- trackDelegate: Rectangle {
- rotation: -90
- transformOrigin: Item.TopLeft
- gradient: Gradient {
- GradientStop { position: 0; color: "black" }
- GradientStop { position: 0.5; color: Qt.hsla(hueSlider.value, saturationSlider.value, 0.5, 1.0) }
- GradientStop { position: 1; color: "white" }
- }
- }
- }
-
- ColorSlider {
- id: alphaSlider
- minimum: 0.0
- maximum: 1.0
- value: 1.0
- onValueChanged: if (__valueSet) root.currentColor = Qt.hsla(hueSlider.value, saturationSlider.value, lightnessSlider.value, alphaSlider.value)
- text: qsTr("Alpha")
- visible: root.showAlphaChannel
- trackDelegate: Item {
- rotation: -90
- transformOrigin: Item.TopLeft
- Image {
- anchors {fill: parent}
- source: "images/checkers.png"
- fillMode: Image.TileVertically
- }
- Rectangle {
- anchors.fill: parent
- gradient: Gradient {
- GradientStop { position: 0; color: "transparent" }
- GradientStop { position: 1; color: Qt.hsla(hueSlider.value,
- saturationSlider.value,
- lightnessSlider.value, 1.0) }
- } }
- }
- }
- }
-
- Item {
- id: buttonRow
- height: Math.max(buttonsOnly.height, copyIcon.height)
- width: parent.width
- anchors {
- left: parent.left
- right: parent.right
- bottom: content.bottom
- margins: content.outerSpacing
- }
- Row {
- spacing: content.spacing
- height: parent.height
- TextField {
- id: colorField
- text: root.currentColor.toString()
- anchors.verticalCenter: parent.verticalCenter
- onAccepted: root.currentColor = text
- Component.onCompleted: width = implicitWidth + 10
- }
- Image {
- id: copyIcon
- anchors.verticalCenter: parent.verticalCenter
- source: "images/copy.png"
- MouseArea {
- anchors.fill: parent
- onClicked: colorField.copyAll()
- }
- }
- }
- Row {
- id: buttonsOnly
- spacing: content.spacing
- anchors.right: parent.right
- Button {
- id: cancelButton
- text: "Cancel"
- onClicked: root.reject()
- }
- Button {
- id: okButton
- text: "OK"
- onClicked: root.accept()
- }
- }
- }
- }
-}
diff --git a/src/imports/dialogs/DefaultFileDialog.qml b/src/imports/dialogs/DefaultFileDialog.qml
deleted file mode 100644
index 627a719f60..0000000000
--- a/src/imports/dialogs/DefaultFileDialog.qml
+++ /dev/null
@@ -1,394 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.1
-import QtQuick.Dialogs 1.0
-import QtQuick.Window 2.1
-import Qt.labs.folderlistmodel 2.0
-import "qml"
-
-AbstractFileDialog {
- id: root
- onVisibleChanged: {
- if (visible) {
- __selectedIndices = []
- __lastClickedIdx = -1
- currentPathField.visible = false
- }
- }
- onFolderChanged: {
- var str = new String(folder)
- if (str.indexOf("qrc:") === 0)
- folder = "file:" + str.slice(4)
- if (view.model.folder != folder)
- view.model.folder = folder
- }
-
- property real __textX: titleBar.height
- property SystemPalette __palette
- property var __selectedIndices: []
- property int __lastClickedIdx: -1
-
- function __dirDown(path) {
- view.model.folder = "file://" + path
- __lastClickedIdx = -1
- __selectedIndices = []
- }
- function __dirUp() {
- if (view.model.parentFolder == "")
- view.model.folder = "file:///"
- else
- view.model.folder = view.model.parentFolder
- __lastClickedIdx = -1
- __selectedIndices = []
- }
- function __up(extend) {
- if (view.currentIndex > 0)
- --view.currentIndex
- else
- view.currentIndex = 0
- if (extend) {
- if (__selectedIndices.indexOf(view.currentIndex) < 0) {
- var selCopy = __selectedIndices
- selCopy.push(view.currentIndex)
- __selectedIndices = selCopy
- }
- } else
- __selectedIndices = [view.currentIndex]
- }
- function __down(extend) {
- if (view.currentIndex < view.model.count - 1)
- ++view.currentIndex
- else
- view.currentIndex = view.model.count - 1
- if (extend) {
- if (__selectedIndices.indexOf(view.currentIndex) < 0) {
- var selCopy = __selectedIndices
- selCopy.push(view.currentIndex)
- __selectedIndices = selCopy
- }
- } else
- __selectedIndices = [view.currentIndex]
- }
- function __acceptSelection() {
- clearSelection()
- if (selectFolder && __selectedIndices.length == 0)
- addSelection(folder)
- else if (__selectedIndices.length > 0) {
- __selectedIndices.map(function(idx) {
- if (view.model.isFolder(idx)) {
- if (selectFolder)
- addSelection(view.model.get(idx, "fileURL"))
- } else {
- if (!selectFolder)
- addSelection(view.model.get(idx, "fileURL"))
- }
- })
- } else {
- addSelection(pathToUrl(currentPathField.text))
- }
- accept()
- }
-
- Rectangle {
- id: content
- property int maxSize: Math.min(Screen.desktopAvailableWidth, Screen.desktopAvailableHeight)
- // TODO: QTBUG-29817 geometry from AbstractFileDialog
- implicitWidth: Math.min(maxSize, Screen.pixelDensity * 100)
- implicitHeight: Math.min(maxSize, Screen.pixelDensity * 80)
- color: __palette.window
- focus: root.visible && !currentPathField.visible
- property real spacing: 6
- property real outerSpacing: 12
- SystemPalette { id: __palette }
-
- Component {
- id: folderDelegate
- Rectangle {
- id: wrapper
- function launch() {
- if (view.model.isFolder(index)) {
- __dirDown(filePath)
- } else {
- root.__acceptSelection()
- }
- }
- width: content.width
- height: nameText.implicitHeight * 1.5
- color: "transparent"
- Rectangle {
- id: itemHighlight
- visible: root.__selectedIndices.indexOf(index) >= 0
- anchors.fill: parent
- color: __palette.highlight
- }
- Image {
- id: icon
- source: "images/folder.png"
- height: wrapper.height - y * 2; width: height
- x: (root.__textX - width) / 2
- y: 2
- visible: view.model.isFolder(index)
- }
- Text {
- id: nameText
- anchors.fill: parent; verticalAlignment: Text.AlignVCenter
- text: fileName
- anchors.leftMargin: root.__textX
- color: itemHighlight.visible ? __palette.highlightedText : __palette.windowText
- elide: Text.ElideRight
- }
- MouseArea {
- id: mouseRegion
- anchors.fill: parent
- onDoubleClicked: {
- __selectedIndices = [index]
- root.__lastClickedIdx = index
- launch()
- }
- onClicked: {
- view.currentIndex = index
- if (mouse.modifiers & Qt.ControlModifier && root.selectMultiple) {
- // modifying the contents of __selectedIndices doesn't notify,
- // so we have to re-assign the variable
- var selCopy = __selectedIndices
- var existingIdx = selCopy.indexOf(index)
- if (existingIdx >= 0)
- selCopy.splice(existingIdx, 1)
- else
- selCopy.push(index)
- __selectedIndices = selCopy
- } else if (mouse.modifiers & Qt.ShiftModifier && root.selectMultiple) {
- if (root.__lastClickedIdx >= 0) {
- var sel = []
- if (index > __lastClickedIdx) {
- for (var i = root.__lastClickedIdx; i <= index; i++)
- sel.push(i)
- } else {
- for (var i = root.__lastClickedIdx; i >= index; i--)
- sel.push(i)
- }
- __selectedIndices = sel
- }
- } else {
- __selectedIndices = [index]
- root.__lastClickedIdx = index
- }
- }
- }
- }
- }
-
- Keys.onPressed: {
- event.accepted = true
- switch (event.key) {
- case Qt.Key_Up:
- root.__up(event.modifiers & Qt.ShiftModifier && root.selectMultiple)
- break
- case Qt.Key_Down:
- root.__down(event.modifiers & Qt.ShiftModifier && root.selectMultiple)
- break
- case Qt.Key_Left:
- root.__dirUp()
- break
- case Qt.Key_Return:
- case Qt.Key_Select:
- case Qt.Key_Right:
- if (view.currentItem)
- view.currentItem.launch()
- else
- root.__acceptSelection()
- break
- case Qt.Key_Back:
- case Qt.Key_Escape:
- reject()
- break
- case Qt.Key_C:
- if (event.modifiers & Qt.ControlModifier)
- currentPathField.copyAll()
- break
- case Qt.Key_V:
- if (event.modifiers & Qt.ControlModifier) {
- currentPathField.visible = true
- currentPathField.paste()
- }
- break
- default:
- // do nothing
- event.accepted = false
- break
- }
- }
-
- ListView {
- id: view
- anchors.top: titleBar.bottom
- anchors.bottom: bottomBar.top
- clip: true
- x: 0
- width: parent.width
- model: FolderListModel {
- onFolderChanged: {
- root.folder = folder
- currentPathField.text = root.urlToPath(view.model.folder)
- }
- }
- delegate: folderDelegate
- highlight: Rectangle {
- color: "transparent"
- border.color: Qt.darker(__palette.window, 1.3)
- }
- highlightMoveDuration: 0
- highlightMoveVelocity: -1
- }
-
- MouseArea {
- anchors.fill: view
- enabled: currentPathField.visible
- onClicked: currentPathField.visible = false
- }
-
-
- Item {
- id: titleBar
- width: parent.width
- height: currentPathField.height * 1.5
- Rectangle {
- anchors.fill: parent
- color: Qt.darker(__palette.window, 1.1)
- border.color: Qt.darker(__palette.window, 1.3)
- }
- Rectangle {
- id: upButton
- width: root.__textX
- height: titleBar.height
- color: "transparent"
-
- Image {
- id: upButtonImage
- anchors.centerIn: parent; source: "images/up.png"
- }
- MouseArea { id: upRegion; anchors.centerIn: parent
- width: 56
- height: parent.height
- onClicked: if (view.model.parentFolder !== "") __dirUp()
- }
- states: [
- State {
- name: "pressed"
- when: upRegion.pressed
- PropertyChanges { target: upButton; color: __palette.highlight }
- }
- ]
- }
- Text {
- id: currentPathText
- anchors.left: parent.left; anchors.right: parent.right; anchors.verticalCenter: parent.verticalCenter
- anchors.leftMargin: __textX; anchors.rightMargin: content.spacing
- text: root.urlToPath(view.model.folder)
- color: __palette.text
- elide: Text.ElideLeft; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignVCenter
- MouseArea {
- anchors.fill: parent
- onClicked: currentPathField.visible = true
- }
- }
- TextField {
- id: currentPathField
- anchors.left: parent.left; anchors.right: parent.right; anchors.verticalCenter: parent.verticalCenter
- anchors.leftMargin: __textX; anchors.rightMargin: content.spacing
- visible: false
- focus: visible
- onAccepted: {
- root.clearSelection()
- if (root.addSelection(root.pathToUrl(text)))
- root.accept()
- else
- view.model.folder = root.pathFolder(text)
- }
- onDownPressed: currentPathField.visible = false
- onBackPressed: reject()
- onEscapePressed: reject()
- }
- }
- Rectangle {
- id: bottomBar
- width: parent.width
- height: buttonRow.height + buttonRow.spacing * 2
- anchors.bottom: parent.bottom
- color: Qt.darker(__palette.window, 1.1)
- border.color: Qt.darker(__palette.window, 1.3)
-
- Row {
- id: buttonRow
- anchors.right: parent.right
- anchors.rightMargin: spacing
- anchors.verticalCenter: parent.verticalCenter
- spacing: content.spacing
- TextField {
- id: filterField
- text: root.selectedNameFilter
- visible: !selectFolder
- width: bottomBar.width - cancelButton.width - okButton.width - parent.spacing * 5
- anchors.verticalCenter: parent.verticalCenter
- onAccepted: {
- root.selectNameFilter(text)
- view.model.nameFilters = text
- }
- }
- Button {
- id: cancelButton
- text: "Cancel"
- onClicked: root.reject()
- }
- Button {
- id: okButton
- text: "OK"
- onClicked: {
- if (view.model.isFolder(view.currentIndex) && !selectFolder)
- __dirDown(view.model.get(view.currentIndex, "filePath"))
- else
- root.__acceptSelection()
- }
- }
- }
- }
- }
-}
diff --git a/src/imports/dialogs/DefaultFontDialog.qml b/src/imports/dialogs/DefaultFontDialog.qml
deleted file mode 100644
index 29feed342f..0000000000
--- a/src/imports/dialogs/DefaultFontDialog.qml
+++ /dev/null
@@ -1,483 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.1
-import QtQuick.Window 2.1
-import QtQuick.Dialogs 1.1
-import QtQuick.Dialogs.Private 1.1
-import "qml"
-
-AbstractFontDialog {
- id: root
-
- property alias font: content.externalFont
-
- Rectangle {
- id: content
- implicitWidth: Math.min(Screen.desktopAvailableWidth, implicitHeight * 1.2)
- implicitHeight: Math.min(Screen.desktopAvailableHeight, settingsBottom.implicitHeight * 3)
- color: palette.window
- focus: root.visible
- property real spacing: 6
- property real outerSpacing: 12
- property real listMargins: 4
- property real delegateHeightMultiplier: 1.5
- property real extraWidth: width > 400 ? width - 400 : 0
- property real extraHeight: height > initialHeight ? height - initialHeight : 0
- property real initialHeight: -1
- onHeightChanged: if (visible && initialHeight < 0) initialHeight = height
-
- property color borderColor: Qt.darker(palette.button, 1.5)
-
- property font font: Qt.font({ family: "Helvetica", pointSize: 24, weight: Font.Normal })
- property font externalFont
- property string writingSystem
- property string writingSystemSample
- property var pointSizes
-
- onFontChanged: externalFont = font
-
- onExternalFontChanged: {
- if (content.font != content.externalFont) {
- font = externalFont
- wsListView.reset()
- fontListView.reset()
- weightListView.reset()
- }
- }
-
- Keys.onPressed: {
- event.accepted = true
- switch (event.key) {
- case Qt.Key_Return:
- case Qt.Key_Select:
- root.font = content.font
- root.accept()
- break
- case Qt.Key_Escape:
- case Qt.Key_Back:
- reject()
- break
- default:
- // do nothing
- event.accepted = false
- break
- }
- }
-
- SystemPalette { id: palette }
-
- Column {
- id: contentColumn
- anchors.fill: parent
- anchors.margins: content.outerSpacing
- spacing: content.outerSpacing
-
- Grid {
- id: settingsTop
- columns: 3
- spacing: content.spacing
- width: parent.width
- height: parent.height - buttonRow.height - settingsBottom.height - parent.spacing * 2
- property real columnHeight: height - writingSystemLabel.height - spacing
-
- Text { id: writingSystemLabel; text: qsTr("Writing System"); font.bold: true }
- Text { id: fontNameLabel; text: qsTr("Font"); font.bold: true }
- Text { id: sizeLabel; text: qsTr("Size"); font.bold: true }
- Rectangle {
- id: wsColumn
- radius: 3
- color: palette.window
- border.color: content.borderColor
- implicitWidth: Math.max(writingSystemLabel.implicitWidth, 100) + content.extraWidth / 5
- height: parent.columnHeight
- clip: true
- ListView {
- id: wsListView
- anchors.fill: parent
- anchors.margins: content.listMargins
- anchors.topMargin: 2
- highlightMoveDuration: 0
- onHeightChanged: positionViewAtIndex(currentIndex, ListView.Contain)
- function reset() {
- if (wsModel.count > 0) {
- content.writingSystem = wsModel.get(0).name;
- fontModel.writingSystem = content.writingSystem;
- content.writingSystemSample = wsModel.get(0).sample;
- }
- }
-
- model: WritingSystemListModel {
- id: wsModel
- Component.onCompleted: wsListView.reset()
- }
- highlight: Rectangle {
- color: palette.highlight
- x: 2 - wsListView.anchors.margins
- width: wsListView.parent.width - 4
- }
- delegate: Item {
- width: parent.width
- height: wsText.height * content.delegateHeightMultiplier
- Text {
- id: wsText
- text: name
- width: parent.width
- elide: Text.ElideRight
- color: index === wsListView.currentIndex ? palette.highlightedText : palette.windowText
- anchors.verticalCenter: parent.verticalCenter
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- wsListView.currentIndex = index;
- content.writingSystem = wsModel.get(wsListView.currentIndex).name;
- fontModel.writingSystem = content.writingSystem;
- content.writingSystemSample = wsModel.get(wsListView.currentIndex).sample;
- }
- }
- }
- }
- }
- Rectangle {
- radius: 3
- color: palette.window
- border.color: content.borderColor
- implicitWidth: Math.max(fontNameLabel.implicitWidth, parent.width - wsColumn.implicitWidth - pointSizesColumn.implicitWidth - parent.spacing * 2)
- height: parent.columnHeight
- clip: true
- ListView {
- id: fontListView
- anchors.fill: parent
- anchors.margins: content.listMargins
- anchors.topMargin: 2
- highlightMoveDuration: 0
- onHeightChanged: positionViewAtIndex(currentIndex, ListView.Contain)
- function reset() {
- fontModel.findIndex()
- content.pointSizes = fontModel.pointSizes()
- fontModel.findPointSizesIndex()
- }
-
- model: FontListModel {
- id: fontModel
- scalableFonts: root.scalableFonts
- nonScalableFonts: root.nonScalableFonts
- monospacedFonts: root.monospacedFonts
- proportionalFonts: root.proportionalFonts
- Component.onCompleted: fontListView.reset()
- onModelReset: { findIndex(); }
- function findIndex() {
- if (fontModel.count <= 0)
- return
-
- if (content.font.family == "") {
- content.font.family = fontModel.get(0).family
- fontListView.currentIndex = 0
- } else {
- var find = false
- for (var i = 0; i < fontModel.count; ++i) {
- if (content.font.family == fontModel.get(i).family) {
- find = true
- fontListView.currentIndex = i
- break
- }
- }
- if (find == false) {
- content.font.family = fontModel.get(0).family
- fontListView.currentIndex = 0
- }
- }
- }
- function findPointSizesIndex() {
- if (content.pointSizes.length <= 0)
- return
-
- var find = false
- for (var i = 0; i < content.pointSizes.length; ++i) {
- if (content.font.pointSize == content.pointSizes[i]) {
- find = true
- pointSizesListView.currentIndex = i
- break
- }
- }
- if (find == false) {
- content.font.pointSize = content.pointSizes[0]
- pointSizesListView.currentIndex = 0
- }
- }
- }
- highlight: Rectangle {
- color: palette.highlight
- x: 2 - fontListView.anchors.margins
- width: fontListView.parent.width - 4
- }
- delegate: Item {
- width: parent.width
- height: fontText.height * content.delegateHeightMultiplier
- Text {
- id: fontText
- text: family
- width: parent.width
- elide: Text.ElideRight
- color: index === fontListView.currentIndex ? palette.highlightedText : palette.windowText
- anchors.verticalCenter: parent.verticalCenter
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- fontListView.currentIndex = index
- content.font.family = fontModel.get(fontListView.currentIndex).family
- }
- }
- }
- }
- }
- Rectangle {
- id: pointSizesColumn
- radius: 3
- color: palette.window
- border.color: content.borderColor
- implicitWidth:sizeLabel.implicitWidth * 2
- height: parent.columnHeight
- clip: true
- ListView {
- id: pointSizesListView
- anchors.fill: parent
- anchors.margins: content.listMargins
- anchors.topMargin: 2
- highlightMoveDuration: 0
- onHeightChanged: positionViewAtIndex(currentIndex, ListView.Contain)
- model: content.pointSizes
- highlight: Rectangle {
- color: palette.highlight
- x: 2 - pointSizesListView.anchors.margins
- width: pointSizesListView.parent.width - 4
- }
- delegate: Item {
- width: parent.width
- height: pointSizesText.height * content.delegateHeightMultiplier
- Text {
- id: pointSizesText
- text: content.pointSizes[index]
- width: parent.width
- elide: Text.ElideRight
- color: index === pointSizesListView.currentIndex ? palette.highlightedText : palette.windowText
- anchors.verticalCenter: parent.verticalCenter
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- pointSizesListView.currentIndex = index
- content.font.pointSize = content.pointSizes[pointSizesListView.currentIndex]
- }
- }
- }
- }
- }
- }
-
- Grid {
- id: settingsBottom
- columns: 3
- spacing: content.spacing
- width: parent.width
- height: initialHeight + content.extraHeight / 4
- property real initialHeight
- property real secondRowHeight: height - weightLabel.height - spacing
- Component.onCompleted: initialHeight = implicitHeight
-
- Text { id: weightLabel; text: qsTr("Weight"); font.bold: true }
- Text { id: optionsLabel; text: qsTr("Style"); font.bold: true }
- Text { id: sampleLabel; text: qsTr("Sample"); font.bold: true }
- Rectangle {
- id: weightColumn
- radius: 3
- color: palette.window
- border.color: content.borderColor
- implicitWidth: optionsColumn.implicitWidth
- implicitHeight: optionsColumn.implicitHeight
- height: parent.secondRowHeight
- clip: true
- ListView {
- id: weightListView
- anchors.fill: parent
- anchors.margins: content.listMargins
- anchors.topMargin: 2
- highlightMoveDuration: 0
- onHeightChanged: positionViewAtIndex(currentIndex, ListView.Contain)
- function reset() {
- weightModel.findIndex()
- }
-
- model: ListModel {
- id: weightModel
- ListElement {
- name: "Light"
- weight: Font.Light
- }
- ListElement {
- name: "Normal"
- weight: Font.Normal
- }
- ListElement {
- name: "DemiBold"
- weight: Font.DemiBold
- }
- ListElement {
- name: "Bold"
- weight: Font.Bold
- }
- ListElement {
- name: "Black"
- weight: Font.Black
- }
- Component.onCompleted: weightListView.reset()
- function findIndex() {
- var find = false
- for (var i = 0; i < weightModel.count; ++i) {
- if (content.font.weight == weightModel.get(i).weight) {
- find = true
- weightListView.currentIndex = i
- break
- }
- }
- if (find == false) {
- content.font.weight = weightModel.get(1).family
- fontListView.currentIndex = 1
- }
- }
- }
- highlight: Rectangle {
- color: palette.highlight
- x: 2 - weightListView.anchors.margins
- width: weightListView.parent.width - 4
- }
- delegate: Item {
- width: parent.width
- height: weightText.height * content.delegateHeightMultiplier
- Text {
- id: weightText
- text: name
- width: parent.width
- elide: Text.ElideRight
- color: index === weightListView.currentIndex ? palette.highlightedText : palette.windowText
- anchors.verticalCenter: parent.verticalCenter
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- weightListView.currentIndex = index
- content.font.weight = weightModel.get(weightListView.currentIndex).weight
- }
- }
- }
- }
- }
- Column {
- id: optionsColumn
- spacing: 4
- CheckBox {
- id: italicCheckBox
- text: qsTr("Italic")
- checked: content.font.italic
- onClicked: { content.font.italic = italicCheckBox.checked }
- }
- CheckBox {
- id: underlineCheckBox
- text: qsTr("Underline")
- checked: content.font.underline
- onClicked: { content.font.underline = underlineCheckBox.checked }
- }
- CheckBox {
- id: overlineCheckBox
- text: qsTr("Overline")
- checked: content.font.overline
- onClicked: { content.font.overline = overlineCheckBox.checked }
- }
- CheckBox {
- id: strikeoutCheckBox
- text: qsTr("Strikeout")
- checked: content.font.strikeout
- onClicked: { content.font.strikeout = strikeoutCheckBox.checked }
- }
- }
- Rectangle {
- clip: true
- implicitWidth: sample.implicitWidth + parent.spacing
- implicitHeight: optionsColumn.implicitHeight
- width: parent.width - weightColumn.width - optionsColumn.width - parent.spacing * 2
- height: parent.secondRowHeight
- color: palette.window
- border.color: content.borderColor
- Text {
- id: sample
- anchors.centerIn: parent
- font: content.font
- text: content.writingSystemSample
- }
- }
- }
-
- Item {
- id: buttonRow
- height: buttonsOnly.height
- width: parent.width
- Row {
- id: buttonsOnly
- spacing: content.spacing
- anchors.right: parent.right
- Button {
- text: qsTr("Cancel")
- onClicked: root.reject()
- }
- Button {
- text: qsTr("OK")
- onClicked: {
- root.font = content.font
- root.accept()
- }
- }
- }
- }
- }
- }
-}
-
diff --git a/src/imports/dialogs/DefaultMessageDialog.qml b/src/imports/dialogs/DefaultMessageDialog.qml
deleted file mode 100644
index ba29469b5e..0000000000
--- a/src/imports/dialogs/DefaultMessageDialog.qml
+++ /dev/null
@@ -1,330 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.1
-import QtQuick.Window 2.1
-import QtQuick.Dialogs 1.1
-import "qml"
-
-AbstractMessageDialog {
- id: root
-
- Rectangle {
- id: content
- property real spacing: 6
- property real outerSpacing: 12
- property real buttonsRowImplicitWidth: Screen.pixelDensity * 50
- implicitHeight: contentColumn.implicitHeight + outerSpacing * 2
- onImplicitHeightChanged: root.height = implicitHeight
- implicitWidth: Math.min(Screen.desktopAvailableWidth * 0.9, Math.max(
- mainText.implicitWidth, buttonsRowImplicitWidth) + outerSpacing * 2);
- onImplicitWidthChanged: root.width = implicitWidth
- color: palette.window
- focus: root.visible
- Keys.onPressed: {
- event.accepted = true
- if (event.modifiers === Qt.ControlModifier)
- switch (event.key) {
- case Qt.Key_A:
- detailedText.selectAll()
- break
- case Qt.Key_C:
- detailedText.copy()
- break
- } else switch (event.key) {
- case Qt.Key_Escape:
- case Qt.Key_Back:
- reject()
- break
- case Qt.Key_Enter:
- case Qt.Key_Return:
- accept()
- break
- }
- }
-
- Column {
- id: contentColumn
- spacing: content.spacing
- anchors {
- top: parent.top
- left: parent.left
- right: parent.right
- margins: content.outerSpacing
- }
-
- SystemPalette { id: palette }
-
- Item {
- width: parent.width
- height: Math.max(icon.height, mainText.height + informativeText.height + content.spacing)
- Image {
- id: icon
- source: root.standardIconSource
- }
-
- Text {
- id: mainText
- anchors {
- left: icon.right
- leftMargin: content.spacing
- right: parent.right
- }
- text: root.text
- font.weight: Font.Bold
- wrapMode: Text.WordWrap
- }
-
- Text {
- id: informativeText
- anchors {
- left: icon.right
- right: parent.right
- top: mainText.bottom
- leftMargin: content.spacing
- topMargin: content.spacing
- }
- text: root.informativeText
- wrapMode: Text.WordWrap
- }
- }
-
-
- Flow {
- id: buttons
- spacing: content.spacing
- layoutDirection: Qt.RightToLeft
- width: parent.width + content.outerSpacing
- x: -content.outerSpacing
- Button {
- id: okButton
- text: "OK"
- onClicked: root.click(StandardButton.Ok)
- visible: root.standardButtons & StandardButton.Ok
- }
- Button {
- id: openButton
- text: "Open"
- onClicked: root.click(StandardButton.Open)
- visible: root.standardButtons & StandardButton.Open
- }
- Button {
- id: saveButton
- text: "Save"
- onClicked: root.click(StandardButton.Save)
- visible: root.standardButtons & StandardButton.Save
- }
- Button {
- id: saveAllButton
- text: "Save All"
- onClicked: root.click(StandardButton.SaveAll)
- visible: root.standardButtons & StandardButton.SaveAll
- }
- Button {
- id: retryButton
- text: "Retry"
- onClicked: root.click(StandardButton.Retry)
- visible: root.standardButtons & StandardButton.Retry
- }
- Button {
- id: ignoreButton
- text: "Ignore"
- onClicked: root.click(StandardButton.Ignore)
- visible: root.standardButtons & StandardButton.Ignore
- }
- Button {
- id: applyButton
- text: "Apply"
- onClicked: root.click(StandardButton.Apply)
- visible: root.standardButtons & StandardButton.Apply
- }
- Button {
- id: yesButton
- text: "Yes"
- onClicked: root.click(StandardButton.Yes)
- visible: root.standardButtons & StandardButton.Yes
- }
- Button {
- id: yesAllButton
- text: "Yes to All"
- onClicked: root.click(StandardButton.YesToAll)
- visible: root.standardButtons & StandardButton.YesToAll
- }
- Button {
- id: noButton
- text: "No"
- onClicked: root.click(StandardButton.No)
- visible: root.standardButtons & StandardButton.No
- }
- Button {
- id: noAllButton
- text: "No to All"
- onClicked: root.click(StandardButton.NoToAll)
- visible: root.standardButtons & StandardButton.NoToAll
- }
- Button {
- id: discardButton
- text: "Discard"
- onClicked: root.click(StandardButton.Discard)
- visible: root.standardButtons & StandardButton.Discard
- }
- Button {
- id: resetButton
- text: "Reset"
- onClicked: root.click(StandardButton.Reset)
- visible: root.standardButtons & StandardButton.Reset
- }
- Button {
- id: restoreDefaultsButton
- text: "Restore Defaults"
- onClicked: root.click(StandardButton.RestoreDefaults)
- visible: root.standardButtons & StandardButton.RestoreDefaults
- }
- Button {
- id: cancelButton
- text: "Cancel"
- onClicked: root.click(StandardButton.Cancel)
- visible: root.standardButtons & StandardButton.Cancel
- }
- Button {
- id: abortButton
- text: "Abort"
- onClicked: root.click(StandardButton.Abort)
- visible: root.standardButtons & StandardButton.Abort
- }
- Button {
- id: closeButton
- text: "Close"
- onClicked: root.click(StandardButton.Close)
- visible: root.standardButtons & StandardButton.Close
- }
- Button {
- id: moreButton
- text: "Show Details..."
- onClicked: content.state = (content.state === "" ? "expanded" : "")
- visible: root.detailedText.length > 0
- }
- Button {
- id: helpButton
- text: "Help"
- onClicked: root.click(StandardButton.Help)
- visible: root.standardButtons & StandardButton.Help
- }
- onVisibleChildrenChanged: calculateImplicitWidth()
- }
- }
-
- Item {
- id: details
- width: parent.width
- implicitHeight: detailedText.implicitHeight + content.spacing
- height: 0
- clip: true
-
- anchors {
- left: parent.left
- right: parent.right
- top: contentColumn.bottom
- topMargin: content.spacing
- leftMargin: content.outerSpacing
- rightMargin: content.outerSpacing
- }
-
- Flickable {
- id: flickable
- contentHeight: detailedText.height
- anchors.fill: parent
- anchors.topMargin: content.spacing
- anchors.bottomMargin: content.outerSpacing
- TextEdit {
- id: detailedText
- text: root.detailedText
- width: details.width
- wrapMode: Text.WordWrap
- readOnly: true
- selectByMouse: true
- }
- }
-
- Component {
- id: edgeFade
- EdgeFade {
- fadeColor: palette.window
- topThreshold: flickable.atYBeginning ? 0 : content.spacing * 3
- bottomThreshold: flickable.atYEnd ? 0 : content.spacing * 3
- }
- }
-
- Loader {
- sourceComponent: flickable.height < flickable.contentHeight ? edgeFade : undefined
- anchors.fill: parent
- }
-
- }
-
- states: [
- State {
- name: "expanded"
- PropertyChanges {
- target: details
- height: content.height - contentColumn.height - content.spacing - content.outerSpacing
- }
- PropertyChanges {
- target: content
- implicitHeight: contentColumn.implicitHeight + content.spacing * 2 +
- detailedText.implicitHeight + content.outerSpacing * 2
- }
- PropertyChanges {
- target: moreButton
- text: "Hide Details"
- }
- }
- ]
- }
- function calculateImplicitWidth() {
- if (buttons.visibleChildren.length < 2)
- return;
- var calcWidth = 0;
- for (var i = 0; i < buttons.visibleChildren.length; ++i)
- calcWidth += Math.max(100, buttons.visibleChildren[i].implicitWidth) + content.spacing
- content.buttonsRowImplicitWidth = content.outerSpacing + calcWidth
- }
- Component.onCompleted: calculateImplicitWidth()
-}
diff --git a/src/imports/dialogs/WidgetColorDialog.qml b/src/imports/dialogs/WidgetColorDialog.qml
deleted file mode 100644
index ed7c7ab77a..0000000000
--- a/src/imports/dialogs/WidgetColorDialog.qml
+++ /dev/null
@@ -1,44 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.1
-import QtQuick.PrivateWidgets 1.0
-
-QtColorDialog { }
diff --git a/src/imports/dialogs/WidgetFileDialog.qml b/src/imports/dialogs/WidgetFileDialog.qml
deleted file mode 100644
index c8f59d20a7..0000000000
--- a/src/imports/dialogs/WidgetFileDialog.qml
+++ /dev/null
@@ -1,44 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.1
-import QtQuick.PrivateWidgets 1.0
-
-QtFileDialog { }
diff --git a/src/imports/dialogs/WidgetFontDialog.qml b/src/imports/dialogs/WidgetFontDialog.qml
deleted file mode 100644
index 69f98b28a2..0000000000
--- a/src/imports/dialogs/WidgetFontDialog.qml
+++ /dev/null
@@ -1,44 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.2
-import QtQuick.PrivateWidgets 1.1
-
-QtFontDialog { }
diff --git a/src/imports/dialogs/WidgetMessageDialog.qml b/src/imports/dialogs/WidgetMessageDialog.qml
deleted file mode 100644
index 8bc3eccfd7..0000000000
--- a/src/imports/dialogs/WidgetMessageDialog.qml
+++ /dev/null
@@ -1,44 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.1
-import QtQuick.PrivateWidgets 1.1
-
-QtMessageDialog { }
diff --git a/src/imports/dialogs/dialogs.pro b/src/imports/dialogs/dialogs.pro
deleted file mode 100644
index 1abad55883..0000000000
--- a/src/imports/dialogs/dialogs.pro
+++ /dev/null
@@ -1,97 +0,0 @@
-CXX_MODULE = qml
-TARGET = dialogplugin
-TARGETPATH = QtQuick/Dialogs
-IMPORT_VERSION = 1.1
-
-QMAKE_DOCS = $$PWD/doc/qtquickdialogs.qdocconf
-
-SOURCES += \
- qquickabstractmessagedialog.cpp \
- qquickplatformmessagedialog.cpp \
- qquickmessagedialog.cpp \
- qquickabstractfiledialog.cpp \
- qquickplatformfiledialog.cpp \
- qquickfiledialog.cpp \
- qquickabstractcolordialog.cpp \
- qquickplatformcolordialog.cpp \
- qquickcolordialog.cpp \
- qquickabstractfontdialog.cpp \
- qquickplatformfontdialog.cpp \
- qquickfontdialog.cpp \
- qquickabstractdialog.cpp \
- plugin.cpp
-
-HEADERS += \
- qquickabstractmessagedialog_p.h \
- qquickplatformmessagedialog_p.h \
- qquickmessagedialog_p.h \
- qquickdialogassets_p.h \
- qquickabstractfiledialog_p.h \
- qquickplatformfiledialog_p.h \
- qquickfiledialog_p.h \
- qquickabstractcolordialog_p.h \
- qquickplatformcolordialog_p.h \
- qquickcolordialog_p.h \
- qquickabstractfontdialog_p.h \
- qquickplatformfontdialog_p.h \
- qquickfontdialog_p.h \
- qquickabstractdialog_p.h
-
-DIALOGS_QML_FILES += \
- DefaultMessageDialog.qml \
- WidgetMessageDialog.qml \
- DefaultFileDialog.qml \
- WidgetFileDialog.qml \
- DefaultColorDialog.qml \
- WidgetColorDialog.qml \
- DefaultFontDialog.qml \
- WidgetFontDialog.qml \
- qml/Button.qml \
- qml/CheckBox.qml \
- qml/ColorSlider.qml \
- qml/EdgeFade.qml \
- qml/DefaultWindowDecoration.qml \
- qml/TextField.qml \
- qml/qmldir \
- images/critical.png \
- images/information.png \
- images/question.png \
- images/warning.png \
- images/checkers.png \
- images/checkmark.png \
- images/copy.png \
- images/crosshairs.png \
- images/slider_handle.png \
- images/sunken_frame.png \
- images/window_border.png \
- images/folder.png \
- images/up.png
-
-QT += quick-private gui gui-private core core-private qml
-
-# Create the resource file
-GENERATED_RESOURCE_FILE = $$OUT_PWD/dialogs.qrc
-
-RESOURCE_CONTENT = \
- "<RCC>" \
- "<qresource prefix=\"/QtQuick/Dialogs\">"
-
-for(resourcefile, DIALOGS_QML_FILES) {
- resourcefileabsolutepath = $$absolute_path($$resourcefile)
- relativepath_in = $$relative_path($$resourcefileabsolutepath, $$_PRO_FILE_PWD_)
- relativepath_out = $$relative_path($$resourcefileabsolutepath, $$OUT_PWD)
- RESOURCE_CONTENT += "<file alias=\"$$relativepath_in\">$$relativepath_out</file>"
-}
-
-RESOURCE_CONTENT += \
- "</qresource>" \
- "</RCC>"
-
-write_file($$GENERATED_RESOURCE_FILE, RESOURCE_CONTENT)|error("Aborting.")
-
-RESOURCES += $$GENERATED_RESOURCE_FILE
-
-# In case of a debug build, deploy the QML files too
-CONFIG(debug, debug|release): QML_FILES += $$DIALOGS_QML_FILES
-
-load(qml_plugin)
diff --git a/src/imports/dialogs/doc/images/critical.png b/src/imports/dialogs/doc/images/critical.png
deleted file mode 100644
index dc9c5aebf4..0000000000
--- a/src/imports/dialogs/doc/images/critical.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/doc/images/information.png b/src/imports/dialogs/doc/images/information.png
deleted file mode 100644
index 0a2eb87d10..0000000000
--- a/src/imports/dialogs/doc/images/information.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/doc/images/question.png b/src/imports/dialogs/doc/images/question.png
deleted file mode 100644
index 2dd92fd791..0000000000
--- a/src/imports/dialogs/doc/images/question.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/doc/images/replacefile.png b/src/imports/dialogs/doc/images/replacefile.png
deleted file mode 100644
index d1479fa944..0000000000
--- a/src/imports/dialogs/doc/images/replacefile.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/doc/images/warning.png b/src/imports/dialogs/doc/images/warning.png
deleted file mode 100644
index cba78f6bea..0000000000
--- a/src/imports/dialogs/doc/images/warning.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/doc/qtquickdialogs.qdocconf b/src/imports/dialogs/doc/qtquickdialogs.qdocconf
deleted file mode 100644
index 1bad67790f..0000000000
--- a/src/imports/dialogs/doc/qtquickdialogs.qdocconf
+++ /dev/null
@@ -1,41 +0,0 @@
-include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
-
-project = QtQuickDialogs
-description = Qt Quick Dialogs Reference Documentation
-url = http://qt-project.org/doc/qt-$QT_VER
-version = $QT_VERSION
-
-qhp.projects = QtQuickDialogs
-
-qhp.QtQuickDialogs.file = qtquickdialogs.qhp
-qhp.QtQuickDialogs.namespace = org.qt-project.qtquickdialogs.$QT_VERSION_TAG
-qhp.QtQuickDialogs.virtualFolder = qtquickdialogs
-qhp.QtQuickDialogs.indexTitle = Qt Quick Dialogs
-qhp.QtQuickDialogs.indexRoot =
-
-qhp.QtQuickDialogs.filterAttributes = qtquickdialogs $QT_VERSION qtrefdoc
-qhp.QtQuickDialogs.customFilters.Qt.name = QtQuickDialogs $QT_VERSION
-qhp.QtQuickDialogs.customFilters.Qt.filterAttributes = qtquickdialogs $QT_VERSION
-
-qhp.QtQuickDialogs.subprojects = qtquickdialogsqmltypes
-qhp.QtQuickDialogs.subprojects.qtquickdialogsqmltypes.title = QML Types
-qhp.QtQuickDialogs.subprojects.qtquickdialogsqmltypes.indexTitle = Qt Quick Dialogs QML Types
-qhp.QtQuickDialogs.subprojects.qtquickdialogsqmltypes.selectors = fake:qmlclass
-qhp.QtQuickDialogs.subprojects.qtquickdialogsqmltypes.sortPages = true
-
-depends = qtqml qtquick qtgui qtwidgets qtdoc
-
-exampledirs += ../../../../examples/quick/dialogs
-
-examplesinstallpath = quick/dialogs
-
-headerdirs += ..
-
-sourcedirs += ..
-
-imagedirs += images
-
-excludedirs += ../qml
-
-navigation.landingpage = "Qt Quick Dialogs"
-navigation.qmltypespage = "Qt Quick Dialogs QML Types"
diff --git a/src/imports/dialogs/doc/src/qtquickdialogs-examples.qdoc b/src/imports/dialogs/doc/src/qtquickdialogs-examples.qdoc
deleted file mode 100644
index ee277f48dc..0000000000
--- a/src/imports/dialogs/doc/src/qtquickdialogs-examples.qdoc
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \group qtquickdialog_examples
- \ingroup qtquickexamples
- \title Qt Quick Examples - Dialogs
- \brief A Collection of examples for \l{Qt Quick Dialogs}, written in QML.
-
- These examples show how to use the \l{Qt Quick Dialogs}.
-*/
-
diff --git a/src/imports/dialogs/doc/src/qtquickdialogs-index.qdoc b/src/imports/dialogs/doc/src/qtquickdialogs-index.qdoc
deleted file mode 100644
index 5a1223b04d..0000000000
--- a/src/imports/dialogs/doc/src/qtquickdialogs-index.qdoc
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \group dialogs
- \title Dialogs
-*/
-
-/*!
- \page qtquickdialogs-index.html
- \title Qt Quick Dialogs
-
- \brief Qt Quick Dialogs submodule
-
- The module is new in Qt 5.1.
-
- \section1 Dialogs
-
- \annotatedlist dialogs
-
- \section1 Related information
-
- \section2 Examples
- \list
- \li \l{Qt Quick Examples - Dialogs}{Dialogs Examples}
- \endlist
-
- \section2 Reference
- \list
- \li \l{Qt Quick Dialogs QML Types}{QML Types}
- \endlist
-
-*/
-
diff --git a/src/imports/dialogs/images/checkers.png b/src/imports/dialogs/images/checkers.png
deleted file mode 100644
index 458d33de9d..0000000000
--- a/src/imports/dialogs/images/checkers.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/images/checkmark.png b/src/imports/dialogs/images/checkmark.png
deleted file mode 100644
index 821aafccdd..0000000000
--- a/src/imports/dialogs/images/checkmark.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/images/copy.png b/src/imports/dialogs/images/copy.png
deleted file mode 100644
index 2aeb28288f..0000000000
--- a/src/imports/dialogs/images/copy.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/images/critical.png b/src/imports/dialogs/images/critical.png
deleted file mode 100644
index dc9c5aebf4..0000000000
--- a/src/imports/dialogs/images/critical.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/images/crosshairs.png b/src/imports/dialogs/images/crosshairs.png
deleted file mode 100644
index 9a61946eca..0000000000
--- a/src/imports/dialogs/images/crosshairs.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/images/folder.png b/src/imports/dialogs/images/folder.png
deleted file mode 100644
index e53e2ad464..0000000000
--- a/src/imports/dialogs/images/folder.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/images/information.png b/src/imports/dialogs/images/information.png
deleted file mode 100644
index 0a2eb87d10..0000000000
--- a/src/imports/dialogs/images/information.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/images/question.png b/src/imports/dialogs/images/question.png
deleted file mode 100644
index 2dd92fd791..0000000000
--- a/src/imports/dialogs/images/question.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/images/slider_handle.png b/src/imports/dialogs/images/slider_handle.png
deleted file mode 100644
index e3b9654392..0000000000
--- a/src/imports/dialogs/images/slider_handle.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/images/sunken_frame.png b/src/imports/dialogs/images/sunken_frame.png
deleted file mode 100644
index 178c3092d2..0000000000
--- a/src/imports/dialogs/images/sunken_frame.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/images/up.png b/src/imports/dialogs/images/up.png
deleted file mode 100644
index b05f8025d0..0000000000
--- a/src/imports/dialogs/images/up.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/images/warning.png b/src/imports/dialogs/images/warning.png
deleted file mode 100644
index cba78f6bea..0000000000
--- a/src/imports/dialogs/images/warning.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/images/window_border.png b/src/imports/dialogs/images/window_border.png
deleted file mode 100644
index 431af8545d..0000000000
--- a/src/imports/dialogs/images/window_border.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/dialogs/plugin.cpp b/src/imports/dialogs/plugin.cpp
deleted file mode 100644
index 70e12093b6..0000000000
--- a/src/imports/dialogs/plugin.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtQml/qqml.h>
-#include <QtQml/qqmlextensionplugin.h>
-#include "qquickmessagedialog_p.h"
-#include "qquickabstractmessagedialog_p.h"
-#include "qquickdialogassets_p.h"
-#include "qquickplatformmessagedialog_p.h"
-#include "qquickfiledialog_p.h"
-#include "qquickabstractfiledialog_p.h"
-#include "qquickplatformfiledialog_p.h"
-#include "qquickcolordialog_p.h"
-#include "qquickabstractcolordialog_p.h"
-#include "qquickplatformcolordialog_p.h"
-#include "qquickfontdialog_p.h"
-#include "qquickabstractfontdialog_p.h"
-#include "qquickplatformfontdialog_p.h"
-#include <private/qguiapplication_p.h>
-#include <qpa/qplatformintegration.h>
-
-//#define PURE_QML_ONLY
-//#define DEBUG_REGISTRATION
-
-static void initResources()
-{
- Q_INIT_RESOURCE(dialogs);
-}
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmlmodule QtQuick.Dialogs 1.1
- \title Qt Quick Dialogs QML Types
- \ingroup qmlmodules
- \brief Provides QML types for standard file, color picker and message dialogs
-
- This QML module contains types for creating and interacting with system dialogs.
-
- To use the types in this module, import the module with the following line:
-
- \code
- import QtQuick.Dialogs 1.1
- \endcode
-*/
-
-class QtQuick2DialogsPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
-
-public:
- QtQuick2DialogsPlugin() : QQmlExtensionPlugin(), m_useResources(true) { }
-
- virtual void initializeEngine(QQmlEngine *engine, const char * uri) {
-#ifdef DEBUG_REGISTRATION
- qDebug() << Q_FUNC_INFO << uri << m_decorationComponentUrl;
-#else
- Q_UNUSED(uri)
-#endif
- QQuickAbstractDialog::m_decorationComponent =
- new QQmlComponent(engine, m_decorationComponentUrl, QQmlComponent::Asynchronous);
- }
-
- virtual void registerTypes(const char *uri) {
- initResources();
-
-#ifdef DEBUG_REGISTRATION
- qDebug() << Q_FUNC_INFO << uri;
-#endif
- Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Dialogs"));
- bool hasTopLevelWindows = QGuiApplicationPrivate::platformIntegration()->
- hasCapability(QPlatformIntegration::MultipleWindows);
- QDir qmlDir(baseUrl().toLocalFile());
- QDir widgetsDir(baseUrl().toLocalFile());
- // TODO: find the directory by searching rather than assuming a relative path
- widgetsDir.cd("../PrivateWidgets");
-
- // If at least one file was actually installed, then use installed qml files instead of resources.
- // This makes debugging and incremental development easier, whereas the "normal" installation
- // uses resources to save space and cut down on the number of files to deploy.
- if (qmlDir.exists(QString("DefaultFileDialog.qml")))
- m_useResources = false;
- m_decorationComponentUrl = m_useResources ?
- QUrl("qrc:/QtQuick/Dialogs/qml/DefaultWindowDecoration.qml") :
- QUrl::fromLocalFile(qmlDir.filePath(QString("qml/DefaultWindowDecoration.qml")));
-
- // Prefer the QPA dialog helpers if the platform supports them.
- // Else if there is a QWidget-based implementation, check whether it's
- // possible to instantiate it from Qt Quick.
- // Otherwise fall back to a pure-QML implementation.
-
- // MessageDialog
- qmlRegisterUncreatableType<QQuickStandardButton>(uri, 1, 1, "StandardButton",
- QLatin1String("Do not create objects of type StandardButton"));
- qmlRegisterUncreatableType<QQuickStandardIcon>(uri, 1, 1, "StandardIcon",
- QLatin1String("Do not create objects of type StandardIcon"));
-#ifndef PURE_QML_ONLY
- if (QGuiApplicationPrivate::platformTheme()->usePlatformNativeDialog(QPlatformTheme::MessageDialog))
- qmlRegisterType<QQuickPlatformMessageDialog>(uri, 1, 0, "MessageDialog");
- else
-#endif
- registerWidgetOrQmlImplementation<QQuickMessageDialog>(widgetsDir, qmlDir, "MessageDialog", uri, hasTopLevelWindows, 1, 1);
-
- // FileDialog
-#ifndef PURE_QML_ONLY
- if (QGuiApplicationPrivate::platformTheme()->usePlatformNativeDialog(QPlatformTheme::FileDialog))
- qmlRegisterType<QQuickPlatformFileDialog>(uri, 1, 0, "FileDialog");
- else
-#endif
- registerWidgetOrQmlImplementation<QQuickFileDialog>(widgetsDir, qmlDir, "FileDialog", uri, hasTopLevelWindows, 1, 0);
-
- // ColorDialog
-#ifndef PURE_QML_ONLY
- if (QGuiApplicationPrivate::platformTheme()->usePlatformNativeDialog(QPlatformTheme::ColorDialog))
- qmlRegisterType<QQuickPlatformColorDialog>(uri, 1, 0, "ColorDialog");
- else
-#endif
- registerWidgetOrQmlImplementation<QQuickColorDialog>(widgetsDir, qmlDir, "ColorDialog", uri, hasTopLevelWindows, 1, 0);
-
- // FontDialog
-#ifndef PURE_QML_ONLY
- if (QGuiApplicationPrivate::platformTheme()->usePlatformNativeDialog(QPlatformTheme::FontDialog))
- qmlRegisterType<QQuickPlatformFontDialog>(uri, 1, 1, "FontDialog");
- else
-#endif
- registerWidgetOrQmlImplementation<QQuickFontDialog>(widgetsDir, qmlDir, "FontDialog", uri, hasTopLevelWindows, 1, 1);
- }
-
-protected:
- template <class WrapperType>
- void registerWidgetOrQmlImplementation(QDir widgetsDir, QDir qmlDir,
- const char *qmlName, const char *uri, bool hasTopLevelWindows, int versionMajor, int versionMinor) {
- // qDebug() << "QtQuick2DialogsPlugin::registerWidgetOrQmlImplementation" << uri << qmlName << ": QML in" << qmlDir.absolutePath()
- // << "using resources?" << m_useResources << "; widgets in" << widgetsDir.absolutePath();
- bool needQmlImplementation = true;
-
-#ifdef PURE_QML_ONLY
- Q_UNUSED(widgetsDir)
- Q_UNUSED(hasTopLevelWindows)
-#else
- // If there is a qmldir and we have a QApplication instance (as opposed to a
- // widget-free QGuiApplication), assume that the widget-based dialog will work.
- if (hasTopLevelWindows && widgetsDir.exists("qmldir") &&
- QCoreApplication::instance()->inherits("QApplication")) {
- QUrl dialogQmlPath = m_useResources ?
- QUrl(QString("qrc:/QtQuick/Dialogs/Widget%1.qml").arg(qmlName)) :
- QUrl::fromLocalFile(qmlDir.filePath(QString("Widget%1.qml").arg(qmlName)));
- if (qmlRegisterType(dialogQmlPath, uri, versionMajor, versionMinor, qmlName) >= 0) {
- needQmlImplementation = false;
-#ifdef DEBUG_REGISTRATION
- qDebug() << " registering" << qmlName << " as " << dialogQmlPath << "success?" << !needQmlImplementation;
-#endif
- }
- }
-#endif
- if (needQmlImplementation) {
- QByteArray abstractTypeName = QByteArray("Abstract") + qmlName;
- qmlRegisterType<WrapperType>(uri, versionMajor, versionMinor, abstractTypeName); // implementation wrapper
- QUrl dialogQmlPath = m_useResources ?
- QUrl(QString("qrc:/QtQuick/Dialogs/Default%1.qml").arg(qmlName)) :
- QUrl::fromLocalFile(qmlDir.filePath(QString("Default%1.qml").arg(qmlName)));
-#ifdef DEBUG_REGISTRATION
- qDebug() << " registering" << qmlName << " as " << dialogQmlPath << "success?" <<
-#endif
- qmlRegisterType(dialogQmlPath, uri, versionMajor, versionMinor, qmlName);
- }
- }
-
- QUrl m_decorationComponentUrl;
- bool m_useResources;
-};
-
-QT_END_NAMESPACE
-
-#include "plugin.moc"
diff --git a/src/imports/dialogs/plugins.qmltypes b/src/imports/dialogs/plugins.qmltypes
deleted file mode 100644
index d5db4b93bd..0000000000
--- a/src/imports/dialogs/plugins.qmltypes
+++ /dev/null
@@ -1,654 +0,0 @@
-import QtQuick.tooling 1.1
-
-// This file describes the plugin-supplied types contained in the library.
-// It is used for QML tooling purposes only.
-//
-// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -omit-prefix=__ QtQuick.Dialogs 1.1'
-
-Module {
- Component {
- name: "QQuickAbstractColorDialog"
- prototype: "QQuickAbstractDialog"
- Property { name: "showAlphaChannel"; type: "bool" }
- Property { name: "color"; type: "QColor" }
- Property { name: "currentColor"; type: "QColor" }
- Property { name: "currentHue"; type: "double"; isReadonly: true }
- Property { name: "currentSaturation"; type: "double"; isReadonly: true }
- Property { name: "currentLightness"; type: "double"; isReadonly: true }
- Property { name: "currentAlpha"; type: "double"; isReadonly: true }
- Signal { name: "selectionAccepted" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
- }
- Method {
- name: "setModality"
- Parameter { name: "m"; type: "Qt::WindowModality" }
- }
- Method {
- name: "setTitle"
- Parameter { name: "t"; type: "string" }
- }
- Method {
- name: "setColor"
- Parameter { name: "arg"; type: "QColor" }
- }
- Method {
- name: "setCurrentColor"
- Parameter { name: "currentColor"; type: "QColor" }
- }
- Method {
- name: "setShowAlphaChannel"
- Parameter { name: "arg"; type: "bool" }
- }
- }
- Component {
- name: "QQuickAbstractDialog"
- prototype: "QObject"
- Property { name: "visible"; type: "bool" }
- Property { name: "modality"; type: "Qt::WindowModality" }
- Property { name: "title"; type: "string" }
- Property { name: "isWindow"; type: "bool"; isReadonly: true }
- Property { name: "x"; type: "int" }
- Property { name: "y"; type: "int" }
- Property { name: "width"; type: "int" }
- Property { name: "height"; type: "int" }
- Signal { name: "visibilityChanged" }
- Signal { name: "geometryChanged" }
- Signal { name: "accepted" }
- Signal { name: "rejected" }
- Method { name: "open" }
- Method { name: "close" }
- Method {
- name: "setX"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setY"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setWidth"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setHeight"
- Parameter { name: "arg"; type: "int" }
- }
- }
- Component {
- name: "QQuickAbstractFileDialog"
- prototype: "QQuickAbstractDialog"
- Property { name: "selectExisting"; type: "bool" }
- Property { name: "selectMultiple"; type: "bool" }
- Property { name: "selectFolder"; type: "bool" }
- Property { name: "folder"; type: "QUrl" }
- Property { name: "nameFilters"; type: "QStringList" }
- Property { name: "selectedNameFilter"; type: "string" }
- Property { name: "fileUrl"; type: "QUrl"; isReadonly: true }
- Property { name: "fileUrls"; type: "QList<QUrl>"; isReadonly: true }
- Signal { name: "filterSelected" }
- Signal { name: "fileModeChanged" }
- Signal { name: "selectionAccepted" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
- }
- Method {
- name: "setTitle"
- Parameter { name: "t"; type: "string" }
- }
- Method {
- name: "setSelectExisting"
- Parameter { name: "s"; type: "bool" }
- }
- Method {
- name: "setSelectMultiple"
- Parameter { name: "s"; type: "bool" }
- }
- Method {
- name: "setSelectFolder"
- Parameter { name: "s"; type: "bool" }
- }
- Method {
- name: "setFolder"
- Parameter { name: "f"; type: "QUrl" }
- }
- Method {
- name: "setNameFilters"
- Parameter { name: "f"; type: "QStringList" }
- }
- Method {
- name: "selectNameFilter"
- Parameter { name: "f"; type: "string" }
- }
- }
- Component {
- name: "QQuickAbstractFontDialog"
- prototype: "QQuickAbstractDialog"
- Property { name: "scalableFonts"; type: "bool" }
- Property { name: "nonScalableFonts"; type: "bool" }
- Property { name: "monospacedFonts"; type: "bool" }
- Property { name: "proportionalFonts"; type: "bool" }
- Property { name: "font"; type: "QFont" }
- Signal { name: "selectionAccepted" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
- }
- Method {
- name: "setModality"
- Parameter { name: "m"; type: "Qt::WindowModality" }
- }
- Method {
- name: "setTitle"
- Parameter { name: "t"; type: "string" }
- }
- Method {
- name: "setFont"
- Parameter { name: "arg"; type: "QFont" }
- }
- Method {
- name: "setScalableFonts"
- Parameter { name: "arg"; type: "bool" }
- }
- Method {
- name: "setNonScalableFonts"
- Parameter { name: "arg"; type: "bool" }
- }
- Method {
- name: "setMonospacedFonts"
- Parameter { name: "arg"; type: "bool" }
- }
- Method {
- name: "setProportionalFonts"
- Parameter { name: "arg"; type: "bool" }
- }
- }
- Component {
- name: "QQuickAbstractMessageDialog"
- prototype: "QQuickAbstractDialog"
- Enum {
- name: "Icon"
- values: {
- "NoIcon": 0,
- "Information": 1,
- "Warning": 2,
- "Critical": 3,
- "Question": 4
- }
- }
- Enum {
- name: "StandardButton"
- values: {
- "NoButton": 0,
- "Ok": 1024,
- "Save": 2048,
- "SaveAll": 4096,
- "Open": 8192,
- "Yes": 16384,
- "YesToAll": 32768,
- "No": 65536,
- "NoToAll": 131072,
- "Abort": 262144,
- "Retry": 524288,
- "Ignore": 1048576,
- "Close": 2097152,
- "Cancel": 4194304,
- "Discard": 8388608,
- "Help": 16777216,
- "Apply": 33554432,
- "Reset": 67108864,
- "RestoreDefaults": 134217728
- }
- }
- Enum {
- name: "StandardButtons"
- values: {
- "NoButton": 0,
- "Ok": 1024,
- "Save": 2048,
- "SaveAll": 4096,
- "Open": 8192,
- "Yes": 16384,
- "YesToAll": 32768,
- "No": 65536,
- "NoToAll": 131072,
- "Abort": 262144,
- "Retry": 524288,
- "Ignore": 1048576,
- "Close": 2097152,
- "Cancel": 4194304,
- "Discard": 8388608,
- "Help": 16777216,
- "Apply": 33554432,
- "Reset": 67108864,
- "RestoreDefaults": 134217728
- }
- }
- Property { name: "text"; type: "string" }
- Property { name: "informativeText"; type: "string" }
- Property { name: "detailedText"; type: "string" }
- Property { name: "icon"; type: "Icon" }
- Property { name: "standardIconSource"; type: "QUrl"; isReadonly: true }
- Property { name: "standardButtons"; type: "StandardButtons" }
- Property { name: "clickedButton"; type: "StandardButton"; isReadonly: true }
- Signal { name: "buttonClicked" }
- Signal { name: "discard" }
- Signal { name: "help" }
- Signal { name: "yes" }
- Signal { name: "no" }
- Signal { name: "apply" }
- Signal { name: "reset" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
- }
- Method {
- name: "setTitle"
- Parameter { name: "arg"; type: "string" }
- }
- Method {
- name: "setText"
- Parameter { name: "arg"; type: "string" }
- }
- Method {
- name: "setInformativeText"
- Parameter { name: "arg"; type: "string" }
- }
- Method {
- name: "setDetailedText"
- Parameter { name: "arg"; type: "string" }
- }
- Method {
- name: "setIcon"
- Parameter { name: "icon"; type: "Icon" }
- }
- Method {
- name: "setStandardButtons"
- Parameter { name: "buttons"; type: "StandardButtons" }
- }
- Method {
- name: "click"
- Parameter { name: "button"; type: "QMessageDialogOptions::StandardButton" }
- Parameter { type: "QMessageDialogOptions::ButtonRole" }
- }
- Method {
- name: "click"
- Parameter { name: "button"; type: "QQuickAbstractMessageDialog::StandardButton" }
- }
- }
- Component {
- name: "QQuickColorDialog"
- defaultProperty: "implementation"
- prototype: "QQuickAbstractColorDialog"
- exports: ["QtQuick.Dialogs/AbstractColorDialog 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "implementation"; type: "QObject"; isPointer: true }
- }
- Component {
- name: "QQuickFileDialog"
- defaultProperty: "implementation"
- prototype: "QQuickAbstractFileDialog"
- exports: ["QtQuick.Dialogs/AbstractFileDialog 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "implementation"; type: "QObject"; isPointer: true }
- Method { name: "clearSelection" }
- Method {
- name: "addSelection"
- type: "bool"
- Parameter { name: "path"; type: "QUrl" }
- }
- }
- Component {
- name: "QQuickFontDialog"
- defaultProperty: "implementation"
- prototype: "QQuickAbstractFontDialog"
- exports: ["QtQuick.Dialogs/AbstractFontDialog 1.1"]
- exportMetaObjectRevisions: [0]
- Property { name: "implementation"; type: "QObject"; isPointer: true }
- }
- Component {
- name: "QQuickMessageDialog"
- defaultProperty: "implementation"
- prototype: "QQuickAbstractMessageDialog"
- exports: ["QtQuick.Dialogs/AbstractMessageDialog 1.1"]
- exportMetaObjectRevisions: [0]
- Property { name: "implementation"; type: "QObject"; isPointer: true }
- }
- Component {
- name: "QQuickStandardButton"
- exports: ["QtQuick.Dialogs/StandardButton 1.1"]
- exportMetaObjectRevisions: [0]
- }
- Component {
- name: "QQuickStandardIcon"
- exports: ["QtQuick.Dialogs/StandardIcon 1.1"]
- exportMetaObjectRevisions: [0]
- }
- Component {
- prototype: "QObject"
- name: "QtQuick.Dialogs/ColorDialog"
- exports: ["QtQuick.Dialogs/ColorDialog 1.0"]
- exportMetaObjectRevisions: [0]
- defaultProperty: "implementation"
- Property { name: "showAlphaChannel"; type: "bool" }
- Property { name: "color"; type: "QColor" }
- Property { name: "currentColor"; type: "QColor" }
- Property { name: "currentHue"; type: "double"; isReadonly: true }
- Property { name: "currentSaturation"; type: "double"; isReadonly: true }
- Property { name: "currentLightness"; type: "double"; isReadonly: true }
- Property { name: "currentAlpha"; type: "double"; isReadonly: true }
- Signal { name: "selectionAccepted" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
- }
- Method {
- name: "setModality"
- Parameter { name: "m"; type: "Qt::WindowModality" }
- }
- Method {
- name: "setTitle"
- Parameter { name: "t"; type: "string" }
- }
- Method {
- name: "setColor"
- Parameter { name: "arg"; type: "QColor" }
- }
- Method {
- name: "setCurrentColor"
- Parameter { name: "currentColor"; type: "QColor" }
- }
- Method {
- name: "setShowAlphaChannel"
- Parameter { name: "arg"; type: "bool" }
- }
- Property { name: "visible"; type: "bool" }
- Property { name: "modality"; type: "Qt::WindowModality" }
- Property { name: "title"; type: "string" }
- Property { name: "isWindow"; type: "bool"; isReadonly: true }
- Property { name: "x"; type: "int" }
- Property { name: "y"; type: "int" }
- Property { name: "width"; type: "int" }
- Property { name: "height"; type: "int" }
- Signal { name: "visibilityChanged" }
- Signal { name: "geometryChanged" }
- Signal { name: "accepted" }
- Signal { name: "rejected" }
- Method { name: "open" }
- Method { name: "close" }
- Method {
- name: "setX"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setY"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setWidth"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setHeight"
- Parameter { name: "arg"; type: "int" }
- }
- Property { name: "implementation"; type: "QObject"; isPointer: true }
- }
- Component {
- prototype: "QObject"
- name: "QtQuick.Dialogs/FileDialog"
- exports: ["QtQuick.Dialogs/FileDialog 1.0"]
- exportMetaObjectRevisions: [0]
- defaultProperty: "implementation"
- Property { name: "visible"; type: "bool" }
- Property { name: "modality"; type: "Qt::WindowModality" }
- Property { name: "title"; type: "string" }
- Property { name: "isWindow"; type: "bool"; isReadonly: true }
- Property { name: "x"; type: "int" }
- Property { name: "y"; type: "int" }
- Property { name: "width"; type: "int" }
- Property { name: "height"; type: "int" }
- Signal { name: "visibilityChanged" }
- Signal { name: "geometryChanged" }
- Signal { name: "accepted" }
- Signal { name: "rejected" }
- Method { name: "open" }
- Method { name: "close" }
- Method {
- name: "setX"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setY"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setWidth"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setHeight"
- Parameter { name: "arg"; type: "int" }
- }
- Property { name: "selectExisting"; type: "bool" }
- Property { name: "selectMultiple"; type: "bool" }
- Property { name: "selectFolder"; type: "bool" }
- Property { name: "folder"; type: "QUrl" }
- Property { name: "nameFilters"; type: "QStringList" }
- Property { name: "selectedNameFilter"; type: "string" }
- Property { name: "fileUrl"; type: "QUrl"; isReadonly: true }
- Property { name: "fileUrls"; type: "QList<QUrl>"; isReadonly: true }
- Signal { name: "filterSelected" }
- Signal { name: "fileModeChanged" }
- Signal { name: "selectionAccepted" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
- }
- Method {
- name: "setTitle"
- Parameter { name: "t"; type: "string" }
- }
- Method {
- name: "setSelectExisting"
- Parameter { name: "s"; type: "bool" }
- }
- Method {
- name: "setSelectMultiple"
- Parameter { name: "s"; type: "bool" }
- }
- Method {
- name: "setSelectFolder"
- Parameter { name: "s"; type: "bool" }
- }
- Method {
- name: "setFolder"
- Parameter { name: "f"; type: "QUrl" }
- }
- Method {
- name: "setNameFilters"
- Parameter { name: "f"; type: "QStringList" }
- }
- Method {
- name: "selectNameFilter"
- Parameter { name: "f"; type: "string" }
- }
- Property { name: "implementation"; type: "QObject"; isPointer: true }
- Method { name: "clearSelection" }
- Method {
- name: "addSelection"
- type: "bool"
- Parameter { name: "path"; type: "QUrl" }
- }
- }
- Component {
- prototype: "QObject"
- name: "QtQuick.Dialogs/FontDialog"
- exports: ["QtQuick.Dialogs/FontDialog 1.1"]
- exportMetaObjectRevisions: [1]
- defaultProperty: "implementation"
- Property { name: "font"; type: "QFont" }
- Property { name: "visible"; type: "bool" }
- Property { name: "modality"; type: "Qt::WindowModality" }
- Property { name: "title"; type: "string" }
- Property { name: "isWindow"; type: "bool"; isReadonly: true }
- Property { name: "x"; type: "int" }
- Property { name: "y"; type: "int" }
- Property { name: "width"; type: "int" }
- Property { name: "height"; type: "int" }
- Signal { name: "visibilityChanged" }
- Signal { name: "geometryChanged" }
- Signal { name: "accepted" }
- Signal { name: "rejected" }
- Method { name: "open" }
- Method { name: "close" }
- Method {
- name: "setX"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setY"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setWidth"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setHeight"
- Parameter { name: "arg"; type: "int" }
- }
- Property { name: "scalableFonts"; type: "bool" }
- Property { name: "nonScalableFonts"; type: "bool" }
- Property { name: "monospacedFonts"; type: "bool" }
- Property { name: "proportionalFonts"; type: "bool" }
- Property { name: "font"; type: "QFont" }
- Signal { name: "selectionAccepted" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
- }
- Method {
- name: "setModality"
- Parameter { name: "m"; type: "Qt::WindowModality" }
- }
- Method {
- name: "setTitle"
- Parameter { name: "t"; type: "string" }
- }
- Method {
- name: "setFont"
- Parameter { name: "arg"; type: "QFont" }
- }
- Method {
- name: "setScalableFonts"
- Parameter { name: "arg"; type: "bool" }
- }
- Method {
- name: "setNonScalableFonts"
- Parameter { name: "arg"; type: "bool" }
- }
- Method {
- name: "setMonospacedFonts"
- Parameter { name: "arg"; type: "bool" }
- }
- Method {
- name: "setProportionalFonts"
- Parameter { name: "arg"; type: "bool" }
- }
- Property { name: "implementation"; type: "QObject"; isPointer: true }
- }
- Component {
- prototype: "QObject"
- name: "QtQuick.Dialogs/MessageDialog"
- exports: ["QtQuick.Dialogs/MessageDialog 1.1"]
- exportMetaObjectRevisions: [1]
- defaultProperty: "implementation"
- Method { name: "calculateImplicitWidth"; type: "QVariant" }
- Property { name: "visible"; type: "bool" }
- Property { name: "modality"; type: "Qt::WindowModality" }
- Property { name: "title"; type: "string" }
- Property { name: "isWindow"; type: "bool"; isReadonly: true }
- Property { name: "x"; type: "int" }
- Property { name: "y"; type: "int" }
- Property { name: "width"; type: "int" }
- Property { name: "height"; type: "int" }
- Signal { name: "visibilityChanged" }
- Signal { name: "geometryChanged" }
- Signal { name: "accepted" }
- Signal { name: "rejected" }
- Method { name: "open" }
- Method { name: "close" }
- Method {
- name: "setX"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setY"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setWidth"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setHeight"
- Parameter { name: "arg"; type: "int" }
- }
- Property { name: "text"; type: "string" }
- Property { name: "informativeText"; type: "string" }
- Property { name: "detailedText"; type: "string" }
- Property { name: "icon"; type: "Icon" }
- Property { name: "standardIconSource"; type: "QUrl"; isReadonly: true }
- Property { name: "standardButtons"; type: "StandardButtons" }
- Property { name: "clickedButton"; type: "StandardButton"; isReadonly: true }
- Signal { name: "buttonClicked" }
- Signal { name: "discard" }
- Signal { name: "help" }
- Signal { name: "yes" }
- Signal { name: "no" }
- Signal { name: "apply" }
- Signal { name: "reset" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
- }
- Method {
- name: "setTitle"
- Parameter { name: "arg"; type: "string" }
- }
- Method {
- name: "setText"
- Parameter { name: "arg"; type: "string" }
- }
- Method {
- name: "setInformativeText"
- Parameter { name: "arg"; type: "string" }
- }
- Method {
- name: "setDetailedText"
- Parameter { name: "arg"; type: "string" }
- }
- Method {
- name: "setIcon"
- Parameter { name: "icon"; type: "Icon" }
- }
- Method {
- name: "setStandardButtons"
- Parameter { name: "buttons"; type: "StandardButtons" }
- }
- Method {
- name: "click"
- Parameter { name: "button"; type: "QMessageDialogOptions::StandardButton" }
- Parameter { type: "QMessageDialogOptions::ButtonRole" }
- }
- Method {
- name: "click"
- Parameter { name: "button"; type: "QQuickAbstractMessageDialog::StandardButton" }
- }
- Property { name: "implementation"; type: "QObject"; isPointer: true }
- }
-}
diff --git a/src/imports/dialogs/qml/Button.qml b/src/imports/dialogs/qml/Button.qml
deleted file mode 100644
index f48264d5ff..0000000000
--- a/src/imports/dialogs/qml/Button.qml
+++ /dev/null
@@ -1,86 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.1
-import QtQuick.Window 2.1
-
-Item {
- id: container
-
- property alias text: buttonLabel.text
- property alias label: buttonLabel
- signal clicked
- property alias containsMouse: mouseArea.containsMouse
- property alias pressed: mouseArea.pressed
- implicitHeight: Math.max(Screen.pixelDensity * 7, buttonLabel.implicitHeight * 1.2)
- implicitWidth: visible ? Math.max(Screen.pixelDensity * 11, buttonLabel.implicitWidth * 1.3) : 0
- height: implicitHeight
- width: implicitWidth
-
- SystemPalette { id: palette }
-
- Rectangle {
- id: frame
- anchors.fill: parent
- color: palette.button
- gradient: Gradient {
- GradientStop { position: 0.0; color: mouseArea.pressed ? Qt.darker(palette.button, 1.3) : palette.button }
- GradientStop { position: 1.0; color: Qt.darker(palette.button, 1.3) }
- }
- antialiasing: true
- radius: height / 6
- border.color: Qt.darker(palette.button, 1.5)
- border.width: 1
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: container.clicked()
- hoverEnabled: true
- }
-
- Text {
- id: buttonLabel
- text: container.text
- color: palette.buttonText
- anchors.centerIn: parent
- }
-}
diff --git a/src/imports/dialogs/qml/CheckBox.qml b/src/imports/dialogs/qml/CheckBox.qml
deleted file mode 100644
index 32b0e6ff70..0000000000
--- a/src/imports/dialogs/qml/CheckBox.qml
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.1
-
-Item {
- id: root
- implicitHeight: frame.height
- implicitWidth: row.implicitWidth
- width: implicitWidth
- height: implicitHeight
- property alias text: label.text
- property bool checked
- property alias pressed: mouseArea.pressed
- signal clicked
-
- SystemPalette { id: palette }
-
- Row {
- id: row
- anchors.verticalCenter: parent.verticalCenter
- spacing: 6
- Rectangle {
- id: frame
- gradient: Gradient {
- GradientStop { position: 0.0; color: mouseArea.pressed ? Qt.darker(palette.button, 1.3) : palette.button }
- GradientStop { position: 1.0; color: Qt.darker(palette.button, 1.3) }
- }
- height: label.implicitHeight * 1.5
- width: height
- anchors.margins: 1
- radius: 3
- antialiasing: true
- border.color: Qt.darker(palette.button, 1.5)
- Image {
- id: theX
- source: "../images/checkmark.png"
- anchors.fill: frame
- anchors.margins: frame.width / 5
- fillMode: Image.PreserveAspectFit
- smooth: true
- visible: checked
- }
- }
- Text {
- id: label
- color: palette.text
- anchors.verticalCenter: frame.verticalCenter
- }
- }
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: {
- parent.checked = !parent.checked
- parent.clicked()
- }
- }
-}
diff --git a/src/imports/dialogs/qml/ColorSlider.qml b/src/imports/dialogs/qml/ColorSlider.qml
deleted file mode 100755
index 8fc9717380..0000000000
--- a/src/imports/dialogs/qml/ColorSlider.qml
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.1
-
-Item {
- id: colorSlider
-
- property real value: 1
- property real maximum: 1
- property real minimum: 0
- property string text: ""
- property bool pressed: mouseArea.pressed
- property bool integer: false
- property Component trackDelegate
- property string handleSource: "../images/slider_handle.png"
-
- width: parent.width
- height: handle.height + textText.implicitHeight
-
- function updatePos() {
- if (maximum > minimum) {
- var pos = (track.width - 10) * (value - minimum) / (maximum - minimum) + 5;
- return Math.min(Math.max(pos, 5), track.width - 5) - 10;
- } else {
- return 5;
- }
- }
-
- SystemPalette { id: palette }
-
- Column {
- id: column
- width: parent.width
- spacing: 12
- Text {
- id: textText
- anchors.horizontalCenter: parent.horizontalCenter
- text: colorSlider.text
- anchors.left: parent.left
- color: palette.windowText
- }
-
- Item {
- id: track
- height: 8
- anchors.left: parent.left
- anchors.right: parent.right
-
- Loader {
- sourceComponent: trackDelegate
- width: parent.height
- height: parent.width
- y: width
- }
-
- BorderImage {
- source: "../images/sunken_frame.png"
- border.left: 8
- border.right: 8
- border.top:8
- border.bottom: 8
- anchors.fill: track
- anchors.margins: -1
- anchors.topMargin: -2
- anchors.leftMargin: -2
- }
-
- Image {
- id: handle
- anchors.verticalCenter: parent.verticalCenter
- smooth: true
- source: "../images/slider_handle.png"
- x: updatePos() - 8
- z: 1
- }
-
- MouseArea {
- id: mouseArea
- anchors {left: parent.left; right: parent.right; verticalCenter: parent.verticalCenter}
- height: handle.height
- width: handle.width
- preventStealing: true
-
- onPressed: {
- var handleX = Math.max(0, Math.min(mouseX, mouseArea.width))
- var realValue = (maximum - minimum) * handleX / mouseArea.width + minimum;
- value = colorSlider.integer ? Math.round(realValue) : realValue;
- }
-
- onPositionChanged: {
- if (pressed) {
- var handleX = Math.max(0, Math.min(mouseX, mouseArea.width))
- var realValue = (maximum - minimum) * handleX / mouseArea.width + minimum;
- value = colorSlider.integer ? Math.round(realValue) : realValue;
- }
- }
- }
- }
- }
-}
diff --git a/src/imports/dialogs/qml/DefaultWindowDecoration.qml b/src/imports/dialogs/qml/DefaultWindowDecoration.qml
deleted file mode 100644
index ec930101d2..0000000000
--- a/src/imports/dialogs/qml/DefaultWindowDecoration.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.1
-
-Rectangle {
- color: "#80000000"
- anchors.fill: parent
- z: 1000000
- property alias content: borderImage.content
- property bool dismissOnOuterClick: true
- signal dismissed
- MouseArea {
- anchors.fill: parent
- enabled: dismissOnOuterClick
- onClicked: dismissed()
- BorderImage {
- id: borderImage
- property Item content
-
- MouseArea { anchors.fill: parent }
-
- width: content ? content.width + 15 : 0
- height: content ? content.height + 15 : 0
- onWidthChanged: content.x = 5
- onHeightChanged: content.y = 5
- border { left: 10; top: 10; right: 10; bottom: 10 }
- clip: true
- source: "../images/window_border.png"
- anchors.centerIn: parent
- onContentChanged: if (content) content.parent = borderImage
- }
- }
-}
diff --git a/src/imports/dialogs/qml/EdgeFade.qml b/src/imports/dialogs/qml/EdgeFade.qml
deleted file mode 100644
index 376aa151e6..0000000000
--- a/src/imports/dialogs/qml/EdgeFade.qml
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.1
-
-ShaderEffect {
- property color fadeColor
- property real topThreshold: 10
- property real bottomThreshold: 10
- property real _topRatio: topThreshold / height
- property real _bottomRatio: bottomThreshold / height
- z: 1
- fragmentShader: "
- varying lowp vec2 qt_TexCoord0;
- uniform lowp vec4 fadeColor;
- uniform highp float _topRatio;
- uniform highp float _bottomRatio;
-
- void main() {
- highp float bottomEnd = 1. - _bottomRatio;
- gl_FragColor = fadeColor *
- (qt_TexCoord0.y < _topRatio ? 1. - qt_TexCoord0.y / _topRatio :
- (qt_TexCoord0.y > bottomEnd ? (qt_TexCoord0.y - bottomEnd) / _bottomRatio : 0.));
- }
- "
-}
diff --git a/src/imports/dialogs/qml/TextField.qml b/src/imports/dialogs/qml/TextField.qml
deleted file mode 100644
index e67155086c..0000000000
--- a/src/imports/dialogs/qml/TextField.qml
+++ /dev/null
@@ -1,89 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.1
-
-Item {
- id: root
-
- property alias textInput: textInput
- property alias text: textInput.text
- signal accepted
- signal downPressed
- signal backPressed
- signal escapePressed
- implicitWidth: textInput.implicitWidth + rect.radius * 2
- implicitHeight: textInput.implicitHeight
-
- function copyAll() {
- textInput.selectAll()
- textInput.copy()
- }
-
- function paste() {
- textInput.selectAll()
- textInput.paste()
- }
-
- SystemPalette { id: palette }
- height: textInput.implicitHeight + 8
- clip: true
-
- Rectangle {
- id: rect
- anchors.fill: parent
- radius: height / 4
- color: palette.button
- border.color: Qt.darker(palette.button, 1.5)
- }
-
- TextInput {
- id: textInput
- color: palette.text
- anchors.fill: parent
- anchors.leftMargin: rect.radius
- anchors.rightMargin: rect.radius
- verticalAlignment: Text.AlignVCenter
- onAccepted: root.accepted()
- Keys.onDownPressed: root.downPressed()
- Keys.onBackPressed: root.backPressed()
- Keys.onEscapePressed: root.escapePressed()
- }
-}
diff --git a/src/imports/dialogs/qml/qmldir b/src/imports/dialogs/qml/qmldir
deleted file mode 100644
index 9d273b1c4b..0000000000
--- a/src/imports/dialogs/qml/qmldir
+++ /dev/null
@@ -1,5 +0,0 @@
-Button 1.0 Button.qml
-CheckBox 1.1 CheckBox.qml
-ColorSlider 1.0 ColorSlider.qml
-EdgeFade 1.0 EdgeFade.qml
-TextField 1.0 TextField.qml
diff --git a/src/imports/dialogs/qmldir b/src/imports/dialogs/qmldir
deleted file mode 100644
index b4ae1a059c..0000000000
--- a/src/imports/dialogs/qmldir
+++ /dev/null
@@ -1,4 +0,0 @@
-module QtQuick.Dialogs
-plugin dialogplugin
-classname QtQuick2DialogsPlugin
-typeinfo plugins.qmltypes
diff --git a/src/imports/dialogs/qquickabstractcolordialog.cpp b/src/imports/dialogs/qquickabstractcolordialog.cpp
deleted file mode 100644
index 1931bde905..0000000000
--- a/src/imports/dialogs/qquickabstractcolordialog.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickabstractcolordialog_p.h"
-#include "qquickitem.h"
-
-#include <private/qguiapplication_p.h>
-#include <QWindow>
-#include <QQuickWindow>
-
-QT_BEGIN_NAMESPACE
-
-QQuickAbstractColorDialog::QQuickAbstractColorDialog(QObject *parent)
- : QQuickAbstractDialog(parent)
- , m_dlgHelper(0)
- , m_options(QSharedPointer<QColorDialogOptions>(new QColorDialogOptions()))
-{
- // On the Mac, modality doesn't work unless you call exec(). But this is a reasonable default anyway.
- m_modality = Qt::NonModal;
- connect(this, SIGNAL(accepted()), this, SIGNAL(selectionAccepted()));
-}
-
-QQuickAbstractColorDialog::~QQuickAbstractColorDialog()
-{
-}
-
-void QQuickAbstractColorDialog::setVisible(bool v)
-{
- if (helper() && v) {
- m_dlgHelper->setOptions(m_options);
- // Due to the fact that QColorDialogOptions doesn't have currentColor...
- m_dlgHelper->setCurrentColor(m_color);
- }
- QQuickAbstractDialog::setVisible(v);
- // QTBUG-35206
-#if defined(Q_OS_WIN)
- if (m_dialogWindow)
- m_dialogWindow->setWidth(m_dialogWindow->width() + 1);
-#endif
-}
-
-void QQuickAbstractColorDialog::setModality(Qt::WindowModality m)
-{
-#ifdef Q_OS_MAC
- // On the Mac, modality doesn't work unless you call exec()
- m_modality = Qt::NonModal;
- emit modalityChanged();
- return;
-#endif
- QQuickAbstractDialog::setModality(m);
-}
-
-QString QQuickAbstractColorDialog::title() const
-{
- return m_options->windowTitle();
-}
-
-bool QQuickAbstractColorDialog::showAlphaChannel() const
-{
- return m_options->testOption(QColorDialogOptions::ShowAlphaChannel);
-}
-
-void QQuickAbstractColorDialog::setTitle(const QString &t)
-{
- if (m_options->windowTitle() == t) return;
- m_options->setWindowTitle(t);
- emit titleChanged();
-}
-
-void QQuickAbstractColorDialog::setColor(QColor arg)
-{
- if (m_dlgHelper)
- m_dlgHelper->setCurrentColor(arg);
- // m_options->setCustomColor or setStandardColor don't make sense here
- if (m_color != arg) {
- m_color = arg;
- emit colorChanged();
- }
- setCurrentColor(arg);
-}
-
-void QQuickAbstractColorDialog::setCurrentColor(QColor currentColor)
-{
- if (m_currentColor != currentColor) {
- m_currentColor = currentColor;
- emit currentColorChanged();
- }
-}
-
-void QQuickAbstractColorDialog::setShowAlphaChannel(bool arg)
-{
- m_options->setOption(QColorDialogOptions::ShowAlphaChannel, arg);
- emit showAlphaChannelChanged();
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/dialogs/qquickabstractcolordialog_p.h b/src/imports/dialogs/qquickabstractcolordialog_p.h
deleted file mode 100644
index ad2c7ce1ed..0000000000
--- a/src/imports/dialogs/qquickabstractcolordialog_p.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKABSTRACTCOLORDIALOG_P_H
-#define QQUICKABSTRACTCOLORDIALOG_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtQml>
-#include <QQuickView>
-#include <QtGui/qpa/qplatformdialoghelper.h>
-#include <qpa/qplatformtheme.h>
-#include "qquickabstractdialog_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickAbstractColorDialog : public QQuickAbstractDialog
-{
- Q_OBJECT
- Q_PROPERTY(bool showAlphaChannel READ showAlphaChannel WRITE setShowAlphaChannel NOTIFY showAlphaChannelChanged)
- Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
- Q_PROPERTY(QColor currentColor READ currentColor WRITE setCurrentColor NOTIFY currentColorChanged)
- Q_PROPERTY(qreal currentHue READ currentHue NOTIFY currentColorChanged)
- Q_PROPERTY(qreal currentSaturation READ currentSaturation NOTIFY currentColorChanged)
- Q_PROPERTY(qreal currentLightness READ currentLightness NOTIFY currentColorChanged)
- Q_PROPERTY(qreal currentAlpha READ currentAlpha NOTIFY currentColorChanged)
-
-public:
- QQuickAbstractColorDialog(QObject *parent = 0);
- virtual ~QQuickAbstractColorDialog();
-
- virtual QString title() const;
- bool showAlphaChannel() const;
- QColor color() const { return m_color; }
- QColor currentColor() const { return m_currentColor; }
- qreal currentHue() const { return m_currentColor.hslHueF(); }
- qreal currentSaturation() const { return m_currentColor.hslSaturationF(); }
- qreal currentLightness() const { return m_currentColor.lightnessF(); }
- qreal currentAlpha() const { return m_currentColor.alphaF(); }
-
-public Q_SLOTS:
- void setVisible(bool v);
- void setModality(Qt::WindowModality m);
- void setTitle(const QString &t);
- void setColor(QColor arg);
- void setCurrentColor(QColor currentColor);
- void setShowAlphaChannel(bool arg);
-
-Q_SIGNALS:
- void showAlphaChannelChanged();
- void colorChanged();
- void currentColorChanged();
- void selectionAccepted();
-
-protected:
- QPlatformColorDialogHelper *m_dlgHelper;
- QSharedPointer<QColorDialogOptions> m_options;
- QColor m_color;
- QColor m_currentColor;
-
- Q_DISABLE_COPY(QQuickAbstractColorDialog)
-};
-
-QT_END_NAMESPACE
-
-#endif // QQUICKABSTRACTCOLORDIALOG_P_H
diff --git a/src/imports/dialogs/qquickabstractdialog.cpp b/src/imports/dialogs/qquickabstractdialog.cpp
deleted file mode 100644
index 9bb2388741..0000000000
--- a/src/imports/dialogs/qquickabstractdialog.cpp
+++ /dev/null
@@ -1,337 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickabstractdialog_p.h"
-#include "qquickitem.h"
-
-#include <private/qguiapplication_p.h>
-#include <QWindow>
-#include <QQmlComponent>
-#include <QQuickWindow>
-#include <qpa/qplatformintegration.h>
-
-QT_BEGIN_NAMESPACE
-
-QQmlComponent *QQuickAbstractDialog::m_decorationComponent(0);
-
-QQuickAbstractDialog::QQuickAbstractDialog(QObject *parent)
- : QObject(parent)
- , m_parentWindow(0)
- , m_visible(false)
- , m_modality(Qt::WindowModal)
- , m_qmlImplementation(0)
- , m_dialogWindow(0)
- , m_contentItem(0)
- , m_windowDecoration(0)
- , m_hasNativeWindows(QGuiApplicationPrivate::platformIntegration()->
- hasCapability(QPlatformIntegration::MultipleWindows) &&
- QGuiApplicationPrivate::platformIntegration()->
- hasCapability(QPlatformIntegration::WindowManagement))
- , m_hasAspiredPosition(false)
-{
-}
-
-QQuickAbstractDialog::~QQuickAbstractDialog()
-{
-}
-
-void QQuickAbstractDialog::setVisible(bool v)
-{
- if (m_visible == v) return;
- m_visible = v;
- if (helper()) {
- if (v) {
- Qt::WindowFlags flags = Qt::Dialog;
- if (!title().isEmpty())
- flags |= Qt::WindowTitleHint;
- m_visible = helper()->show(flags, m_modality, parentWindow());
- } else {
- helper()->hide();
- }
- } else {
- // For a pure QML implementation, there is no helper.
- // But m_implementation is probably either an Item or a Window at this point.
- if (!m_dialogWindow) {
- m_dialogWindow = qobject_cast<QWindow *>(m_qmlImplementation);
- if (!m_dialogWindow) {
- m_contentItem = qobject_cast<QQuickItem *>(m_qmlImplementation);
- if (m_contentItem) {
- if (m_hasNativeWindows)
- m_dialogWindow = m_contentItem->window();
- // An Item-based dialog implementation doesn't come with a window, so
- // we have to instantiate one iff the platform allows it.
- if (!m_dialogWindow && m_hasNativeWindows) {
- QQuickWindow *win = new QQuickWindow;
- ((QObject *)win)->setParent(this); // memory management only
- m_dialogWindow = win;
- m_contentItem->setParentItem(win->contentItem());
- m_dialogWindow->setMinimumSize(QSize(m_contentItem->implicitWidth(), m_contentItem->implicitHeight()));
- connect(win, SIGNAL(widthChanged(int)), this, SLOT(windowGeometryChanged()));
- connect(win, SIGNAL(heightChanged(int)), this, SLOT(windowGeometryChanged()));
- }
-
- QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent());
-
- // If the platform does not support multiple windows, but the dialog is
- // implemented as an Item, then try to decorate it as a fake window and make it visible.
- if (parentItem && !m_dialogWindow && !m_windowDecoration) {
- if (m_decorationComponent) {
- if (m_decorationComponent->isLoading())
- connect(m_decorationComponent, SIGNAL(statusChanged(QQmlComponent::Status)),
- this, SLOT(decorationLoaded()));
- else
- decorationLoaded();
- }
- // Window decoration wasn't possible, so just reparent it into the scene
- else {
- m_contentItem->setParentItem(parentItem);
- m_contentItem->setZ(10000);
- }
- }
- }
- }
- if (m_dialogWindow) {
- // "grow up" to the size and position expected to achieve
- if (!m_sizeAspiration.isNull()) {
- if (m_hasAspiredPosition)
- m_dialogWindow->setGeometry(m_sizeAspiration);
- else {
- if (m_sizeAspiration.width() > 0)
- m_dialogWindow->setWidth(m_sizeAspiration.width());
- if (m_sizeAspiration.height() > 0)
- m_dialogWindow->setHeight(m_sizeAspiration.height());
- }
- }
- connect(m_dialogWindow, SIGNAL(visibleChanged(bool)), this, SLOT(visibleChanged(bool)));
- connect(m_dialogWindow, SIGNAL(xChanged(int)), this, SLOT(setX(int)));
- connect(m_dialogWindow, SIGNAL(yChanged(int)), this, SLOT(setY(int)));
- connect(m_dialogWindow, SIGNAL(widthChanged(int)), this, SLOT(setWidth(int)));
- connect(m_dialogWindow, SIGNAL(heightChanged(int)), this, SLOT(setHeight(int)));
- }
- }
- if (m_windowDecoration) {
- m_windowDecoration->setVisible(v);
- } else if (m_dialogWindow) {
- if (v) {
- m_dialogWindow->setTransientParent(parentWindow());
- m_dialogWindow->setTitle(title());
- m_dialogWindow->setModality(m_modality);
- }
- m_dialogWindow->setVisible(v);
- }
- }
-
- emit visibilityChanged();
-}
-
-void QQuickAbstractDialog::decorationLoaded()
-{
- bool ok = false;
- QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent());
- while (parentItem->parentItem() && !parentItem->parentItem()->inherits("QQuickRootItem"))
- parentItem = parentItem->parentItem();
- if (m_decorationComponent->isError()) {
- qWarning() << m_decorationComponent->errors();
- } else {
- QObject *decoration = m_decorationComponent->create();
- m_windowDecoration = qobject_cast<QQuickItem *>(decoration);
- if (m_windowDecoration) {
- m_windowDecoration->setParentItem(parentItem);
- // Give the window decoration its content to manage
- QVariant contentVariant;
- contentVariant.setValue<QQuickItem*>(m_contentItem);
- m_windowDecoration->setProperty("content", contentVariant);
- connect(m_windowDecoration, SIGNAL(dismissed()), this, SLOT(reject()));
- ok = true;
- } else {
- qWarning() << m_decorationComponent->url() <<
- "cannot be used as a window decoration because it's not an Item";
- delete m_windowDecoration;
- delete m_decorationComponent;
- m_decorationComponent = 0;
- }
- }
- // Window decoration wasn't possible, so just reparent it into the scene
- if (!ok) {
- m_contentItem->setParentItem(parentItem);
- m_contentItem->setZ(10000);
- }
-}
-
-void QQuickAbstractDialog::setModality(Qt::WindowModality m)
-{
- if (m_modality == m) return;
- m_modality = m;
- emit modalityChanged();
-}
-
-void QQuickAbstractDialog::accept()
-{
- setVisible(false);
- emit accepted();
-}
-
-void QQuickAbstractDialog::reject()
-{
- setVisible(false);
- emit rejected();
-}
-
-void QQuickAbstractDialog::visibleChanged(bool v)
-{
- m_visible = v;
- emit visibilityChanged();
-}
-
-void QQuickAbstractDialog::windowGeometryChanged()
-{
- QQuickItem *content = qobject_cast<QQuickItem*>(m_qmlImplementation);
- if (m_dialogWindow && content) {
- content->setWidth(m_dialogWindow->width());
- content->setHeight(m_dialogWindow->height());
- }
-}
-
-QQuickWindow *QQuickAbstractDialog::parentWindow()
-{
- QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent());
- if (parentItem)
- m_parentWindow = parentItem->window();
- return m_parentWindow;
-}
-
-void QQuickAbstractDialog::setQmlImplementation(QObject *obj)
-{
- m_qmlImplementation = obj;
- if (m_dialogWindow) {
- disconnect(this, SLOT(visibleChanged(bool)));
- // Can't necessarily delete because m_dialogWindow might have been provided by the QML.
- m_dialogWindow = 0;
- }
-}
-
-int QQuickAbstractDialog::x() const
-{
- if (m_dialogWindow)
- return m_dialogWindow->x();
- return m_sizeAspiration.x();
-}
-
-int QQuickAbstractDialog::y() const
-{
- if (m_dialogWindow)
- return m_dialogWindow->y();
- return m_sizeAspiration.y();
-}
-
-int QQuickAbstractDialog::width() const
-{
- if (m_dialogWindow)
- return m_dialogWindow->width();
- return m_sizeAspiration.width();
-}
-
-int QQuickAbstractDialog::height() const
-{
- if (m_dialogWindow)
- return m_dialogWindow->height();
- return m_sizeAspiration.height();
-}
-
-void QQuickAbstractDialog::setX(int arg)
-{
- m_hasAspiredPosition = true;
- m_sizeAspiration.setX(arg);
- if (helper()) {
- // TODO
- } else if (m_dialogWindow) {
- if (sender() != m_dialogWindow)
- m_dialogWindow->setX(arg);
- } else if (m_contentItem) {
- m_contentItem->setX(arg);
- }
- emit geometryChanged();
-}
-
-void QQuickAbstractDialog::setY(int arg)
-{
- m_hasAspiredPosition = true;
- m_sizeAspiration.setY(arg);
- if (helper()) {
- // TODO
- } else if (m_dialogWindow) {
- if (sender() != m_dialogWindow)
- m_dialogWindow->setY(arg);
- } else if (m_contentItem) {
- m_contentItem->setY(arg);
- }
- emit geometryChanged();
-}
-
-void QQuickAbstractDialog::setWidth(int arg)
-{
- m_sizeAspiration.setWidth(arg);
- if (helper()) {
- // TODO
- } else if (m_dialogWindow) {
- if (sender() != m_dialogWindow)
- m_dialogWindow->setWidth(arg);
- } else if (m_contentItem) {
- m_contentItem->setWidth(arg);
- }
- emit geometryChanged();
-}
-
-void QQuickAbstractDialog::setHeight(int arg)
-{
- m_sizeAspiration.setHeight(arg);
- if (helper()) {
- // TODO
- } else if (m_dialogWindow) {
- if (sender() != m_dialogWindow)
- m_dialogWindow->setHeight(arg);
- } else if (m_contentItem) {
- m_contentItem->setHeight(arg);
- }
- emit geometryChanged();
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/dialogs/qquickabstractdialog_p.h b/src/imports/dialogs/qquickabstractdialog_p.h
deleted file mode 100644
index 8ffa166c5b..0000000000
--- a/src/imports/dialogs/qquickabstractdialog_p.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKABSTRACTDIALOG_P_H
-#define QQUICKABSTRACTDIALOG_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtQml>
-#include <QQuickView>
-#include <QtGui/qpa/qplatformdialoghelper.h>
-#include <qpa/qplatformtheme.h>
-
-QT_BEGIN_NAMESPACE
-
-class QQuickAbstractDialog : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibilityChanged)
- Q_PROPERTY(Qt::WindowModality modality READ modality WRITE setModality NOTIFY modalityChanged)
- Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
- Q_PROPERTY(bool isWindow READ isWindow CONSTANT)
- Q_PROPERTY(int x READ x WRITE setX NOTIFY geometryChanged)
- Q_PROPERTY(int y READ y WRITE setY NOTIFY geometryChanged)
- Q_PROPERTY(int width READ width WRITE setWidth NOTIFY geometryChanged)
- Q_PROPERTY(int height READ height WRITE setHeight NOTIFY geometryChanged)
-
-public:
- QQuickAbstractDialog(QObject *parent = 0);
- virtual ~QQuickAbstractDialog();
-
- bool isVisible() const { return m_visible; }
- Qt::WindowModality modality() const { return m_modality; }
- virtual QString title() const = 0;
- QObject* qmlImplementation() { return m_qmlImplementation; }
-
- int x() const;
- int y() const;
- int width() const;
- int height() const;
-
- virtual void setVisible(bool v);
- virtual void setModality(Qt::WindowModality m);
- virtual void setTitle(const QString &t) = 0;
- void setQmlImplementation(QObject* obj);
- bool isWindow() const { return m_hasNativeWindows; }
-
-public Q_SLOTS:
- void open() { setVisible(true); }
- void close() { setVisible(false); }
- void setX(int arg);
- void setY(int arg);
- void setWidth(int arg);
- void setHeight(int arg);
-
-Q_SIGNALS:
- void visibilityChanged();
- void geometryChanged();
- void modalityChanged();
- void titleChanged();
- void accepted();
- void rejected();
-
-protected Q_SLOTS:
- void decorationLoaded();
- virtual void accept();
- virtual void reject();
- void visibleChanged(bool v);
- void windowGeometryChanged();
-
-protected:
- virtual QPlatformDialogHelper *helper() = 0;
- QQuickWindow *parentWindow();
-
-protected:
- QQuickWindow *m_parentWindow;
- bool m_visible;
- Qt::WindowModality m_modality;
-
-protected: // variables for pure-QML implementations only
- QObject *m_qmlImplementation;
- QWindow *m_dialogWindow;
- QQuickItem *m_contentItem;
- QQuickItem *m_windowDecoration;
- bool m_hasNativeWindows;
- QRect m_sizeAspiration;
- bool m_hasAspiredPosition;
-
- static QQmlComponent *m_decorationComponent;
-
- friend class QtQuick2DialogsPlugin;
-
- Q_DISABLE_COPY(QQuickAbstractDialog)
-};
-
-QT_END_NAMESPACE
-
-#endif // QQUICKABSTRACTDIALOG_P_H
diff --git a/src/imports/dialogs/qquickabstractfiledialog.cpp b/src/imports/dialogs/qquickabstractfiledialog.cpp
deleted file mode 100644
index 0cac801311..0000000000
--- a/src/imports/dialogs/qquickabstractfiledialog.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickabstractfiledialog_p.h"
-#include "qquickitem.h"
-
-#include <private/qguiapplication_p.h>
-#include <QWindow>
-#include <QQuickWindow>
-
-QT_BEGIN_NAMESPACE
-
-QQuickAbstractFileDialog::QQuickAbstractFileDialog(QObject *parent)
- : QQuickAbstractDialog(parent)
- , m_dlgHelper(0)
- , m_options(QSharedPointer<QFileDialogOptions>(new QFileDialogOptions()))
- , m_selectExisting(true)
- , m_selectMultiple(false)
- , m_selectFolder(false)
-{
- updateModes();
- connect(this, SIGNAL(accepted()), this, SIGNAL(selectionAccepted()));
-}
-
-QQuickAbstractFileDialog::~QQuickAbstractFileDialog()
-{
-}
-
-void QQuickAbstractFileDialog::setVisible(bool v)
-{
- if (helper() && v) {
- m_dlgHelper->setOptions(m_options);
- m_dlgHelper->setFilter();
- emit filterSelected();
- }
- QQuickAbstractDialog::setVisible(v);
-}
-
-QString QQuickAbstractFileDialog::title() const
-{
- return m_options->windowTitle();
-}
-
-void QQuickAbstractFileDialog::setTitle(const QString &t)
-{
- if (m_options->windowTitle() == t) return;
- m_options->setWindowTitle(t);
- emit titleChanged();
-}
-
-void QQuickAbstractFileDialog::setSelectExisting(bool selectExisting)
-{
- if (selectExisting == m_selectExisting) return;
- m_selectExisting = selectExisting;
- updateModes();
-}
-
-void QQuickAbstractFileDialog::setSelectMultiple(bool selectMultiple)
-{
- if (selectMultiple == m_selectMultiple) return;
- m_selectMultiple = selectMultiple;
- updateModes();
-}
-
-void QQuickAbstractFileDialog::setSelectFolder(bool selectFolder)
-{
- if (selectFolder == m_selectFolder) return;
- m_selectFolder = selectFolder;
- updateModes();
-}
-
-QUrl QQuickAbstractFileDialog::folder()
-{
- if (m_dlgHelper && !m_dlgHelper->directory().isEmpty())
- return m_dlgHelper->directory();
- return m_options->initialDirectory();
-}
-
-void QQuickAbstractFileDialog::setFolder(const QUrl &f)
-{
- if (m_dlgHelper)
- m_dlgHelper->setDirectory(f);
- m_options->setInitialDirectory(f);
- emit folderChanged();
-}
-
-void QQuickAbstractFileDialog::setNameFilters(const QStringList &f)
-{
- m_options->setNameFilters(f);
- if (f.isEmpty())
- selectNameFilter(QString());
- else if (!f.contains(selectedNameFilter()))
- selectNameFilter(f.first());
- emit nameFiltersChanged();
-}
-
-QString QQuickAbstractFileDialog::selectedNameFilter()
-{
- QString ret;
- if (m_dlgHelper)
- ret = m_dlgHelper->selectedNameFilter();
- if (ret.isEmpty())
- return m_options->initiallySelectedNameFilter();
- return ret;
-}
-
-void QQuickAbstractFileDialog::selectNameFilter(const QString &f)
-{
- // This should work whether the dialog is currently being shown already, or ahead of time.
- m_options->setInitiallySelectedNameFilter(f);
- if (m_dlgHelper)
- m_dlgHelper->selectNameFilter(f);
- emit filterSelected();
-}
-
-QUrl QQuickAbstractFileDialog::fileUrl()
-{
- QList<QUrl> urls = fileUrls();
- return (urls.count() == 1) ? urls[0] : QUrl();
-}
-
-QList<QUrl> QQuickAbstractFileDialog::fileUrls()
-{
- if (m_dlgHelper)
- return m_dlgHelper->selectedFiles();
- return QList<QUrl>();
-}
-
-void QQuickAbstractFileDialog::updateModes()
-{
- // The 4 possible modes are AnyFile, ExistingFile, Directory, ExistingFiles
- // Assume AnyFile until we find a reason to the contrary
- QFileDialogOptions::FileMode mode = QFileDialogOptions::AnyFile;
-
- if (m_selectFolder) {
- mode = QFileDialogOptions::Directory;
- m_options->setOption(QFileDialogOptions::ShowDirsOnly);
- m_selectMultiple = false;
- m_selectExisting = true;
- setNameFilters(QStringList());
- } else if (m_selectExisting) {
- mode = m_selectMultiple ?
- QFileDialogOptions::ExistingFiles : QFileDialogOptions::ExistingFile;
- m_options->setOption(QFileDialogOptions::ShowDirsOnly, false);
- } else if (m_selectMultiple) {
- m_selectExisting = true;
- }
- if (!m_selectExisting)
- m_selectMultiple = false;
- m_options->setFileMode(mode);
- m_options->setAcceptMode(m_selectExisting ?
- QFileDialogOptions::AcceptOpen : QFileDialogOptions::AcceptSave);
- emit fileModeChanged();
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/dialogs/qquickabstractfiledialog_p.h b/src/imports/dialogs/qquickabstractfiledialog_p.h
deleted file mode 100644
index 5ce48e8055..0000000000
--- a/src/imports/dialogs/qquickabstractfiledialog_p.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKABSTRACTFILEDIALOG_P_H
-#define QQUICKABSTRACTFILEDIALOG_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtQml>
-#include <QQuickView>
-#include <QtGui/qpa/qplatformdialoghelper.h>
-#include <qpa/qplatformtheme.h>
-#include "qquickabstractdialog_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickAbstractFileDialog : public QQuickAbstractDialog
-{
- Q_OBJECT
- Q_PROPERTY(bool selectExisting READ selectExisting WRITE setSelectExisting NOTIFY fileModeChanged)
- Q_PROPERTY(bool selectMultiple READ selectMultiple WRITE setSelectMultiple NOTIFY fileModeChanged)
- Q_PROPERTY(bool selectFolder READ selectFolder WRITE setSelectFolder NOTIFY fileModeChanged)
- Q_PROPERTY(QUrl folder READ folder WRITE setFolder NOTIFY folderChanged)
- Q_PROPERTY(QStringList nameFilters READ nameFilters WRITE setNameFilters NOTIFY nameFiltersChanged)
- Q_PROPERTY(QString selectedNameFilter READ selectedNameFilter WRITE selectNameFilter NOTIFY filterSelected)
- Q_PROPERTY(QUrl fileUrl READ fileUrl NOTIFY selectionAccepted)
- Q_PROPERTY(QList<QUrl> fileUrls READ fileUrls NOTIFY selectionAccepted)
-
-public:
- QQuickAbstractFileDialog(QObject *parent = 0);
- virtual ~QQuickAbstractFileDialog();
-
- virtual QString title() const;
- bool selectExisting() const { return m_selectExisting; }
- bool selectMultiple() const { return m_selectMultiple; }
- bool selectFolder() const { return m_selectFolder; }
- QUrl folder();
- QStringList nameFilters() const { return m_options->nameFilters(); }
- QString selectedNameFilter();
- QUrl fileUrl();
- virtual QList<QUrl> fileUrls();
-
-public Q_SLOTS:
- void setVisible(bool v);
- void setTitle(const QString &t);
- void setSelectExisting(bool s);
- void setSelectMultiple(bool s);
- void setSelectFolder(bool s);
- void setFolder(const QUrl &f);
- void setNameFilters(const QStringList &f);
- void selectNameFilter(const QString &f);
-
-Q_SIGNALS:
- void folderChanged();
- void nameFiltersChanged();
- void filterSelected();
- void fileModeChanged();
- void selectionAccepted();
-
-protected:
- void updateModes();
-
-protected:
- QPlatformFileDialogHelper *m_dlgHelper;
- QSharedPointer<QFileDialogOptions> m_options;
- bool m_selectExisting;
- bool m_selectMultiple;
- bool m_selectFolder;
-
- Q_DISABLE_COPY(QQuickAbstractFileDialog)
-};
-
-QT_END_NAMESPACE
-
-#endif // QQUICKABSTRACTFILEDIALOG_P_H
diff --git a/src/imports/dialogs/qquickabstractfontdialog.cpp b/src/imports/dialogs/qquickabstractfontdialog.cpp
deleted file mode 100644
index 29dd15e8cc..0000000000
--- a/src/imports/dialogs/qquickabstractfontdialog.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickabstractfontdialog_p.h"
-#include "qquickitem.h"
-
-#include <private/qguiapplication_p.h>
-#include <QWindow>
-#include <QQuickWindow>
-
-QT_BEGIN_NAMESPACE
-
-QQuickAbstractFontDialog::QQuickAbstractFontDialog(QObject *parent)
- : QQuickAbstractDialog(parent)
- , m_dlgHelper(0)
- , m_options(QSharedPointer<QFontDialogOptions>(new QFontDialogOptions()))
-{
- // On the Mac, modality doesn't work unless you call exec(). But this is a reasonable default anyway.
- m_modality = Qt::NonModal;
- connect(this, SIGNAL(accepted()), this, SIGNAL(selectionAccepted()));
-}
-
-QQuickAbstractFontDialog::~QQuickAbstractFontDialog()
-{
-}
-
-void QQuickAbstractFontDialog::setVisible(bool v)
-{
- if (helper() && v) {
- m_dlgHelper->setOptions(m_options);
- // Due to the fact that QFontDialogOptions doesn't have currentFont...
- m_dlgHelper->setCurrentFont(m_font);
- }
- QQuickAbstractDialog::setVisible(v);
-}
-
-void QQuickAbstractFontDialog::setModality(Qt::WindowModality m)
-{
-#ifdef Q_OS_MAC
- // On the Mac, modality doesn't work unless you call exec()
- m_modality = Qt::NonModal;
- emit modalityChanged();
- return;
-#endif
- QQuickAbstractDialog::setModality(m);
-}
-
-QString QQuickAbstractFontDialog::title() const
-{
- return m_options->windowTitle();
-}
-
-bool QQuickAbstractFontDialog::scalableFonts() const
-{
- return m_options->testOption(QFontDialogOptions::ScalableFonts);
-}
-
-bool QQuickAbstractFontDialog::nonScalableFonts() const
-{
- return m_options->testOption(QFontDialogOptions::NonScalableFonts);
-}
-
-bool QQuickAbstractFontDialog::monospacedFonts() const
-{
- return m_options->testOption(QFontDialogOptions::MonospacedFonts);
-}
-
-bool QQuickAbstractFontDialog::proportionalFonts() const
-{
- return m_options->testOption(QFontDialogOptions::ProportionalFonts);
-}
-
-void QQuickAbstractFontDialog::setTitle(const QString &t)
-{
- if (m_options->windowTitle() == t) return;
- m_options->setWindowTitle(t);
- emit titleChanged();
-}
-
-void QQuickAbstractFontDialog::setFont(const QFont &arg)
-{
- if (m_font != arg) {
- m_font = arg;
- emit fontChanged();
- }
-}
-
-void QQuickAbstractFontDialog::setScalableFonts(bool arg)
-{
- m_options->setOption(QFontDialogOptions::ScalableFonts, arg);
- emit scalableFontsChanged();
-}
-
-void QQuickAbstractFontDialog::setNonScalableFonts(bool arg)
-{
- m_options->setOption(QFontDialogOptions::NonScalableFonts, arg);
- emit nonScalableFontsChanged();
-}
-
-void QQuickAbstractFontDialog::setMonospacedFonts(bool arg)
-{
- m_options->setOption(QFontDialogOptions::MonospacedFonts, arg);
- emit monospacedFontsChanged();
-}
-
-void QQuickAbstractFontDialog::setProportionalFonts(bool arg)
-{
- m_options->setOption(QFontDialogOptions::ProportionalFonts, arg);
- emit proportionalFontsChanged();
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/dialogs/qquickabstractfontdialog_p.h b/src/imports/dialogs/qquickabstractfontdialog_p.h
deleted file mode 100644
index 858a0d3eac..0000000000
--- a/src/imports/dialogs/qquickabstractfontdialog_p.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKABSTRACTFONTDIALOG_P_H
-#define QQUICKABSTRACTFONTDIALOG_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtQml>
-#include <QQuickView>
-#include <QtGui/qpa/qplatformdialoghelper.h>
-#include <QtGui/qfont.h>
-#include <qpa/qplatformtheme.h>
-#include "qquickabstractdialog_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickAbstractFontDialog : public QQuickAbstractDialog
-{
- Q_OBJECT
- Q_PROPERTY(bool scalableFonts READ scalableFonts WRITE setScalableFonts NOTIFY scalableFontsChanged)
- Q_PROPERTY(bool nonScalableFonts READ nonScalableFonts WRITE setNonScalableFonts NOTIFY nonScalableFontsChanged)
- Q_PROPERTY(bool monospacedFonts READ monospacedFonts WRITE setMonospacedFonts NOTIFY monospacedFontsChanged)
- Q_PROPERTY(bool proportionalFonts READ proportionalFonts WRITE setProportionalFonts NOTIFY proportionalFontsChanged)
- Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
-
-public:
- QQuickAbstractFontDialog(QObject *parent = 0);
- virtual ~QQuickAbstractFontDialog();
-
- virtual QString title() const;
- bool scalableFonts() const;
- bool nonScalableFonts() const;
- bool monospacedFonts() const;
- bool proportionalFonts() const;
- QFont font() const { return m_font; }
-
-public Q_SLOTS:
- void setVisible(bool v);
- void setModality(Qt::WindowModality m);
- void setTitle(const QString &t);
- void setFont(const QFont &arg);
- void setScalableFonts(bool arg);
- void setNonScalableFonts(bool arg);
- void setMonospacedFonts(bool arg);
- void setProportionalFonts(bool arg);
-
-Q_SIGNALS:
- void scalableFontsChanged();
- void nonScalableFontsChanged();
- void monospacedFontsChanged();
- void proportionalFontsChanged();
- void fontChanged();
- void selectionAccepted();
-
-protected:
- QPlatformFontDialogHelper *m_dlgHelper;
- QSharedPointer<QFontDialogOptions> m_options;
- QFont m_font;
-
- Q_DISABLE_COPY(QQuickAbstractFontDialog)
-};
-
-QT_END_NAMESPACE
-
-#endif // QQUICKABSTRACTFONTDIALOG_P_H
diff --git a/src/imports/dialogs/qquickabstractmessagedialog.cpp b/src/imports/dialogs/qquickabstractmessagedialog.cpp
deleted file mode 100644
index a44464962a..0000000000
--- a/src/imports/dialogs/qquickabstractmessagedialog.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickabstractmessagedialog_p.h"
-#include <QtGui/qpa/qplatformdialoghelper.h>
-
-QT_BEGIN_NAMESPACE
-
-QQuickAbstractMessageDialog::QQuickAbstractMessageDialog(QObject *parent)
- : QQuickAbstractDialog(parent)
- , m_dlgHelper(0)
- , m_options(QSharedPointer<QMessageDialogOptions>(new QMessageDialogOptions()))
- , m_clickedButton(NoButton)
-{
-}
-
-QQuickAbstractMessageDialog::~QQuickAbstractMessageDialog()
-{
-}
-
-void QQuickAbstractMessageDialog::setVisible(bool v)
-{
- if (helper() && v)
- m_dlgHelper->setOptions(m_options);
- if (v)
- m_clickedButton = NoButton;
- QQuickAbstractDialog::setVisible(v);
-}
-
-void QQuickAbstractMessageDialog::setTitle(const QString &arg)
-{
- if (arg != m_options->windowTitle()) {
- m_options->setWindowTitle(arg);
- emit titleChanged();
- }
-}
-
-void QQuickAbstractMessageDialog::setText(const QString &arg)
-{
- if (arg != m_options->text()) {
- m_options->setText(arg);
- emit textChanged();
- }
-}
-
-void QQuickAbstractMessageDialog::setInformativeText(const QString &arg)
-{
- if (arg != m_options->informativeText()) {
- m_options->setInformativeText(arg);
- emit informativeTextChanged();
- }
-}
-
-void QQuickAbstractMessageDialog::setDetailedText(const QString &arg)
-{
- if (arg != m_options->detailedText()) {
- m_options->setDetailedText(arg);
- emit detailedTextChanged();
- }
-}
-
-void QQuickAbstractMessageDialog::setIcon(QQuickAbstractMessageDialog::Icon icon)
-{
- if (static_cast<int>(icon) != static_cast<int>(m_options->icon())) {
- m_options->setIcon(static_cast<QMessageDialogOptions::Icon>(icon));
- emit iconChanged();
- }
-}
-
-QUrl QQuickAbstractMessageDialog::standardIconSource()
-{
- switch (m_options->icon()) {
- case QMessageDialogOptions::Information:
- return QUrl("images/information.png");
- break;
- case QMessageDialogOptions::Warning:
- return QUrl("images/warning.png");
- break;
- case QMessageDialogOptions::Critical:
- return QUrl("images/critical.png");
- break;
- case QMessageDialogOptions::Question:
- return QUrl("images/question.png");
- break;
- default:
- return QUrl();
- break;
- }
-}
-
-void QQuickAbstractMessageDialog::setStandardButtons(StandardButtons buttons)
-{
- if (buttons != m_options->standardButtons()) {
- m_options->setStandardButtons(static_cast<QMessageDialogOptions::StandardButtons>(static_cast<int>(buttons)));
- emit standardButtonsChanged();
- }
-}
-
-void QQuickAbstractMessageDialog::click(QMessageDialogOptions::StandardButton button, QMessageDialogOptions::ButtonRole role)
-{
- setVisible(false);
- m_clickedButton = static_cast<StandardButton>(button);
- emit buttonClicked();
- switch (role) {
- case QMessageDialogOptions::AcceptRole:
- emit accept();
- break;
- case QMessageDialogOptions::RejectRole:
- emit reject();
- break;
- case QMessageDialogOptions::DestructiveRole:
- emit discard();
- break;
- case QMessageDialogOptions::HelpRole:
- emit help();
- break;
- case QMessageDialogOptions::YesRole:
- emit yes();
- break;
- case QMessageDialogOptions::NoRole:
- emit no();
- break;
- case QMessageDialogOptions::ApplyRole:
- emit apply();
- break;
- case QMessageDialogOptions::ResetRole:
- emit reset();
- break;
- default:
- qWarning("unhandled MessageDialog button %d with role %d", button, role);
- }
-}
-
-void QQuickAbstractMessageDialog::click(QQuickAbstractMessageDialog::StandardButton button)
-{
- click(static_cast<QMessageDialogOptions::StandardButton>(button),
- static_cast<QMessageDialogOptions::ButtonRole>(
- QMessageDialogOptions::buttonRole(static_cast<QMessageDialogOptions::StandardButton>(button))));
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/dialogs/qquickabstractmessagedialog_p.h b/src/imports/dialogs/qquickabstractmessagedialog_p.h
deleted file mode 100644
index f2427bb2e0..0000000000
--- a/src/imports/dialogs/qquickabstractmessagedialog_p.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKABSTRACTMESSAGEDIALOG_P_H
-#define QQUICKABSTRACTMESSAGEDIALOG_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtQml>
-#include <QQuickView>
-#include <QtGui/qpa/qplatformdialoghelper.h>
-#include <qpa/qplatformtheme.h>
-#include "qquickabstractdialog_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickAbstractMessageDialog : public QQuickAbstractDialog
-{
- Q_OBJECT
-
- Q_ENUMS(Icon)
- Q_ENUMS(StandardButton)
- Q_FLAGS(StandardButtons)
-
- Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
- Q_PROPERTY(QString informativeText READ informativeText WRITE setInformativeText NOTIFY informativeTextChanged)
- Q_PROPERTY(QString detailedText READ detailedText WRITE setDetailedText NOTIFY detailedTextChanged)
- Q_PROPERTY(Icon icon READ icon WRITE setIcon NOTIFY iconChanged)
- Q_PROPERTY(QUrl standardIconSource READ standardIconSource NOTIFY iconChanged)
- Q_PROPERTY(StandardButtons standardButtons READ standardButtons WRITE setStandardButtons NOTIFY standardButtonsChanged)
- Q_PROPERTY(StandardButton clickedButton READ clickedButton NOTIFY buttonClicked)
-
-public:
- QQuickAbstractMessageDialog(QObject *parent = 0);
- virtual ~QQuickAbstractMessageDialog();
-
- virtual QString title() const { return m_options->windowTitle(); }
- QString text() const { return m_options->text(); }
- QString informativeText() const { return m_options->informativeText(); }
- QString detailedText() const { return m_options->detailedText(); }
-
- enum Icon {
- NoIcon = QMessageDialogOptions::NoIcon,
- Information = QMessageDialogOptions::Information,
- Warning = QMessageDialogOptions::Warning,
- Critical = QMessageDialogOptions::Critical,
- Question = QMessageDialogOptions::Question
- };
-
- Icon icon() const { return static_cast<Icon>(m_options->icon()); }
-
- QUrl standardIconSource();
-
- enum StandardButton {
- NoButton = QMessageDialogOptions::NoButton,
- Ok = QMessageDialogOptions::Ok,
- Save = QMessageDialogOptions::Save,
- SaveAll = QMessageDialogOptions::SaveAll,
- Open = QMessageDialogOptions::Open,
- Yes = QMessageDialogOptions::Yes,
- YesToAll = QMessageDialogOptions::YesToAll,
- No = QMessageDialogOptions::No,
- NoToAll = QMessageDialogOptions::NoToAll,
- Abort = QMessageDialogOptions::Abort,
- Retry = QMessageDialogOptions::Retry,
- Ignore = QMessageDialogOptions::Ignore,
- Close = QMessageDialogOptions::Close,
- Cancel = QMessageDialogOptions::Cancel,
- Discard = QMessageDialogOptions::Discard,
- Help = QMessageDialogOptions::Help,
- Apply = QMessageDialogOptions::Apply,
- Reset = QMessageDialogOptions::Reset,
- RestoreDefaults = QMessageDialogOptions::RestoreDefaults
- };
- Q_DECLARE_FLAGS(StandardButtons, StandardButton)
-
- StandardButtons standardButtons() const { return static_cast<StandardButtons>(static_cast<int>(m_options->standardButtons())); }
-
- StandardButton clickedButton() const { return m_clickedButton; }
-
-public Q_SLOTS:
- virtual void setVisible(bool v);
- virtual void setTitle(const QString &arg);
- void setText(const QString &arg);
- void setInformativeText(const QString &arg);
- void setDetailedText(const QString &arg);
- void setIcon(Icon icon);
- void setStandardButtons(StandardButtons buttons);
- void click(QMessageDialogOptions::StandardButton button, QMessageDialogOptions::ButtonRole);
- void click(QQuickAbstractMessageDialog::StandardButton button);
-
-Q_SIGNALS:
- void textChanged();
- void informativeTextChanged();
- void detailedTextChanged();
- void iconChanged();
- void standardButtonsChanged();
- void buttonClicked();
- void discard();
- void help();
- void yes();
- void no();
- void apply();
- void reset();
-
-protected:
- QPlatformMessageDialogHelper *m_dlgHelper;
- QSharedPointer<QMessageDialogOptions> m_options;
- StandardButton m_clickedButton;
-
- Q_DISABLE_COPY(QQuickAbstractMessageDialog)
-};
-
-Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickAbstractMessageDialog::StandardButtons)
-
-QT_END_NAMESPACE
-
-#endif // QQUICKABSTRACTMESSAGEDIALOG_P_H
diff --git a/src/imports/dialogs/qquickcolordialog.cpp b/src/imports/dialogs/qquickcolordialog.cpp
deleted file mode 100644
index d0e0e11b07..0000000000
--- a/src/imports/dialogs/qquickcolordialog.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickcolordialog_p.h"
-#include <QQuickItem>
-#include <private/qguiapplication_p.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype AbstractColorDialog
- \instantiates QQuickColorDialog
- \inqmlmodule QtQuick.Dialogs 1
- \ingroup qtquick-visual
- \brief API wrapper for QML file dialog implementations
- \since 5.1
- \internal
-
- AbstractColorDialog provides only the API for implementing a color dialog.
- The implementation (e.g. a Window or preferably an Item, in case it is
- shown on a device that doesn't support multiple windows) can be provided as
- \l implementation, which is the default property (the only allowed child
- element).
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::AbstractColorDialog::accepted
-
- This signal is emitted by \l accept().
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::AbstractColorDialog::rejected
-
- This signal is emitted by \l reject().
-*/
-
-/*!
- \class QQuickColorDialog
- \inmodule QtQuick.Dialogs
- \internal
-
- The QQuickColorDialog class is a concrete subclass of
- \l QQuickAbstractColorDialog, but it is abstract from the QML perspective
- because it needs to enclose a graphical implementation. It exists in order
- to provide accessors and helper functions which the QML implementation will
- need.
-
- \since 5.1
-*/
-
-/*!
- Constructs a file dialog wrapper with parent window \a parent.
-*/
-QQuickColorDialog::QQuickColorDialog(QObject *parent)
- : QQuickAbstractColorDialog(parent)
-{
-}
-
-
-/*!
- Destroys the file dialog wrapper.
-*/
-QQuickColorDialog::~QQuickColorDialog()
-{
-}
-
-/*!
- \qmlproperty bool AbstractColorDialog::visible
-
- This property holds whether the dialog is visible. By default this is false.
-*/
-
-/*!
- \qmlproperty QObject AbstractColorDialog::implementation
-
- The QML object which implements the actual file dialog. Should be either a
- \l Window or an \l Item.
-*/
-
-QT_END_NAMESPACE
diff --git a/src/imports/dialogs/qquickcolordialog_p.h b/src/imports/dialogs/qquickcolordialog_p.h
deleted file mode 100644
index ff6953fc0f..0000000000
--- a/src/imports/dialogs/qquickcolordialog_p.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKCOLORDIALOG_P_H
-#define QQUICKCOLORDIALOG_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qquickabstractcolordialog_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickColorDialog : public QQuickAbstractColorDialog
-{
- Q_OBJECT
- Q_PROPERTY(QObject* implementation READ qmlImplementation WRITE setQmlImplementation DESIGNABLE false)
- Q_CLASSINFO("DefaultProperty", "implementation") // AbstractColorDialog in QML can have only one child
-
-public:
- explicit QQuickColorDialog(QObject *parent = 0);
- ~QQuickColorDialog();
-
-protected:
- virtual QPlatformColorDialogHelper *helper() { return 0; }
-
- Q_DISABLE_COPY(QQuickColorDialog)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickColorDialog *)
-
-#endif // QQUICKCOLORDIALOG_P_H
diff --git a/src/imports/dialogs/qquickdialogassets_p.h b/src/imports/dialogs/qquickdialogassets_p.h
deleted file mode 100644
index 406b68a66d..0000000000
--- a/src/imports/dialogs/qquickdialogassets_p.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKDIALOGASSETS_P_H
-#define QQUICKDIALOGASSETS_P_H
-
-#include <private/qtquickglobal_p.h>
-#include <QtGui/qpa/qplatformdialoghelper.h>
-#include "qquickabstractmessagedialog_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickStandardButton
-{
- Q_GADGET
- Q_ENUMS(QQuickAbstractMessageDialog::StandardButton)
-};
-
-class QQuickStandardIcon
-{
- Q_GADGET
- Q_ENUMS(QQuickAbstractMessageDialog::Icon)
-};
-
-QT_END_NAMESPACE
-
-#endif // QQUICKDIALOGASSETS_P_H
diff --git a/src/imports/dialogs/qquickfiledialog.cpp b/src/imports/dialogs/qquickfiledialog.cpp
deleted file mode 100644
index 2ee4afc5d2..0000000000
--- a/src/imports/dialogs/qquickfiledialog.cpp
+++ /dev/null
@@ -1,172 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickfiledialog_p.h"
-#include <QQuickItem>
-#include <private/qguiapplication_p.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype AbstractFileDialog
- \instantiates QQuickFileDialog
- \inqmlmodule QtQuick.Dialogs 1
- \ingroup qtquick-visual
- \brief API wrapper for QML file dialog implementations
- \since 5.1
- \internal
-
- AbstractFileDialog provides only the API for implementing a file dialog.
- The implementation (e.g. a Window or preferably an Item, in case it is
- shown on a device that doesn't support multiple windows) can be provided as
- \l implementation, which is the default property (the only allowed child
- element).
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::AbstractFileDialog::accepted
-
- This signal is emitted by \l accept().
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::AbstractFileDialog::rejected
-
- This signal is emitted by \l reject().
-*/
-
-/*!
- \class QQuickFileDialog
- \inmodule QtQuick.Dialogs
- \internal
-
- The QQuickFileDialog class is a concrete subclass of
- \l QQuickAbstractFileDialog, but it is abstract from the QML perspective
- because it needs to enclose a graphical implementation. It exists in order
- to provide accessors and helper functions which the QML implementation will
- need.
-
- \since 5.1
-*/
-
-/*!
- Constructs a file dialog wrapper with parent window \a parent.
-*/
-QQuickFileDialog::QQuickFileDialog(QObject *parent)
- : QQuickAbstractFileDialog(parent)
-{
-}
-
-
-/*!
- Destroys the file dialog wrapper.
-*/
-QQuickFileDialog::~QQuickFileDialog()
-{
-}
-
-QList<QUrl> QQuickFileDialog::fileUrls()
-{
- return m_selections;
-}
-
-/*!
- \qmlproperty bool AbstractFileDialog::visible
-
- This property holds whether the dialog is visible. By default this is false.
-*/
-
-/*!
- \qmlproperty bool AbstractFileDialog::fileUrls
-
- A list of files to be populated as the user chooses.
-*/
-
-/*!
- \brief Clears \l fileUrls
-*/
-void QQuickFileDialog::clearSelection()
-{
- m_selections.clear();
-}
-
-/*!
- \brief Adds one file to \l fileUrls
-
- \l path should be given as an absolute file:// path URL.
- Returns true on success, false if the given path is
- not valid given the current property settings.
-*/
-bool QQuickFileDialog::addSelection(const QUrl &path)
-{
- QFileInfo info(path.toLocalFile());
- if (info.exists() && ((info.isDir() && m_selectFolder) || !info.isDir())) {
- if (m_selectFolder)
- m_selections.append(pathFolder(path.toLocalFile()));
- else
- m_selections.append(path);
- return true;
- }
- return false;
-}
-
-/*!
- \brief get a file's directory as a URL
-
- If \a path points to a directory, just convert it to a URL.
- If \a path points to a file, convert the file's directory to a URL.
-*/
-QUrl QQuickFileDialog::pathFolder(const QString &path)
-{
- QFileInfo info(path);
- if (info.exists() && info.isDir())
- return QUrl::fromLocalFile(path);
- return QUrl::fromLocalFile(QFileInfo(path).absolutePath());
-}
-
-/*!
- \qmlproperty QObject AbstractFileDialog::implementation
-
- The QML object which implements the actual file dialog. Should be either a
- \l Window or an \l Item.
-*/
-
-QT_END_NAMESPACE
diff --git a/src/imports/dialogs/qquickfiledialog_p.h b/src/imports/dialogs/qquickfiledialog_p.h
deleted file mode 100644
index a4c7939fda..0000000000
--- a/src/imports/dialogs/qquickfiledialog_p.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKFILEDIALOG_P_H
-#define QQUICKFILEDIALOG_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qquickabstractfiledialog_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickFileDialog : public QQuickAbstractFileDialog
-{
- Q_OBJECT
- Q_PROPERTY(QObject* implementation READ qmlImplementation WRITE setQmlImplementation DESIGNABLE false)
- Q_CLASSINFO("DefaultProperty", "implementation") // AbstractFileDialog in QML can have only one child
-
-public:
- explicit QQuickFileDialog(QObject *parent = 0);
- ~QQuickFileDialog();
- virtual QList<QUrl> fileUrls();
-
-Q_SIGNALS:
-
-public Q_SLOTS:
- void clearSelection();
- bool addSelection(const QUrl &path);
-
-protected:
- virtual QPlatformFileDialogHelper *helper() { return 0; }
- Q_INVOKABLE QString urlToPath(const QUrl &url) { return url.toLocalFile(); }
- Q_INVOKABLE QUrl pathToUrl(const QString &path) { return QUrl::fromLocalFile(path); }
- Q_INVOKABLE QUrl pathFolder(const QString &path);
-
-private:
- QList<QUrl> m_selections;
-
- Q_DISABLE_COPY(QQuickFileDialog)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickFileDialog *)
-
-#endif // QQUICKFILEDIALOG_P_H
diff --git a/src/imports/dialogs/qquickfontdialog.cpp b/src/imports/dialogs/qquickfontdialog.cpp
deleted file mode 100644
index 2f3c6d83bb..0000000000
--- a/src/imports/dialogs/qquickfontdialog.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickfontdialog_p.h"
-#include <QQuickItem>
-#include <private/qguiapplication_p.h>
-#include <qpa/qplatformintegration.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype AbstractFontDialog
- \instantiates QQuickFontDialog
- \inqmlmodule QtQuick.Dialogs 1
- \ingroup qtquick-visual
- \brief API wrapper for QML font dialog implementations
- \since 5.2
- \internal
-
- AbstractFontDialog provides only the API for implementing a font dialog.
- The implementation (e.g. a Window or preferably an Item, in case it is
- shown on a device that doesn't support multiple windows) can be provided as
- \l implementation, which is the default property (the only allowed child
- element).
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::AbstractFontDialog::accepted
-
- The \a accepted signal is emitted by \l accept().
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::AbstractFontDialog::rejected
-
- The \a accepted signal is emitted by \l reject().
-*/
-
-/*!
- \class QQuickFontDialog
- \inmodule QtQuick.Dialogs
- \internal
-
- The QQuickFontDialog class is a concrete subclass of \l
- QQuickAbstractFontDialog, but it is abstract from the QML perspective
- because it needs to enclose a graphical implementation. It exists in order
- to provide accessors and helper functions which the QML implementation will
- need.
-
- \since 5.2
-*/
-
-/*!
- Constructs a font dialog wrapper with parent window \a parent.
-*/
-QQuickFontDialog::QQuickFontDialog(QObject *parent)
- : QQuickAbstractFontDialog(parent)
-{
-}
-
-
-/*!
- Destroys the font dialog wrapper.
-*/
-QQuickFontDialog::~QQuickFontDialog()
-{
-}
-
-/*!
- \qmlproperty bool AbstractFontDialog::visible
-
- This property holds whether the dialog is visible. By default this is false.
-*/
-
-/*!
- \qmlproperty QObject AbstractFontDialog::implementation
-
- The QML object which implements the actual font dialog. Should be either a
- \l Window or an \l Item.
-*/
-
-QT_END_NAMESPACE
diff --git a/src/imports/dialogs/qquickfontdialog_p.h b/src/imports/dialogs/qquickfontdialog_p.h
deleted file mode 100644
index a8e2d82e6f..0000000000
--- a/src/imports/dialogs/qquickfontdialog_p.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKFONTDIALOG_P_H
-#define QQUICKFONTDIALOG_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qquickabstractfontdialog_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickFontDialog : public QQuickAbstractFontDialog
-{
- Q_OBJECT
- Q_PROPERTY(QObject* implementation READ qmlImplementation WRITE setQmlImplementation DESIGNABLE false)
- Q_CLASSINFO("DefaultProperty", "implementation")
-
-public:
- explicit QQuickFontDialog(QObject *parent = 0);
- ~QQuickFontDialog();
-
-protected:
- virtual QPlatformFontDialogHelper *helper() { return 0; }
-
- Q_DISABLE_COPY(QQuickFontDialog)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickFontDialog *)
-
-#endif // QQUICKFONTDIALOG_P_H
diff --git a/src/imports/dialogs/qquickmessagedialog.cpp b/src/imports/dialogs/qquickmessagedialog.cpp
deleted file mode 100644
index 43b6ca09b4..0000000000
--- a/src/imports/dialogs/qquickmessagedialog.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickmessagedialog_p.h"
-#include <QQuickItem>
-#include <private/qguiapplication_p.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype AbstractMessageDialog
- \instantiates QQuickMessageDialog
- \inqmlmodule QtQuick.Dialogs 1
- \ingroup qtquick-visual
- \brief API wrapper for QML message dialog implementations
- \since 5.2
- \internal
-
- AbstractMessageDialog provides only the API for implementing a message dialog.
- The implementation (e.g. a Window or preferably an Item, in case it is
- shown on a device that doesn't support multiple windows) can be provided as
- \l implementation, which is the default property (the only allowed child
- element).
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::AbstractMessageDialog::accepted
-
- This signal is emitted by \l accept().
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::AbstractMessageDialog::rejected
-
- This signal is emitted by \l reject().
-*/
-
-/*!
- \class QQuickMessageDialog
- \inmodule QtQuick.Dialogs
- \internal
-
- The QQuickMessageDialog class is a concrete subclass of
- \l QQuickAbstractMessageDialog, but it is abstract from the QML perspective
- because it needs to enclose a graphical implementation. It exists in order
- to provide accessors and helper functions which the QML implementation will
- need.
-
- \since 5.2
-*/
-
-/*!
- Constructs a message dialog wrapper with parent window \a parent.
-*/
-QQuickMessageDialog::QQuickMessageDialog(QObject *parent)
- : QQuickAbstractMessageDialog(parent)
-{
- connect(this, SIGNAL(buttonClicked()), this, SLOT(clicked()));
-}
-
-
-/*!
- Destroys the message dialog wrapper.
-*/
-QQuickMessageDialog::~QQuickMessageDialog()
-{
-}
-
-/*!
- \qmlproperty bool AbstractMessageDialog::visible
-
- This property holds whether the dialog is visible. By default this is false.
-*/
-
-/*!
- \qmlproperty QObject AbstractMessageDialog::implementation
-
- The QML object which implements the actual message dialog. Should be either a
- \l Window or an \l Item.
-*/
-
-
-void QQuickMessageDialog::clicked() {
- switch (m_clickedButton) {
- // This mapping from buttons to roles is the same as
- // documented for enum QMessageBox::StandardButton
- case Ok:
- case Open:
- case Save:
- case SaveAll:
- case Retry:
- case Ignore:
- accept();
- break;
- case Cancel:
- case Close:
- case Abort:
- reject();
- break;
- case Discard:
- emit discard();
- close();
- break;
- case Help:
- emit help();
- break;
- case Yes:
- case YesToAll:
- emit yes();
- close();
- break;
- case No:
- case NoToAll:
- emit no();
- close();
- break;
- case Apply:
- emit apply();
- break;
- case Reset:
- case RestoreDefaults:
- emit reset();
- break;
- default:
- qWarning("StandardButton %d has no role", m_clickedButton);
- }
-}
-
-void QQuickMessageDialog::accept() {
- // enter key is treated like OK
- if (m_clickedButton == NoButton)
- m_clickedButton = Ok;
- QQuickAbstractMessageDialog::accept();
-}
-
-void QQuickMessageDialog::reject() {
- // escape key is treated like cancel
- if (m_clickedButton == NoButton)
- m_clickedButton = Cancel;
- QQuickAbstractMessageDialog::reject();
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/dialogs/qquickmessagedialog_p.h b/src/imports/dialogs/qquickmessagedialog_p.h
deleted file mode 100644
index b21d8cba42..0000000000
--- a/src/imports/dialogs/qquickmessagedialog_p.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKMESSAGEDIALOG_P_H
-#define QQUICKMESSAGEDIALOG_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qquickabstractmessagedialog_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickMessageDialog : public QQuickAbstractMessageDialog
-{
- Q_OBJECT
- Q_PROPERTY(QObject* implementation READ qmlImplementation WRITE setQmlImplementation DESIGNABLE false)
- Q_CLASSINFO("DefaultProperty", "implementation") // AbstractMessageDialog in QML can have only one child
-
-public:
- explicit QQuickMessageDialog(QObject *parent = 0);
- ~QQuickMessageDialog();
-
-protected:
- virtual QPlatformDialogHelper *helper() { return 0; }
-
-protected Q_SLOTS:
- virtual void accept();
- virtual void reject();
- void clicked();
-
-private:
- Q_DISABLE_COPY(QQuickMessageDialog)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickMessageDialog *)
-
-#endif // QQUICKMESSAGEDIALOG_P_H
diff --git a/src/imports/dialogs/qquickplatformcolordialog.cpp b/src/imports/dialogs/qquickplatformcolordialog.cpp
deleted file mode 100644
index 11ddbfe6c7..0000000000
--- a/src/imports/dialogs/qquickplatformcolordialog.cpp
+++ /dev/null
@@ -1,254 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickplatformcolordialog_p.h"
-#include "qquickitem.h"
-
-#include <private/qguiapplication_p.h>
-#include <QWindow>
-#include <QQuickView>
-#include <QQuickWindow>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype ColorDialog
- \instantiates QQuickPlatformColorDialog
- \inqmlmodule QtQuick.Dialogs 1
- \ingroup dialogs
- \brief Dialog component for choosing a color.
- \since 5.1
-
- ColorDialog allows the user to select a color. The dialog is initially
- invisible. You need to set the properties as desired first, then set
- \l visible to true or call \l open().
-
- Here is a minimal example to open a color dialog and exit after the user
- chooses a color:
-
- \qml
- import QtQuick 2.1
- import QtQuick.Dialogs 1.0
-
- ColorDialog {
- id: colorDialog
- title: "Please choose a color"
- onAccepted: {
- console.log("You chose: " + colorDialog.color)
- Qt.quit()
- }
- onRejected: {
- console.log("Canceled")
- Qt.quit()
- }
- Component.onCompleted: visible = true
- }
- \endqml
-
- A ColorDialog window is automatically transient for its parent window. So
- whether you declare the dialog inside an \l Item or inside a \l Window, the
- dialog will appear centered over the window containing the item, or over
- the Window that you declared.
-
- The implementation of ColorDialog will be a platform color dialog if
- possible. If that isn't possible, then it will try to instantiate a
- \l QColorDialog. If that also isn't possible, then it will fall back to a QML
- implementation, DefaultColorDialog.qml. In that case you can customize the
- appearance by editing this file. DefaultColorDialog.qml contains a Rectangle
- to hold the dialog's contents, because certain embedded systems do not
- support multiple top-level windows. When the dialog becomes visible, it
- will automatically be wrapped in a Window if possible, or simply reparented
- on top of the main window if there can only be one window.
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::ColorDialog::accepted
-
- This handler is called when the user has finished using the
- dialog. You can then inspect the \l color property to get the selection.
-
- Example:
-
- \qml
- ColorDialog {
- onAccepted: { console.log("Selected color: " + color) }
- }
- \endqml
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::ColorDialog::rejected
-
- This handler is called when the user has dismissed the dialog,
- either by closing the dialog window or by pressing the Cancel button.
-*/
-
-/*!
- \class QQuickPlatformColorDialog
- \inmodule QtQuick.Dialogs
- \internal
-
- \brief The QQuickPlatformColorDialog class provides a color dialog
-
- The dialog is implemented via the QPlatformColorDialogHelper when possible;
- otherwise it falls back to a QColorDialog or a QML implementation.
-
- \since 5.1
-*/
-
-/*!
- Constructs a color dialog with parent window \a parent.
-*/
-QQuickPlatformColorDialog::QQuickPlatformColorDialog(QObject *parent) :
- QQuickAbstractColorDialog(parent)
-{
-}
-
-/*!
- Destroys the color dialog.
-*/
-QQuickPlatformColorDialog::~QQuickPlatformColorDialog()
-{
- if (m_dlgHelper)
- m_dlgHelper->hide();
- delete m_dlgHelper;
-}
-
-QPlatformColorDialogHelper *QQuickPlatformColorDialog::helper()
-{
- QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent());
- if (parentItem)
- m_parentWindow = parentItem->window();
-
- if ( !m_dlgHelper && QGuiApplicationPrivate::platformTheme()->
- usePlatformNativeDialog(QPlatformTheme::ColorDialog) ) {
- m_dlgHelper = static_cast<QPlatformColorDialogHelper *>(QGuiApplicationPrivate::platformTheme()
- ->createPlatformDialogHelper(QPlatformTheme::ColorDialog));
- if (!m_dlgHelper)
- return m_dlgHelper;
- connect(m_dlgHelper, SIGNAL(accept()), this, SLOT(accept()));
- connect(m_dlgHelper, SIGNAL(reject()), this, SLOT(reject()));
- connect(m_dlgHelper, SIGNAL(currentColorChanged(QColor)), this, SLOT(setCurrentColor(QColor)));
- connect(m_dlgHelper, SIGNAL(colorSelected(QColor)), this, SLOT(setColor(QColor)));
- }
-
- return m_dlgHelper;
-}
-
-/*!
- \qmlproperty bool ColorDialog::visible
-
- This property holds whether the dialog is visible. By default this is
- false.
-
- \sa modality
-*/
-
-/*!
- \qmlproperty Qt::WindowModality ColorDialog::modality
-
- Whether the dialog should be shown modal with respect to the window
- containing the dialog's parent Item, modal with respect to the whole
- application, or non-modal.
-
- By default it is \l NonModal.
-
- Modality does not mean that there are any blocking calls to wait for the
- dialog to be accepted or rejected; it's only that the user will be
- prevented from interacting with the parent window and/or the application
- windows at the same time.
-
- On MacOS the color dialog is only allowed to be non-modal.
-*/
-
-/*!
- \qmlmethod void ColorDialog::open()
-
- Shows the dialog to the user. It is equivalent to setting \l visible to
- true.
-*/
-
-/*!
- \qmlmethod void ColorDialog::close()
-
- Closes the dialog.
-*/
-
-/*!
- \qmlproperty string ColorDialog::title
-
- The title of the dialog window.
-*/
-
-/*!
- \qmlproperty bool ColorDialog::showAlphaChannel
-
- Whether the dialog will provide a means of changing the opacity.
-
- By default, this property is true. This property must be set to the desired
- value before opening the dialog. Usually the alpha channel is represented
- by an additional slider control.
-*/
-
-/*!
- \qmlproperty color ColorDialog::color
-
- The color which the user selected.
-
- \note This color is not always the same as the color held by the
- currentColor property since the user can choose different colors before
- finally selecting the one to use.
-
- \sa currentColor
-*/
-
-/*!
- \qmlproperty color ColorDialog::currentColor
-
- The color which the user has currently selected.
-
- For the color that is set when the dialog is accepted, use the \l color
- property.
-
- \sa color
-*/
-
-QT_END_NAMESPACE
diff --git a/src/imports/dialogs/qquickplatformcolordialog_p.h b/src/imports/dialogs/qquickplatformcolordialog_p.h
deleted file mode 100644
index 55d301da8b..0000000000
--- a/src/imports/dialogs/qquickplatformcolordialog_p.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKPLATFORMCOLORDIALOG_P_H
-#define QQUICKPLATFORMCOLORDIALOG_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qquickabstractcolordialog_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickPlatformColorDialog : public QQuickAbstractColorDialog
-{
- Q_OBJECT
-
-public:
- QQuickPlatformColorDialog(QObject *parent = 0);
- virtual ~QQuickPlatformColorDialog();
-
-protected:
- QPlatformColorDialogHelper *helper();
-
- Q_DISABLE_COPY(QQuickPlatformColorDialog)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickPlatformColorDialog *)
-
-#endif // QQUICKPLATFORMCOLORDIALOG_P_H
diff --git a/src/imports/dialogs/qquickplatformfiledialog.cpp b/src/imports/dialogs/qquickplatformfiledialog.cpp
deleted file mode 100644
index 066aabe336..0000000000
--- a/src/imports/dialogs/qquickplatformfiledialog.cpp
+++ /dev/null
@@ -1,314 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickplatformfiledialog_p.h"
-#include "qquickitem.h"
-
-#include <private/qguiapplication_p.h>
-#include <QWindow>
-#include <QQuickView>
-#include <QQuickWindow>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype FileDialog
- \instantiates QQuickPlatformFileDialog
- \inqmlmodule QtQuick.Dialogs 1
- \ingroup dialogs
- \brief Dialog component for choosing files from a local filesystem.
- \since 5.1
-
- FileDialog provides a basic file chooser: it allows the user to select
- existing files and/or directories, or create new filenames. The dialog is
- initially invisible. You need to set the properties as desired first, then
- set \l visible to true or call \l open().
-
- Here is a minimal example to open a file dialog and exit after the user
- chooses a file:
-
- \qml
- import QtQuick 2.1
- import QtQuick.Dialogs 1.0
-
- FileDialog {
- id: fileDialog
- title: "Please choose a file"
- onAccepted: {
- console.log("You chose: " + fileDialog.fileUrls)
- Qt.quit()
- }
- onRejected: {
- console.log("Canceled")
- Qt.quit()
- }
- Component.onCompleted: visible = true
- }
- \endqml
-
- A FileDialog window is automatically transient for its parent window. So
- whether you declare the dialog inside an \l Item or inside a \l Window, the
- dialog will appear centered over the window containing the item, or over
- the Window that you declared.
-
- The implementation of FileDialog will be a platform file dialog if
- possible. If that isn't possible, then it will try to instantiate a
- \l QFileDialog. If that also isn't possible, then it will fall back to a QML
- implementation, DefaultFileDialog.qml. In that case you can customize the
- appearance by editing this file. DefaultFileDialog.qml contains a Rectangle
- to hold the dialog's contents, because certain embedded systems do not
- support multiple top-level windows. When the dialog becomes visible, it
- will automatically be wrapped in a Window if possible, or simply reparented
- on top of the main window if there can only be one window.
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::FileDialog::accepted
-
- This handler is called when the user has finished using the
- dialog. You can then inspect the \l fileUrl or \l fileUrls properties to
- get the selection.
-
- Example:
-
- \qml
- FileDialog {
- onAccepted: { console.log("Selected file: " + fileUrl) }
- }
- \endqml
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::FileDialog::rejected
-
- This handler is called when the user has dismissed the dialog,
- either by closing the dialog window or by pressing the Cancel button.
-*/
-
-/*!
- \class QQuickPlatformFileDialog
- \inmodule QtQuick.Dialogs
- \internal
-
- \brief The QQuickPlatformFileDialog class provides a file dialog
-
- The dialog is implemented via the QPlatformFileDialogHelper when possible;
- otherwise it falls back to a QFileDialog or a QML implementation.
-
- \since 5.1
-*/
-
-/*!
- Constructs a file dialog with parent window \a parent.
-*/
-QQuickPlatformFileDialog::QQuickPlatformFileDialog(QObject *parent) :
- QQuickAbstractFileDialog(parent)
-{
-}
-
-/*!
- Destroys the file dialog.
-*/
-QQuickPlatformFileDialog::~QQuickPlatformFileDialog()
-{
- if (m_dlgHelper)
- m_dlgHelper->hide();
- delete m_dlgHelper;
-}
-
-QPlatformFileDialogHelper *QQuickPlatformFileDialog::helper()
-{
- QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent());
- if (parentItem)
- m_parentWindow = parentItem->window();
-
- if ( !m_dlgHelper && QGuiApplicationPrivate::platformTheme()->
- usePlatformNativeDialog(QPlatformTheme::FileDialog) ) {
- m_dlgHelper = static_cast<QPlatformFileDialogHelper *>(QGuiApplicationPrivate::platformTheme()
- ->createPlatformDialogHelper(QPlatformTheme::FileDialog));
- if (!m_dlgHelper)
- return m_dlgHelper;
- connect(m_dlgHelper, SIGNAL(directoryEntered(QUrl)), this, SIGNAL(folderChanged()));
- connect(m_dlgHelper, SIGNAL(filterSelected(QString)), this, SIGNAL(filterSelected()));
- connect(m_dlgHelper, SIGNAL(accept()), this, SLOT(accept()));
- connect(m_dlgHelper, SIGNAL(reject()), this, SLOT(reject()));
- }
-
- return m_dlgHelper;
-}
-
-/*!
- \qmlproperty bool FileDialog::visible
-
- This property holds whether the dialog is visible. By default this is
- false.
-
- \sa modality
-*/
-
-/*!
- \qmlproperty Qt::WindowModality FileDialog::modality
-
- Whether the dialog should be shown modal with respect to the window
- containing the dialog's parent Item, modal with respect to the whole
- application, or non-modal.
-
- By default it is \c Qt.WindowModal.
-
- Modality does not mean that there are any blocking calls to wait for the
- dialog to be accepted or rejected; it's only that the user will be
- prevented from interacting with the parent window and/or the application
- windows at the same time. You probably need to write an onAccepted handler
- to actually load or save the chosen file.
-*/
-
-/*!
- \qmlmethod void FileDialog::open()
-
- Shows the dialog to the user. It is equivalent to setting \l visible to
- true.
-*/
-
-/*!
- \qmlmethod void FileDialog::close()
-
- Closes the dialog.
-*/
-
-/*!
- \qmlproperty string FileDialog::title
-
- The title of the dialog window.
-*/
-
-/*!
- \qmlproperty bool FileDialog::selectExisting
-
- Whether only existing files or directories can be selected.
-
- By default, this property is true. This property must be set to the desired
- value before opening the dialog. Setting this property to false implies
- that the dialog is for naming a file to which to save something, or naming
- a folder to be created; therefore \l selectMultiple must be false.
-*/
-
-/*!
- \qmlproperty bool FileDialog::selectMultiple
-
- Whether more than one filename can be selected.
-
- By default, this property is false. This property must be set to the
- desired value before opening the dialog. Setting this property to true
- implies that \l selectExisting must be true.
-*/
-
-/*!
- \qmlproperty bool FileDialog::selectFolder
-
- Whether the selected item should be a folder.
-
- By default, this property is false. This property must be set to the
- desired value before opening the dialog. Setting this property to true
- implies that \l selectMultiple must be false and \l selectExisting must be
- true.
-*/
-
-/*!
- \qmlproperty url FileDialog::folder
-
- The path to the currently selected folder. Setting this property before
- invoking open() will cause the file browser to be initially positioned on
- the specified folder.
-
- The value of this property is also updated after the dialog is closed.
-
- By default, this property is false.
-*/
-
-/*!
- \qmlproperty list<string> FileDialog::nameFilters
-
- A list of strings to be used as file name filters. Each string can be a
- space-separated list of filters; filters may include the ? and * wildcards.
- The list of filters can also be enclosed in parentheses and a textual
- description of the filter can be provided.
-
- For example:
-
- \qml
- FileDialog {
- nameFilters: [ "Image files (*.jpg *.png)", "All files (*)" ]
- }
- \endqml
-
- \note Directories are not excluded by filters.
- \sa selectedNameFilter
-*/
-
-/*!
- \qmlproperty string FileDialog::selectedNameFilter
-
- Which of the \l nameFilters is currently selected.
-
- This property can be set before the dialog is visible, to set the default
- name filter, and can also be set while the dialog is visible to set the
- current name filter. It is also updated when the user selects a different
- filter.
-*/
-
-/*!
- \qmlproperty url FileDialog::fileUrl
-
- The path of the file which was selected by the user.
-
- \note This property is set only if exactly one file was selected. In all
- other cases, it will be empty.
-
- \sa fileUrls
-*/
-
-/*!
- \qmlproperty list<url> FileDialog::fileUrls
-
- The list of file paths which were selected by the user.
-*/
-
-QT_END_NAMESPACE
diff --git a/src/imports/dialogs/qquickplatformfiledialog_p.h b/src/imports/dialogs/qquickplatformfiledialog_p.h
deleted file mode 100644
index 5431836271..0000000000
--- a/src/imports/dialogs/qquickplatformfiledialog_p.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKPLATFORMFILEDIALOG_P_H
-#define QQUICKPLATFORMFILEDIALOG_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qquickabstractfiledialog_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickPlatformFileDialog : public QQuickAbstractFileDialog
-{
- Q_OBJECT
-
-public:
- QQuickPlatformFileDialog(QObject *parent = 0);
- virtual ~QQuickPlatformFileDialog();
-
-protected:
- QPlatformFileDialogHelper *helper();
-
- Q_DISABLE_COPY(QQuickPlatformFileDialog)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickPlatformFileDialog *)
-
-#endif // QQUICKPLATFORMFILEDIALOG_P_H
diff --git a/src/imports/dialogs/qquickplatformfontdialog.cpp b/src/imports/dialogs/qquickplatformfontdialog.cpp
deleted file mode 100644
index 46ad5eb8df..0000000000
--- a/src/imports/dialogs/qquickplatformfontdialog.cpp
+++ /dev/null
@@ -1,252 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickplatformfontdialog_p.h"
-#include "qquickitem.h"
-
-#include <private/qguiapplication_p.h>
-#include <QWindow>
-#include <QQuickView>
-#include <QQuickWindow>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype FontDialog
- \instantiates QQuickPlatformFontDialog
- \inqmlmodule QtQuick.Dialogs 1
- \ingroup qtquick-visual
- \ingroup dialogs
- \brief Dialog component for choosing a font.
- \since 5.2
-
- FontDialog allows the user to select a font. The dialog is initially
- invisible. You need to set the properties as desired first, then set
- \l visible to true or call \l open().
-
- Here is a minimal example to open a font dialog and exit after the user
- chooses a font:
-
- \qml
- import QtQuick 2.2
- import QtQuick.Dialogs 1.1
-
- FontDialog {
- id: fontDialog
- title: "Please choose a font"
- font: Qt.font({ family: "Arial", pointSize: 24, weight: Font.Normal })
- onAccepted: {
- console.log("You chose: " + fontDialog.font)
- Qt.quit()
- }
- onRejected: {
- console.log("Canceled")
- Qt.quit()
- }
- Component.onCompleted: visible = true
- }
- \endqml
-
- A FontDialog window is automatically transient for its parent window. So
- whether you declare the dialog inside an \l Item or inside a \l Window, the
- dialog will appear centered over the window containing the item, or over
- the Window that you declared.
-
- The implementation of FontDialog will be a platform font dialog if
- possible. If that isn't possible, then it will try to instantiate a
- \l QFontDialog. If that also isn't possible, then it will fall back to a QML
- implementation, DefaultFontDialog.qml. In that case you can customize the
- appearance by editing this file. DefaultFontDialog.qml contains a Rectangle
- to hold the dialog's contents, because certain embedded systems do not
- support multiple top-level windows. When the dialog becomes visible, it
- will automatically be wrapped in a Window if possible, or simply reparented
- on top of the main window if there can only be one window.
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::FontDialog::accepted
-
- The \a accepted signal is emitted when the user has finished using the
- dialog. You can then inspect the \a font property to get the selection.
-
- Example:
-
- \qml
- FontDialog {
- onAccepted: { console.log("Selected font: " + font) }
- }
- \endqml
-*/
-
-/*!
- \qmlsignal QtQuick::Dialogs::FontDialog::rejected
-
- The \a rejected signal is emitted when the user has dismissed the dialog,
- either by closing the dialog window or by pressing the Cancel button.
-*/
-
-/*!
- \class QQuickPlatformFontDialog
- \inmodule QtQuick.Dialogs
- \internal
-
- \brief The QQuickPlatformFontDialog class provides a font dialog
-
- The dialog is implemented via the QQuickPlatformFontDialogHelper when possible;
- otherwise it falls back to a QFontDialog or a QML implementation.
-
- \since 5.2
-*/
-
-/*!
- Constructs a file dialog with parent window \a parent.
-*/
-QQuickPlatformFontDialog::QQuickPlatformFontDialog(QObject *parent) :
- QQuickAbstractFontDialog(parent)
-{
-}
-
-/*!
- Destroys the file dialog.
-*/
-QQuickPlatformFontDialog::~QQuickPlatformFontDialog()
-{
- if (m_dlgHelper)
- m_dlgHelper->hide();
- delete m_dlgHelper;
-}
-
-QPlatformFontDialogHelper *QQuickPlatformFontDialog::helper()
-{
- QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent());
- if (parentItem)
- m_parentWindow = parentItem->window();
-
- if ( !m_dlgHelper && QGuiApplicationPrivate::platformTheme()->
- usePlatformNativeDialog(QPlatformTheme::FontDialog) ) {
- m_dlgHelper = static_cast<QPlatformFontDialogHelper *>(QGuiApplicationPrivate::platformTheme()
- ->createPlatformDialogHelper(QPlatformTheme::FontDialog));
- if (!m_dlgHelper)
- return m_dlgHelper;
- connect(m_dlgHelper, SIGNAL(accept()), this, SLOT(accept()));
- connect(m_dlgHelper, SIGNAL(reject()), this, SLOT(reject()));
- connect(m_dlgHelper, SIGNAL(currentFontChanged(const QFont&)), this, SLOT(setFont(const QFont&)));
- connect(m_dlgHelper, SIGNAL(fontSelected(const QFont&)), this, SLOT(setFont(const QFont&)));
- }
-
- return m_dlgHelper;
-}
-
-/*!
- \qmlproperty bool FontDialog::visible
-
- This property holds whether the dialog is visible. By default this is
- false.
-
- \sa modality
-*/
-
-/*!
- \qmlproperty Qt::WindowModality FontDialog::modality
-
- Whether the dialog should be shown modal with respect to the window
- containing the dialog's parent Item, modal with respect to the whole
- application, or non-modal.
-
- By default it is \l WindowModal.
-
- Modality does not mean that there are any blocking calls to wait for the
- dialog to be accepted or rejected; it's only that the user will be
- prevented from interacting with the parent window and/or the application
- windows at the same time. You probably need to write an onAccepted handler
- to actually load or save the chosen file.
-*/
-
-/*!
- \qmlmethod void FontDialog::open()
-
- Shows the dialog to the user. It is equivalent to setting \l visible to
- true.
-*/
-
-/*!
- \qmlmethod void FontDialog::close()
-
- Closes the dialog.
-*/
-
-/*!
- \qmlproperty string FontDialog::title
-
- The title of the dialog window.
-*/
-
-/*!
- \qmlproperty bool FontDialog::scalableFonts
-
- Whether the dialog will show scalable fonts or not.
-*/
-
-/*!
- \qmlproperty bool FontDialog::nonScalableFonts
-
- Whether the dialog will show non scalable fonts or not.
-*/
-
-/*!
- \qmlproperty bool FontDialog::monospacedFonts
-
- Whether the dialog will show monospaced fonts or not.
-*/
-
-/*!
- \qmlproperty bool FontDialog::proportionalFonts
-
- Whether the dialog will show proportional fonts or not.
-*/
-
-/*!
- \qmlproperty font FontDialog::font
-
- The font which the user selected.
-*/
-
-QT_END_NAMESPACE
diff --git a/src/imports/dialogs/qquickplatformfontdialog_p.h b/src/imports/dialogs/qquickplatformfontdialog_p.h
deleted file mode 100644
index 743b24ad87..0000000000
--- a/src/imports/dialogs/qquickplatformfontdialog_p.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKPLATFORMFONTDIALOG_P_H
-#define QQUICKPLATFORMFONTDIALOG_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qquickabstractfontdialog_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickPlatformFontDialog : public QQuickAbstractFontDialog
-{
- Q_OBJECT
-
-public:
- QQuickPlatformFontDialog(QObject *parent = 0);
- virtual ~QQuickPlatformFontDialog();
-
-protected:
- QPlatformFontDialogHelper *helper();
-
- Q_DISABLE_COPY(QQuickPlatformFontDialog)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickPlatformFontDialog *)
-
-#endif // QQUICKPLATFORMFONTDIALOG_P_H
diff --git a/src/imports/dialogs/qquickplatformmessagedialog.cpp b/src/imports/dialogs/qquickplatformmessagedialog.cpp
deleted file mode 100644
index 65114100d2..0000000000
--- a/src/imports/dialogs/qquickplatformmessagedialog.cpp
+++ /dev/null
@@ -1,398 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickplatformmessagedialog_p.h"
-#include "qquickitem.h"
-
-#include <private/qguiapplication_p.h>
-#include <QWindow>
-#include <QQuickView>
-#include <QQuickWindow>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype MessageDialog
- \instantiates QQuickPlatformMessageDialog
- \inqmlmodule QtQuick.Dialogs 1
- \ingroup dialogs
- \brief Dialog component for displaying popup messages.
- \since 5.2
-
- The most basic use case for a MessageDialog is a popup alert. It also
- allows the user to respond in various ways depending on which buttons are
- enabled. The dialog is initially invisible. You need to set the properties
- as desired first, then set \l visible to \c true or call \l open().
-
- Here is a minimal example to show an alert and exit after the user
- responds:
-
- \qml
- import QtQuick 2.2
- import QtQuick.Dialogs 1.1
-
- MessageDialog {
- id: messageDialog
- title: "May I have your attention please"
- text: "It's so cool that you are using Qt Quick."
- onAccepted: {
- console.log("And of course you could only agree.")
- Qt.quit()
- }
- Component.onCompleted: visible = true
- }
- \endqml
-
- There are several possible handlers depending on which \l standardButtons
- the dialog has and the \l {QMessageBox::ButtonRole} {ButtonRole} of each.
- For example, the \l {rejected} {onRejected} handler will be called if the
- user presses a \gui Cancel, \gui Close or \gui Abort button.
-
- A MessageDialog window is automatically transient for its parent window. So
- whether you declare the dialog inside an \l Item or inside a \l Window, the
- dialog will appear centered over the window containing the item, or over
- the Window that you declared.
-
- The implementation of MessageDialog will be a platform message dialog if
- possible. If that isn't possible, then it will try to instantiate a
- \l QMessageBox. If that also isn't possible, then it will fall back to a QML
- implementation, \c DefaultMessageDialog.qml. In that case you can customize
- the appearance by editing this file. \c DefaultMessageDialog.qml contains a
- \l Rectangle to hold the dialog's contents, because certain embedded systems
- do not support multiple top-level windows. When the dialog becomes visible,
- it will automatically be wrapped in a \l Window if possible, or simply
- reparented on top of the main window if there can only be one window.
-*/
-
-/*!
- \qmlsignal MessageDialog::accepted()
-
- This handler is called when the user has pressed any button which has the
- \l {QMessageBox::AcceptRole} {AcceptRole}: \gui OK, \gui Open, \gui Save,
- \gui {Save All}, \gui Retry or \gui Ignore.
-*/
-
-/*!
- \qmlsignal MessageDialog::rejected()
-
- This handler is called when the user has dismissed the dialog, by closing
- the dialog window, by pressing a \gui Cancel, \gui Close or \gui Abort
- button on the dialog, or by pressing the back button or the escape key.
-*/
-
-/*!
- \qmlsignal MessageDialog::discard()
-
- This handler is called when the user has pressed the \gui Discard button.
-*/
-
-/*!
- \qmlsignal MessageDialog::help()
-
- This handler is called when the user has pressed the \gui Help button.
- Depending on platform, the dialog may not be automatically dismissed
- because the help that your application provides may need to be relevant to
- the text shown in this dialog in order to assist the user in making a
- decision. However on other platforms it's not possible to show a dialog and
- a help window at the same time. If you want to be sure that the dialog will
- close, you can set \l visible to \c false in your handler.
-*/
-
-/*!
- \qmlsignal MessageDialog::yes()
-
- This handler is called when the user has pressed any button which has
- the \l {QMessageBox::YesRole} {YesRole}: \gui Yes or \gui {Yes to All}.
-*/
-
-/*!
- \qmlsignal MessageDialog::no()
-
- This handler is called when the user has pressed any button which has
- the \l {QMessageBox::NoRole} {NoRole}: \gui No or \gui {No to All}.
-*/
-
-/*!
- \qmlsignal MessageDialog::apply()
-
- This handler is called when the user has pressed the \gui Apply button.
-*/
-
-/*!
- \qmlsignal MessageDialog::reset()
-
- This handler is called when the user has pressed any button which has
- the \l {QMessageBox::ResetRole} {ResetRole}: \gui Reset or \gui {Restore Defaults}.
-*/
-
-/*!
- \class QQuickPlatformMessageDialog
- \inmodule QtQuick.Dialogs
- \internal
-
- \brief The QQuickPlatformMessageDialog class provides a message dialog
-
- The dialog is implemented via the QPlatformMessageDialogHelper when possible;
- otherwise it falls back to a QMessageBox or a QML implementation.
-
- \since 5.2
-*/
-
-/*!
- Constructs a file dialog with parent window \a parent.
-*/
-QQuickPlatformMessageDialog::QQuickPlatformMessageDialog(QObject *parent) :
- QQuickAbstractMessageDialog(parent)
-{
-}
-
-/*!
- Destroys the file dialog.
-*/
-QQuickPlatformMessageDialog::~QQuickPlatformMessageDialog()
-{
- if (m_dlgHelper)
- m_dlgHelper->hide();
- delete m_dlgHelper;
-}
-
-QPlatformMessageDialogHelper *QQuickPlatformMessageDialog::helper()
-{
- QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent());
- if (parentItem)
- m_parentWindow = parentItem->window();
-
- if ( !m_dlgHelper && QGuiApplicationPrivate::platformTheme()->
- usePlatformNativeDialog(QPlatformTheme::MessageDialog) ) {
- m_dlgHelper = static_cast<QPlatformMessageDialogHelper *>(QGuiApplicationPrivate::platformTheme()
- ->createPlatformDialogHelper(QPlatformTheme::MessageDialog));
- if (!m_dlgHelper)
- return m_dlgHelper;
- // accept() shouldn't be emitted. reject() happens only if the dialog is
- // dismissed by closing the window rather than by one of its button widgets.
- connect(m_dlgHelper, SIGNAL(accept()), this, SLOT(accept()));
- connect(m_dlgHelper, SIGNAL(reject()), this, SLOT(reject()));
- connect(m_dlgHelper, SIGNAL(clicked(QMessageDialogOptions::StandardButton, QMessageDialogOptions::ButtonRole)),
- this, SLOT(click(QMessageDialogOptions::StandardButton, QMessageDialogOptions::ButtonRole)));
- }
-
- return m_dlgHelper;
-}
-
-/*!
- \qmlproperty bool MessageDialog::visible
-
- This property holds whether the dialog is visible. By default this is
- \c false.
-
- \sa modality
-*/
-
-/*!
- \qmlproperty Qt::WindowModality MessageDialog::modality
-
- Whether the dialog should be shown modal with respect to the window
- containing the dialog's parent Item, modal with respect to the whole
- application, or non-modal.
-
- By default it is \c Qt.WindowModal.
-
- Modality does not mean that there are any blocking calls to wait for the
- dialog to be accepted or rejected; it's only that the user will be
- prevented from interacting with the parent window and/or the application
- windows until the dialog is dismissed.
-*/
-
-/*!
- \qmlmethod void MessageDialog::open()
-
- Shows the dialog to the user. It is equivalent to setting \l visible to
- \c true.
-*/
-
-/*!
- \qmlmethod void MessageDialog::close()
-
- Closes the dialog.
-*/
-
-/*!
- \qmlproperty string MessageDialog::title
-
- The title of the dialog window.
-*/
-
-/*!
- \qmlproperty string MessageDialog::text
-
- The primary text to be displayed.
-*/
-
-/*!
- \qmlproperty string MessageDialog::informativeText
-
- The informative text that provides a fuller description for the message.
-
- Informative text can be used to supplement the \c text to give more
- information to the user. Depending on the platform, it may appear in a
- smaller font below the text, or simply appended to the text.
-
- \sa {MessageDialog::text}{text}
-*/
-
-/*!
- \qmlproperty string MessageDialog::detailedText
-
- The text to be displayed in the details area, which is hidden by default.
- The user will then be able to press the \gui {Show Details...} button to
- make it visible.
-
- \sa {MessageDialog::text}{text}
-*/
-
-/*!
- \enum QQuickStandardIcon::Icon
-
- This enum specifies a standard icon to be used on a dialog.
-*/
-
-/*!
- \qmlproperty QQuickStandardIcon::Icon MessageDialog::icon
-
- The icon of the message box can be specified with one of these values:
-
- \table
- \row
- \li no icon
- \li \l StandardIcon.NoIcon
- \li For an unadorned text alert.
- \row
- \li \inlineimage ../images/question.png "Question icon"
- \li \l StandardIcon.Question
- \li For asking a question during normal operations.
- \row
- \li \image information.png
- \li \l StandardIcon.Information
- \li For reporting information about normal operations.
- \row
- \li \image warning.png
- \li \l StandardIcon.Warning
- \li For reporting non-critical errors.
- \row
- \li \image critical.png
- \li \l StandardIcon.Critical
- \li For reporting critical errors.
- \endtable
-
- The default is \c StandardIcon.NoIcon.
-
- The enum values are the same as in \l QMessageBox::Icon.
-*/
-
-// TODO after QTBUG-35019 is fixed: fix links to this module's enums
-// rather than linking to those in QMessageBox
-/*!
- \enum QQuickStandardButton::StandardButton
-
- This enum specifies a button with a standard label to be used on a dialog.
-*/
-
-/*!
- \qmlproperty StandardButtons MessageDialog::standardButtons
-
- The MessageDialog has a row of buttons along the bottom, each of which has
- a \l {QMessageBox::ButtonRole} {ButtonRole} that determines which signal
- will be emitted when the button is pressed. You can also find out which
- specific button was pressed after the fact via the \l clickedButton
- property. You can control which buttons are available by setting
- standardButtons to a bitwise-or combination of the following flags:
-
- \table
- \row \li StandardButton.Ok \li An \gui OK button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Open \li An \gui Open button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Save \li A \gui Save button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Cancel \li A \gui Cancel button defined with the \l {QMessageBox::RejectRole} {RejectRole}.
- \row \li StandardButton.Close \li A \gui Close button defined with the \l {QMessageBox::RejectRole} {RejectRole}.
- \row \li StandardButton.Discard \li A \gui Discard or \gui {Don't Save} button, depending on the platform,
- defined with the \l {QMessageBox::DestructiveRole} {DestructiveRole}.
- \row \li StandardButton.Apply \li An \gui Apply button defined with the \l {QMessageBox::ApplyRole} {ApplyRole}.
- \row \li StandardButton.Reset \li A \gui Reset button defined with the \l {QMessageBox::ResetRole} {ResetRole}.
- \row \li StandardButton.RestoreDefaults \li A \gui {Restore Defaults} button defined with the \l {QMessageBox::ResetRole} {ResetRole}.
- \row \li StandardButton.Help \li A \gui Help button defined with the \l {QMessageBox::HelpRole} {HelpRole}.
- \row \li StandardButton.SaveAll \li A \gui {Save All} button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Yes \li A \gui Yes button defined with the \l {QMessageBox::YesRole} {YesRole}.
- \row \li StandardButton.YesToAll \li A \gui {Yes to All} button defined with the \l {QMessageBox::YesRole} {YesRole}.
- \row \li StandardButton.No \li A \gui No button defined with the \l {QMessageBox::NoRole} {NoRole}.
- \row \li StandardButton.NoToAll \li A \gui {No to All} button defined with the \l {QMessageBox::NoRole} {NoRole}.
- \row \li StandardButton.Abort \li An \gui Abort button defined with the \l {QMessageBox::RejectRole} {RejectRole}.
- \row \li StandardButton.Retry \li A \gui Retry button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Ignore \li An \gui Ignore button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \endtable
-
- For example the following dialog will ask a question with 5 possible answers:
-
- \qml
- import QtQuick 2.2
- import QtQuick.Dialogs 1.1
-
- MessageDialog {
- title: "Overwrite?"
- icon: StandardIcon.Question
- text: "file.txt already exists. Replace?"
- detailedText: "To replace a file means that its existing contents will be lost. " +
- "The file that you are copying now will be copied over it instead."
- standardButtons: StandardButton.Yes | StandardButton.YesToAll |
- StandardButton.No | StandardButton.NoToAll | StandardButton.Abort
- Component.onCompleted: visible = true
- onYes: console.log("copied")
- onNo: console.log("didn't copy")
- onRejected: console.log("aborted")
- }
- \endqml
-
- \image replacefile.png
-
- The default is \c StandardButton.Ok.
-
- The enum values are the same as in \l QMessageBox::StandardButtons.
-*/
-
-QT_END_NAMESPACE
diff --git a/src/imports/dialogs/qquickplatformmessagedialog_p.h b/src/imports/dialogs/qquickplatformmessagedialog_p.h
deleted file mode 100644
index 61f055bb38..0000000000
--- a/src/imports/dialogs/qquickplatformmessagedialog_p.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 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 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKPLATFORMMESSAGEDIALOG_P_H
-#define QQUICKPLATFORMMESSAGEDIALOG_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qquickabstractmessagedialog_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickPlatformMessageDialog : public QQuickAbstractMessageDialog
-{
- Q_OBJECT
-
-public:
- QQuickPlatformMessageDialog(QObject *parent = 0);
- virtual ~QQuickPlatformMessageDialog();
-
-protected:
- QPlatformMessageDialogHelper *helper();
-
- Q_DISABLE_COPY(QQuickPlatformMessageDialog)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickPlatformMessageDialog *)
-
-#endif // QQUICKPLATFORMMESSAGEDIALOG_P_H