follow the SlideObject for more parts
This commit is contained in:
parent
4efddac106
commit
51f8488089
7 changed files with 18 additions and 16 deletions
|
@ -94,7 +94,7 @@ int main(int argc, char *argv[])
|
||||||
qDebug() << QIcon::themeName();
|
qDebug() << QIcon::themeName();
|
||||||
|
|
||||||
//Need to instantiate our slide
|
//Need to instantiate our slide
|
||||||
Slide slide("", "", "", "", "", "", "", 0);
|
Slide slide("BALHJ!", "", "/home/chris/Pictures/wallpapers/RoyalKing.png", "", "", "", "", 0);
|
||||||
// QScopedPointer<Slide> slide(new Slide("", "", "", "", "", "", "", 0));
|
// QScopedPointer<Slide> slide(new Slide("", "", "", "", "", "", "", 0));
|
||||||
|
|
||||||
// apparently mpv needs this class set
|
// apparently mpv needs this class set
|
||||||
|
|
|
@ -8,6 +8,7 @@ import QtMultimedia 5.15
|
||||||
/* import QtAudioEngine 1.15 */
|
/* import QtAudioEngine 1.15 */
|
||||||
import org.kde.kirigami 2.13 as Kirigami
|
import org.kde.kirigami 2.13 as Kirigami
|
||||||
import "./presenter" as Presenter
|
import "./presenter" as Presenter
|
||||||
|
import org.presenter 1.0
|
||||||
|
|
||||||
Kirigami.ApplicationWindow {
|
Kirigami.ApplicationWindow {
|
||||||
id: rootApp
|
id: rootApp
|
||||||
|
|
|
@ -122,19 +122,19 @@ Controls.Page {
|
||||||
const item = serviceItemModel.getItem(index);
|
const item = serviceItemModel.getItem(index);
|
||||||
print("index grabbed: " + index);
|
print("index grabbed: " + index);
|
||||||
|
|
||||||
SlideObject.setImageBackground("/home/chris/Pictures/RoyalKing.png");
|
|
||||||
print("The slides backgorund is: " + SlideObject.imageBackground);
|
|
||||||
|
|
||||||
presentation.stopVideo()
|
presentation.stopVideo()
|
||||||
presentation.itemType = item.type;
|
presentation.itemType = item.type;
|
||||||
print("Time to start changing");
|
print("Time to start changing");
|
||||||
|
|
||||||
if (item.backgroundType === "image") {
|
if (item.backgroundType === "image") {
|
||||||
presentation.vidbackground = "";
|
print("The slides backgorund is: " + SlideObject.imageBackground);
|
||||||
presentation.imagebackground = item.background;
|
SlideObject.setVideoBackground("");
|
||||||
|
SlideObject.setImageBackground(item.background);
|
||||||
} else {
|
} else {
|
||||||
presentation.imagebackground = "";
|
print("The slides backgorund is: " + SlideObject.videoBackground);
|
||||||
presentation.vidbackground = item.background;
|
SlideObject.setImageBackground("");
|
||||||
|
SlideObject.setVideoBackground(item.background);
|
||||||
presentation.loadVideo()
|
presentation.loadVideo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ Item {
|
||||||
property url imagebackground
|
property url imagebackground
|
||||||
property url vidbackground
|
property url vidbackground
|
||||||
|
|
||||||
Component.onCompleted: nextSlideAction()
|
/* Component.onCompleted: nextSlideAction() */
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -87,7 +87,8 @@ Item {
|
||||||
textSize: width / 15
|
textSize: width / 15
|
||||||
itemType: root.itemType
|
itemType: root.itemType
|
||||||
imageSource: SlideObject.imageBackground
|
imageSource: SlideObject.imageBackground
|
||||||
videoSource: vidbackground
|
videoSource: SlideObject.videoBackground
|
||||||
|
text: SlideObject.text
|
||||||
preview: true
|
preview: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,8 +123,6 @@ Item {
|
||||||
|
|
||||||
function nextSlideAction() {
|
function nextSlideAction() {
|
||||||
print(textIndex);
|
print(textIndex);
|
||||||
print("YIPPEE KAYAYYYY!");
|
|
||||||
print("YIPPEE KAYAYYYY!");
|
|
||||||
if (itemType === "song") {
|
if (itemType === "song") {
|
||||||
if (textIndex === 0) {
|
if (textIndex === 0) {
|
||||||
previewSlide.text = root.text[textIndex];
|
previewSlide.text = root.text[textIndex];
|
||||||
|
|
|
@ -24,9 +24,9 @@ Window {
|
||||||
Presenter.Slide {
|
Presenter.Slide {
|
||||||
id: presentationSlide
|
id: presentationSlide
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
imageSource: imageBackground
|
imageSource: SlideObject.imageBackground
|
||||||
videoSource: videoBackground
|
videoSource: SlideObject.videoBackground
|
||||||
text: currentText
|
text: SlideObject.text
|
||||||
|
|
||||||
Component.onCompleted: slideItem = presentationSlide
|
Component.onCompleted: slideItem = presentationSlide
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,8 @@ Item {
|
||||||
// These properties are for the slides visuals
|
// These properties are for the slides visuals
|
||||||
property real textSize: 50
|
property real textSize: 50
|
||||||
property bool dropShadow: false
|
property bool dropShadow: false
|
||||||
property url imageSource: imageBackground
|
property url imageSource
|
||||||
property url videoSource: videoBackground
|
property url videoSource
|
||||||
property string chosenFont: "Quicksand"
|
property string chosenFont: "Quicksand"
|
||||||
property string text: "This is demo text"
|
property string text: "This is demo text"
|
||||||
property color backgroundColor
|
property color backgroundColor
|
||||||
|
|
|
@ -17,6 +17,7 @@ Slide::Slide(const QString &text, const QString &audio, const QString &imageBack
|
||||||
m_horizontalTextAlignment(horizontalTextAlignment),m_font(font),m_fontSize(fontSize)
|
m_horizontalTextAlignment(horizontalTextAlignment),m_font(font),m_fontSize(fontSize)
|
||||||
{
|
{
|
||||||
qDebug() << "Initializing slide with defaults";
|
qDebug() << "Initializing slide with defaults";
|
||||||
|
qDebug() << m_imageBackground;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Slide::text() const {
|
QString Slide::text() const {
|
||||||
|
@ -90,6 +91,7 @@ void Slide::setVideoBackground(QString videoBackground)
|
||||||
if (m_videoBackground == videoBackground)
|
if (m_videoBackground == videoBackground)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
qDebug() << "####changing video background to: " << videoBackground;
|
||||||
m_videoBackground = videoBackground;
|
m_videoBackground = videoBackground;
|
||||||
emit videoBackgroundChanged(m_videoBackground);
|
emit videoBackgroundChanged(m_videoBackground);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue