gpt4all/gpt4all-chat/main.qml

70 lines
1.3 KiB
QML
Raw Normal View History

import QtCore
2023-04-09 03:28:39 +00:00
import QtQuick
import QtQuick.Controls
2023-04-10 19:03:00 +00:00
import QtQuick.Controls.Basic
2023-04-16 05:14:42 +00:00
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
2023-04-09 03:28:39 +00:00
import llm
2023-06-22 19:44:49 +00:00
import chatlistmodel
2023-04-28 14:54:05 +00:00
import download
2023-06-22 19:44:49 +00:00
import modellist
import network
import gpt4all
import mysettings
2023-04-09 03:28:39 +00:00
Window {
id: window
width: 1920
height: 1080
minimumWidth: 720
minimumHeight: 480
2023-04-09 03:28:39 +00:00
visible: true
title: qsTr("GPT4All v") + Qt.application.version
Settings {
property alias x: window.x
property alias y: window.y
property alias width: window.width
property alias height: window.height
}
Theme {
id: theme
}
property bool hasSaved: false
PopupDialog {
id: savingPopup
anchors.centerIn: parent
shouldTimeOut: false
shouldShowBusy: true
text: qsTr("Saving chats.")
font.pixelSize: theme.fontSizeLarge
}
onClosing: function(close) {
if (window.hasSaved)
return;
savingPopup.open();
2023-06-22 19:44:49 +00:00
ChatListModel.saveChats();
close.accepted = false
}
Connections {
2023-06-22 19:44:49 +00:00
target: ChatListModel
function onSaveChatsFinished() {
window.hasSaved = true;
savingPopup.close();
window.close()
}
}
2023-04-24 01:05:38 +00:00
color: theme.black
ChatView {
anchors.fill: parent
2023-04-09 03:28:39 +00:00
}
}