1 /***************************************************************************
2 * This file is part of KWorship. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
5 * KWorship is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 3 of the License, or *
8 * (at your option) any later version. *
10 * KWorship is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with KWorship. If not, see <http://www.gnu.org/licenses/>. *
17 ***************************************************************************/
20 * @file UpKpr1Presentation.cpp
21 * @brief KPresenter 1 presentation.
22 * @author James Hogan <james@albanarts.com>
25 #include "UpKpr1Presentation.h"
26 #include "UpKpr1Slide.h"
29 * Constructors + destructor
32 /// Primary constructor.
33 UpKpr1Presentation::UpKpr1Presentation(const UpKpr1PresentationDcop
& dcop
, QObject
* parent
)
34 : UpPresentation(parent
)
41 UpKpr1Presentation::~UpKpr1Presentation()
49 void UpKpr1Presentation::close()
53 QUrl
UpKpr1Presentation::url() const
62 int UpKpr1Presentation::numSlides()
64 return m_dcop
.numSlides();
67 UpSlide
* UpKpr1Presentation::slide(int index
)
69 return new UpKpr1Slide(m_dcop
.slide(index
), this);
76 void UpKpr1Presentation::startSlideshow()
78 UpKpr1Dcop view
= m_dcop
.view();
81 view
.eval(QStringList() << "screenStart()");
85 void UpKpr1Presentation::stopSlideshow()
87 UpKpr1Dcop view
= m_dcop
.view();
90 view
.eval(QStringList() << "screenStop()");
94 void UpKpr1Presentation::goToSlide(int index
)
96 UpKpr1Dcop view
= m_dcop
.view();
100 num
.setNum(index
+ 1);
101 // Warning: An out of range argument kills kpresenter
102 view
.eval(QStringList() << "gotoPresPage(int)" << num
);
106 #include "UpKpr1Presentation.moc"