From 41f9a9b0563c3bd523bd534b854e50161a2626b3 Mon Sep 17 00:00:00 2001 From: Javier Date: Sat, 13 Jun 2015 04:24:21 +0200 Subject: continue with paperreplay loading changes --- afdnotebook.h | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'afdnotebook.h') diff --git a/afdnotebook.h b/afdnotebook.h index 38f926f..737196e 100644 --- a/afdnotebook.h +++ b/afdnotebook.h @@ -15,10 +15,31 @@ public: AfdNotebook(QObject *parent = 0); ~AfdNotebook(); + struct PageAddress { + PageAddress(); + explicit PageAddress(uint shelf, uint segment, uint book, uint page); + explicit PageAddress(uint series, uint shelf, uint segment, uint book, uint page); + explicit PageAddress(quint64 addr); + explicit PageAddress(const QString &str); + + QString toString() const; + quint64 toUInt64() const; + + bool operator<(const PageAddress& o) const; + bool operator==(const PageAddress& o) const; + + uint series : 12; + uint shelf : 12; + uint segment : 16; + uint book : 12; + uint page : 12; + }; + bool open(const QString &path); void close(); QString title() const; + quint64 guid() const; int numPages() const; @@ -36,25 +57,6 @@ public: bool readStrokes(const QString &penSerial, int page, StfReader::StrokeHandler *handler); private: - struct PageAddress { - PageAddress(); - explicit PageAddress(uint shelf, uint segment, uint book, uint page); - explicit PageAddress(uint series, uint shelf, uint segment, uint book, uint page); - explicit PageAddress(quint64 addr); - explicit PageAddress(const QString &str); - - QString toString() const; - - bool operator<(const PageAddress& o) const; - bool operator==(const PageAddress& o) const; - - uint series : 12; - uint shelf : 12; - uint segment : 16; - uint book : 12; - uint page : 12; - }; - struct Gfx { QString basename; }; @@ -89,6 +91,7 @@ private: private: QDir _dir; QString _title; + quint64 _guid; PageAddress _firstPage, _lastPage; uint _pagesPerBook; QMap _gfx; -- cgit v1.2.3