Skip to content

Commit 866d686

Browse files
committed
Add project settings dialog
1 parent b4e0ec0 commit 866d686

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

src/app/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ qt_add_qml_module(${APP_TARGET}
1616
QML_FILES
1717
qml/main.qml
1818
qml/dialogs/AboutDialog.qml
19+
qml/dialogs/ProjectSettingsDialog.qml
1920
)
2021

2122
set(QML_IMPORT_PATH "${QML_IMPORT_PATH};${CMAKE_CURRENT_LIST_DIR}"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// SPDX-License-Identifier: GPL-3.0-or-later
2+
3+
import QtQuick
4+
import QtQuick.Controls
5+
import QtQuick.Layouts
6+
import ScratchCPP.UiComponents
7+
import ScratchCPP.Render
8+
9+
CustomDialog {
10+
property ProjectPlayer projectPlayer: null
11+
title: qsTr("Project settings")
12+
standardButtons: Dialog.Close
13+
14+
contentItem: RowLayout {}
15+
}

src/app/qml/main.qml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ ApplicationWindow {
3333
player.fileName = fileName;
3434
}
3535

36+
function onProjectSettingsTriggered() {
37+
projectSettingsDialog.open();
38+
}
39+
3640
function onAboutAppTriggered() {
3741
aboutDialog.open();
3842
}
@@ -41,6 +45,11 @@ ApplicationWindow {
4145

4246
AboutDialog { id: aboutDialog }
4347

48+
ProjectSettingsDialog {
49+
id: projectSettingsDialog
50+
projectPlayer: player
51+
}
52+
4453
ColumnLayout {
4554
id: layout
4655
anchors.fill: parent

0 commit comments

Comments
 (0)