2023-04-27 20:27:53 +00:00
|
|
|
import QtCore
|
2023-04-20 10:48:00 +00:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
2023-04-24 03:56:33 +00:00
|
|
|
import QtQuick.Controls.Basic
|
2023-04-27 20:27:53 +00:00
|
|
|
import QtQuick.Dialogs
|
2023-04-20 10:48:00 +00:00
|
|
|
import QtQuick.Layouts
|
2023-04-19 01:10:06 +00:00
|
|
|
import download
|
|
|
|
import llm
|
2023-05-03 00:31:17 +00:00
|
|
|
import network
|
2023-04-19 01:10:06 +00:00
|
|
|
|
|
|
|
Dialog {
|
|
|
|
id: modelDownloaderDialog
|
|
|
|
modal: true
|
|
|
|
opacity: 0.9
|
2023-05-04 19:31:41 +00:00
|
|
|
closePolicy: LLM.chatListModel.currentChat.modelList.length === 0 ? Popup.NoAutoClose : (Popup.CloseOnEscape | Popup.CloseOnPressOutside)
|
2023-05-23 02:13:42 +00:00
|
|
|
padding: 20
|
|
|
|
bottomPadding: 30
|
2023-04-19 01:10:06 +00:00
|
|
|
background: Rectangle {
|
|
|
|
anchors.fill: parent
|
2023-04-23 13:42:35 +00:00
|
|
|
color: theme.backgroundDarkest
|
2023-04-19 01:10:06 +00:00
|
|
|
border.width: 1
|
2023-04-23 13:42:35 +00:00
|
|
|
border.color: theme.dialogBorder
|
2023-04-19 01:10:06 +00:00
|
|
|
radius: 10
|
|
|
|
}
|
|
|
|
|
2023-05-03 00:31:17 +00:00
|
|
|
onOpened: {
|
|
|
|
Network.sendModelDownloaderDialog();
|
|
|
|
}
|
|
|
|
|
2023-04-27 20:45:24 +00:00
|
|
|
property string defaultModelPath: Download.defaultLocalModelsPath()
|
|
|
|
property alias modelPath: settings.modelPath
|
|
|
|
Settings {
|
|
|
|
id: settings
|
|
|
|
property string modelPath: modelDownloaderDialog.defaultModelPath
|
|
|
|
}
|
|
|
|
|
2023-04-19 01:10:06 +00:00
|
|
|
Component.onCompleted: {
|
2023-04-27 20:45:24 +00:00
|
|
|
Download.downloadLocalModelsPath = settings.modelPath
|
2023-04-19 01:10:06 +00:00
|
|
|
}
|
|
|
|
|
2023-04-27 20:45:24 +00:00
|
|
|
Component.onDestruction: {
|
|
|
|
settings.sync()
|
|
|
|
}
|
|
|
|
|
2023-04-19 01:10:06 +00:00
|
|
|
ColumnLayout {
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 20
|
2023-04-23 15:28:17 +00:00
|
|
|
spacing: 30
|
2023-04-19 01:10:06 +00:00
|
|
|
|
|
|
|
Label {
|
|
|
|
id: listLabel
|
|
|
|
text: "Available Models:"
|
|
|
|
Layout.alignment: Qt.AlignLeft
|
|
|
|
Layout.fillWidth: true
|
2023-04-23 13:42:35 +00:00
|
|
|
color: theme.textColor
|
2023-04-19 01:10:06 +00:00
|
|
|
}
|
|
|
|
|
2023-04-23 15:28:17 +00:00
|
|
|
ScrollView {
|
|
|
|
id: scrollView
|
|
|
|
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
2023-04-19 01:10:06 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
clip: true
|
|
|
|
|
2023-04-23 15:28:17 +00:00
|
|
|
ListView {
|
|
|
|
id: modelList
|
|
|
|
model: Download.modelList
|
|
|
|
boundsBehavior: Flickable.StopAtBounds
|
|
|
|
|
|
|
|
delegate: Item {
|
|
|
|
id: delegateItem
|
|
|
|
width: modelList.width
|
2023-04-27 18:52:40 +00:00
|
|
|
height: modelName.height + modelName.padding
|
|
|
|
+ description.height + description.padding
|
2023-04-23 15:28:17 +00:00
|
|
|
objectName: "delegateItem"
|
|
|
|
property bool downloading: false
|
|
|
|
Rectangle {
|
|
|
|
anchors.fill: parent
|
|
|
|
color: index % 2 === 0 ? theme.backgroundLight : theme.backgroundLighter
|
|
|
|
}
|
2023-04-19 01:10:06 +00:00
|
|
|
|
2023-04-23 15:28:17 +00:00
|
|
|
Text {
|
|
|
|
id: modelName
|
|
|
|
objectName: "modelName"
|
|
|
|
property string filename: modelData.filename
|
2023-05-15 00:12:15 +00:00
|
|
|
text: !modelData.isChatGPT ? filename.slice(5, filename.length - 4) : filename
|
2023-04-27 18:52:40 +00:00
|
|
|
padding: 20
|
|
|
|
anchors.top: parent.top
|
2023-04-23 15:28:17 +00:00
|
|
|
anchors.left: parent.left
|
2023-05-09 23:15:18 +00:00
|
|
|
font.bold: modelData.isDefault || modelData.bestGPTJ || modelData.bestLlama || modelData.bestMPT
|
2023-04-27 18:52:40 +00:00
|
|
|
color: theme.assistantColor
|
2023-04-23 15:28:17 +00:00
|
|
|
Accessible.role: Accessible.Paragraph
|
|
|
|
Accessible.name: qsTr("Model file")
|
|
|
|
Accessible.description: qsTr("Model file to be downloaded")
|
|
|
|
}
|
2023-04-19 01:10:06 +00:00
|
|
|
|
2023-04-27 18:52:40 +00:00
|
|
|
Text {
|
|
|
|
id: description
|
|
|
|
text: " - " + modelData.description
|
|
|
|
leftPadding: 20
|
2023-04-27 20:27:53 +00:00
|
|
|
rightPadding: 20
|
2023-04-27 18:52:40 +00:00
|
|
|
anchors.top: modelName.bottom
|
|
|
|
anchors.left: modelName.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
2023-05-15 00:12:15 +00:00
|
|
|
textFormat: Text.StyledText
|
2023-04-27 18:52:40 +00:00
|
|
|
color: theme.textColor
|
2023-05-15 00:12:15 +00:00
|
|
|
linkColor: theme.textColor
|
2023-04-27 18:52:40 +00:00
|
|
|
Accessible.role: Accessible.Paragraph
|
|
|
|
Accessible.name: qsTr("Description")
|
|
|
|
Accessible.description: qsTr("The description of the file")
|
2023-05-15 00:12:15 +00:00
|
|
|
onLinkActivated: Qt.openUrlExternally(link)
|
2023-04-27 18:52:40 +00:00
|
|
|
}
|
|
|
|
|
2023-04-23 15:28:17 +00:00
|
|
|
Text {
|
|
|
|
id: isDefault
|
|
|
|
text: qsTr("(default)")
|
|
|
|
visible: modelData.isDefault
|
2023-04-27 18:52:40 +00:00
|
|
|
anchors.top: modelName.top
|
2023-04-23 15:28:17 +00:00
|
|
|
anchors.left: modelName.right
|
2023-04-27 18:52:40 +00:00
|
|
|
padding: 20
|
2023-04-23 15:28:17 +00:00
|
|
|
color: theme.textColor
|
|
|
|
Accessible.role: Accessible.Paragraph
|
|
|
|
Accessible.name: qsTr("Default file")
|
|
|
|
Accessible.description: qsTr("Whether the file is the default model")
|
2023-04-19 01:10:06 +00:00
|
|
|
}
|
2023-04-23 15:28:17 +00:00
|
|
|
|
|
|
|
Text {
|
|
|
|
text: modelData.filesize
|
2023-04-27 18:52:40 +00:00
|
|
|
anchors.top: modelName.top
|
2023-04-23 15:28:17 +00:00
|
|
|
anchors.left: isDefault.visible ? isDefault.right : modelName.right
|
2023-04-27 18:52:40 +00:00
|
|
|
padding: 20
|
2023-04-23 15:28:17 +00:00
|
|
|
color: theme.textColor
|
|
|
|
Accessible.role: Accessible.Paragraph
|
|
|
|
Accessible.name: qsTr("File size")
|
|
|
|
Accessible.description: qsTr("The size of the file")
|
2023-04-23 11:48:06 +00:00
|
|
|
}
|
2023-04-19 01:10:06 +00:00
|
|
|
|
2023-04-23 15:28:17 +00:00
|
|
|
Label {
|
|
|
|
id: speedLabel
|
2023-04-27 18:52:40 +00:00
|
|
|
anchors.top: modelName.top
|
2023-04-23 15:28:17 +00:00
|
|
|
anchors.right: itemProgressBar.left
|
2023-04-27 18:52:40 +00:00
|
|
|
padding: 20
|
2023-04-23 15:28:17 +00:00
|
|
|
objectName: "speedLabel"
|
|
|
|
color: theme.textColor
|
|
|
|
text: ""
|
|
|
|
visible: downloading
|
|
|
|
Accessible.role: Accessible.Paragraph
|
|
|
|
Accessible.name: qsTr("Download speed")
|
|
|
|
Accessible.description: qsTr("Download speed in bytes/kilobytes/megabytes per second")
|
|
|
|
}
|
2023-04-19 01:10:06 +00:00
|
|
|
|
2023-04-23 15:28:17 +00:00
|
|
|
ProgressBar {
|
|
|
|
id: itemProgressBar
|
|
|
|
objectName: "itemProgressBar"
|
2023-04-27 18:52:40 +00:00
|
|
|
anchors.top: modelName.top
|
2023-04-23 15:28:17 +00:00
|
|
|
anchors.right: downloadButton.left
|
2023-04-27 20:27:53 +00:00
|
|
|
anchors.topMargin: 20
|
|
|
|
anchors.rightMargin: 20
|
2023-04-23 15:28:17 +00:00
|
|
|
width: 100
|
|
|
|
visible: downloading
|
2023-04-24 04:14:52 +00:00
|
|
|
background: Rectangle {
|
|
|
|
implicitWidth: 200
|
|
|
|
implicitHeight: 30
|
|
|
|
color: theme.backgroundDarkest
|
|
|
|
radius: 3
|
|
|
|
}
|
|
|
|
|
|
|
|
contentItem: Item {
|
|
|
|
implicitWidth: 200
|
|
|
|
implicitHeight: 25
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: itemProgressBar.visualPosition * parent.width
|
|
|
|
height: parent.height
|
|
|
|
radius: 2
|
2023-04-27 20:27:53 +00:00
|
|
|
color: theme.assistantColor
|
2023-04-24 04:14:52 +00:00
|
|
|
}
|
|
|
|
}
|
2023-04-23 15:28:17 +00:00
|
|
|
Accessible.role: Accessible.ProgressBar
|
|
|
|
Accessible.name: qsTr("Download progressBar")
|
|
|
|
Accessible.description: qsTr("Shows the progress made in the download")
|
|
|
|
}
|
2023-04-19 01:10:06 +00:00
|
|
|
|
2023-04-23 23:43:20 +00:00
|
|
|
Item {
|
|
|
|
visible: modelData.calcHash
|
2023-04-27 18:52:40 +00:00
|
|
|
anchors.top: modelName.top
|
2023-04-23 23:43:20 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
Label {
|
|
|
|
id: calcHashLabel
|
|
|
|
anchors.right: busyCalcHash.left
|
2023-04-27 18:52:40 +00:00
|
|
|
padding: 20
|
2023-04-23 23:43:20 +00:00
|
|
|
objectName: "calcHashLabel"
|
|
|
|
color: theme.textColor
|
|
|
|
text: qsTr("Calculating MD5...")
|
|
|
|
Accessible.role: Accessible.Paragraph
|
|
|
|
Accessible.name: text
|
|
|
|
Accessible.description: qsTr("Whether the file hash is being calculated")
|
|
|
|
}
|
|
|
|
|
|
|
|
BusyIndicator {
|
|
|
|
id: busyCalcHash
|
|
|
|
anchors.right: parent.right
|
2023-04-27 18:52:40 +00:00
|
|
|
padding: 20
|
2023-04-23 23:43:20 +00:00
|
|
|
running: modelData.calcHash
|
|
|
|
Accessible.role: Accessible.Animation
|
|
|
|
Accessible.name: qsTr("Busy indicator")
|
|
|
|
Accessible.description: qsTr("Displayed when the file hash is being calculated")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-16 13:32:01 +00:00
|
|
|
Item {
|
2023-04-27 18:52:40 +00:00
|
|
|
anchors.top: modelName.top
|
2023-05-16 13:32:01 +00:00
|
|
|
anchors.topMargin: 15
|
2023-04-23 15:28:17 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
visible: modelData.installed
|
2023-05-16 13:32:01 +00:00
|
|
|
|
|
|
|
Label {
|
|
|
|
id: installedLabel
|
|
|
|
anchors.verticalCenter: removeButton.verticalCenter
|
|
|
|
anchors.right: removeButton.left
|
|
|
|
anchors.rightMargin: 15
|
|
|
|
objectName: "installedLabel"
|
|
|
|
color: theme.textColor
|
|
|
|
text: qsTr("Already installed")
|
|
|
|
Accessible.role: Accessible.Paragraph
|
|
|
|
Accessible.name: text
|
|
|
|
Accessible.description: qsTr("Whether the file is already installed on your system")
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
id: removeButton
|
|
|
|
contentItem: Text {
|
|
|
|
color: theme.textColor
|
|
|
|
text: "Remove"
|
|
|
|
}
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 20
|
|
|
|
background: Rectangle {
|
|
|
|
opacity: .5
|
|
|
|
border.color: theme.backgroundLightest
|
|
|
|
border.width: 1
|
|
|
|
radius: 10
|
|
|
|
color: theme.backgroundLight
|
|
|
|
}
|
|
|
|
onClicked: {
|
|
|
|
Download.removeModel(modelData.filename);
|
|
|
|
}
|
|
|
|
Accessible.role: Accessible.Button
|
|
|
|
Accessible.name: qsTr("Remove button")
|
|
|
|
Accessible.description: qsTr("Remove button to remove model from filesystem")
|
|
|
|
}
|
2023-04-23 15:28:17 +00:00
|
|
|
}
|
2023-04-19 01:10:06 +00:00
|
|
|
|
2023-05-15 00:12:15 +00:00
|
|
|
Item {
|
|
|
|
visible: modelData.isChatGPT && !modelData.installed
|
|
|
|
anchors.top: modelName.top
|
|
|
|
anchors.topMargin: 15
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: openaiKey
|
|
|
|
anchors.right: installButton.left
|
|
|
|
anchors.rightMargin: 15
|
|
|
|
color: theme.textColor
|
|
|
|
background: Rectangle {
|
|
|
|
color: theme.backgroundLighter
|
|
|
|
radius: 10
|
|
|
|
}
|
|
|
|
placeholderText: qsTr("enter $OPENAI_API_KEY")
|
|
|
|
placeholderTextColor: theme.backgroundLightest
|
|
|
|
Accessible.role: Accessible.EditableText
|
|
|
|
Accessible.name: placeholderText
|
|
|
|
Accessible.description: qsTr("Whether the file hash is being calculated")
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
id: installButton
|
|
|
|
contentItem: Text {
|
|
|
|
color: openaiKey.text === "" ? theme.backgroundLightest : theme.textColor
|
|
|
|
text: "Install"
|
|
|
|
}
|
|
|
|
enabled: openaiKey.text !== ""
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 20
|
|
|
|
background: Rectangle {
|
|
|
|
opacity: .5
|
|
|
|
border.color: theme.backgroundLightest
|
|
|
|
border.width: 1
|
|
|
|
radius: 10
|
|
|
|
color: theme.backgroundLight
|
|
|
|
}
|
|
|
|
onClicked: {
|
|
|
|
Download.installModel(modelData.filename, openaiKey.text);
|
|
|
|
}
|
|
|
|
Accessible.role: Accessible.Button
|
|
|
|
Accessible.name: qsTr("Install button")
|
|
|
|
Accessible.description: qsTr("Install button to install chatgpt model")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-23 15:28:17 +00:00
|
|
|
Button {
|
|
|
|
id: downloadButton
|
2023-04-24 03:57:41 +00:00
|
|
|
contentItem: Text {
|
|
|
|
color: theme.textColor
|
|
|
|
text: downloading ? "Cancel" : "Download"
|
|
|
|
}
|
2023-04-27 18:52:40 +00:00
|
|
|
anchors.top: modelName.top
|
2023-04-23 15:28:17 +00:00
|
|
|
anchors.right: parent.right
|
2023-04-27 20:27:53 +00:00
|
|
|
anchors.topMargin: 15
|
|
|
|
anchors.rightMargin: 20
|
2023-05-15 00:12:15 +00:00
|
|
|
visible: !modelData.isChatGPT && !modelData.installed && !modelData.calcHash
|
2023-04-23 15:28:17 +00:00
|
|
|
onClicked: {
|
|
|
|
if (!downloading) {
|
|
|
|
downloading = true;
|
|
|
|
Download.downloadModel(modelData.filename);
|
|
|
|
} else {
|
|
|
|
downloading = false;
|
|
|
|
Download.cancelDownload(modelData.filename);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
background: Rectangle {
|
|
|
|
opacity: .5
|
|
|
|
border.color: theme.backgroundLightest
|
|
|
|
border.width: 1
|
|
|
|
radius: 10
|
|
|
|
color: theme.backgroundLight
|
|
|
|
}
|
|
|
|
Accessible.role: Accessible.Button
|
|
|
|
Accessible.name: text
|
|
|
|
Accessible.description: qsTr("Cancel/Download button to stop/start the download")
|
2023-04-19 01:10:06 +00:00
|
|
|
|
2023-04-23 15:28:17 +00:00
|
|
|
}
|
|
|
|
}
|
2023-04-19 01:10:06 +00:00
|
|
|
|
2023-04-23 15:28:17 +00:00
|
|
|
Component.onCompleted: {
|
|
|
|
Download.downloadProgress.connect(updateProgress);
|
|
|
|
Download.downloadFinished.connect(resetProgress);
|
|
|
|
}
|
2023-04-19 01:10:06 +00:00
|
|
|
|
2023-04-23 15:28:17 +00:00
|
|
|
property var lastUpdate: ({})
|
|
|
|
|
|
|
|
function updateProgress(bytesReceived, bytesTotal, modelName) {
|
|
|
|
let currentTime = new Date().getTime();
|
|
|
|
|
|
|
|
for (let i = 0; i < modelList.contentItem.children.length; i++) {
|
|
|
|
let delegateItem = modelList.contentItem.children[i];
|
|
|
|
if (delegateItem.objectName === "delegateItem") {
|
|
|
|
let modelNameText = delegateItem.children.find(child => child.objectName === "modelName").filename;
|
|
|
|
if (modelNameText === modelName) {
|
|
|
|
let progressBar = delegateItem.children.find(child => child.objectName === "itemProgressBar");
|
|
|
|
progressBar.value = bytesReceived / bytesTotal;
|
|
|
|
|
|
|
|
// Calculate the download speed
|
|
|
|
if (lastUpdate[modelName] && lastUpdate[modelName].timestamp) {
|
|
|
|
let timeDifference = currentTime - lastUpdate[modelName].timestamp;
|
|
|
|
let bytesDifference = bytesReceived - lastUpdate[modelName].bytesReceived;
|
|
|
|
let speed = (bytesDifference / timeDifference) * 1000; // bytes per second
|
2023-05-09 23:15:18 +00:00
|
|
|
delegateItem.downloading = true
|
2023-04-23 15:28:17 +00:00
|
|
|
|
|
|
|
// Update the speed label
|
|
|
|
let speedLabel = delegateItem.children.find(child => child.objectName === "speedLabel");
|
|
|
|
if (speed < 1024) {
|
|
|
|
speedLabel.text = speed.toFixed(2) + " B/s";
|
|
|
|
} else if (speed < 1024 * 1024) {
|
|
|
|
speedLabel.text = (speed / 1024).toFixed(2) + " KB/s";
|
|
|
|
} else {
|
|
|
|
speedLabel.text = (speed / (1024 * 1024)).toFixed(2) + " MB/s";
|
|
|
|
}
|
2023-04-19 01:10:06 +00:00
|
|
|
}
|
|
|
|
|
2023-04-23 15:28:17 +00:00
|
|
|
// Update the lastUpdate object for the current model
|
|
|
|
lastUpdate[modelName] = {"timestamp": currentTime, "bytesReceived": bytesReceived};
|
|
|
|
break;
|
|
|
|
}
|
2023-04-19 01:10:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-23 15:28:17 +00:00
|
|
|
function resetProgress(modelName) {
|
|
|
|
for (let i = 0; i < modelList.contentItem.children.length; i++) {
|
|
|
|
let delegateItem = modelList.contentItem.children[i];
|
|
|
|
if (delegateItem.objectName === "delegateItem") {
|
|
|
|
let modelNameText = delegateItem.children.find(child => child.objectName === "modelName").filename;
|
|
|
|
if (modelNameText === modelName) {
|
|
|
|
let progressBar = delegateItem.children.find(child => child.objectName === "itemProgressBar");
|
|
|
|
progressBar.value = 0;
|
|
|
|
delegateItem.downloading = false;
|
|
|
|
|
|
|
|
// Remove speed label text
|
|
|
|
let speedLabel = delegateItem.children.find(child => child.objectName === "speedLabel");
|
|
|
|
speedLabel.text = "";
|
|
|
|
|
|
|
|
// Remove the lastUpdate object for the canceled model
|
|
|
|
delete lastUpdate[modelName];
|
|
|
|
break;
|
|
|
|
}
|
2023-04-19 01:10:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-04-27 20:27:53 +00:00
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
Layout.alignment: Qt.AlignCenter
|
2023-04-23 15:28:17 +00:00
|
|
|
Layout.fillWidth: true
|
2023-04-27 20:27:53 +00:00
|
|
|
spacing: 20
|
|
|
|
FolderDialog {
|
|
|
|
id: modelPathDialog
|
|
|
|
title: "Please choose a directory"
|
2023-05-21 20:24:37 +00:00
|
|
|
currentFolder: "file://" + Download.downloadLocalModelsPath
|
2023-04-27 20:27:53 +00:00
|
|
|
onAccepted: {
|
|
|
|
Download.downloadLocalModelsPath = selectedFolder
|
|
|
|
settings.modelPath = Download.downloadLocalModelsPath
|
|
|
|
settings.sync()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Label {
|
|
|
|
id: modelPathLabel
|
|
|
|
text: qsTr("Download path:")
|
|
|
|
color: theme.textColor
|
|
|
|
Layout.row: 1
|
|
|
|
Layout.column: 0
|
|
|
|
}
|
|
|
|
TextField {
|
|
|
|
id: modelPathDisplayLabel
|
|
|
|
text: Download.downloadLocalModelsPath
|
|
|
|
readOnly: true
|
|
|
|
color: theme.textColor
|
|
|
|
Layout.fillWidth: true
|
|
|
|
ToolTip.text: qsTr("Path where model files will be downloaded to")
|
|
|
|
ToolTip.visible: hovered
|
|
|
|
Accessible.role: Accessible.ToolTip
|
|
|
|
Accessible.name: modelPathDisplayLabel.text
|
|
|
|
Accessible.description: ToolTip.text
|
2023-04-29 02:07:37 +00:00
|
|
|
background: Rectangle {
|
|
|
|
color: theme.backgroundLighter
|
|
|
|
radius: 10
|
|
|
|
}
|
2023-04-27 20:27:53 +00:00
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: qsTr("Browse")
|
|
|
|
contentItem: Text {
|
|
|
|
text: qsTr("Browse")
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
color: theme.textColor
|
|
|
|
Accessible.role: Accessible.Button
|
|
|
|
Accessible.name: text
|
|
|
|
Accessible.description: qsTr("Opens a folder picker dialog to choose where to save model files")
|
|
|
|
}
|
|
|
|
background: Rectangle {
|
|
|
|
opacity: .5
|
|
|
|
border.color: theme.backgroundLightest
|
|
|
|
border.width: 1
|
|
|
|
radius: 10
|
|
|
|
color: theme.backgroundLight
|
|
|
|
}
|
|
|
|
onClicked: modelPathDialog.open()
|
|
|
|
}
|
2023-04-23 15:28:17 +00:00
|
|
|
}
|
2023-04-19 01:10:06 +00:00
|
|
|
}
|
|
|
|
}
|