aboutsummaryrefslogtreecommitdiff
path: root/afdnotebook.h
diff options
context:
space:
mode:
Diffstat (limited to 'afdnotebook.h')
-rw-r--r--afdnotebook.h41
1 files changed, 22 insertions, 19 deletions
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<QString, Gfx> _gfx;