2023-04-23 06:58:07 -04:00
|
|
|
import QtCore
|
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
2023-04-23 23:56:33 -04:00
|
|
|
import QtQuick.Controls.Basic
|
2023-04-25 10:57:40 -04:00
|
|
|
import QtQuick.Dialogs
|
2023-04-23 06:58:07 -04:00
|
|
|
import QtQuick.Layouts
|
2023-06-05 09:23:43 -04:00
|
|
|
import Qt.labs.folderlistmodel
|
2023-04-23 06:58:07 -04:00
|
|
|
import download
|
2023-06-22 15:44:49 -04:00
|
|
|
import modellist
|
2023-04-23 06:58:07 -04:00
|
|
|
import network
|
|
|
|
import llm
|
2023-06-27 11:54:34 -04:00
|
|
|
import mysettings
|
2023-04-23 06:58:07 -04:00
|
|
|
|
2023-07-06 10:53:43 -04:00
|
|
|
MyDialog {
|
2023-04-23 06:58:07 -04:00
|
|
|
id: settingsDialog
|
|
|
|
modal: true
|
2023-05-22 22:13:42 -04:00
|
|
|
padding: 20
|
2023-05-02 20:31:17 -04:00
|
|
|
onOpened: {
|
|
|
|
Network.sendSettingsDialog();
|
|
|
|
}
|
|
|
|
|
2023-04-23 06:58:07 -04:00
|
|
|
Item {
|
|
|
|
Accessible.role: Accessible.Dialog
|
2023-10-21 10:38:46 -04:00
|
|
|
Accessible.name: qsTr("Settings")
|
|
|
|
Accessible.description: qsTr("Contains various application settings")
|
2023-04-23 06:58:07 -04:00
|
|
|
}
|
2023-04-25 13:00:28 -04:00
|
|
|
|
2023-06-30 09:50:09 -04:00
|
|
|
ListModel {
|
|
|
|
id: stacksModel
|
|
|
|
ListElement {
|
2023-07-01 11:34:21 -04:00
|
|
|
title: "Models"
|
2023-06-30 09:50:09 -04:00
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
title: "Application"
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
title: "Plugins"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ScrollView {
|
|
|
|
id: stackList
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.left: parent.left
|
|
|
|
width: 200
|
|
|
|
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
|
|
|
clip: true
|
|
|
|
|
|
|
|
ListView {
|
|
|
|
id: listView
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.rightMargin: 10
|
|
|
|
model: stacksModel
|
|
|
|
|
|
|
|
delegate: Rectangle {
|
|
|
|
id: item
|
|
|
|
width: listView.width
|
|
|
|
height: titleLabel.height + 25
|
|
|
|
color: "transparent"
|
|
|
|
border.color: theme.backgroundLighter
|
|
|
|
border.width: index == listView.currentIndex ? 1 : 0
|
|
|
|
radius: 10
|
|
|
|
|
|
|
|
Text {
|
|
|
|
id: titleLabel
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.margins: 20
|
2023-07-01 11:34:21 -04:00
|
|
|
font.bold: index == listView.currentIndex
|
2023-06-30 09:50:09 -04:00
|
|
|
text: title
|
2023-08-07 13:54:13 -04:00
|
|
|
font.pixelSize: theme.fontSizeLarge
|
2023-06-30 09:50:09 -04:00
|
|
|
elide: Text.ElideRight
|
|
|
|
color: theme.textColor
|
|
|
|
width: 200
|
2023-07-11 14:58:54 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
TapHandler {
|
|
|
|
onTapped: {
|
|
|
|
listView.currentIndex = index
|
2023-06-30 09:50:09 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StackLayout {
|
|
|
|
id: stackLayout
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.left: stackList.right
|
|
|
|
anchors.right: parent.right
|
|
|
|
currentIndex: listView.currentIndex
|
|
|
|
|
|
|
|
MySettingsStack {
|
2023-07-01 11:34:21 -04:00
|
|
|
title: qsTr("Model/Character Settings")
|
2023-06-30 09:50:09 -04:00
|
|
|
tabs: [
|
2023-07-01 11:34:21 -04:00
|
|
|
Component { ModelSettings { } }
|
2023-06-30 09:50:09 -04:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
MySettingsStack {
|
2023-07-01 11:34:21 -04:00
|
|
|
title: qsTr("Application General Settings")
|
2023-06-30 09:50:09 -04:00
|
|
|
tabs: [
|
|
|
|
Component { ApplicationSettings { } }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
MySettingsStack {
|
2023-07-01 11:34:21 -04:00
|
|
|
title: qsTr("LocalDocs Plugin (BETA) Settings")
|
2023-06-30 09:50:09 -04:00
|
|
|
tabs: [
|
|
|
|
Component { LocalDocsSettings { } }
|
|
|
|
]
|
|
|
|
}
|
2023-04-23 06:58:07 -04:00
|
|
|
}
|
|
|
|
}
|