gpt4all
77 строк · 2.0 Кб
1import QtCore
2import QtQuick
3import QtQuick.Controls
4import QtQuick.Controls.Basic
5import QtQuick.Layouts
6import download
7import network
8import llm
9
10MyDialog {
11id: thumbsDownDialog
12modal: true
13padding: 20
14
15Theme {
16id: theme
17}
18
19property alias response: thumbsDownNewResponse.text
20
21Column {
22anchors.fill: parent
23spacing: 20
24Item {
25width: childrenRect.width
26height: childrenRect.height
27Image {
28id: img
29anchors.top: parent.top
30anchors.left: parent.left
31width: 60
32height: 60
33source: "qrc:/gpt4all/icons/thumbs_down.svg"
34}
35Text {
36anchors.left: img.right
37anchors.leftMargin: 30
38anchors.verticalCenter: img.verticalCenter
39text: qsTr("Please edit the text below to provide a better response. (optional)")
40color: theme.textColor
41font.pixelSize: theme.fontSizeLarge
42}
43}
44
45ScrollView {
46clip: true
47height: 300
48width: parent.width
49ScrollBar.vertical.policy: ScrollBar.AlwaysOn
50ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
51
52MyTextArea {
53id: thumbsDownNewResponse
54placeholderText: qsTr("Please provide a better response...")
55}
56}
57}
58
59footer: DialogButtonBox {
60padding: 20
61alignment: Qt.AlignRight
62spacing: 10
63MySettingsButton {
64text: qsTr("Submit")
65Accessible.description: qsTr("Submits the user's response")
66DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
67}
68MySettingsButton {
69text: qsTr("Cancel")
70Accessible.description: qsTr("Closes the response dialog")
71DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
72}
73background: Rectangle {
74color: "transparent"
75}
76}
77}
78