diff options
Diffstat (limited to 'src/gui/previewwindow.h')
-rw-r--r-- | src/gui/previewwindow.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/gui/previewwindow.h b/src/gui/previewwindow.h new file mode 100644 index 0000000..c850ce9 --- /dev/null +++ b/src/gui/previewwindow.h @@ -0,0 +1,35 @@ +#ifndef PREVIEWWINDOW_H +#define PREVIEWWINDOW_H + +#include <QDialog> +#include <QPlainTextEdit> +#include <poppler/qt5/poppler-qt5.h> + +namespace Ui { +class PreviewWindow; +} + +class PreviewWindow : public QDialog +{ + Q_OBJECT + +public: + explicit PreviewWindow(QWidget *parent = nullptr); + ~PreviewWindow(); + void setPdf(QString file); + QString preparePreview(QString tikz); + QPlainTextEdit *outputTextEdit(); + +protected: + void resizeEvent(QResizeEvent *e); + void showEvent(QShowEvent *e); + void closeEvent(QCloseEvent *e); + +private: + Ui::PreviewWindow *ui; + void render(); + Poppler::Document *_doc; + Poppler::Page *_page; +}; + +#endif // PREVIEWWINDOW_H |