Issue #10: Ability to cancel the operation

This commit is contained in:
Jakub Melka
2022-02-04 20:03:23 +01:00
parent 284f0c4db8
commit 49cab7937a
15 changed files with 302 additions and 61 deletions

View File

@ -54,7 +54,7 @@ private:
/// Asynchronous page compiler compiles pages asynchronously, and stores them in the
/// cache. Cache size can be set. This object is designed to cooperate with
/// draw widget proxy.
class PDFAsynchronousPageCompiler : public QObject
class PDFAsynchronousPageCompiler : public QObject, public PDFOperationControl
{
Q_OBJECT
@ -106,6 +106,9 @@ public:
/// \param compile Compile the page, if it is not found in the cache
const PDFPrecompiledPage* getCompiledPage(PDFInteger pageIndex, bool compile);
/// Is operation being cancelled?
virtual bool isOperationCancelled() const override;
signals:
void pageImageChanged(bool all, const std::vector<pdf::PDFInteger>& pages);
void renderingError(pdf::PDFInteger pageIndex, const QList<pdf::PDFRenderError>& errors);