diff options
author | Mitch Curtis <[email protected]> | 2021-08-12 14:39:51 +0200 |
---|---|---|
committer | Mitch Curtis <[email protected]> | 2021-08-16 12:52:59 +0200 |
commit | 809339d1484cf556512534367b8170bc26baf072 (patch) | |
tree | 12871313b658f36d058b5ef25af1e247e9c46ce9 /src/quickdialogs2/quickdialogs2quickimpl/qml | |
parent | b01b4f00eae8022c6a97d90f54dac395144ae095 (diff) |
Now that qtquickcontrols2 has been merged into qtdeclarative,
we should make it obvious that this repo should no longer be
used, by preventing it from being built.
Task-number: QTBUG-95173
Pick-to: 6.2
Change-Id: I95bd6a214f3d75a865ab163ee0a1f9ffbeb7a051
Reviewed-by: Alexandru Croitor <[email protected]>
Reviewed-by: Volker Hilsheimer <[email protected]>
Diffstat (limited to 'src/quickdialogs2/quickdialogs2quickimpl/qml')
22 files changed, 0 insertions, 2983 deletions
diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Fusion/FileDialog.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Fusion/FileDialog.qml deleted file mode 100644 index 744f32f4..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Fusion/FileDialog.qml +++ /dev/null @@ -1,196 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.labs.folderlistmodel -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Controls.Fusion -import QtQuick.Controls.Fusion.impl -import QtQuick.Dialogs -import QtQuick.Dialogs.quickimpl -import QtQuick.Layouts -import QtQuick.Templates as T - -import "." as DialogsImpl - -FileDialogImpl { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, - implicitHeaderWidth, - implicitFooterWidth) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding - + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) - + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) - - padding: 6 - horizontalPadding: 12 - - standardButtons: T.Dialog.Open | T.Dialog.Cancel - - /* - We use attached properties because we want to handle logic in C++, and: - - We can't assume the footer only contains a DialogButtonBox (which would allow us - to connect up to it in QQuickFileDialogImpl); it also needs to hold a ComboBox - and therefore the root footer item will be e.g. a layout item instead. - - We don't want to create our own "FileDialogButtonBox" (in order to be able to handle the logic - in C++) because we'd need to copy (and hence duplicate code in) DialogButtonBox.qml. - */ - FileDialogImpl.buttonBox: buttonBox - FileDialogImpl.nameFiltersComboBox: nameFiltersComboBox - FileDialogImpl.fileDialogListView: fileDialogListView - FileDialogImpl.breadcrumbBar: breadcrumbBar - - background: Rectangle { - implicitWidth: 600 - implicitHeight: 400 - color: control.palette.window - border.color: control.palette.mid - radius: 2 - - Rectangle { - z: -1 - x: 1 - y: 1 - width: parent.width - height: parent.height - color: control.palette.shadow - opacity: 0.2 - radius: 2 - } - } - - header: ColumnLayout { - spacing: 0 - - Label { - objectName: "dialogTitleBarLabel" - text: control.title - horizontalAlignment: Label.AlignHCenter - elide: Label.ElideRight - font.bold: true - padding: 6 - - Layout.fillWidth: true - Layout.leftMargin: 12 - Layout.rightMargin: 12 - Layout.topMargin: control.title.length > 0 ? 0 : 12 - Layout.preferredHeight: control.title.length > 0 ? implicitHeight : 0 - } - - DialogsImpl.FolderBreadcrumbBar { - id: breadcrumbBar - fileDialog: control - - Layout.fillWidth: true - Layout.leftMargin: 12 - Layout.rightMargin: 12 - - KeyNavigation.tab: fileDialogListView - } - } - - contentItem: Frame { - padding: 0 - verticalPadding: 1 - - ListView { - id: fileDialogListView - objectName: "fileDialogListView" - anchors.fill: parent - clip: true - focus: true - boundsBehavior: Flickable.StopAtBounds - - ScrollBar.vertical: ScrollBar {} - - model: FolderListModel { - folder: control.currentFolder - nameFilters: control.selectedNameFilter.globs - showDirsFirst: true - } - delegate: DialogsImpl.FileDialogDelegate { - objectName: "fileDialogDelegate" + index - x: 1 - width: ListView.view.width - 2 - highlighted: ListView.isCurrentItem - fileDialog: control - fileDetailRowWidth: nameFiltersComboBox.width - - KeyNavigation.backtab: breadcrumbBar - KeyNavigation.tab: nameFiltersComboBox - } - } - } - - footer: RowLayout { - id: rowLayout - spacing: 12 - - ComboBox { - // OK to use IDs here, since users shouldn't be overriding this stuff. - id: nameFiltersComboBox - model: control.nameFilters - - Layout.leftMargin: 12 - Layout.fillWidth: true - Layout.bottomMargin: 12 - } - - DialogButtonBox { - id: buttonBox - standardButtons: control.standardButtons - spacing: 6 - horizontalPadding: 0 - verticalPadding: 0 - background: null - - Layout.rightMargin: 12 - Layout.bottomMargin: 12 - } - } - - T.Overlay.modal: Rectangle { - color: Fusion.topShadow - } - - T.Overlay.modeless: Rectangle { - color: Fusion.topShadow - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Fusion/FileDialogDelegate.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Fusion/FileDialogDelegate.qml deleted file mode 100644 index 3c2b7b9c..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Fusion/FileDialogDelegate.qml +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl as ControlsImpl -import QtQuick.Controls.Fusion -import QtQuick.Controls.Fusion.impl -import QtQuick.Dialogs.quickimpl as DialogsQuickImpl - -DialogsQuickImpl.FileDialogDelegate { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - implicitContentHeight + topPadding + bottomPadding, - implicitIndicatorHeight + topPadding + bottomPadding) - - padding: 6 - spacing: 6 - - file: fileUrl - - icon.width: 16 - icon.height: 16 - icon.color: highlighted ? palette.highlightedText : palette.text - icon.source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/" - + (fileIsDir ? "folder" : "file") + "-icon-round.png" - - // We don't use index here, but in C++. Since we're using required - // properties, the index context property will not be injected, so we can't - // use its QQmlContext to access it. - required property int index - required property string fileName - required property url fileUrl - required property int fileSize - required property date fileModified - required property bool fileIsDir - - required property int fileDetailRowWidth - - contentItem: FileDialogDelegateLabel { - delegate: control - fileDetailRowTextColor: control.highlighted ? Fusion.highlightedText(control.palette) : control.palette.text - fileDetailRowWidth: control.fileDetailRowWidth - } - - background: Rectangle { - implicitWidth: 100 - implicitHeight: 20 - color: control.down ? Fusion.buttonColor(control.palette, false, true, true) - : control.highlighted ? Fusion.highlight(control.palette) : control.palette.base - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Fusion/FolderBreadcrumbBar.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Fusion/FolderBreadcrumbBar.qml deleted file mode 100644 index 066a60d7..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Fusion/FolderBreadcrumbBar.qml +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Dialogs.quickimpl as DialogsQuickImpl - -DialogsQuickImpl.FolderBreadcrumbBar { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - implicitContentWidth + (upButton ? upButton.implicitWidth + upButtonSpacing : 0) - + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - implicitContentHeight + topPadding + bottomPadding) - upButtonSpacing: 6 - - contentItem: ListView { - id: listView - currentIndex: control.currentIndex - model: control.contentModel - orientation: ListView.Horizontal - snapMode: ListView.SnapToItem - highlightMoveDuration: 0 - interactive: false - clip: true - - Rectangle { - anchors.fill: parent - color: control.palette.light - border.color: control.palette.mid - radius: 2 - z: -1 - } - } - buttonDelegate: Button { - id: buttonDelegateRoot - text: folderName - flat: true - - // The default of 100 is a bit too wide for short directory names. - Binding { - target: buttonDelegateRoot.background - property: "implicitWidth" - value: 24 - } - - required property int index - required property string folderName - } - separatorDelegate: IconImage { - id: iconImage - source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/crumb-separator-icon-round.png" - sourceSize: Qt.size(8, 8) - width: 8 + 6 - height: control.contentItem.height - color: control.palette.dark - y: (control.height - height) / 2 - } - upButton: Button { - x: control.leftPadding - y: control.topPadding - icon.source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/up-icon-round.png" - icon.width: 16 - icon.height: 16 - width: height - height: Math.max(implicitHeight, control.contentItem.height) - focusPolicy: Qt.TabFocus - } - textField: TextField { - text: control.fileDialog.selectedFile - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Fusion/FontDialog.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Fusion/FontDialog.qml deleted file mode 100644 index dd75338f..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Fusion/FontDialog.qml +++ /dev/null @@ -1,151 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Controls.Fusion -import QtQuick.Dialogs -import QtQuick.Dialogs.quickimpl -import QtQuick.Layouts -import QtQuick.Templates as T - -FontDialogImpl { - id: control - - implicitWidth: Math.max(control.implicitBackgroundWidth + control.leftInset + control.rightInset, - control.contentWidth + control.leftPadding + control.rightPadding, - control.implicitHeaderWidth, - control.implicitFooterWidth) - implicitHeight: Math.max(control.implicitBackgroundHeight + control.topInset + control.bottomInset, - control.contentHeight + control.topPadding + control.bottomPadding - + (control.implicitHeaderHeight > 0 ? control.implicitHeaderHeight + control.spacing : 0) - + (control.implicitFooterHeight > 0 ? control.implicitFooterHeight + control.spacing : 0)) - - leftPadding: 20 - rightPadding: 20 - // Ensure that the background's border is visible. - leftInset: -1 - rightInset: -1 - topInset: -1 - bottomInset: -1 - - standardButtons: T.Dialog.Ok | T.Dialog.Cancel - - FontDialogImpl.buttonBox: buttonBox - FontDialogImpl.familyListView: content.familyListView - FontDialogImpl.styleListView: content.styleListView - FontDialogImpl.sizeListView: content.sizeListView - FontDialogImpl.sampleEdit: content.sampleEdit - FontDialogImpl.writingSystemComboBox: writingSystemComboBox - FontDialogImpl.underlineCheckBox: content.underline - FontDialogImpl.strikeoutCheckBox: content.strikeout - FontDialogImpl.familyEdit: content.familyEdit - FontDialogImpl.styleEdit: content.styleEdit - FontDialogImpl.sizeEdit: content.sizeEdit - - background: Rectangle { - implicitWidth: 600 - implicitHeight: 400 - color: control.palette.window - border.color: control.palette.mid - radius: 2 - - Rectangle { - z: -1 - x: 1 - y: 1 - width: parent.width - height: parent.height - color: control.palette.shadow - opacity: 0.2 - radius: 2 - } - } - - Overlay.modal: Rectangle { - color: Fusion.topShadow - } - - Overlay.modeless: Rectangle { - color: Fusion.topShadow - } - - header: Label { - text: control.title - horizontalAlignment: Label.AlignHCenter - elide: Label.ElideRight - font.bold: true - padding: 6 - } - - contentItem: FontDialogContent { - id: content - } - - footer: RowLayout { - id: rowLayout - spacing: 12 - - Label { - text: qsTr("Writing System") - - Layout.leftMargin: 12 - Layout.topMargin: 6 - Layout.bottomMargin: 6 - } - ComboBox{ - id: writingSystemComboBox - - Layout.fillWidth: true - Layout.topMargin: 6 - Layout.bottomMargin: 6 - } - - DialogButtonBox { - id: buttonBox - standardButtons: control.standardButtons - spacing: 6 - horizontalPadding: 0 - verticalPadding: 0 - background: null - - Layout.rightMargin: 12 - Layout.topMargin: 6 - Layout.bottomMargin: 6 - } - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Imagine/FileDialog.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Imagine/FileDialog.qml deleted file mode 100644 index fdf8f36e..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Imagine/FileDialog.qml +++ /dev/null @@ -1,190 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.labs.folderlistmodel -import QtQuick -import QtQuick.Templates as T -import QtQuick.Controls.Imagine -import QtQuick.Controls.Imagine.impl -import QtQuick.Dialogs.quickimpl -import QtQuick.Layouts - -import "." as DialogsImpl - -FileDialogImpl { - id: control - - // Can't set implicitWidth of the NinePatchImage background, so we do it here. - implicitWidth: Math.max(600, - implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, - implicitHeaderWidth, - implicitFooterWidth) - implicitHeight: Math.max(400, - implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding - + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) - + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) - - topPadding: background ? background.topPadding : 0 - leftPadding: background ? background.leftPadding : 0 - rightPadding: background ? background.rightPadding : 0 - bottomPadding: background ? background.bottomPadding : 0 - - topInset: background ? -background.topInset || 0 : 0 - leftInset: background ? -background.leftInset || 0 : 0 - rightInset: background ? -background.rightInset || 0 : 0 - bottomInset: background ? -background.bottomInset || 0 : 0 - - standardButtons: T.Dialog.Open | T.Dialog.Cancel - - FileDialogImpl.buttonBox: buttonBox - FileDialogImpl.nameFiltersComboBox: nameFiltersComboBox - FileDialogImpl.fileDialogListView: fileDialogListView - FileDialogImpl.breadcrumbBar: breadcrumbBar - - background: NinePatchImage { - source: Imagine.url + "dialog-background" - NinePatchImageSelector on source { - states: [ - {"modal": control.modal}, - {"dim": control.dim} - ] - } - } - - header: ColumnLayout { - spacing: 12 - - Label { - text: control.title - elide: Label.ElideRight - font.bold: true - - Layout.leftMargin: 16 - Layout.rightMargin: 16 - Layout.topMargin: 12 - Layout.fillWidth: true - Layout.preferredHeight: control.title.length > 0 ? implicitHeight : 0 - - background: NinePatchImage { - width: parent.width - height: parent.height - - source: Imagine.url + "dialog-title" - NinePatchImageSelector on source { - states: [ - {"modal": control.modal}, - {"dim": control.dim} - ] - } - } - } - - DialogsImpl.FolderBreadcrumbBar { - id: breadcrumbBar - fileDialog: control - - Layout.leftMargin: 16 - Layout.rightMargin: 16 - Layout.fillWidth: true - Layout.maximumWidth: parent.width - 28 - } - } - - contentItem: ListView { - id: fileDialogListView - objectName: "fileDialogListView" - clip: true - boundsBehavior: Flickable.StopAtBounds - - ScrollBar.vertical: ScrollBar {} - - model: FolderListModel { - folder: control.currentFolder - nameFilters: control.selectedNameFilter.globs - showDirsFirst: true - } - delegate: DialogsImpl.FileDialogDelegate { - objectName: "fileDialogDelegate" + index - width: ListView.view.width - highlighted: ListView.isCurrentItem - fileDialog: control - fileDetailRowWidth: nameFiltersComboBox.width - } - } - - footer: RowLayout { - id: rowLayout - spacing: 20 - - ComboBox { - id: nameFiltersComboBox - model: control.nameFilters - - Layout.leftMargin: 16 - Layout.bottomMargin: 16 - Layout.fillWidth: true - } - - DialogButtonBox { - id: buttonBox - standardButtons: control.standardButtons - spacing: 12 - - Layout.bottomMargin: 16 - Layout.rightMargin: 16 - } - } - - T.Overlay.modal: NinePatchImage { - source: Imagine.url + "dialog-overlay" - NinePatchImageSelector on source { - states: [ - {"modal": true} - ] - } - } - - T.Overlay.modeless: NinePatchImage { - source: Imagine.url + "dialog-overlay" - NinePatchImageSelector on source { - states: [ - {"modal": false} - ] - } - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Imagine/FileDialogDelegate.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Imagine/FileDialogDelegate.qml deleted file mode 100644 index 9785afd1..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Imagine/FileDialogDelegate.qml +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick.Controls -import QtQuick.Controls.Imagine -import QtQuick.Controls.Imagine.impl -import QtQuick.Controls.impl as ControlsImpl -import QtQuick.Dialogs.quickimpl as DialogsQuickImpl - -DialogsQuickImpl.FileDialogDelegate { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - implicitContentHeight + topPadding + bottomPadding, - implicitIndicatorHeight + topPadding + bottomPadding) - - spacing: 12 - - topPadding: background ? background.topPadding : 0 - leftPadding: background ? background.leftPadding : 0 - rightPadding: background ? background.rightPadding : 0 - bottomPadding: background ? background.bottomPadding : 0 - - topInset: background ? -background.topInset || 0 : 0 - leftInset: background ? -background.leftInset || 0 : 0 - rightInset: background ? -background.rightInset || 0 : 0 - bottomInset: background ? -background.bottomInset || 0 : 0 - - file: fileUrl - - icon.width: 16 - icon.height: 16 - icon.color: highlighted ? palette.highlightedText : palette.text - icon.source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/" - + (fileIsDir ? "folder" : "file") + "-icon-round.png" - - required property int index - required property string fileName - required property url fileUrl - required property int fileSize - required property date fileModified - required property bool fileIsDir - - required property int fileDetailRowWidth - - contentItem: FileDialogDelegateLabel { - delegate: control - fileDetailRowTextColor: control.icon.color - fileDetailRowWidth: control.fileDetailRowWidth - } - - background: NinePatchImage { - source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/imagine/filedialogdelegate-background" - NinePatchImageSelector on source { - states: [ - { "disabled": !control.enabled }, - { "pressed": control.down }, - { "focused": control.visualFocus }, - { "highlighted": control.highlighted }, - { "mirrored": control.mirrored }, - { "hovered": control.hovered } - ] - } - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Imagine/FolderBreadcrumbBar.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Imagine/FolderBreadcrumbBar.qml deleted file mode 100644 index 2a56a3c3..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Imagine/FolderBreadcrumbBar.qml +++ /dev/null @@ -1,91 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Dialogs.quickimpl as DialogsQuickImpl - -DialogsQuickImpl.FolderBreadcrumbBar { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - implicitContentWidth + (upButton ? upButton.implicitWidth + upButtonSpacing : 0) - + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - implicitContentHeight + topPadding + bottomPadding) - upButtonSpacing: 20 - padding: 1 - - background: Rectangle {} - contentItem: ListView { - id: listView - currentIndex: control.currentIndex - model: control.contentModel - orientation: ListView.Horizontal - snapMode: ListView.SnapToItem - highlightMoveDuration: 0 - interactive: false - clip: true - } - buttonDelegate: Button { - id: buttonDelegateRoot - text: folderName - flat: true - - required property int index - required property string folderName - } - separatorDelegate: IconImage { - id: iconImage - source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/crumb-separator-icon-round.png" - sourceSize: Qt.size(8, 8) - width: 8 - height: control.contentItem.height - y: (control.height - height) / 2 - } - upButton: ToolButton { - x: control.leftPadding - y: control.topPadding - icon.source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/up-icon-thick-square.png" - icon.width: 16 - icon.height: 16 - focusPolicy: Qt.TabFocus - } - textField: TextField { - text: control.fileDialog.selectedFile - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Imagine/FontDialog.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Imagine/FontDialog.qml deleted file mode 100644 index 47bd53da..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Imagine/FontDialog.qml +++ /dev/null @@ -1,167 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Controls.Imagine -import QtQuick.Controls.Imagine.impl -import QtQuick.Dialogs -import QtQuick.Dialogs.quickimpl -import QtQuick.Layouts -import QtQuick.Templates as T - -FontDialogImpl { - id: control - - // Can't set implicitWidth of the NinePatchImage background, so we do it here. - implicitWidth: Math.max(600, - implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, - implicitHeaderWidth, - implicitFooterWidth) - implicitHeight: Math.max(400, - implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding - + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) - + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) - - topPadding: background ? background.topPadding : 0 - leftPadding: background ? background.leftPadding : 0 - rightPadding: background ? background.rightPadding : 0 - bottomPadding: background ? background.bottomPadding : 0 - - topInset: background ? -background.topInset || 0 : 0 - leftInset: background ? -background.leftInset || 0 : 0 - rightInset: background ? -background.rightInset || 0 : 0 - bottomInset: background ? -background.bottomInset || 0 : 0 - - standardButtons: T.Dialog.Ok | T.Dialog.Cancel - - FontDialogImpl.buttonBox: buttonBox - FontDialogImpl.familyListView: content.familyListView - FontDialogImpl.styleListView: content.styleListView - FontDialogImpl.sizeListView: content.sizeListView - FontDialogImpl.sampleEdit: content.sampleEdit - FontDialogImpl.writingSystemComboBox: writingSystemComboBox - FontDialogImpl.underlineCheckBox: content.underline - FontDialogImpl.strikeoutCheckBox: content.strikeout - FontDialogImpl.familyEdit: content.familyEdit - FontDialogImpl.styleEdit: content.styleEdit - FontDialogImpl.sizeEdit: content.sizeEdit - - background: NinePatchImage { - source: Imagine.url + "dialog-background" - NinePatchImageSelector on source { - states: [ - {"modal": control.modal}, - {"dim": control.dim} - ] - } - } - - Overlay.modal: NinePatchImage { - source: Imagine.url + "dialog-overlay" - NinePatchImageSelector on source { - states: [ - {"modal": true} - ] - } - } - - Overlay.modeless: NinePatchImage { - source: Imagine.url + "dialog-overlay" - NinePatchImageSelector on source { - states: [ - {"modal": false} - ] - } - } - - header: Label { - text: control.title - elide: Label.ElideRight - font.bold: true - - leftPadding: 16 - rightPadding: 16 - topPadding: 12 - height: control.title.length > 0 ? implicitHeight : 0 - - background: NinePatchImage { - width: parent.width - height: parent.height - - source: Imagine.url + "dialog-title" - NinePatchImageSelector on source { - states: [ - {"modal": control.modal}, - {"dim": control.dim} - ] - } - } - } - - contentItem: FontDialogContent { - id: content - rowSpacing: 16 - } - - footer: RowLayout { - id: rowLayout - spacing: 20 - - Label { - text: qsTr("Writing System") - Layout.leftMargin: 20 - Layout.bottomMargin: 16 - } - ComboBox{ - id: writingSystemComboBox - - Layout.fillWidth: true - Layout.bottomMargin: 16 - } - - DialogButtonBox { - id: buttonBox - standardButtons: control.standardButtons - spacing: 12 - Layout.rightMargin: 20 - Layout.bottomMargin: 16 - } - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Material/FileDialog.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Material/FileDialog.qml deleted file mode 100644 index 7e7c4307..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Material/FileDialog.qml +++ /dev/null @@ -1,163 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.labs.folderlistmodel -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Controls.Material -import QtQuick.Controls.Material.impl -import QtQuick.Dialogs -import QtQuick.Dialogs.quickimpl -import QtQuick.Layouts -import QtQuick.Templates as T - -import "." as DialogsImpl - -FileDialogImpl { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, - implicitFooterWidth) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding - + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) - + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) - - leftPadding: 24 - rightPadding: 24 - - standardButtons: T.Dialog.Open | T.Dialog.Cancel - - Material.elevation: 24 - - FileDialogImpl.buttonBox: buttonBox - FileDialogImpl.nameFiltersComboBox: nameFiltersComboBox - FileDialogImpl.fileDialogListView: fileDialogListView - FileDialogImpl.breadcrumbBar: breadcrumbBar - - background: Rectangle { - implicitWidth: 600 - implicitHeight: 400 - radius: 2 - color: control.Material.dialogColor - - layer.enabled: control.Material.elevation > 0 - layer.effect: ElevationEffect { - elevation: control.Material.elevation - } - } - - header: ColumnLayout { - spacing: 12 - - Label { - text: control.title - visible: control.title.length > 0 - elide: Label.ElideRight - font.bold: true - font.pixelSize: 16 - - Layout.leftMargin: 24 - Layout.rightMargin: 24 - Layout.topMargin: 24 - Layout.fillWidth: true - } - - DialogsImpl.FolderBreadcrumbBar { - id: breadcrumbBar - fileDialog: control - - Layout.leftMargin: 24 - Layout.rightMargin: 24 - Layout.fillWidth: true - Layout.maximumWidth: parent.width - 48 - } - } - - contentItem: ListView { - id: fileDialogListView - objectName: "fileDialogListView" - clip: true - - ScrollBar.vertical: ScrollBar {} - - model: FolderListModel { - folder: control.currentFolder - nameFilters: control.selectedNameFilter.globs - showDirsFirst: true - } - delegate: DialogsImpl.FileDialogDelegate { - objectName: "fileDialogDelegate" + index - width: ListView.view.width - highlighted: ListView.isCurrentItem - fileDialog: control - fileDetailRowWidth: nameFiltersComboBox.width - } - } - - footer: RowLayout { - id: rowLayout - spacing: 20 - - ComboBox { - id: nameFiltersComboBox - model: control.nameFilters - - Layout.leftMargin: 20 - Layout.fillWidth: true - } - - DialogButtonBox { - id: buttonBox - standardButtons: control.standardButtons - spacing: 12 - horizontalPadding: 0 - verticalPadding: 20 - - Layout.rightMargin: 20 - } - } - - Overlay.modal: Rectangle { - color: Color.transparent(control.palette.shadow, 0.5) - } - - Overlay.modeless: Rectangle { - color: Color.transparent(control.palette.shadow, 0.12) - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Material/FileDialogDelegate.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Material/FileDialogDelegate.qml deleted file mode 100644 index eb4bae9b..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Material/FileDialogDelegate.qml +++ /dev/null @@ -1,95 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls.impl -import QtQuick.Controls.Material -import QtQuick.Controls.Material.impl -import QtQuick.Dialogs.quickimpl as DialogsQuickImpl - -DialogsQuickImpl.FileDialogDelegate { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - implicitContentHeight + topPadding + bottomPadding, - implicitIndicatorHeight + topPadding + bottomPadding) - - padding: 16 - verticalPadding: 8 - spacing: 16 - - icon.width: 16 - icon.height: 16 - icon.color: enabled ? Material.foreground : Material.hintTextColor - icon.source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/" - + (fileIsDir ? "folder" : "file") + "-icon-square.png" - - file: fileUrl - - required property int index - required property string fileName - required property url fileUrl - required property int fileSize - required property date fileModified - required property bool fileIsDir - - required property int fileDetailRowWidth - - contentItem: FileDialogDelegateLabel { - delegate: control - fileDetailRowTextColor: control.Material.hintTextColor - fileDetailRowWidth: control.fileDetailRowWidth - } - - background: Rectangle { - implicitHeight: control.Material.delegateHeight - - color: control.highlighted ? Color.transparent(control.Material.accentColor, 0.08) : "transparent" - - Ripple { - width: parent.width - height: parent.height - - clip: visible - pressed: control.pressed - anchor: control - active: control.down || control.visualFocus || control.hovered - color: control.highlighted ? control.Material.highlightedRippleColor : control.Material.rippleColor - } - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Material/FolderBreadcrumbBar.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Material/FolderBreadcrumbBar.qml deleted file mode 100644 index 7b839034..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Material/FolderBreadcrumbBar.qml +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Controls.Material -import QtQuick.Dialogs.quickimpl as DialogsQuickImpl - -DialogsQuickImpl.FolderBreadcrumbBar { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - implicitContentWidth + (upButton ? upButton.implicitWidth + upButtonSpacing : 0) - + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - implicitContentHeight + topPadding + bottomPadding) - upButtonSpacing: 20 - padding: 1 - - background: Rectangle {} - contentItem: ListView { - id: listView - currentIndex: control.currentIndex - model: control.contentModel - orientation: ListView.Horizontal - snapMode: ListView.SnapToItem - highlightMoveDuration: 0 - interactive: false - clip: true - } - buttonDelegate: Button { - id: buttonDelegateRoot - text: folderName - flat: true - font.capitalization: Font.MixedCase - - // The default of 100 is a bit too wide for short directory names. - Binding { - target: buttonDelegateRoot.background - property: "implicitWidth" - value: control.Material.buttonHeight - } - - required property int index - required property string folderName - } - separatorDelegate: IconImage { - id: iconImage - source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/crumb-separator-icon-square.png" - sourceSize: Qt.size(8, 8) - // The image is 8x8, and add 2 px padding on each side. - width: 8 + 4 - height: control.contentItem.height - color: control.Material.hintTextColor - y: (control.height - height) / 2 - } - upButton: ToolButton { - x: control.leftPadding - y: control.topPadding - icon.source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/up-icon-thick-square.png" - icon.width: 16 - icon.height: 16 - width: height - focusPolicy: Qt.TabFocus - } - textField: TextField { - text: control.fileDialog.selectedFile - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Material/FontDialog.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Material/FontDialog.qml deleted file mode 100644 index 51134680..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Material/FontDialog.qml +++ /dev/null @@ -1,142 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Controls.Material -import QtQuick.Controls.Material.impl -import QtQuick.Dialogs -import QtQuick.Dialogs.quickimpl -import QtQuick.Layouts -import QtQuick.Templates as T - -FontDialogImpl { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, - implicitFooterWidth) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding - + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) - + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) - - leftPadding: 24 - rightPadding: 24 - - standardButtons: T.Dialog.Ok | T.Dialog.Cancel - - Material.elevation: 24 - - FontDialogImpl.buttonBox: buttonBox - FontDialogImpl.familyListView: content.familyListView - FontDialogImpl.styleListView: content.styleListView - FontDialogImpl.sizeListView: content.sizeListView - FontDialogImpl.sampleEdit: content.sampleEdit - FontDialogImpl.writingSystemComboBox: writingSystemComboBox - FontDialogImpl.underlineCheckBox: content.underline - FontDialogImpl.strikeoutCheckBox: content.strikeout - FontDialogImpl.familyEdit: content.familyEdit - FontDialogImpl.styleEdit: content.styleEdit - FontDialogImpl.sizeEdit: content.sizeEdit - - background: Rectangle { - implicitWidth: 600 - implicitHeight: 400 - radius: 2 - color: control.Material.dialogColor - - layer.enabled: control.Material.elevation > 0 - layer.effect: ElevationEffect { - elevation: control.Material.elevation - } - } - - Overlay.modal: Rectangle { - color: Color.transparent(control.palette.shadow, 0.5) - } - - Overlay.modeless: Rectangle { - color: Color.transparent(control.palette.shadow, 0.12) - } - - header: Label { - text: control.title - visible: control.title.length > 0 - elide: Label.ElideRight - font.bold: true - font.pixelSize: 16 - - leftPadding: 24 - rightPadding: 24 - topPadding: 24 - bottomPadding: 24 - } - - contentItem: FontDialogContent { - id: content - familyEdit.bottomPadding: 8 - styleEdit.bottomPadding: 8 - sizeEdit.bottomPadding: 8 - } - - footer: RowLayout { - id: rowLayout - spacing: 20 - - Label { - text: qsTr("Writing System") - - Layout.leftMargin: 20 - } - ComboBox{ - id: writingSystemComboBox - - Layout.fillWidth: true - } - - DialogButtonBox { - id: buttonBox - standardButtons: control.standardButtons - spacing: 12 - horizontalPadding: 0 - verticalPadding: 20 - - Layout.rightMargin: 20 - } - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Universal/FileDialog.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Universal/FileDialog.qml deleted file mode 100644 index 02b7368c..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Universal/FileDialog.qml +++ /dev/null @@ -1,165 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.labs.folderlistmodel -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.Universal -import QtQuick.Dialogs -import QtQuick.Dialogs.quickimpl -import QtQuick.Layouts -import QtQuick.Templates as T - -import "." as DialogsImpl - -FileDialogImpl { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, - implicitHeaderWidth, - implicitFooterWidth) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding - + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) - + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) - - padding: 24 - verticalPadding: 18 - - standardButtons: T.Dialog.Open | T.Dialog.Cancel - - FileDialogImpl.buttonBox: buttonBox - FileDialogImpl.nameFiltersComboBox: nameFiltersComboBox - FileDialogImpl.fileDialogListView: fileDialogListView - FileDialogImpl.breadcrumbBar: breadcrumbBar - - background: Rectangle { - implicitWidth: 600 - implicitHeight: 400 - color: control.Universal.chromeMediumLowColor - border.color: control.Universal.chromeHighColor - border.width: 1 // FlyoutBorderThemeThickness - } - - header: ColumnLayout { - spacing: 12 - - Label { - text: control.title - elide: Label.ElideRight - // TODO: QPlatformTheme::TitleBarFont - font.pixelSize: 20 - - Layout.leftMargin: 24 - Layout.rightMargin: 24 - Layout.topMargin: 18 - Layout.fillWidth: true - Layout.preferredHeight: control.title.length > 0 ? implicitHeight : 0 - - background: Rectangle { - x: 1; y: 1 // // FlyoutBorderThemeThickness - color: control.Universal.chromeMediumLowColor - width: parent.width - 2 - height: parent.height - 1 - } - } - - DialogsImpl.FolderBreadcrumbBar { - id: breadcrumbBar - fileDialog: control - - Layout.leftMargin: 24 - Layout.rightMargin: 24 - Layout.fillWidth: true - Layout.maximumWidth: parent.width - 48 - } - } - - contentItem: ListView { - id: fileDialogListView - objectName: "fileDialogListView" - clip: true - boundsBehavior: Flickable.StopAtBounds - - ScrollBar.vertical: ScrollBar {} - - model: FolderListModel { - folder: control.currentFolder - nameFilters: control.selectedNameFilter.globs - showDirsFirst: true - } - delegate: DialogsImpl.FileDialogDelegate { - objectName: "fileDialogDelegate" + index - width: ListView.view.width - highlighted: ListView.isCurrentItem - fileDialog: control - fileDetailRowWidth: nameFiltersComboBox.width - } - } - - footer: RowLayout { - id: rowLayout - spacing: 24 - - ComboBox { - id: nameFiltersComboBox - model: control.nameFilters - - Layout.leftMargin: 24 - Layout.fillWidth: true - Layout.topMargin: 6 - Layout.bottomMargin: 24 - } - - DialogButtonBox { - id: buttonBox - standardButtons: control.standardButtons - spacing: 12 - horizontalPadding: 0 - - Layout.rightMargin: 24 - } - } - - T.Overlay.modal: Rectangle { - color: control.Universal.baseLowColor - } - - T.Overlay.modeless: Rectangle { - color: control.Universal.baseLowColor - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Universal/FileDialogDelegate.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Universal/FileDialogDelegate.qml deleted file mode 100644 index d4322dc5..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Universal/FileDialogDelegate.qml +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls.impl -import QtQuick.Controls.Universal -import QtQuick.Dialogs.quickimpl as DialogsQuickImpl - -DialogsQuickImpl.FileDialogDelegate { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - implicitContentHeight + topPadding + bottomPadding, - implicitIndicatorHeight + topPadding + bottomPadding) - - spacing: 12 - - padding: 12 - topPadding: padding - 1 - bottomPadding: padding + 1 - - icon.width: 20 - icon.height: 20 - icon.color: Color.transparent(Universal.foreground, enabled ? 1.0 : 0.2) - icon.source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/" - + (fileIsDir ? "folder" : "file") + "-icon-square.png" - - file: fileUrl - - required property int index - required property string fileName - required property url fileUrl - required property int fileSize - required property date fileModified - required property bool fileIsDir - - required property int fileDetailRowWidth - - contentItem: FileDialogDelegateLabel { - delegate: control - fileDetailRowTextColor: control.icon.color - fileDetailRowWidth: control.fileDetailRowWidth - } - - background: Rectangle { - visible: control.down || control.highlighted || control.visualFocus || control.hovered - color: control.down ? control.Universal.listMediumColor : - control.hovered ? control.Universal.listLowColor : control.Universal.altMediumLowColor - - Rectangle { - width: parent.width - height: parent.height - visible: control.visualFocus || control.highlighted - color: control.Universal.accent - opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6 - } - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Universal/FolderBreadcrumbBar.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Universal/FolderBreadcrumbBar.qml deleted file mode 100644 index f270b411..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Universal/FolderBreadcrumbBar.qml +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Controls.Universal -import QtQuick.Dialogs.quickimpl as DialogsQuickImpl - -DialogsQuickImpl.FolderBreadcrumbBar { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - implicitContentWidth + (upButton ? upButton.implicitWidth + upButtonSpacing : 0) - + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - implicitContentHeight + topPadding + bottomPadding) - upButtonSpacing: 20 - padding: 1 - - background: Rectangle {} - contentItem: ListView { - id: listView - currentIndex: control.currentIndex - model: control.contentModel - orientation: ListView.Horizontal - snapMode: ListView.SnapToItem - highlightMoveDuration: 0 - interactive: false - clip: true - } - buttonDelegate: ToolButton { - id: buttonDelegateRoot - text: folderName - - // The default is a bit too wide for short directory names. - Binding { - target: buttonDelegateRoot.background - property: "implicitWidth" - value: 48 - } - - required property int index - required property string folderName - } - separatorDelegate: IconImage { - id: iconImage - source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/crumb-separator-icon-square.png" - sourceSize: Qt.size(8, 8) - // The image is 8x8, and add 2 px padding on each side. - width: 8 + 4 - height: control.contentItem.height - color: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2) - y: (control.height - height) / 2 - } - upButton: ToolButton { - x: control.leftPadding - y: control.topPadding - icon.source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/up-icon-square.png" - icon.width: 16 - icon.height: 16 - width: height - focusPolicy: Qt.TabFocus - } - textField: TextField { - text: control.fileDialog.selectedFile - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Universal/FontDialog.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/+Universal/FontDialog.qml deleted file mode 100644 index 1bd3092e..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/+Universal/FontDialog.qml +++ /dev/null @@ -1,144 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Controls.Universal -import QtQuick.Dialogs -import QtQuick.Dialogs.quickimpl -import QtQuick.Layouts -import QtQuick.Templates as T - -FontDialogImpl { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, - implicitHeaderWidth, - implicitFooterWidth) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding - + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) - + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) - - padding: 24 - verticalPadding: 18 - - standardButtons: T.Dialog.Ok | T.Dialog.Cancel - - FontDialogImpl.buttonBox: buttonBox - FontDialogImpl.familyListView: content.familyListView - FontDialogImpl.styleListView: content.styleListView - FontDialogImpl.sizeListView: content.sizeListView - FontDialogImpl.sampleEdit: content.sampleEdit - FontDialogImpl.writingSystemComboBox: writingSystemComboBox - FontDialogImpl.underlineCheckBox: content.underline - FontDialogImpl.strikeoutCheckBox: content.strikeout - FontDialogImpl.familyEdit: content.familyEdit - FontDialogImpl.styleEdit: content.styleEdit - FontDialogImpl.sizeEdit: content.sizeEdit - - background: Rectangle { - implicitWidth: 600 - implicitHeight: 400 - color: control.Universal.chromeMediumLowColor - border.color: control.Universal.chromeHighColor - border.width: 1 // FlyoutBorderThemeThickness - } - - Overlay.modal: Rectangle { - color: control.Universal.baseLowColor - } - - Overlay.modeless: Rectangle { - color: control.Universal.baseLowColor - } - - header: Label { - text: control.title - elide: Label.ElideRight - // TODO: QPlatformTheme::TitleBarFont - font.pixelSize: 20 - - leftPadding: 24 - rightPadding: 24 - topPadding: 18 - height: control.title.length > 0 ? implicitHeight : 0 - - background: Rectangle { - x: 1; y: 1 // // FlyoutBorderThemeThickness - color: control.Universal.chromeMediumLowColor - width: parent.width - 2 - height: parent.height - 1 - } - } - - contentItem: FontDialogContent { - id: content - rowSpacing: 12 - } - - footer: RowLayout { - id: rowLayout - spacing: 24 - - Label { - text: qsTr("Writing System") - - Layout.leftMargin: 24 - Layout.topMargin: 6 - Layout.bottomMargin: 24 - } - ComboBox{ - id: writingSystemComboBox - - Layout.fillWidth: true - Layout.topMargin: 6 - Layout.bottomMargin: 24 - - } - - DialogButtonBox { - id: buttonBox - standardButtons: control.standardButtons - spacing: 12 - horizontalPadding: 0 - - Layout.rightMargin: 24 - } - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/FileDialog.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/FileDialog.qml deleted file mode 100644 index 99a90cbc..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/FileDialog.qml +++ /dev/null @@ -1,183 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.labs.folderlistmodel -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Dialogs -import QtQuick.Dialogs.quickimpl -import QtQuick.Layouts -import QtQuick.Templates as T - -import "." as DialogsImpl - -FileDialogImpl { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding, - implicitHeaderWidth, - implicitFooterWidth) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding - + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) - + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) - - leftPadding: 20 - rightPadding: 20 - // Ensure that the background's border is visible. - leftInset: -1 - rightInset: -1 - topInset: -1 - bottomInset: -1 - - standardButtons: T.Dialog.Open | T.Dialog.Cancel - - /* - We use attached properties because we want to handle logic in C++, and: - - We can't assume the footer only contains a DialogButtonBox (which would allow us - to connect up to it in QQuickFileDialogImpl); it also needs to hold a ComboBox - and therefore the root footer item will be e.g. a layout item instead. - - We don't want to create our own "FileDialogButtonBox" (in order to be able to handle the logic - in C++) because we'd need to copy (and hence duplicate code in) DialogButtonBox.qml. - */ - FileDialogImpl.buttonBox: buttonBox - FileDialogImpl.nameFiltersComboBox: nameFiltersComboBox - FileDialogImpl.fileDialogListView: fileDialogListView - FileDialogImpl.breadcrumbBar: breadcrumbBar - - background: Rectangle { - implicitWidth: 600 - implicitHeight: 400 - color: control.palette.window - border.color: control.palette.dark - } - - header: Pane { - palette.window: control.palette.light - padding: 20 - - contentItem: Column { - spacing: 12 - - Label { - objectName: "dialogTitleBarLabel" - width: parent.width - text: control.title - visible: control.title.length > 0 - horizontalAlignment: Label.AlignHCenter - elide: Label.ElideRight - font.bold: true - } - - DialogsImpl.FolderBreadcrumbBar { - id: breadcrumbBar - width: parent.width - fileDialog: control - - KeyNavigation.tab: fileDialogListView - } - } - } - - contentItem: ListView { - id: fileDialogListView - objectName: "fileDialogListView" - clip: true - focus: true - boundsBehavior: Flickable.StopAtBounds - - ScrollBar.vertical: ScrollBar {} - - model: FolderListModel { - folder: control.currentFolder - nameFilters: control.selectedNameFilter.globs - showDirsFirst: true - } - delegate: DialogsImpl.FileDialogDelegate { - objectName: "fileDialogDelegate" + index - width: ListView.view.width - highlighted: ListView.isCurrentItem - fileDialog: control - fileDetailRowWidth: nameFiltersComboBox.width - - KeyNavigation.backtab: breadcrumbBar - KeyNavigation.tab: nameFiltersComboBox - } - } - - footer: Rectangle { - color: control.palette.light - implicitWidth: rowLayout.implicitWidth - implicitHeight: rowLayout.implicitHeight - - RowLayout { - id: rowLayout - width: parent.width - height: parent.height - spacing: 20 - - ComboBox { - // OK to use IDs here, since users shouldn't be overriding this stuff. - id: nameFiltersComboBox - model: control.nameFilters - - Layout.leftMargin: 20 - Layout.fillWidth: true - } - - DialogButtonBox { - id: buttonBox - standardButtons: control.standardButtons - palette.window: control.palette.light - spacing: 12 - horizontalPadding: 0 - verticalPadding: 20 - - Layout.rightMargin: 20 - } - } - } - - Overlay.modal: Rectangle { - color: Color.transparent(control.palette.shadow, 0.5) - } - - Overlay.modeless: Rectangle { - color: Color.transparent(control.palette.shadow, 0.12) - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/FileDialogDelegate.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/FileDialogDelegate.qml deleted file mode 100644 index 03250faa..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/FileDialogDelegate.qml +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl as ControlsImpl -import QtQuick.Dialogs.quickimpl as DialogsQuickImpl - -DialogsQuickImpl.FileDialogDelegate { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - implicitContentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - implicitContentHeight + topPadding + bottomPadding, - implicitIndicatorHeight + topPadding + bottomPadding) - - padding: 12 - spacing: 8 - topPadding: 0 - bottomPadding: 0 - - file: fileUrl - - icon.width: 16 - icon.height: 16 - icon.color: highlighted ? palette.highlightedText : palette.text - icon.source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/" - + (fileIsDir ? "folder" : "file") + "-icon-round.png" - - // We don't use index here, but in C++. Since we're using required - // properties, the index context property will not be injected, so we can't - // use its QQmlContext to access it. - required property int index - required property string fileName - required property url fileUrl - required property int fileSize - required property date fileModified - required property bool fileIsDir - - required property int fileDetailRowWidth - - contentItem: FileDialogDelegateLabel { - delegate: control - fileDetailRowTextColor: control.icon.color - fileDetailRowWidth: control.fileDetailRowWidth - } - - background: Rectangle { - implicitWidth: 100 - implicitHeight: 40 - visible: control.down || control.highlighted || control.visualFocus - color: Color.blend(control.down ? control.palette.midlight : control.palette.light, - control.palette.highlight, control.highlighted ? 0.15 : 0.0) - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/FileDialogDelegateLabel.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/FileDialogDelegateLabel.qml deleted file mode 100644 index 9768cd51..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/FileDialogDelegateLabel.qml +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Dialogs.quickimpl as DialogsQuickImpl - -/* - Most of the elements in here are the same between styles, so we - have a reusable component for it and provide some properties to enable style-specific tweaks. -*/ -Item { - id: root - implicitWidth: column.implicitWidth - implicitHeight: column.implicitHeight - - required property DialogsQuickImpl.FileDialogDelegate delegate - required property int fileDetailRowWidth - - property color fileDetailRowTextColor - - Column { - id: column - y: (parent.height - height) / 2 - - Row { - spacing: root.delegate.spacing - - IconImage { - id: iconImage - source: root.delegate.icon.source - sourceSize: Qt.size(root.delegate.icon.width, root.delegate.icon.height) - width: root.delegate.icon.width - height: root.delegate.icon.height - color: root.delegate.icon.color - y: (parent.height - height) / 2 - } - Label { - text: root.delegate.fileName - color: root.delegate.icon.color - y: (parent.height - height) / 2 - } - } - - Item { - id: fileDetailRow - x: iconImage.width + root.delegate.spacing - width: fileDetailRowWidth - x - root.delegate.leftPadding - implicitHeight: childrenRect.height - - Label { - text: locale.formattedDataSize(root.delegate.fileSize) - font.pixelSize: root.delegate.font.pixelSize * 0.75 - color: root.fileDetailRowTextColor - } - Label { - text: Qt.formatDateTime(root.delegate.fileModified) - font.pixelSize: root.delegate.font.pixelSize * 0.75 - color: root.fileDetailRowTextColor - x: parent.width - width - } - } - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/FolderBreadcrumbBar.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/FolderBreadcrumbBar.qml deleted file mode 100644 index f04d5804..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/FolderBreadcrumbBar.qml +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Dialogs.quickimpl as DialogsQuickImpl - -DialogsQuickImpl.FolderBreadcrumbBar { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - implicitContentWidth + (upButton ? upButton.implicitWidth + upButtonSpacing : 0) - + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - implicitContentHeight + topPadding + bottomPadding) - upButtonSpacing: 20 - padding: 1 - - background: Rectangle { - border.color: control.palette.button - } - contentItem: ListView { - id: listView - currentIndex: control.currentIndex - model: control.contentModel - orientation: ListView.Horizontal - snapMode: ListView.SnapToItem - highlightMoveDuration: 0 - interactive: false - clip: true - } - buttonDelegate: Button { - id: buttonDelegateRoot - text: folderName - flat: true - - // The default of 100 is a bit too wide for short directory names. - Binding { - target: buttonDelegateRoot.background - property: "implicitWidth" - value: 40 - } - - required property int index - required property string folderName - } - separatorDelegate: IconImage { - id: iconImage - source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/crumb-separator-icon-round.png" - sourceSize: Qt.size(8, 8) - width: 8 - height: control.contentItem.height - color: control.palette.button - y: (control.height - height) / 2 - } - upButton: ToolButton { - x: control.leftPadding - y: control.topPadding - icon.source: "qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/images/up-icon-round.png" - icon.width: 16 - icon.height: 16 - width: height - focusPolicy: Qt.TabFocus - } - textField: TextField { - text: control.fileDialog.selectedFile - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/FontDialog.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/FontDialog.qml deleted file mode 100644 index e2caea40..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/FontDialog.qml +++ /dev/null @@ -1,148 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Dialogs -import QtQuick.Dialogs.quickimpl -import QtQuick.Layouts -import QtQuick.Templates as T - -FontDialogImpl { - id: control - - implicitWidth: Math.max(control.implicitBackgroundWidth + control.leftInset + control.rightInset, - control.contentWidth + control.leftPadding + control.rightPadding, - control.implicitHeaderWidth, - control.implicitFooterWidth) - implicitHeight: Math.max(control.implicitBackgroundHeight + control.topInset + control.bottomInset, - control.contentHeight + control.topPadding + control.bottomPadding - + (control.implicitHeaderHeight > 0 ? control.implicitHeaderHeight + control.spacing : 0) - + (control.implicitFooterHeight > 0 ? control.implicitFooterHeight + control.spacing : 0)) - - leftPadding: 20 - rightPadding: 20 - // Ensure that the background's border is visible. - leftInset: -1 - rightInset: -1 - topInset: -1 - bottomInset: -1 - - spacing: 12 - - standardButtons: T.Dialog.Ok | T.Dialog.Cancel - - FontDialogImpl.buttonBox: buttonBox - FontDialogImpl.familyListView: content.familyListView - FontDialogImpl.styleListView: content.styleListView - FontDialogImpl.sizeListView: content.sizeListView - FontDialogImpl.sampleEdit: content.sampleEdit - FontDialogImpl.writingSystemComboBox: writingSystemComboBox - FontDialogImpl.underlineCheckBox: content.underline - FontDialogImpl.strikeoutCheckBox: content.strikeout - FontDialogImpl.familyEdit: content.familyEdit - FontDialogImpl.styleEdit: content.styleEdit - FontDialogImpl.sizeEdit: content.sizeEdit - - background: Rectangle { - implicitWidth: 600 - implicitHeight: 400 - color: control.palette.window - border.color: control.palette.dark - } - - Overlay.modal: Rectangle { - color: Color.transparent(control.palette.shadow, 0.5) - } - - Overlay.modeless: Rectangle { - color: Color.transparent(control.palette.shadow, 0.12) - } - - header: Pane { - palette.window: control.palette.light - padding: 20 - - contentItem: Label { - width: parent.width - text: control.title - visible: control.title.length > 0 - horizontalAlignment: Label.AlignHCenter - elide: Label.ElideRight - font.bold: true - } - } - - contentItem: FontDialogContent { - id: content - } - - footer: Rectangle { - color: control.palette.light - implicitWidth: rowLayout.implicitWidth - implicitHeight: rowLayout.implicitHeight - - RowLayout { - id: rowLayout - width: parent.width - height: parent.height - spacing: 20 - - Label { - text: qsTr("Writing System") - - Layout.leftMargin: 20 - } - ComboBox{ - id: writingSystemComboBox - - Layout.fillWidth: true - } - - DialogButtonBox { - id: buttonBox - standardButtons: control.standardButtons - palette.window: control.palette.light - spacing: 12 - horizontalPadding: 0 - verticalPadding: 20 - - Layout.rightMargin: 20 - } - } - } -} diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/FontDialogContent.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/FontDialogContent.qml deleted file mode 100644 index a0b7dd38..00000000 --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/FontDialogContent.qml +++ /dev/null @@ -1,267 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Dialogs module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.impl -import QtQuick.Dialogs -import QtQuick.Dialogs.quickimpl -import QtQuick.Layouts - -GridLayout { - property alias familyListView: fontFamilyListView - property alias styleListView: fontStyleListView - property alias sizeListView: fontSizeListView - property alias sampleEdit: fontSample - property alias underline: fontUnderline - property alias strikeout: fontStrikeout - property alias familyEdit: fontFamilyEdit - property alias styleEdit: fontStyleEdit - property alias sizeEdit: fontSizeEdit - - columns: 3 - - ColumnLayout { - spacing: 0 - - Layout.preferredWidth: 50 - - Label { - text: qsTr("Family") - Layout.alignment: Qt.AlignLeft - } - TextField { - id: fontFamilyEdit - objectName: "familyEdit" - readOnly: true - Layout.fillWidth: true - focus: true - } - Frame { - Layout.fillWidth: true - Layout.fillHeight: true - background: Rectangle { - color: "white" - } - ListView { - id: fontFamilyListView - objectName: "familyListView" - implicitHeight: 200 - anchors.fill: parent - clip: true - - ScrollBar.vertical: ScrollBar { - policy: ScrollBar.AlwaysOn - } - - boundsBehavior: Flickable.StopAtBounds - - highlightMoveVelocity: -1 - highlightMoveDuration: 1 - highlightFollowsCurrentItem: true - keyNavigationEnabled: true - - delegate: ItemDelegate { - width: ListView.view.width - highlighted: ListView.isCurrentItem - onClicked: () => fontFamilyListView.currentIndex = index - text: modelData - } - } - } - } - - ColumnLayout { - spacing: 0 - - Layout.preferredWidth: 30 - - Label { - text: qsTr("Style") - Layout.alignment: Qt.AlignLeft - } - TextField { - id: fontStyleEdit - objectName: "styleEdit" - readOnly: true - Layout.fillWidth: true - } - Frame { - Layout.fillWidth: true - Layout.fillHeight: true - background: Rectangle { - color: "white" - } - ListView { - id: fontStyleListView - objectName: "styleListView" - implicitHeight: 200 - anchors.fill: parent - clip: true - - ScrollBar.vertical: ScrollBar {} - boundsBehavior: Flickable.StopAtBounds - - highlightMoveVelocity: -1 - highlightMoveDuration: 1 - highlightFollowsCurrentItem: true - keyNavigationEnabled: true - - delegate: ItemDelegate { - width: ListView.view.width - highlighted: ListView.isCurrentItem - onClicked: () => fontStyleListView.currentIndex = index - text: modelData - } - } - } - } - - ColumnLayout { - spacing: 0 - - Layout.preferredWidth: 20 - - Label { - text: qsTr("Size") - Layout.alignment: Qt.AlignLeft - } - TextField { - id: fontSizeEdit - objectName: "sizeEdit" - Layout.fillWidth: true - validator: IntValidator { - bottom: 1 - top: 512 - } - } - Frame { - Layout.fillWidth: true - Layout.fillHeight: true - - background: Rectangle { - color: "white" - } - ListView { - id: fontSizeListView - objectName: "sizeListView" - implicitHeight: 200 - anchors.fill: parent - clip: true - - ScrollBar.vertical: ScrollBar { - policy: ScrollBar.AlwaysOn - } - - boundsBehavior: Flickable.StopAtBounds - - highlightMoveVelocity: -1 - highlightMoveDuration: 1 - highlightFollowsCurrentItem: true - keyNavigationEnabled: true - - delegate: ItemDelegate { - width: ListView.view.width - highlighted: ListView.isCurrentItem - onClicked: () => fontSizeListView.currentIndex = index - text: modelData - } - } - } - } - - ColumnLayout { - Layout.preferredWidth: 80 - - GroupBox { - id: effectsGroupBox - title: qsTr("Effects") - - Layout.fillWidth: true - Layout.fillHeight: true - - label: Label { - anchors.left: effectsGroupBox.left - text: parent.title - } - - RowLayout { - anchors.fill: parent - CheckBox { - id: fontUnderline - objectName: "underlineEffect" - text: qsTr("Underline") - } - CheckBox{ - id: fontStrikeout - objectName: "strikeoutEffect" - text: qsTr("Strikeout") - } - } - } - } - - GroupBox { - id: sample - padding: label.implicitHeight - title: qsTr("Sample") - - Layout.fillWidth: true - Layout.preferredWidth: 80 - Layout.fillHeight: true - Layout.columnSpan: 2 - clip: true - - background: Rectangle { - y: sample.topPadding - sample.bottomPadding - width: parent.width - sample.leftPadding + sample.rightPadding - height: parent.height - sample.topPadding + sample.bottomPadding - radius: 3 - } - - label: Label { - anchors.left: sample.left - text: sample.title - } - - TextEdit { - id: fontSample - objectName: "sampleEdit" - anchors.centerIn: parent - readOnly: true - } - } -} |