aboutsummaryrefslogtreecommitdiff
path: root/notebookmodel.cc
diff options
context:
space:
mode:
Diffstat (limited to 'notebookmodel.cc')
-rw-r--r--notebookmodel.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/notebookmodel.cc b/notebookmodel.cc
index 1d8228c..13e3b21 100644
--- a/notebookmodel.cc
+++ b/notebookmodel.cc
@@ -3,6 +3,7 @@
#include <QtGui/QIcon>
#include <QtGui/QDesktopServices>
#include <QtGui/QStyle>
+#include "replaydata.h"
#include "notebookmodel.h"
#define NUM_COLUMNS 3
@@ -263,7 +264,14 @@ void NotebookModel::refreshPen(const QString &name)
endInsertRows();
}
- qDebug() << "Found" << curNotebooks.size() << "notebook for pen" << 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)
@@ -319,5 +327,8 @@ void NotebookModel::handleChangedDirectory(const QString &path)
qDebug() << "changed" << path;
if (path == _dataDir.absolutePath()) {
refresh();
+ } else if (path.endsWith(".pen")) {
+ QFileInfo finfo(path);
+ refreshPen(finfo.baseName());
}
}