kdocumentviewer.h 1.56 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
/***************************************************************************
 *   Copyright (C) 2007 by Pino Toscano <pino@kde.org>                     *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/

#ifndef _KDOCUMENTVIEWER_H_
#define _KDOCUMENTVIEWER_H_

13
#include "okularpart_export.h"
René J.V. Bertin's avatar
René J.V. Bertin committed
14

Yuri Chornoivan's avatar
Yuri Chornoivan committed
15
#include <QStringList>
16

Lukáš Tinkl's avatar
Lukáš Tinkl committed
17
class QUrl;
18 19 20 21

/**
 * @short Abstract interface for a document viewer
 *
Frederik Gladhorn's avatar
Frederik Gladhorn committed
22
 * This interface describes the basic functions of a document viewer.
23
 */
24
class OKULARPART_EXPORT KDocumentViewer
25 26 27 28 29 30 31
{
    public:
        virtual ~KDocumentViewer() {}

        /**
         * Open the document at the specified @p url at page @p page.
         */
Lukáš Tinkl's avatar
Lukáš Tinkl committed
32
        virtual bool openDocument( const QUrl& url, uint page ) = 0;
33 34 35 36 37 38 39 40 41 42

        /**
         * Change to @p page the currently shown page.
         */
        virtual void goToPage( uint page ) = 0;

        /**
         * Start the presentation mode.
         */
        virtual void startPresentation() = 0;
43 44

        /**
45
         * Return a list with the supported mimetypes.
46 47
         */
        virtual QStringList supportedMimeTypes() const = 0;
48 49 50 51 52
};

Q_DECLARE_INTERFACE( KDocumentViewer, "org.kde.kdocumentviewer/0.1" )

#endif