First upload, 18 controller version
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Dialog {
|
||||
property alias text: message.text
|
||||
property bool handled: false
|
||||
title: qsTr("Alert Dialog")
|
||||
modal: false
|
||||
anchors.centerIn: parent
|
||||
objectName: "alertDialog"
|
||||
|
||||
ColumnLayout {
|
||||
id: rootLayout
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
property int minimumWidth: rootLayout.implicitWidth + rootLayout.doubleMargins
|
||||
property int minimumHeight: rootLayout.implicitHeight + rootLayout.doubleMargins
|
||||
property int doubleMargins: anchors.margins * 2
|
||||
SystemPalette { id: palette; colorGroup: SystemPalette.Active }
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
spacing: 8
|
||||
Image {
|
||||
source: "qrc:/qt-project.org/imports/QtWebEngine/ControlsDelegates/information.png"
|
||||
}
|
||||
Label {
|
||||
id: message
|
||||
Layout.fillWidth: true
|
||||
color: palette.windowText
|
||||
textFormat: Text.PlainText
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
Button {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("OK")
|
||||
onClicked: accept()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Dialog {
|
||||
property alias text: message.text
|
||||
property bool handled: false
|
||||
signal credentials(string user, string password)
|
||||
title: qsTr("Authentication Required")
|
||||
modal: false
|
||||
anchors.centerIn: parent
|
||||
objectName: "authenticationDialog"
|
||||
|
||||
function acceptDialog() {
|
||||
credentials(userField.text, passwordField.text);
|
||||
accept()
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: rootLayout
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
property int minimumWidth: rootLayout.implicitWidth + rootLayout.doubleMargins
|
||||
property int minimumHeight: rootLayout.implicitHeight + rootLayout.doubleMargins
|
||||
|
||||
property int doubleMargins: anchors.margins * 2
|
||||
|
||||
SystemPalette { id: palette; colorGroup: SystemPalette.Active }
|
||||
Label {
|
||||
id: message
|
||||
color: palette.windowText
|
||||
textFormat: Text.PlainText
|
||||
}
|
||||
GridLayout {
|
||||
columns: 2
|
||||
Label {
|
||||
text: qsTr("Username:")
|
||||
color: palette.windowText
|
||||
}
|
||||
TextField {
|
||||
id: userField
|
||||
focus: true
|
||||
Layout.fillWidth: true
|
||||
onAccepted: {
|
||||
if (userField.text && passwordField.text)
|
||||
acceptDialog();
|
||||
}
|
||||
}
|
||||
Label {
|
||||
text: qsTr("Password:")
|
||||
color: palette.windowText
|
||||
}
|
||||
TextField {
|
||||
id: passwordField
|
||||
Layout.fillWidth: true
|
||||
echoMode: TextInput.Password
|
||||
onAccepted: {
|
||||
if (userField.text && passwordField.text)
|
||||
acceptDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
spacing: 8
|
||||
Button {
|
||||
id: cancelButton
|
||||
text: qsTr("Cancel")
|
||||
onClicked: reject()
|
||||
}
|
||||
Button {
|
||||
text: qsTr("Log In")
|
||||
onClicked: acceptDialog()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Popup {
|
||||
id: root
|
||||
// Let Chromium close the popup.
|
||||
closePolicy: Popup.NoAutoClose
|
||||
|
||||
property variant controller: null
|
||||
property int itemHeight: 0
|
||||
|
||||
signal selected(int index)
|
||||
signal accepted()
|
||||
|
||||
function setCurrentIndex(index)
|
||||
{
|
||||
listView.currentIndex = index;
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: listView
|
||||
anchors.fill: parent
|
||||
clip: true
|
||||
|
||||
model: controller.model
|
||||
currentIndex: -1
|
||||
|
||||
delegate: ItemDelegate {
|
||||
width: listView.width
|
||||
height: root.itemHeight
|
||||
text: model.display
|
||||
highlighted: ListView.isCurrentItem
|
||||
|
||||
onHoveredChanged: if (hovered) selected(index);
|
||||
onClicked: accepted();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick.Dialogs
|
||||
|
||||
ColorDialog {
|
||||
id: colorDialog
|
||||
objectName: "colorDialog"
|
||||
|
||||
signal selectedColor(var color)
|
||||
|
||||
onAccepted : selectedColor(selectedColor)
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Dialog {
|
||||
property alias text: message.text
|
||||
property bool handled: false
|
||||
title: qsTr("Confirm Dialog")
|
||||
modal: false
|
||||
anchors.centerIn: parent
|
||||
objectName: "confirmDialog"
|
||||
|
||||
ColumnLayout {
|
||||
id: rootLayout
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
property int minimumWidth: rootLayout.implicitWidth + rootLayout.doubleMargins
|
||||
property int minimumHeight: rootLayout.implicitHeight + rootLayout.doubleMargins
|
||||
property int doubleMargins: anchors.margins * 2
|
||||
SystemPalette { id: palette; colorGroup: SystemPalette.Active }
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
spacing: 8
|
||||
Image {
|
||||
source: "qrc:/qt-project.org/imports/QtWebEngine/ControlsDelegates/question.png"
|
||||
}
|
||||
Text {
|
||||
id: message
|
||||
Layout.fillWidth: true
|
||||
color: palette.windowText
|
||||
textFormat: Text.PlainText
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
spacing: 8
|
||||
Button {
|
||||
text: qsTr("OK")
|
||||
onClicked: accept()
|
||||
}
|
||||
Button {
|
||||
text: qsTr("Cancel")
|
||||
onClicked: reject()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick.Dialogs
|
||||
|
||||
FolderDialog {
|
||||
id: folderDialog
|
||||
objectName: "folderDialog"
|
||||
|
||||
signal folderSelected(var folder)
|
||||
|
||||
onAccepted: {
|
||||
folderSelected([selectedFolder])
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick.Dialogs
|
||||
|
||||
FileDialog {
|
||||
id: fileDialog
|
||||
objectName: "fileDialog"
|
||||
|
||||
signal filesSelected(var fileList)
|
||||
|
||||
onAccepted: {
|
||||
filesSelected(selectedFiles)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls as C
|
||||
|
||||
C.Menu {
|
||||
id: menu
|
||||
signal done()
|
||||
objectName: "menu"
|
||||
|
||||
// Use private API for now
|
||||
onAboutToHide: doneTimer.start()
|
||||
|
||||
// WORKAROUND On Mac the Menu may be destroyed before the MenuItem
|
||||
// is actually triggered (see qtbase commit 08cc9b9991ae9ab51)
|
||||
Timer {
|
||||
id: doneTimer
|
||||
interval: 100
|
||||
onTriggered: menu.done()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls as C
|
||||
|
||||
C.MenuItem { }
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick
|
||||
|
||||
Item { id: dummy }
|
||||
@@ -0,0 +1,60 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Dialog {
|
||||
property alias text: message.text
|
||||
property alias prompt: field.text
|
||||
property bool handled: false
|
||||
signal input(string text)
|
||||
title: qsTr("Prompt Dialog")
|
||||
modal: false
|
||||
anchors.centerIn: parent
|
||||
objectName: "promptDialog"
|
||||
|
||||
|
||||
function acceptDialog() {
|
||||
input(field.text);
|
||||
accept();
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: rootLayout
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
property int minimumWidth: rootLayout.implicitWidth + rootLayout.doubleMargins
|
||||
property int minimumHeight: rootLayout.implicitHeight + rootLayout.doubleMargins
|
||||
property int doubleMargins: anchors.margins * 2
|
||||
SystemPalette { id: palette; colorGroup: SystemPalette.Active }
|
||||
Text {
|
||||
id: message
|
||||
Layout.fillWidth: true
|
||||
color: palette.windowText
|
||||
textFormat: Text.PlainText
|
||||
}
|
||||
TextField {
|
||||
id:field
|
||||
focus: true
|
||||
Layout.fillWidth: true
|
||||
onAccepted: acceptDialog()
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
spacing: 8
|
||||
Button {
|
||||
text: qsTr("OK")
|
||||
onClicked: acceptDialog()
|
||||
}
|
||||
Button {
|
||||
text: qsTr("Cancel")
|
||||
onClicked: reject()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick.Controls as C
|
||||
|
||||
C.ToolTip {
|
||||
delay: 1000
|
||||
timeout: 1500
|
||||
objectName: "toolTip"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright (C) 2018 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick
|
||||
|
||||
Image { }
|
||||
@@ -0,0 +1,139 @@
|
||||
// Copyright (C) 2018 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
Rectangle {
|
||||
id: menu
|
||||
|
||||
signal cutTriggered
|
||||
signal copyTriggered
|
||||
signal pasteTriggered
|
||||
signal contextMenuTriggered
|
||||
|
||||
property bool isCutEnabled: false
|
||||
property bool isCopyEnabled: false
|
||||
property bool isPasteEnabled: false
|
||||
|
||||
property color borderColor: "darkGray"
|
||||
property color bgColor: "white"
|
||||
|
||||
radius: 4
|
||||
border.color: borderColor
|
||||
color: borderColor
|
||||
antialiasing: true
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
spacing: parent.border.width
|
||||
anchors.margins: parent.border.width
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
radius: menu.radius
|
||||
color: bgColor
|
||||
visible: isCutEnabled
|
||||
|
||||
Text {
|
||||
id: cutText
|
||||
anchors.centerIn: parent
|
||||
text: "Cut"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPressed: {
|
||||
parent.color = borderColor;
|
||||
cutText.color = "white";
|
||||
}
|
||||
onReleased: {
|
||||
parent.color = bgColor;
|
||||
cutText.color = "black";
|
||||
cutTriggered();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
radius: menu.radius
|
||||
color: bgColor
|
||||
visible: isCopyEnabled
|
||||
|
||||
Text {
|
||||
id: copyText
|
||||
anchors.centerIn: parent
|
||||
text: "Copy"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPressed: {
|
||||
parent.color = borderColor;
|
||||
copyText.color = "white";
|
||||
}
|
||||
onReleased: {
|
||||
parent.color = bgColor;
|
||||
copyText.color = "black";
|
||||
copyTriggered();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
radius: menu.radius
|
||||
color: bgColor
|
||||
visible: isPasteEnabled
|
||||
|
||||
Text {
|
||||
id: pasteText
|
||||
anchors.centerIn: parent
|
||||
text: "Paste"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPressed: {
|
||||
parent.color = borderColor;
|
||||
pasteText.color = "white";
|
||||
}
|
||||
onReleased: {
|
||||
parent.color = bgColor;
|
||||
pasteText.color = "black";
|
||||
pasteTriggered();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
radius: menu.radius
|
||||
color: bgColor
|
||||
|
||||
Text {
|
||||
id: contextMenuText
|
||||
anchors.centerIn: parent
|
||||
text: "..."
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPressed: {
|
||||
parent.color = borderColor;
|
||||
contextMenuText.color = "white";
|
||||
}
|
||||
onReleased: {
|
||||
parent.color = bgColor;
|
||||
contextMenuText.color = "black";
|
||||
contextMenuTriggered();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import QtQuick.tooling 1.2
|
||||
|
||||
// This file describes the plugin-supplied types contained in the library.
|
||||
// It is used for QML tooling purposes only.
|
||||
//
|
||||
// This file was auto-generated by qmltyperegistrar.
|
||||
|
||||
Module {}
|
||||
@@ -0,0 +1,36 @@
|
||||
module QtWebEngine.ControlsDelegates
|
||||
linktarget Qt6::qtwebenginequickdelegatesplugin
|
||||
optional plugin qtwebenginequickdelegatesplugin
|
||||
classname QtWebEngine_ControlsDelegatesPlugin
|
||||
typeinfo WebEngineQuickDelegatesQml.qmltypes
|
||||
depends QtQuickControls2
|
||||
prefer :/qt-project.org/imports/QtWebEngine/ControlsDelegates/
|
||||
AlertDialog 6.0 AlertDialog.qml
|
||||
AlertDialog 1.0 AlertDialog.qml
|
||||
AuthenticationDialog 6.0 AuthenticationDialog.qml
|
||||
AuthenticationDialog 1.0 AuthenticationDialog.qml
|
||||
AutofillPopup 6.0 AutofillPopup.qml
|
||||
AutofillPopup 1.0 AutofillPopup.qml
|
||||
ConfirmDialog 6.0 ConfirmDialog.qml
|
||||
ConfirmDialog 1.0 ConfirmDialog.qml
|
||||
DirectoryPicker 6.0 DirectoryPicker.qml
|
||||
DirectoryPicker 1.0 DirectoryPicker.qml
|
||||
FilePicker 6.0 FilePicker.qml
|
||||
FilePicker 1.0 FilePicker.qml
|
||||
Menu 6.0 Menu.qml
|
||||
Menu 1.0 Menu.qml
|
||||
MenuItem 6.0 MenuItem.qml
|
||||
MenuItem 1.0 MenuItem.qml
|
||||
MenuSeparator 6.0 MenuSeparator.qml
|
||||
MenuSeparator 1.0 MenuSeparator.qml
|
||||
PromptDialog 6.0 PromptDialog.qml
|
||||
PromptDialog 1.0 PromptDialog.qml
|
||||
ToolTip 6.0 ToolTip.qml
|
||||
ToolTip 1.0 ToolTip.qml
|
||||
TouchHandle 6.0 TouchHandle.qml
|
||||
TouchHandle 1.0 TouchHandle.qml
|
||||
TouchSelectionMenu 6.0 TouchSelectionMenu.qml
|
||||
TouchSelectionMenu 1.0 TouchSelectionMenu.qml
|
||||
ColorDialog 6.0 ColorDialog.qml
|
||||
ColorDialog 1.0 ColorDialog.qml
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
11
.venv_nopip/Lib/site-packages/PySide6/qml/QtWebEngine/qmldir
Normal file
11
.venv_nopip/Lib/site-packages/PySide6/qml/QtWebEngine/qmldir
Normal file
@@ -0,0 +1,11 @@
|
||||
module QtWebEngine
|
||||
linktarget Qt6::qtwebenginequickplugin
|
||||
plugin qtwebenginequickplugin
|
||||
classname QtWebEnginePlugin
|
||||
typeinfo plugins.qmltypes
|
||||
depends QtQuick auto
|
||||
depends QtWebChannel auto
|
||||
depends QtWebEngine.ControlsDelegates auto
|
||||
prefer :/qt-project.org/imports/QtWebEngine/
|
||||
depends QtQuick
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user