preparing for a settings module
This commit is contained in:
parent
09f5e23612
commit
e4e3e581ea
2 changed files with 27 additions and 2 deletions
|
@ -22,6 +22,8 @@ Kirigami.ApplicationWindow {
|
||||||
|
|
||||||
property bool editMode: false
|
property bool editMode: false
|
||||||
|
|
||||||
|
property string soundEffect
|
||||||
|
|
||||||
signal edit()
|
signal edit()
|
||||||
|
|
||||||
onActiveFocusItemChanged: console.log("FOCUS CHANGED TO: " + activeFocusControl)
|
onActiveFocusItemChanged: console.log("FOCUS CHANGED TO: " + activeFocusControl)
|
||||||
|
@ -148,6 +150,22 @@ Kirigami.ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileDialog {
|
||||||
|
id: soundFileDialog
|
||||||
|
title: "Pick a Sound Effect"
|
||||||
|
folder: shortcuts.home
|
||||||
|
/* fileMode: FileDialog.SaveFile */
|
||||||
|
/* defaultSuffix: ".pres" */
|
||||||
|
selectExisting: true
|
||||||
|
onAccepted: {
|
||||||
|
soundEffect = loadFileDialog.fileUrl;
|
||||||
|
showPassiveNotification(soundEffect);
|
||||||
|
}
|
||||||
|
onRejected: {
|
||||||
|
console.log("Canceled")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function toggleEditMode() {
|
function toggleEditMode() {
|
||||||
editMode = !editMode;
|
editMode = !editMode;
|
||||||
mainPage.editSwitch();
|
mainPage.editSwitch();
|
||||||
|
|
|
@ -5,12 +5,12 @@ import QtQuick.Layouts 1.2
|
||||||
import org.kde.kirigami 2.13 as Kirigami
|
import org.kde.kirigami 2.13 as Kirigami
|
||||||
import "./" as Presenter
|
import "./" as Presenter
|
||||||
import org.presenter 1.0
|
import org.presenter 1.0
|
||||||
|
import Qt.labs.settings 1.0
|
||||||
|
|
||||||
Kirigami.OverlaySheet {
|
Kirigami.OverlaySheet {
|
||||||
|
id: root
|
||||||
property ListModel theModel
|
property ListModel theModel
|
||||||
|
|
||||||
id: root
|
|
||||||
header: Kirigami.Heading {
|
header: Kirigami.Heading {
|
||||||
text: "Settings"
|
text: "Settings"
|
||||||
}
|
}
|
||||||
|
@ -29,5 +29,12 @@ Kirigami.OverlaySheet {
|
||||||
presentationScreen = screens[currentIndex];
|
presentationScreen = screens[currentIndex];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Controls.ToolButton {
|
||||||
|
id: soundEffectBut
|
||||||
|
Kirigami.FormData.label: i18nc("@label:button", "Sound Effect:")
|
||||||
|
text: "Sound Effect"
|
||||||
|
onClicked: soundFileDialog.open()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue