Thumbnails - first part

This commit is contained in:
Jakub Melka
2019-12-07 17:59:03 +01:00
parent 99ba0a0c09
commit 1be4aea954
17 changed files with 792 additions and 9 deletions

View File

@ -113,8 +113,11 @@ public:
signals:
void drawSpaceChanged();
void repaintNeeded();
void pageImageChanged(bool all, const std::vector<PDFInteger>& pages);
private:
void onOptionalContentGroupStateChanged();
/// Recalculates the draw space. Preserves setted page rotation.
void recalculate();
@ -176,6 +179,12 @@ public:
/// \param rect Rectangle in which the content is painted
void draw(QPainter* painter, QRect rect);
/// Draws thumbnail image of the given size (so larger of the page size
/// width or height equals to pixel size and the latter size is rescaled
/// using the aspect ratio)
/// \param pixelSize Pixel size
QImage drawThumbnailImage(PDFInteger pageIndex, int pixelSize) const;
enum Operation
{
ZoomIn,
@ -260,6 +269,7 @@ signals:
void pageLayoutChanged();
void renderingError(PDFInteger pageIndex, const QList<PDFRenderError>& errors);
void repaintNeeded();
void pageImageChanged(bool all, const std::vector<PDFInteger>& pages);
private:
struct LayoutItem