Convertion to CSS-like format of style sheets at top level (criteria, not styles)
[kworship.git] / unipresent / kpresenter2 / UpKpr2Presentation.h
blob48e43122cc291db6ffab37b03a483240631fdaea
1 /***************************************************************************
2 * This file is part of KWorship. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
4 * *
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 2 of the License, or *
8 * (at your option) any later version. *
9 * *
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. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with KWorship. If not, write to the Free Software Foundation, *
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
20 #ifndef _UpKpr2Presentation_h_
21 #define _UpKpr2Presentation_h_
23 /**
24 * @file UpKpr2Presentation.h
25 * @brief KPresenter 2 presentation.
26 * @author James Hogan <james@albanarts.com>
29 #include "UpPresentation.h"
31 #include <QDBusInterface>
33 class UpKpr2Backend;
35 /// KPresenter 2 presentation.
36 class UpKpr2Presentation : public UpPresentation
38 Q_OBJECT
39 public:
42 * Constructors + destructor
45 /// Primary constructor.
46 UpKpr2Presentation(QString service, QString path, UpKpr2Backend* backend, QObject* parent = 0);
48 /// Destructor.
49 virtual ~UpKpr2Presentation();
52 * Main interface
55 virtual void close();
56 virtual QUrl url() const;
59 * Custom slideshows
62 virtual QString currentSlideshow();
63 virtual QStringList slideshows();
64 virtual void setSlideshow(QString slideshow);
65 virtual int numSlides();
66 virtual UpSlide* slide(int index);
69 * Slideshow accessors
72 virtual bool isSlideshowRunning();
73 virtual int numSlidesInSlideshow();
74 virtual int currentSlideshowSlide();
75 virtual int stepsInCurrentSlideshowSlide();
76 virtual int currentSlideshowStep();
79 * Slideshow control
82 virtual void startSlideshow();
83 virtual void stopSlideshow();
84 virtual void goToSlide(int index);
85 virtual void previousSlide();
86 virtual void nextSlide();
87 virtual void previousStep();
88 virtual void nextStep();
91 * Backend specific interface.
94 /// Get the dbus interface.
95 QDBusInterface& dbus();
97 /// Get the dbus view interface.
98 QDBusInterface* dbusView();
100 private slots:
103 * DBus slots
106 void dbusCurrentSlideshowChanged(QString slideshow);
107 void dbusScreenStarted(int pages);
110 * Callbacks
113 void callbackResult();
114 void callbackError();
116 private:
119 * Variables
122 /// DBus document interface.
123 QDBusInterface m_dbus;
125 /// DBus view interface.
126 QDBusInterface* m_dbusView;
128 /// Url.
129 QUrl m_url;
131 /// Whether the custom slideshows dialog is being opened.
132 bool m_customSlideshowsDialog;
135 #endif // _UpKpr2Presentation_h_