mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 17:39:03 +08:00
Implement a sync button and file dialogue to export all materials
Contributes to issue CURA-8055.
This commit is contained in:
parent
f436cb8e7b
commit
abba3bdd10
@ -1,5 +1,5 @@
|
|||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2021 Ultimaker B.V.
|
||||||
// Uranium is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
@ -191,6 +191,20 @@ Item
|
|||||||
}
|
}
|
||||||
enabled: base.hasCurrentItem
|
enabled: base.hasCurrentItem
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Sync button.
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
id: syncMaterialsButton
|
||||||
|
text: catalog.i18nc("@action:button Sending materials to printers", "Sync with Printers")
|
||||||
|
iconName: "sync-synchronizing"
|
||||||
|
onClicked:
|
||||||
|
{
|
||||||
|
forceActiveFocus();
|
||||||
|
exportAllMaterialsDialog.open();
|
||||||
|
}
|
||||||
|
enabled: Cura.MachineManager.activeMachine.supportsMaterialExport()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@ -368,6 +382,16 @@ Item
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileDialog
|
||||||
|
{
|
||||||
|
id: exportAllMaterialsDialog
|
||||||
|
title: catalog.i18nc("@title:window", "Export All Materials")
|
||||||
|
selectExisting: false
|
||||||
|
nameFilters: ["Material archives (*.zip)", "All files (*)"]
|
||||||
|
folder: CuraApplication.getDefaultPath("dialog_material_path") //TODO: Implement preference for removable drives.
|
||||||
|
//TODO: Implement onAccepted event to save the profiles.
|
||||||
|
}
|
||||||
|
|
||||||
MessageDialog
|
MessageDialog
|
||||||
{
|
{
|
||||||
id: messageDialog
|
id: messageDialog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user