Generalize previews: Add PreviewResult,PreviewResultPdf, remove PdfPreview
This commit is contained in:
21
gui/previewresultpdf.cpp
Normal file
21
gui/previewresultpdf.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "previewresultpdf.h"
|
||||
|
||||
PreviewResultPdf::PreviewResultPdf(const PreviewResult &o)
|
||||
{
|
||||
this->documentPath = o.getDocumentPath();
|
||||
this->page = o.getPage();
|
||||
}
|
||||
|
||||
QWidget *PreviewResultPdf::createPreviewWidget()
|
||||
{
|
||||
ClickLabel *label = new ClickLabel();
|
||||
label->setPixmap(QPixmap::fromImage(previewImage));
|
||||
label->setToolTip(getDocumentPath());
|
||||
return label;
|
||||
}
|
||||
|
||||
bool PreviewResultPdf::hasPreview()
|
||||
{
|
||||
bool result = !this->previewImage.isNull();
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user