aboutsummaryrefslogtreecommitdiff
path: root/notebookmodel.cc
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2015-06-13 04:24:21 +0200
committerJavier <dev.git@javispedro.com>2015-06-13 04:24:21 +0200
commit41f9a9b0563c3bd523bd534b854e50161a2626b3 (patch)
tree8c30aacdb80e26fd4202d345b30cab84ba437437 /notebookmodel.cc
parent6cb50e66f3c196a2a4bcc95a419260d6b8c2461f (diff)
downloadscribiu-41f9a9b0563c3bd523bd534b854e50161a2626b3.tar.gz
scribiu-41f9a9b0563c3bd523bd534b854e50161a2626b3.zip
continue with paperreplay loading changes
Diffstat (limited to 'notebookmodel.cc')
-rw-r--r--notebookmodel.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/notebookmodel.cc b/notebookmodel.cc
index 13e3b21..2b7c99f 100644
--- a/notebookmodel.cc
+++ b/notebookmodel.cc
@@ -3,7 +3,7 @@
#include <QtGui/QIcon>
#include <QtGui/QDesktopServices>
#include <QtGui/QStyle>
-#include "replaydata.h"
+#include "paperreplay.h"
#include "notebookmodel.h"
#define NUM_COLUMNS 3
@@ -47,6 +47,11 @@ QString NotebookModel::notebookDirectory(const QModelIndex &index) const
return QString();
}
+QString NotebookModel::paperReplayDirectory(const QString &name) const
+{
+ return _dataDir.filePath(name + ".pen" + "/"+ PAPER_REPLAY);
+}
+
QVariant NotebookModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid()) return QVariant();
@@ -231,6 +236,7 @@ void NotebookModel::refreshPen(const QString &name)
for (int i = 0; i < diskNotebooks.size(); i++) {
diskNotebooks[i].chop(4);
}
+ if (penDir.exists(PAPER_REPLAY)) diskNotebooks.append(PAPER_REPLAY);
QModelIndex penIndex = index(indexOfPen(name), 0, QModelIndex());
@@ -265,13 +271,6 @@ void NotebookModel::refreshPen(const QString &name)
}
qDebug() << "Found" << curNotebooks.size() << "notebooks for pen" << name;
-
- ReplayData replay;
- if (replay.open(penDir.filePath("PaperReplay"))) {
- qDebug() << "Paper replay opened";
- } else {
- qDebug() << "No paper replay for pen" << name;
- }
}
int NotebookModel::indexOfPen(const QString &name)