aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2013-12-16 16:05:25 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-07 14:40:00 +0100
commit34793538fbbfce733da1d8495b7f2ed05c5e9a8b (patch)
tree1902ad80e8d9484182f5b11d969f766e511d6346 /examples/quick
parent2740cf4e844f8b8612ea595219eb72c57bbdc42b (diff)
remove QtQuick.Dialogs and related modules
They are being moved to the QtQuick Controls repository (see change ba9ba084124403bd8930e29d8afcea9d64b6c0b6 in qtquickcontrols). This makes it possible to use QtQuick Controls in the implementation. [ChangeLog][QtQuick][Dialogs]Moved dialog implementations from qtdeclarative module to qtquickcontrols module due to dependencies Change-Id: I76d5b71b185dd14a188ea68f18bfec61b4bf2f41 Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/dialogs/dialogs.pro4
-rw-r--r--examples/quick/dialogs/systemdialogs/ColorDialogs.qml146
-rw-r--r--examples/quick/dialogs/systemdialogs/FileDialogs.qml180
-rw-r--r--examples/quick/dialogs/systemdialogs/FontDialogs.qml153
-rw-r--r--examples/quick/dialogs/systemdialogs/MessageDialogs.qml307
-rw-r--r--examples/quick/dialogs/systemdialogs/doc/images/systemdialogs-example.jpgbin47413 -> 0 bytes
-rw-r--r--examples/quick/dialogs/systemdialogs/doc/src/systemdialogs.qdoc48
-rw-r--r--examples/quick/dialogs/systemdialogs/main.cpp41
-rw-r--r--examples/quick/dialogs/systemdialogs/systemdialogs.pro15
-rw-r--r--examples/quick/dialogs/systemdialogs/systemdialogs.qml71
-rw-r--r--examples/quick/dialogs/systemdialogs/systemdialogs.qrc9
-rw-r--r--examples/quick/quick.pro1
12 files changed, 0 insertions, 975 deletions
diff --git a/examples/quick/dialogs/dialogs.pro b/examples/quick/dialogs/dialogs.pro
deleted file mode 100644
index 538e75686c..0000000000
--- a/examples/quick/dialogs/dialogs.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-TEMPLATE = subdirs
-
-SUBDIRS = \
- systemdialogs
diff --git a/examples/quick/dialogs/systemdialogs/ColorDialogs.qml b/examples/quick/dialogs/systemdialogs/ColorDialogs.qml
deleted file mode 100644
index 0cb42a01aa..0000000000
--- a/examples/quick/dialogs/systemdialogs/ColorDialogs.qml
+++ /dev/null
@@ -1,146 +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 examples 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.0
-import QtQuick.Dialogs 1.0
-import "../../shared"
-
-Rectangle {
- width: 320
- height: 240
- color: palette.window
- SystemPalette { id: palette }
- clip: true
-
- //! [colordialog]
- ColorDialog {
- id: colorDialog
- visible: colorDialogVisible.checked
- modality: colorDialogModal.checked ? Qt.WindowModal : Qt.NonModal
- title: "Choose a color"
- color: "green"
- showAlphaChannel: colorDialogAlpha.checked
- onAccepted: { console.log("Accepted: " + color) }
- onRejected: { console.log("Rejected") }
- }
- //! [colordialog]
-
- Column {
- anchors.fill: parent
- anchors.margins: 12
- spacing: 8
- Text {
- font.bold: true
- text: "Color dialog properties:"
- }
- CheckBox {
- id: colorDialogModal
- text: "Modal"
- checked: true
- Binding on checked { value: colorDialog.modality != Qt.NonModal }
- }
- CheckBox {
- id: colorDialogAlpha
- text: "Show alpha channel"
- Binding on checked { value: colorDialog.showAlphaChannel }
- }
- CheckBox {
- id: colorDialogVisible
- text: "Visible"
- Binding on checked { value: colorDialog.visible }
- }
- Row {
- id: colorRow
- spacing: parent.spacing
- height: colorLabel.implicitHeight * 2.0
- Rectangle {
- color: colorDialog.color
- height: parent.height
- width: height * 2
- border.color: "black"
- MouseArea {
- anchors.fill: parent
- onClicked: colorDialog.open()
- }
- }
- Text {
- id: colorLabel
- color: palette.windowText
- text: "<b>current color:</b> " + colorDialog.color
- anchors.verticalCenter: parent.verticalCenter
- }
- }
- }
-
- Rectangle {
- anchors {
- left: parent.left
- right: parent.right
- bottom: parent.bottom
- }
- height: buttonRow.height * 1.2
- color: Qt.darker(palette.window, 1.1)
- border.color: Qt.darker(palette.window, 1.3)
- Row {
- id: buttonRow
- spacing: 6
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: 12
- height: implicitHeight
- width: parent.width
- Button {
- text: "Open"
- anchors.verticalCenter: parent.verticalCenter
- onClicked: colorDialog.open()
- }
- Button {
- text: "Close"
- anchors.verticalCenter: parent.verticalCenter
- onClicked: colorDialog.close()
- }
- Button {
- text: "set to green"
- anchors.verticalCenter: parent.verticalCenter
- onClicked: colorDialog.color = "green"
- }
- }
- }
-}
diff --git a/examples/quick/dialogs/systemdialogs/FileDialogs.qml b/examples/quick/dialogs/systemdialogs/FileDialogs.qml
deleted file mode 100644
index d6ee1a13ca..0000000000
--- a/examples/quick/dialogs/systemdialogs/FileDialogs.qml
+++ /dev/null
@@ -1,180 +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 examples 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.0
-import QtQuick.Dialogs 1.0
-import QtQuick.Window 2.0
-import "../../shared"
-
-Rectangle {
- width: 580
- height: 400
- color: palette.window
- SystemPalette { id: palette }
- clip: true
-
- //! [filedialog]
- FileDialog {
- id: fileDialog
- visible: fileDialogVisible.checked
- modality: fileDialogModal.checked ? Qt.WindowModal : Qt.NonModal
- title: fileDialogSelectFolder.checked ? "Choose a folder" :
- (fileDialogSelectMultiple.checked ? "Choose some files" : "Choose a file")
- selectExisting: fileDialogSelectExisting.checked
- selectMultiple: fileDialogSelectMultiple.checked
- selectFolder: fileDialogSelectFolder.checked
- nameFilters: [ "Image files (*.png *.jpg)", "All files (*)" ]
- selectedNameFilter: "All files (*)"
- onAccepted: {
- console.log("Accepted: " + fileUrls)
- if (fileDialogOpenFiles.checked)
- for (var i = 0; i < fileUrls.length; ++i)
- Qt.openUrlExternally(fileUrls[i])
- }
- onRejected: { console.log("Rejected") }
- }
- //! [filedialog]
-
- Column {
- anchors.fill: parent
- anchors.margins: 12
- spacing: 8
- Text {
- color: palette.windowText
- font.bold: true
- text: "File dialog properties:"
- }
- CheckBox {
- id: fileDialogModal
- text: "Modal"
- checked: true
- Binding on checked { value: fileDialog.modality != Qt.NonModal }
- }
- CheckBox {
- id: fileDialogSelectFolder
- text: "Select Folder"
- Binding on checked { value: fileDialog.selectFolder }
- }
- CheckBox {
- id: fileDialogSelectExisting
- text: "Select Existing Files"
- checked: true
- Binding on checked { value: fileDialog.selectExisting }
- }
- CheckBox {
- id: fileDialogSelectMultiple
- text: "Select Multiple Files"
- Binding on checked { value: fileDialog.selectMultiple }
- }
- CheckBox {
- id: fileDialogOpenFiles
- text: "Open Files After Accepting"
- }
- CheckBox {
- id: fileDialogVisible
- text: "Visible"
- Binding on checked { value: fileDialog.visible }
- }
- Text {
- color: palette.windowText
- text: "<b>current view folder:</b> " + fileDialog.folder
- }
- Text {
- color: palette.windowText
- text: "<b>name filters:</b> {" + fileDialog.nameFilters + "}"
- width: parent.width
- wrapMode: Text.Wrap
- }
- Text {
- color: palette.windowText
- text: "<b>current filter:</b>" + fileDialog.selectedNameFilter
- width: parent.width
- wrapMode: Text.Wrap
- }
- Text {
- color: palette.windowText
- text: "<b>chosen files:</b> " + fileDialog.fileUrls
- width: parent.width
- wrapMode: Text.Wrap
- }
- Text {
- color: palette.windowText
- text: "<b>chosen single path:</b> " + fileDialog.fileUrl
- width: parent.width
- wrapMode: Text.Wrap
- }
- }
-
- Rectangle {
- anchors {
- left: parent.left
- right: parent.right
- bottom: parent.bottom
- }
- height: buttonRow.height * 1.2
- color: Qt.darker(palette.window, 1.1)
- border.color: Qt.darker(palette.window, 1.3)
- Row {
- id: buttonRow
- spacing: 6
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: 12
- height: implicitHeight
- width: parent.width
- Button {
- text: "Open"
- anchors.verticalCenter: parent.verticalCenter
- onClicked: fileDialog.open()
- }
- Button {
- text: "Close"
- anchors.verticalCenter: parent.verticalCenter
- onClicked: fileDialog.close()
- }
- Button {
- text: "go to /tmp"
- anchors.verticalCenter: parent.verticalCenter
- // TODO: QTBUG-29814 This isn't portable, but we don't expose QDir::tempPath to QML yet.
- onClicked: fileDialog.folder = (Qt.platform.os === "windows" ? "/c:/temp" : "/tmp")
- }
- }
- }
-}
diff --git a/examples/quick/dialogs/systemdialogs/FontDialogs.qml b/examples/quick/dialogs/systemdialogs/FontDialogs.qml
deleted file mode 100644
index 7d4328994b..0000000000
--- a/examples/quick/dialogs/systemdialogs/FontDialogs.qml
+++ /dev/null
@@ -1,153 +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 examples 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.Dialogs 1.1
-import "../../shared"
-
-Rectangle {
- width: 320
- height: 360
- color: palette.window
- SystemPalette { id: palette }
- clip: true
-
- FontDialog {
- id: fontDialog
- visible: fontDialogVisible.checked
- modality: fontDialogModal.checked ? Qt.WindowModal : Qt.NonModal
- scalableFonts: fontDialogScalableFonts.checked
- nonScalableFonts: fontDialogNonScalableFonts.checked
- monospacedFonts: fontDialogMonospacedFonts.checked
- proportionalFonts: fontDialogProportionalFonts.checked
- title: "Choose a font"
- font: Qt.font({ family: "Arial", pointSize: 24, weight: Font.Normal })
- onAccepted: { console.log("Accepted: " + font) }
- onRejected: { console.log("Rejected") }
- }
-
- Column {
- id: optionsColumn
- anchors.fill: parent
- anchors.margins: 12
- spacing: 8
- Text {
- font.bold: true
- text: "Font dialog properties:"
- }
- CheckBox {
- id: fontDialogModal
- text: "Modal"
- checked: true
- Binding on checked { value: fontDialog.modality != Qt.NonModal }
- }
- CheckBox {
- id: fontDialogScalableFonts
- text: "Scalable fonts"
- Binding on checked { value: fontDialog.scalableFonts }
- }
- CheckBox {
- id: fontDialogNonScalableFonts
- text: "Non scalable fonts"
- Binding on checked { value: fontDialog.nonScalableFonts }
- }
- CheckBox {
- id: fontDialogMonospacedFonts
- text: "Monospaced fonts"
- Binding on checked { value: fontDialog.monospacedFonts }
- }
- CheckBox {
- id: fontDialogProportionalFonts
- text: "Proportional fonts"
- Binding on checked { value: fontDialog.proportionalFonts }
- }
- CheckBox {
- id: fontDialogVisible
- text: "Visible"
- Binding on checked { value: fontDialog.visible }
- }
- Text {
- text: "Current font:"
- }
- Text {
- id: fontLabel
- color: palette.windowText
- text: "<b>" + fontDialog.font.family + " - " + fontDialog.font.pointSize + "</b>"
- MouseArea {
- anchors.fill: parent
- onClicked: fontDialog.open()
- }
- }
- }
-
- Rectangle {
- anchors {
- left: parent.left
- right: parent.right
- bottom: parent.bottom
- }
- height: buttonRow.height * 1.2
- color: Qt.darker(palette.window, 1.1)
- border.color: Qt.darker(palette.window, 1.3)
- Row {
- id: buttonRow
- spacing: 6
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: 12
- width: parent.width
- Button {
- text: "Open"
- anchors.verticalCenter: parent.verticalCenter
- onClicked: fontDialog.open()
- }
- Button {
- text: "Close"
- anchors.verticalCenter: parent.verticalCenter
- onClicked: fontDialog.close()
- }
- Button {
- text: "set to default"
- anchors.verticalCenter: parent.verticalCenter
- onClicked: fontDialog.font = Qt.font({ family: "Arial", pointSize: 24, weight: Font.Normal })
- }
- }
- }
-}
diff --git a/examples/quick/dialogs/systemdialogs/MessageDialogs.qml b/examples/quick/dialogs/systemdialogs/MessageDialogs.qml
deleted file mode 100644
index 9c70228046..0000000000
--- a/examples/quick/dialogs/systemdialogs/MessageDialogs.qml
+++ /dev/null
@@ -1,307 +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 examples 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.1
-import QtQuick.Window 2.0
-import "../../shared"
-
-Rectangle {
- width: 580
- height: 400
- color: palette.window
- SystemPalette { id: palette }
- clip: true
-
- //! [messagedialog]
- MessageDialog {
- id: messageDialog
- visible: messageDialogVisible.checked
- modality: messageDialogModal.checked ? Qt.WindowModal : Qt.NonModal
- title: windowTitleField.text
- text: customizeText.checked ? textField.text : ""
- informativeText: customizeInformativeText.checked ? informativeTextField.text : ""
- detailedText: customizeDetailedText.checked ? detailedTextField.text : ""
- onButtonClicked: console.log("clicked button " + clickedButton)
- onAccepted: lastChosen.text = "Accepted " +
- (clickedButton == StandardButton.Ok ? "(OK)" : (clickedButton == StandardButton.Retry ? "(Retry)" : "(Ignore)"))
- onRejected: lastChosen.text = "Rejected " +
- (clickedButton == StandardButton.Close ? "(Close)" : (clickedButton == StandardButton.Abort ? "(Abort)" : "(Cancel)"))
- onHelp: lastChosen.text = "Yelped for help!"
- onYes: lastChosen.text = (clickedButton == StandardButton.Yes ? "Yeessss!!" : "Yes, now and always")
- onNo: lastChosen.text = (clickedButton == StandardButton.No ? "Oh No." : "No, no, a thousand times no!")
- onApply: lastChosen.text = "Apply"
- onReset: lastChosen.text = "Reset"
- }
- //! [messagedialog]
-
- Column {
- anchors.fill: parent
- anchors.margins: 12
- spacing: 8
- Text {
- color: palette.windowText
- font.bold: true
- text: "Message dialog properties:"
- }
- CheckBox {
- id: messageDialogModal
- text: "Modal"
- checked: true
- Binding on checked { value: messageDialog.modality != Qt.NonModal }
- }
- CheckBox {
- id: customizeTitle
- text: "Window Title"
- checked: true
- width: parent.width
- TextField {
- id: windowTitleField
- anchors.right: parent.right
- width: informativeTextField.width
- text: "Alert"
- }
- }
- Row {
- spacing: 8
- property bool updating: false
- function updateIcon(icon, checked) {
- if (updating) return
- updating = true
- messageDialog.icon = (checked ? icon : StandardIcon.NoIcon)
- for (var i = 0; i < children.length; ++i)
- if (children[i].icon !== icon)
- children[i].checked = false
- updating = false
- }
-
- CheckBox {
- id: iconInformation
- text: "Information"
- property int icon: StandardIcon.Information
- onCheckedChanged: parent.updateIcon(icon, checked)
- }
-
- CheckBox {
- id: iconWarning
- text: "Warning"
- checked: true
- property int icon: StandardIcon.Warning
- onCheckedChanged: parent.updateIcon(icon, checked)
- Component.onCompleted: parent.updateIcon(icon, true)
- }
-
- CheckBox {
- id: iconCritical
- text: "Critical"
- property int icon: StandardIcon.Critical
- onCheckedChanged: parent.updateIcon(icon, checked)
- }
-
- CheckBox {
- id: iconQuestion
- text: "Question"
- property int icon: StandardIcon.Question
- onCheckedChanged: parent.updateIcon(icon, checked)
- }
- }
-
- CheckBox {
- id: customizeText
- text: "Primary Text"
- checked: true
- width: parent.width
- TextField {
- id: textField
- anchors.right: parent.right
- width: informativeTextField.width
- text: "Attention Please"
- }
- }
- CheckBox {
- id: customizeInformativeText
- text: "Informative Text"
- checked: true
- width: parent.width
- TextField {
- id: informativeTextField
- anchors.right: parent.right
- width: parent.width - parent.row.spacing - parent.row.width
- text: "Be alert!"
- }
- }
- Text {
- text: "Buttons:"
- }
- Flow {
- spacing: 8
- width: parent.width
- property bool updating: false
- function updateButtons(button, checked) {
- if (updating) return
- updating = true
- var buttons = 0
- for (var i = 0; i < children.length; ++i)
- if (children[i].checked)
- buttons |= children[i].button
- if (!buttons)
- buttons = StandardButton.Ok
- messageDialog.standardButtons = buttons
- updating = false
- }
-
- CheckBox {
- text: "Help"
- property int button: StandardButton.Help
- onCheckedChanged: parent.updateButtons(button, checked)
- }
-
- CheckBox {
- text: "Abort"
- property int button: StandardButton.Abort
- onCheckedChanged: parent.updateButtons(button, checked)
- }
-
- CheckBox {
- text: "Close"
- property int button: StandardButton.Close
- onCheckedChanged: parent.updateButtons(button, checked)
- }
-
- CheckBox {
- text: "Cancel"
- property int button: StandardButton.Cancel
- onCheckedChanged: parent.updateButtons(button, checked)
- }
-
- CheckBox {
- text: "NoToAll"
- property int button: StandardButton.NoToAll
- onCheckedChanged: parent.updateButtons(button, checked)
- }
-
- CheckBox {
- text: "No"
- property int button: StandardButton.No
- onCheckedChanged: parent.updateButtons(button, checked)
- }
-
- CheckBox {
- text: "YesToAll"
- property int button: StandardButton.YesToAll
- onCheckedChanged: parent.updateButtons(button, checked)
- }
-
- CheckBox {
- text: "Yes"
- property int button: StandardButton.Yes
- onCheckedChanged: parent.updateButtons(button, checked)
- }
-
- CheckBox {
- text: "Ignore"
- property int button: StandardButton.Ignore
- onCheckedChanged: parent.updateButtons(button, checked)
- }
-
- CheckBox {
- text: "Retry"
- property int button: StandardButton.Retry
- onCheckedChanged: parent.updateButtons(button, checked)
- }
-
- CheckBox {
- text: "OK"
- checked: true
- property int button: StandardButton.Ok
- onCheckedChanged: parent.updateButtons(button, checked)
- }
- }
- CheckBox {
- id: customizeDetailedText
- text: "Detailed Text"
- checked: true
- width: parent.width
- TextField {
- id: detailedTextField
- anchors.right: parent.right
- width: informativeTextField.width
- text: "The world needs more lerts."
- }
- }
- CheckBox {
- id: messageDialogVisible
- text: "Visible"
- Binding on checked { value: messageDialog.visible }
- }
- Text {
- id: lastChosen
- }
- }
-
- Rectangle {
- anchors {
- left: parent.left
- right: parent.right
- bottom: parent.bottom
- }
- height: buttonRow.height * 1.2
- color: Qt.darker(palette.window, 1.1)
- border.color: Qt.darker(palette.window, 1.3)
- Row {
- id: buttonRow
- spacing: 6
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: 12
- width: parent.width
- Button {
- text: "Open"
- anchors.verticalCenter: parent.verticalCenter
- onClicked: messageDialog.open()
- }
- Button {
- text: "Close"
- anchors.verticalCenter: parent.verticalCenter
- onClicked: messageDialog.close()
- }
- }
- }
-}
diff --git a/examples/quick/dialogs/systemdialogs/doc/images/systemdialogs-example.jpg b/examples/quick/dialogs/systemdialogs/doc/images/systemdialogs-example.jpg
deleted file mode 100644
index 4517a39308..0000000000
--- a/examples/quick/dialogs/systemdialogs/doc/images/systemdialogs-example.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/quick/dialogs/systemdialogs/doc/src/systemdialogs.qdoc b/examples/quick/dialogs/systemdialogs/doc/src/systemdialogs.qdoc
deleted file mode 100644
index 9788be7343..0000000000
--- a/examples/quick/dialogs/systemdialogs/doc/src/systemdialogs.qdoc
+++ /dev/null
@@ -1,48 +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$
-**
-****************************************************************************/
-/*!
- \title Qt Quick System Dialog Examples
- \example systemdialogs
- \brief This example demonstrates the system dialog types in QML
- \image systemdialogs-example.jpg
- \ingroup qtquickdialog_examples
-
- This example demonstrates the system dialogs in the \l{Qt Quick Dialogs}
- module. The appearance and behavior is platform-dependent.
-
- A \l FileDialog is used to choose a single file, multiple files or a
- single directory, depending on how it is configured.
- \snippet systemdialogs/FileDialogs.qml filedialog
-
- A \l ColorDialog is used to choose a color, with or without alpha (transparency)
- depending on how it is configured.
- \snippet systemdialogs/ColorDialogs.qml colordialog
-
- The example can be built as a standalone executable, but each
- type of dialog is demonstrated in a separate QML file which can
- also be run separately with qmlscene.
-*/
diff --git a/examples/quick/dialogs/systemdialogs/main.cpp b/examples/quick/dialogs/systemdialogs/main.cpp
deleted file mode 100644
index f6723bb35b..0000000000
--- a/examples/quick/dialogs/systemdialogs/main.cpp
+++ /dev/null
@@ -1,41 +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 examples 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(dialogs/systemdialogs/systemdialogs)
diff --git a/examples/quick/dialogs/systemdialogs/systemdialogs.pro b/examples/quick/dialogs/systemdialogs/systemdialogs.pro
deleted file mode 100644
index 323ea2fac7..0000000000
--- a/examples/quick/dialogs/systemdialogs/systemdialogs.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-RESOURCES += systemdialogs.qrc ../../shared/shared.qrc
-
-OTHER_FILES += \
- systemdialogs.qml \
- FileDialogs.qml \
- ColorDialogs.qml \
- FontDialogs.qml \
- MessageDialogs.qml
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/dialogs/systemdialogs
-INSTALLS += target
diff --git a/examples/quick/dialogs/systemdialogs/systemdialogs.qml b/examples/quick/dialogs/systemdialogs/systemdialogs.qml
deleted file mode 100644
index 1600e88812..0000000000
--- a/examples/quick/dialogs/systemdialogs/systemdialogs.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 examples 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 "../../shared"
-
-TabSet {
- width: 580
- height: 440
-
- FileDialogs {
- property string title: "File Dialog"
- anchors.fill: parent
- color: "#e3e3e3" // to match tab.png
- }
-
- ColorDialogs {
- property string title: "Color Dialog"
- anchors.fill: parent
- color: "#e3e3e3" // to match tab.png
- }
-
- FontDialogs {
- property string title: "Font Dialog"
- anchors.fill: parent
- color: "#e3e3e3" // to match tab.png
- }
-
- MessageDialogs {
- property string title: "Message Dialog"
- anchors.fill: parent
- color: "#e3e3e3" // to match tab.png
- }
-}
diff --git a/examples/quick/dialogs/systemdialogs/systemdialogs.qrc b/examples/quick/dialogs/systemdialogs/systemdialogs.qrc
deleted file mode 100644
index 2193088cb9..0000000000
--- a/examples/quick/dialogs/systemdialogs/systemdialogs.qrc
+++ /dev/null
@@ -1,9 +0,0 @@
-<RCC>
- <qresource prefix="/dialogs/systemdialogs">
- <file>systemdialogs.qml</file>
- <file>FileDialogs.qml</file>
- <file>ColorDialogs.qml</file>
- <file>FontDialogs.qml</file>
- <file>MessageDialogs.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/quick.pro b/examples/quick/quick.pro
index c6b7ee1c34..186988716c 100644
--- a/examples/quick/quick.pro
+++ b/examples/quick/quick.pro
@@ -21,7 +21,6 @@ SUBDIRS = quick-accessibility \
customitems \
imageprovider \
window \
- dialogs \
particles \
demos