mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-10 15:28:56 -07:00
Expose MeshFileHandler to QML and use it to set supported read/write file types
This commit is contained in:
parent
9452b3ef3f
commit
5607cf5afd
1 changed files with 4 additions and 0 deletions
|
|
@ -308,6 +308,8 @@ UM.MainWindow {
|
||||||
//TODO: Support multiple file selection, workaround bug in KDE file dialog
|
//TODO: Support multiple file selection, workaround bug in KDE file dialog
|
||||||
//selectMultiple: true
|
//selectMultiple: true
|
||||||
|
|
||||||
|
nameFilters: UM.MeshFileHandler.supportedReadFileTypes;
|
||||||
|
|
||||||
onAccepted:
|
onAccepted:
|
||||||
{
|
{
|
||||||
UM.Controller.addMesh(fileUrl)
|
UM.Controller.addMesh(fileUrl)
|
||||||
|
|
@ -323,6 +325,8 @@ UM.MainWindow {
|
||||||
|
|
||||||
modality: UM.Application.platform == "linux" ? Qt.NonModal : Qt.Modal;
|
modality: UM.Application.platform == "linux" ? Qt.NonModal : Qt.Modal;
|
||||||
|
|
||||||
|
nameFilters: UM.MeshFileHandler.supportedWriteFileTypes
|
||||||
|
|
||||||
onAccepted:
|
onAccepted:
|
||||||
{
|
{
|
||||||
Printer.saveGCode(fileUrl);
|
Printer.saveGCode(fileUrl);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue