diff options
Diffstat (limited to 'notebookmodel.h')
-rw-r--r-- | notebookmodel.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/notebookmodel.h b/notebookmodel.h index f847c77..51148e5 100644 --- a/notebookmodel.h +++ b/notebookmodel.h @@ -24,6 +24,10 @@ #include <QtCore/QFileSystemWatcher> #include <QtGui/QIcon> +#define PEN_EXTENSION "pen" +#define ARCHIVE_EXTENSION "archive" +#define AFD_NOTEBOOK_EXTENSION "afd" + class NotebookModel : public QAbstractItemModel { Q_OBJECT @@ -31,6 +35,10 @@ class NotebookModel : public QAbstractItemModel public: explicit NotebookModel(QObject *parent = 0); + enum Roles { + FileNameRole = Qt::UserRole + }; + static QString defaultDataDirectory(); static QString userDataDirectory(); @@ -58,7 +66,11 @@ private: int indexOfPen(const QString &name); QDir penDir(const QString &pen) const; QDir notebookDir(const QString &pen, const QString ¬ebook) const; - QIcon getNotebookIcon(const QString &pen, const QString ¬ebook) const; + QString penDisplayName(const QString &pen) const; + QString notebookDisplayName(const QString &pen, const QString ¬ebook) const; + QIcon penIcon(const QString &pen) const; + QIcon notebookIcon(const QString &pen, const QString ¬ebook) const; + bool isPenArchive(const QString &pen) const; bool isPenLocked(const QString &pen) const; bool isNotebookLocked(const QString &pen, const QString ¬ebook) const; bool isPaperReplayLocked(const QString &pen) const; |