diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2018-12-31 12:56:32 +0100 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2018-12-31 12:56:32 +0100 |
commit | c5fedfb1ec79b97edec4a82b70f082fba93a5b5d (patch) | |
tree | d625f92b917f4c9cc11e3271f66c17a01f63f54e /src/gui/previewwindow.h | |
parent | 281efdc81ddfbd8a94775e96d7076860af1ae2e3 (diff) |
image export in progress
Diffstat (limited to 'src/gui/previewwindow.h')
-rw-r--r-- | src/gui/previewwindow.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/gui/previewwindow.h b/src/gui/previewwindow.h index a937263..20dd042 100644 --- a/src/gui/previewwindow.h +++ b/src/gui/previewwindow.h @@ -1,10 +1,12 @@ #ifndef PREVIEWWINDOW_H #define PREVIEWWINDOW_H +#include "pdfdocument.h" #include <QDialog> #include <QLabel> #include <QPlainTextEdit> +#include <QContextMenuEvent> #include <poppler/qt5/poppler-qt5.h> namespace Ui { @@ -20,24 +22,27 @@ public: Running, Success, Failed }; explicit PreviewWindow(QWidget *parent = nullptr); - ~PreviewWindow(); + ~PreviewWindow() override; void setPdf(QString file); QString preparePreview(QString tikz); QPlainTextEdit *outputTextEdit(); void setStatus(Status status); + PdfDocument *doc() const; + public slots: void render(); + void exportImage(); + void copyImageToClipboard(); protected: - void resizeEvent(QResizeEvent *e); - void showEvent(QShowEvent *e); - void closeEvent(QCloseEvent *e); - + void resizeEvent(QResizeEvent *e) override; + void showEvent(QShowEvent *e) override; + void closeEvent(QCloseEvent *e) override; + void contextMenuEvent(QContextMenuEvent *event) override; private: Ui::PreviewWindow *ui; - Poppler::Document *_doc; - Poppler::Page *_page; + PdfDocument *_doc; QLabel *_loader; }; |