diff options
Diffstat (limited to 'notebookmodel.cc')
-rw-r--r-- | notebookmodel.cc | 15 |
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) |