aboutsummaryrefslogtreecommitdiff
path: root/notebookview.cc
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2021-09-12 01:36:41 +0200
committerJavier <dev.git@javispedro.com>2021-09-12 01:36:41 +0200
commit66dd35254724ec5d4471a8be71f92e06cf0fa8e8 (patch)
tree1918dcca44dd75108d442bf173b58419ab41a518 /notebookview.cc
parent8333259e49fc2961cab0939e3d937167d38a9f9d (diff)
downloadscribiu-66dd35254724ec5d4471a8be71f92e06cf0fa8e8.tar.gz
scribiu-66dd35254724ec5d4471a8be71f92e06cf0fa8e8.zip
add ability to export a stroke list in plain text
Diffstat (limited to 'notebookview.cc')
-rw-r--r--notebookview.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/notebookview.cc b/notebookview.cc
index 833f8e8..c8fd1c0 100644
--- a/notebookview.cc
+++ b/notebookview.cc
@@ -18,6 +18,7 @@
#include <QtCore/QDebug>
#include <QtGui/QResizeEvent>
+#include "stftxtexport.h"
#include "notebookview.h"
#define VIEW_MARGIN 2
@@ -121,7 +122,7 @@ QRect NotebookView::getCurPageTrim() const
return _nb->getPageTrim(_curPage);
}
-QImage NotebookView::exportPage(int pageNum) const
+QImage NotebookView::exportPageAsImage(int pageNum) const
{
const QRect pageTrim = _nb->getPageTrim(pageNum);
QImage image(pageTrim.width() / 4, pageTrim.height() / 4, QImage::Format_RGB32);
@@ -139,6 +140,12 @@ void NotebookView::renderPage(QPainter *painter, int pageNum, const QRectF &targ
scene.render(painter, target, source, Qt::KeepAspectRatio);
}
+void NotebookView::exportPageAsStrokeList(QIODevice *device, int pageNum)
+{
+ StfTxtExport writer(_nb);
+ writer.exportStrokeList(device, pageNum);
+}
+
void NotebookView::requestPaperReplay(const QString &file, qint64 time)
{
emit paperReplayRequested(file, time);