41 lines
632 B
C++
Executable File
41 lines
632 B
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Handle PDF output for thp
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
#pragma once
|
|
#include <QWidget>
|
|
|
|
|
|
class QUrl;
|
|
namespace Ui
|
|
{
|
|
class PdfWidget;
|
|
}
|
|
|
|
namespace THP
|
|
{
|
|
class PdfWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit PdfWidget(QWidget *parent = nullptr);
|
|
~PdfWidget();
|
|
|
|
bool showPDF(const QUrl &pdf);
|
|
void setZoomFactor(double newZoomFactor);
|
|
QVector<QImage> getPrintableImages(int resolution = 300);
|
|
void resizePdfToWidth();
|
|
|
|
protected Q_SLOTS:
|
|
void onPreviousPage();
|
|
void onNextPage();
|
|
void pageChanged(int cur, int max);
|
|
protected:
|
|
|
|
Ui::PdfWidget *ui;
|
|
};
|
|
} // namespace THP
|