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 2 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, write to the Free Software Foundation, *
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
20 #ifndef _UpKpr2Backend_h_
21 #define _UpKpr2Backend_h_
24 * @file UpKpr2Backend.h
25 * @brief KPresenter 2 presentation manager.
26 * @author James Hogan <james@albanarts.com>
29 #include "UpBackend.h"
34 class UpKpr2Presentation
;
36 /** KPresenter 2 presentation manager.
37 * This uses a nice dbus interface.
39 class UpKpr2Backend
: public UpBackend
46 * Constructors + destructor
49 /// Primary constructor.
50 UpKpr2Backend(QObject
* parent
= 0);
53 virtual ~UpKpr2Backend();
56 * General meta information
59 virtual QString
id() const;
60 virtual QString
name() const;
61 virtual QString
description() const;
62 virtual QStringList
mimeTypes() const;
63 virtual QIcon
icon() const;
69 virtual bool isActive();
70 virtual bool activate();
71 virtual void deactivate();
74 * Presentation management
77 virtual QList
<UpPresentation
*> presentations();
78 virtual bool openPresentation(const QUrl
& url
);
86 /// DBus service ownership change.
87 void dbusServiceOwnerChange(const QString
& name
, const QString
& oldOwner
, const QString
& newOwner
);
89 // Slots for UpKpr2Process signals
90 void dbusLoadedPresentation(UpKpr2Presentation
*);
91 void dbusUnloadedPresentation(UpKpr2Presentation
*);
99 typedef QHash
<QString
,UpKpr2Process
*> QStringHashProcess
;
100 /// The kpresenter processes.
101 QStringHashProcess m_processes
;
103 /// List of presentations.
104 QList
<UpPresentation
*> m_presentations
;
108 #endif // _UpKpr2Backend_h_