![]() |
LeechCraft Monocle
0.6.70-13729-g7046a9d2a7
Modular document viewer for LeechCraft
|
Interface for redirecting document opening requests. More...
#include "iredirectproxy.h"
Public Member Functions | |
virtual | ~IRedirectProxy () |
virtual QObject * | GetQObject ()=0 |
Returns this object as a QObject. More... | |
virtual QString | GetRedirectSource () const =0 |
Returns the source filename of the document. More... | |
virtual QString | GetRedirectTarget () const =0 |
Returns the filename of the converted document. More... | |
virtual QString | GetRedirectedMime () const =0 |
Returns the MIME type of the converted document. More... | |
Protected Member Functions | |
virtual void | ready (const QString &target)=0 |
Emitted when the document has finished converting. More... | |
Interface for redirecting document opening requests.
This interface is used when a backend can't open a document, but can convert it to a format probably openable by another Monocle plugin.
The GetRedirectedMime() method returns the MIME of the converted document.
GetRedirectSource() returns the filename of the source document, and GetRedirectTarget() returns the filename of the converted document.
The redirect proxy should start converting after a small delay after construction (like after spinning the main event loop via QTimer with a zero timeout). This is because temporary IRedirectProxy objects can be requested by Monocle to get the MIME type of the redirected document without actually converting it.
Definition at line 61 of file iredirectproxy.h.
|
inlinevirtual |
Definition at line 64 of file iredirectproxy.h.
|
pure virtual |
Returns this object as a QObject.
|
pure virtual |
Returns the MIME type of the converted document.
This function should return valid data even before ready() is emitted.
|
pure virtual |
Returns the source filename of the document.
The source filename is what's been passed to the IBackendPlugin::GetRedirection() method.
This function should return valid data even before ready() is emitted.
|
pure virtual |
Returns the filename of the converted document.
This function should return valid data even before ready() is emitted.
|
protectedpure virtual |
Emitted when the document has finished converting.
This signal should be emitted both when document is converted successfully and when it failed to be converted.
[out] | target | The target document. |