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