This commit is contained in:
2026-06-17 04:55:15 +03:00
commit da3d9ef7b5
74 changed files with 5307 additions and 0 deletions
+68
View File
@@ -0,0 +1,68 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import "settings"
Dialog {
id: dlg
modal: true
title: "Настройки"
width: Math.min(720, parent ? parent.width * 0.95 : 720)
height: Math.min(560, parent ? parent.height * 0.95 : 560)
anchors.centerIn: parent
standardButtons: Dialog.Close
StackView {
id: stack
anchors.fill: parent
initialItem: mainPageComp
}
Component {
id: mainPageComp
MainPage {
onOpenButtons: stack.push(buttonsPageComp)
onOpenLayout: stack.push(layoutPageComp)
onOpenBackground: stack.push(backgroundPageComp)
onOpenFeedback: stack.push(feedbackPageComp)
onOpenNetwork: stack.push(networkPageComp)
onOpenUpdate: stack.push(updatePageComp)
onChangePassword: changePwdDialog.open()
}
}
Component {
id: buttonsPageComp
ButtonsPage {
onCreateRequested: editorDialog.openForCreate()
onEditRequested: function(data) { editorDialog.openForEdit(data) }
}
}
Component { id: layoutPageComp; LayoutPage {} }
Component { id: backgroundPageComp; BackgroundPage {} }
Component { id: feedbackPageComp; FeedbackPage {} }
Component { id: networkPageComp; NetworkInfoPage {} }
Component { id: updatePageComp; UpdatePage {} }
ButtonEditorDialog { id: editorDialog }
Dialog {
id: changePwdDialog
modal: true
title: "Сменить пароль"
anchors.centerIn: parent
standardButtons: Dialog.Ok | Dialog.Cancel
TextField {
id: newPwdField
anchors.fill: parent
placeholderText: "Новый пароль"
echoMode: TextInput.Password
}
onAccepted: {
if (newPwdField.text.length > 0)
btnController.setPassword(newPwdField.text)
newPwdField.text = ""
}
}
}