1/***************************************************************************
2 * Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
9
10#ifndef _KDOCUMENTVIEWER_H_
11#define _KDOCUMENTVIEWER_H_
12
13#include <QtCore/QStringList>
14
15class KUrl;
16
17/**
18 * @short Abstract interface for a document viewer
19 *
20 * This interface describe briefly the basic functions of a document viewer.
21 */
22class KDocumentViewer
23{
24 public:
25 virtual ~KDocumentViewer() {}
26
27 /**
28 * Open the document at the specified @p url at page @p page.
29 */
30 virtual bool openDocument( const KUrl& url, uint page ) = 0;
31
32 /**
33 * Change to @p page the currently shown page.
34 */
35 virtual void goToPage( uint page ) = 0;
36
37 /**
38 * Start the presentation mode.
39 */
40 virtual void startPresentation() = 0;
41
42 /**
43 * Return a list with the supported mimetypes.
44 */
45 virtual QStringList supportedMimeTypes() const = 0;
46};
47
48Q_DECLARE_INTERFACE( KDocumentViewer, "org.kde.kdocumentviewer/0.1" )
49
50#endif
51