adding a nextSlideAction instead of nextSlideText to allow for other types
This commit is contained in:
parent
366660dcb2
commit
2e72a01c6f
4 changed files with 24 additions and 16 deletions
|
@ -79,7 +79,7 @@ int main(int argc, char *argv[])
|
||||||
#ifdef Q_OS_WINDOWS
|
#ifdef Q_OS_WINDOWS
|
||||||
QIcon::setFallbackThemeName("breeze");
|
QIcon::setFallbackThemeName("breeze");
|
||||||
QQuickStyle::setStyle(QStringLiteral("org.kde.breeze"));
|
QQuickStyle::setStyle(QStringLiteral("org.kde.breeze"));
|
||||||
QApplication::setStyle(QStringLiteral("breeze"));
|
// QApplication::setStyle(QStringLiteral("breeze"));
|
||||||
#else
|
#else
|
||||||
QIcon::setFallbackThemeName("breeze");
|
QIcon::setFallbackThemeName("breeze");
|
||||||
QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
|
QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
|
||||||
|
@ -87,6 +87,8 @@ int main(int argc, char *argv[])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QGuiApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("system-config-display")));
|
QGuiApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("system-config-display")));
|
||||||
|
qDebug() << QQuickStyle::availableStyles();
|
||||||
|
qDebug() << QIcon::themeName();
|
||||||
|
|
||||||
// apparently mpv needs this class set
|
// apparently mpv needs this class set
|
||||||
// let's register mpv as well
|
// let's register mpv as well
|
||||||
|
|
|
@ -121,6 +121,7 @@ Kirigami.ApplicationWindow {
|
||||||
/* print(Qt.application.state); */
|
/* print(Qt.application.state); */
|
||||||
screens = Qt.application.screens;
|
screens = Qt.application.screens;
|
||||||
presentationScreen = screens[1]
|
presentationScreen = screens[1]
|
||||||
|
print(Kirigami.Settings.Style);
|
||||||
for (let i = 0; i < screens.length; i++) {
|
for (let i = 0; i < screens.length; i++) {
|
||||||
/* print(screens[i]); */
|
/* print(screens[i]); */
|
||||||
/* print(screens[i].name); */
|
/* print(screens[i].name); */
|
||||||
|
|
|
@ -125,7 +125,7 @@ Controls.Page {
|
||||||
else
|
else
|
||||||
presentation.text = item.text;
|
presentation.text = item.text;
|
||||||
presentation.textIndex = 0;
|
presentation.textIndex = 0;
|
||||||
presentation.nextSlideText();
|
presentation.nextSlideAction();
|
||||||
|
|
||||||
print("Slide changed to: " + item.name);
|
print("Slide changed to: " + item.name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ Item {
|
||||||
Layout.alignment: Qt.AlignLeft
|
Layout.alignment: Qt.AlignLeft
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onPressed: nextSlideText()
|
onPressed: nextSlideAction()
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,20 +122,25 @@ Item {
|
||||||
previewSlide.loadVideo();
|
previewSlide.loadVideo();
|
||||||
}
|
}
|
||||||
|
|
||||||
function nextSlideText() {
|
function nextSlideAction() {
|
||||||
if (textIndex === 0) {
|
if (itemType === "song") {
|
||||||
previewSlide.text = root.text[textIndex];
|
if (textIndex === 0) {
|
||||||
print(root.text[textIndex]);
|
previewSlide.text = root.text[textIndex];
|
||||||
textIndex++;
|
print(root.text[textIndex]);
|
||||||
} else if (textIndex < root.text.length) {
|
textIndex++;
|
||||||
previewSlide.text = root.text[textIndex];
|
} else if (textIndex < root.text.length) {
|
||||||
print(root.text[textIndex]);
|
previewSlide.text = root.text[textIndex];
|
||||||
textIndex++;
|
print(root.text[textIndex]);
|
||||||
} else {
|
textIndex++;
|
||||||
print("Next slide time");
|
} else {
|
||||||
|
print("Next slide time");
|
||||||
|
textIndex = 0;
|
||||||
|
nextSlide();
|
||||||
|
}
|
||||||
|
} else if (itemType === "video")
|
||||||
|
nextSlide();
|
||||||
|
else if (itemType === "image")
|
||||||
nextSlide();
|
nextSlide();
|
||||||
textIndex = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function nextSlide() {
|
function nextSlide() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue