Changeset View
Changeset View
Standalone View
Standalone View
mobile/app/package/contents/ui/main.qml
Show All 12 Lines | |||||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public | 14 | * You should have received a copy of the GNU General Public | ||
15 | * License along with this program; if not, write to the | 15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.1 | 20 | import QtQuick 2.1 | ||
21 | import QtQuick.Controls 1.3 | 21 | import QtQuick.Dialogs 1.3 as QQD | ||
22 | import org.kde.okular 2.0 as Okular | 22 | import org.kde.okular 2.0 as Okular | ||
23 | import org.kde.kirigami 2.0 as Kirigami | 23 | import org.kde.kirigami 2.0 as Kirigami | ||
24 | 24 | | |||
25 | Kirigami.AbstractApplicationWindow { | 25 | Kirigami.AbstractApplicationWindow { | ||
26 | id: fileBrowserRoot | 26 | id: fileBrowserRoot | ||
27 | visible: true | 27 | visible: true | ||
28 | 28 | | |||
29 | /*TODO: port ResourceInstance | | |||
30 | PlasmaExtras.ResourceInstance { | | |||
31 | id: resourceInstance | | |||
32 | uri: documentItem.path | | |||
33 | }*/ | | |||
34 | | ||||
35 | header: null | 29 | header: null | ||
36 | globalDrawer: Kirigami.OverlayDrawer { | 30 | globalDrawer: Kirigami.GlobalDrawer { | ||
37 | edge: Qt.LeftEdge | 31 | title: i18n("Okular") | ||
38 | contentItem: Documents { | 32 | titleIcon: "okular" | ||
39 | implicitWidth: Kirigami.Units.gridUnit * 20 | 33 | | ||
aacid: That path is WHAAAT | |||||
34 | QQD.FileDialog { | ||||
35 | id: fileDialog | ||||
36 | nameFilters: Okular.Okular.nameFilters | ||||
37 | folder: "file://" + userPaths.documents | ||||
38 | onAccepted: { | ||||
39 | documentItem.url = fileDialog.fileUrl | ||||
40 | } | ||||
41 | } | ||||
42 | | ||||
43 | actions: [ | ||||
44 | Kirigami.Action { | ||||
45 | text: i18n("Open...") | ||||
46 | icon.name: "document-open" | ||||
47 | onTriggered: { | ||||
48 | fileDialog.open() | ||||
40 | } | 49 | } | ||
41 | } | 50 | } | ||
42 | contextDrawer: OkularDrawer { | 51 | ] | ||
43 | drawerOpen: false | | |||
44 | } | 52 | } | ||
53 | contextDrawer: OkularDrawer {} | ||||
45 | 54 | | |||
46 | title: documentItem.windowTitleForDocument | 55 | title: documentItem.windowTitleForDocument | ||
47 | Okular.DocumentItem { | 56 | Okular.DocumentItem { | ||
48 | id: documentItem | 57 | id: documentItem | ||
49 | onUrlChanged: { currentPage = 0 } | 58 | onUrlChanged: { currentPage = 0 } | ||
50 | onWindowTitleForDocumentChanged: { | 59 | onWindowTitleForDocumentChanged: { | ||
51 | } | 60 | } | ||
52 | } | 61 | } | ||
Show All 20 Lines |
That path is WHAAAT