1 /***************************************************************************
2 * This file is part of KWorship. *
3 * Copyright 2008-2009 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 _UpOkProcess_h_
21 #define _UpOkProcess_h_
25 * @brief Okular process.
26 * @author James Hogan <james@albanarts.com>
34 class UpOkPresentation
;
37 * This corresponds to a KPresenter dbus service.
39 class UpOkProcess
: public QObject
46 * Constructors + destructor
49 /// Primary constructor.
50 UpOkProcess(QString serviceName
, UpOkBackend
* parent
= 0);
53 virtual ~UpOkProcess();
59 /// Get the service name.
60 QString
serviceName() const;
62 /// Get a list of presentations.
63 QList
<UpOkPresentation
*> presentations();
71 /// Emitted when a new presentation is created or loaded.
72 void loadedPresentation(UpOkPresentation
*);
74 /// Emitted when a presentation is about to be closed.
75 void unloadedPresentation(UpOkPresentation
*);
83 /// Indicates that a new presentation has been made available.
84 void dbusPresentationOpened(QString docName
);
86 /// Indicates that an old presentation is no longer available.
87 void dbusPresentationClosed(QString docName
);
96 UpOkBackend
* m_backend
;
98 /// DBus service name.
99 QString m_serviceName
;
101 typedef QHash
<QString
, UpOkPresentation
*> StringHashPresentation
;
102 /// Presentations by name.
103 StringHashPresentation m_presentations
;
107 #endif // _UpOkProcess_h_