mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Update open files dialog to QtControls 2
CURA-8684
This commit is contained in:
parent
582e4fcbd0
commit
9e5fd998f4
1 changed files with 35 additions and 38 deletions
|
@ -1,9 +1,8 @@
|
||||||
// Copyright (c) 2021 Ultimaker B.V.
|
// Copyright (c) 2022 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Controls.Styles 1.1
|
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Dialogs 1.1
|
import QtQuick.Dialogs 1.1
|
||||||
import QtQuick.Window 2.1
|
import QtQuick.Window 2.1
|
||||||
|
@ -69,45 +68,43 @@ UM.Dialog
|
||||||
width: height
|
width: height
|
||||||
}
|
}
|
||||||
|
|
||||||
// Buttons
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.left: parent.left
|
|
||||||
height: childrenRect.height
|
|
||||||
|
|
||||||
Button
|
|
||||||
{
|
|
||||||
id: cancelButton
|
|
||||||
text: catalog.i18nc("@action:button", "Cancel");
|
|
||||||
anchors.right: importAllAsModelsButton.left
|
|
||||||
onClicked:
|
|
||||||
{
|
|
||||||
// cancel
|
|
||||||
base.hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Button
|
|
||||||
{
|
|
||||||
id: importAllAsModelsButton
|
|
||||||
text: catalog.i18nc("@action:button", "Import all as models");
|
|
||||||
anchors.right: parent.right
|
|
||||||
isDefault: true
|
|
||||||
onClicked:
|
|
||||||
{
|
|
||||||
// load models from all selected file
|
|
||||||
loadModelFiles(base.fileUrls);
|
|
||||||
|
|
||||||
base.hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
UM.I18nCatalog
|
UM.I18nCatalog
|
||||||
{
|
{
|
||||||
id: catalog
|
id: catalog
|
||||||
name: "cura"
|
name: "cura"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ButtonGroup {
|
||||||
|
buttons: [cancelButton, importAllAsModelsButton]
|
||||||
|
checkedButton: importAllAsModelsButton
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onAccepted: loadModelFiles(base.fileUrls)
|
||||||
|
|
||||||
|
// Buttons
|
||||||
|
rightButtons:
|
||||||
|
[
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
id: cancelButton
|
||||||
|
text: catalog.i18nc("@action:button", "Cancel");
|
||||||
|
onClicked:
|
||||||
|
{
|
||||||
|
// cancel
|
||||||
|
base.hide();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
id: importAllAsModelsButton
|
||||||
|
text: catalog.i18nc("@action:button", "Import all as models");
|
||||||
|
onClicked:
|
||||||
|
{
|
||||||
|
// load models from all selected file
|
||||||
|
loadModelFiles(base.fileUrls);
|
||||||
|
base.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue