add looping for slides
This add looping primarily for videos but I've added in the groundwork for looping through any kind of slide. This obviously will be implemented differently for each type of slide, but this way the groundwork is done already.
This commit is contained in:
parent
caded1027c
commit
caa2e31d99
15 changed files with 130 additions and 49 deletions
|
@ -13,12 +13,12 @@ Slide::Slide(const QString &text, const QString &audio, const QString &imageBack
|
|||
const QString &videoBackground, const QString &horizontalTextAlignment,
|
||||
const QString &verticalTextAlignment, const QString &font,
|
||||
const int &fontSize, const int &imageCount,
|
||||
const QString &type, const int &slideIndex, QObject *parent)
|
||||
const QString &type, const int &slideIndex, const bool &loop, QObject *parent)
|
||||
: QObject(parent),m_text(text),m_audio(audio),m_imageBackground(imageBackground),
|
||||
m_videoBackground(videoBackground),m_verticalTextAlignment(verticalTextAlignment),
|
||||
m_horizontalTextAlignment(horizontalTextAlignment),m_font(font),
|
||||
m_fontSize(fontSize),m_imageCount(imageCount),m_type(type),
|
||||
m_slideIndex(slideIndex),m_active(false),m_selected(false)
|
||||
m_slideIndex(slideIndex),m_active(false),m_selected(false),m_loop(loop)
|
||||
{
|
||||
qDebug() << "Initializing slide with defaults";
|
||||
}
|
||||
|
@ -92,6 +92,10 @@ bool Slide::selected() const {
|
|||
return m_selected;
|
||||
}
|
||||
|
||||
bool Slide::loop() const {
|
||||
return m_loop;
|
||||
}
|
||||
|
||||
void Slide::setText(QString text)
|
||||
{
|
||||
if (m_text == text)
|
||||
|
@ -238,3 +242,12 @@ void Slide::setSelected(bool selected)
|
|||
m_selected = selected;
|
||||
emit selectedChanged(m_selected);
|
||||
}
|
||||
|
||||
void Slide::setLoop(bool loop)
|
||||
{
|
||||
if (m_loop == loop)
|
||||
return;
|
||||
|
||||
m_loop = loop;
|
||||
emit loopChanged(m_loop);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue