Commit 04548385 authored by Pino Toscano's avatar Pino Toscano

add a method to the document interface to get the supported mimetypes

svn path=/trunk/KDE/kdegraphics/okular/; revision=668028
parent 1a6db045
......@@ -10,6 +10,8 @@
#ifndef _KDOCUMENTVIEWER_H_
#define _KDOCUMENTVIEWER_H_
#include <QtCore/QStringList>
class KUrl;
/**
......@@ -36,6 +38,11 @@ class KDocumentViewer
* Start the presentation mode.
*/
virtual void startPresentation() = 0;
/**
* Change to @p page the currently shown page.
*/
virtual QStringList supportedMimeTypes() const = 0;
};
Q_DECLARE_INTERFACE( KDocumentViewer, "org.kde.kdocumentviewer/0.1" )
......
......@@ -490,6 +490,12 @@ void Part::startPresentation()
}
QStringList Part::supportedMimeTypes() const
{
return m_document->supportedMimeTypes();
}
void Part::openUrlFromDocument(const KUrl &url)
{
m_bExtension->openUrlNotify();
......
......@@ -93,6 +93,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
bool openDocument(const KUrl& url, uint page);
void startPresentation();
QStringList supportedMimeTypes() const;
public slots: // dbus
Q_SCRIPTABLE Q_NOREPLY void goToPage(uint page);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment