diff options
author | Javier <dev.git@javispedro.com> | 2015-06-11 01:16:26 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-06-11 01:16:26 +0200 |
commit | 6cb50e66f3c196a2a4bcc95a419260d6b8c2461f (patch) | |
tree | 610963526dbd205500db145965309b1de2b18a97 /notebookmodel.cc | |
parent | a69e97943539a8abc4d2762638c169dc19c88516 (diff) | |
download | scribiu-6cb50e66f3c196a2a4bcc95a419260d6b8c2461f.tar.gz scribiu-6cb50e66f3c196a2a4bcc95a419260d6b8c2461f.zip |
experiment with audio/paperreplay data
Diffstat (limited to 'notebookmodel.cc')
-rw-r--r-- | notebookmodel.cc | 13 |
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()); } } |