forked from qt-creator/qt-creator
Add and implement 2 icons for adding and saving compositions. Fixes: QDS-11511 Change-Id: I113eeb81ea05fc6db9019d95d476bc0fe20b409f Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
63 lines
1.5 KiB
QML
63 lines
1.5 KiB
QML
// Copyright (C) 2023 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import HelperWidgets as HelperWidgets
|
|
import StudioControls as StudioControls
|
|
import StudioTheme as StudioTheme
|
|
import EffectMakerBackend
|
|
|
|
StudioControls.Dialog {
|
|
id: root
|
|
|
|
title: qsTr("Save Changes")
|
|
|
|
closePolicy: Popup.CloseOnEscape
|
|
modal: true
|
|
implicitWidth: 250
|
|
implicitHeight: 140
|
|
|
|
contentItem: Column {
|
|
spacing: 35
|
|
|
|
Text {
|
|
text: qsTr("Current composition has unsaved changes.")
|
|
color: StudioTheme.Values.themeTextColor
|
|
}
|
|
|
|
Row {
|
|
anchors.right: parent.right
|
|
spacing: 2
|
|
|
|
HelperWidgets.Button {
|
|
id: btnSave
|
|
|
|
width: 70
|
|
text: qsTr("Save")
|
|
onClicked: {
|
|
if (btnSave.enabled) {
|
|
let name = EffectMakerBackend.effectMakerModel.currentComposition
|
|
EffectMakerBackend.effectMakerModel.saveComposition(name)
|
|
root.accept()
|
|
}
|
|
}
|
|
}
|
|
|
|
HelperWidgets.Button {
|
|
id: btnDontSave
|
|
|
|
width: 70
|
|
text: qsTr("Don't Save")
|
|
onClicked: root.accept()
|
|
}
|
|
|
|
HelperWidgets.Button {
|
|
width: 70
|
|
text: qsTr("Cancel")
|
|
onClicked: root.reject()
|
|
}
|
|
}
|
|
}
|
|
}
|