Changeset View
Changeset View
Standalone View
Standalone View
mobile/components/documentitem.h
Show All 33 Lines | |||||
34 | class Observer; | 34 | class Observer; | ||
35 | class TOCModel; | 35 | class TOCModel; | ||
36 | 36 | | |||
37 | class DocumentItem : public QObject | 37 | class DocumentItem : public QObject | ||
38 | { | 38 | { | ||
39 | Q_OBJECT | 39 | Q_OBJECT | ||
40 | 40 | | |||
41 | /** | 41 | /** | ||
42 | * Absolute path of the document file to open | 42 | * Absolute URI to document file to open | ||
43 | */ | 43 | */ | ||
44 | Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged) | 44 | Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged) | ||
45 | 45 | | |||
46 | /** | 46 | /** | ||
47 | * Suggested window title if a window represents this document. may be pathname or document title, dependeing from Okular settings. | 47 | * Suggested window title if a window represents this document. may be pathname or document title, dependeing from Okular settings. | ||
48 | */ | 48 | */ | ||
49 | Q_PROPERTY(QString windowTitleForDocument READ windowTitleForDocument NOTIFY windowTitleForDocumentChanged) | 49 | Q_PROPERTY(QString windowTitleForDocument READ windowTitleForDocument NOTIFY windowTitleForDocumentChanged) | ||
50 | 50 | | |||
51 | /** | 51 | /** | ||
52 | * Current displaying page for the document | 52 | * Current displaying page for the document | ||
Show All 40 Lines | |||||
93 | */ | 93 | */ | ||
94 | Q_PROPERTY(QStringList bookmarks READ bookmarks NOTIFY bookmarksChanged) | 94 | Q_PROPERTY(QStringList bookmarks READ bookmarks NOTIFY bookmarksChanged) | ||
95 | 95 | | |||
96 | public: | 96 | public: | ||
97 | 97 | | |||
98 | explicit DocumentItem(QObject *parent=nullptr); | 98 | explicit DocumentItem(QObject *parent=nullptr); | ||
99 | ~DocumentItem(); | 99 | ~DocumentItem(); | ||
100 | 100 | | |||
101 | void setPath(const QString &path); | 101 | void setUrl(const QUrl &url); | ||
102 | QString path() const; | 102 | QUrl url() const; | ||
103 | 103 | | |||
104 | QString windowTitleForDocument() const; | 104 | QString windowTitleForDocument() const; | ||
105 | 105 | | |||
106 | void setCurrentPage(int page); | 106 | void setCurrentPage(int page); | ||
107 | int currentPage() const; | 107 | int currentPage() const; | ||
108 | 108 | | |||
109 | bool isOpened() const; | 109 | bool isOpened() const; | ||
110 | 110 | | |||
Show All 25 Lines | |||||
136 | Q_INVOKABLE void resetSearch(); | 136 | Q_INVOKABLE void resetSearch(); | ||
137 | 137 | | |||
138 | //Internal, not binded to qml | 138 | //Internal, not binded to qml | ||
139 | Okular::Document *document(); | 139 | Okular::Document *document(); | ||
140 | Observer *pageviewObserver(); | 140 | Observer *pageviewObserver(); | ||
141 | Observer *thumbnailObserver(); | 141 | Observer *thumbnailObserver(); | ||
142 | 142 | | |||
143 | Q_SIGNALS: | 143 | Q_SIGNALS: | ||
144 | void pathChanged(); | 144 | void urlChanged(); | ||
145 | void pageCountChanged(); | 145 | void pageCountChanged(); | ||
146 | void openedChanged(); | 146 | void openedChanged(); | ||
147 | void searchInProgressChanged(); | 147 | void searchInProgressChanged(); | ||
148 | void matchingPagesChanged(); | 148 | void matchingPagesChanged(); | ||
149 | void currentPageChanged(); | 149 | void currentPageChanged(); | ||
150 | void supportsSearchingChanged(); | 150 | void supportsSearchingChanged(); | ||
151 | void bookmarkedPagesChanged(); | 151 | void bookmarkedPagesChanged(); | ||
152 | void bookmarksChanged(); | 152 | void bookmarksChanged(); | ||
Show All 33 Lines |