Debian Codegraph @

plugins/CuraDrive/src/qml/components/BackupListFooter.qml

raw
1 // Copyright (c) 2018 Ultimaker B.V.
2 // Cura is released under the terms of the LGPLv3 or higher.
3
4 import QtQuick 2.7
5 import QtQuick.Controls 2.1
6 import QtQuick.Layouts 1.3
7
8 import UM 1.5 as UM
9 import Cura 1.0 as Cura
10
11 import "../components"
12
13 RowLayout
14 {
15 id: backupListFooter
16 width: parent.width
17 property bool showInfoButton: false
18
19 Cura.PrimaryButton
20 {
21 id: infoButton
22 text: catalog.i18nc("@button", "Want more?")
23 iconSource: UM.Theme.getIcon("Information")
24 onClicked: Qt.openUrlExternally("https://goo.gl/forms/QACEP8pP3RV60QYG2")
25 visible: backupListFooter.showInfoButton
26 }
27
28 Cura.PrimaryButton
29 {
30 id: createBackupButton
31 text: catalog.i18nc("@button", "Backup Now")
32 iconSource: UM.Theme.getIcon("Plus")
33 enabled: !CuraDrive.isCreatingBackup && !CuraDrive.isRestoringBackup
34 onClicked: CuraDrive.createBackup()
35 busy: CuraDrive.isCreatingBackup
36 }
37
38 UM.CheckBox
39 {
40 id: autoBackupEnabled
41 checked: CuraDrive.autoBackupEnabled
42 onClicked: CuraDrive.toggleAutoBackup(autoBackupEnabled.checked)
43 text: catalog.i18nc("@checkbox:description", "Auto Backup")
44 tooltip: catalog.i18nc("@checkbox:description", "Automatically create a backup each day that Cura is started.")
45 }
46 }