Merge lp:~verzegnassi-stefano/ubuntu-docviewer-app/desktop-support into lp:ubuntu-docviewer-app
- desktop-support
- Merge into lo-viewer
Status: | Superseded |
---|---|
Proposed branch: | lp:~verzegnassi-stefano/ubuntu-docviewer-app/desktop-support |
Merge into: | lp:ubuntu-docviewer-app |
Prerequisite: | lp:~verzegnassi-stefano/ubuntu-docviewer-app/uitk-bottom-edge |
Diff against target: |
3349 lines (+1451/-991) 29 files modified
debian/control (+3/-1) po/com.ubuntu.docviewer.pot (+23/-34) po/ja.po (+0/-448) po/ro.po (+0/-449) src/app/qml/common/ContentHubProxy.qml (+5/-5) src/app/qml/common/DetailsPage.qml (+2/-2) src/app/qml/common/PickImportedDialog.qml (+1/-1) src/app/qml/loView/LOViewDefaultHeader.qml (+1/-1) src/app/qml/loView/LOViewPage.qml (+1/-1) src/app/qml/pdfView/PdfView.qml (+2/-5) src/app/qml/textView/TextView.qml (+1/-1) src/app/qml/ubuntu-docviewer-app.qml (+8/-1) src/plugin/file-qml-plugin/CMakeLists.txt (+27/-2) src/plugin/file-qml-plugin/InputInfo/CMakeLists.txt (+39/-0) src/plugin/file-qml-plugin/InputInfo/linux/qinputdeviceinfo_linux.cpp (+288/-0) src/plugin/file-qml-plugin/InputInfo/linux/qinputdeviceinfo_linux_p.h (+98/-0) src/plugin/file-qml-plugin/InputInfo/plugin.cpp (+32/-0) src/plugin/file-qml-plugin/InputInfo/plugin.h (+30/-0) src/plugin/file-qml-plugin/InputInfo/qdeclarativeinputdevicemodel.cpp (+196/-0) src/plugin/file-qml-plugin/InputInfo/qdeclarativeinputdevicemodel_p.h (+102/-0) src/plugin/file-qml-plugin/InputInfo/qinputinfo.cpp (+270/-0) src/plugin/file-qml-plugin/InputInfo/qinputinfo.h (+143/-0) src/plugin/file-qml-plugin/InputInfo/qmldir (+3/-0) src/plugin/file-qml-plugin/backend.cpp (+21/-10) src/plugin/file-qml-plugin/documentmodel.cpp (+2/-2) src/plugin/file-qml-plugin/fileutils.cpp (+11/-21) src/plugin/file-qml-plugin/fileutils.h (+4/-7) src/plugin/file-qml-plugin/ubuntuconvergenceutils.cpp (+82/-0) src/plugin/file-qml-plugin/ubuntuconvergenceutils.h (+56/-0) |
To merge this branch: | bzr merge lp:~verzegnassi-stefano/ubuntu-docviewer-app/desktop-support |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stefano Verzegnassi | Disapprove | ||
Nicholas Skaggs (community) | Needs Fixing | ||
Jenkins Bot | continuous-integration | Needs Fixing | |
Review via email: mp+282639@code.launchpad.net |
Commit message
Better desktop/
WORKAROUND: This makes new BottomEdge component fully working on desktop
Description of the change
Better desktop/
WORKAROUND: This makes new BottomEdge component fully working on desktop
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
- 242. By Stefano Verzegnassi
-
Added translation committed in trunk, removed by mistake
- 243. By Stefano Verzegnassi
-
updated pot
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:243
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:243
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:243
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:243
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Nicholas Skaggs (nskaggs) wrote : | # |
Text conflict in po/com.
Conflict adding file po/ja.po. Moved existing file to po/ja.po.moved.
Conflict adding file po/ro.po. Moved existing file to po/ro.po.moved.
Text conflict in src/app/
Text conflict in src/app/
5 conflicts encountered.
bzr: ERROR: Conflicts from merge
Stefano Verzegnassi (verzegnassi-stefano) wrote : | # |
I did some mistake when I merged trunk (.po conflicts). I will create a new branch for this and propose a new MP.
Unmerged revisions
- 243. By Stefano Verzegnassi
-
updated pot
- 242. By Stefano Verzegnassi
-
Added translation committed in trunk, removed by mistake
- 241. By Stefano Verzegnassi
-
Added 'mouseAttached' property so that BottomEdgeHint can properly work on desktop
- 240. By Stefano Verzegnassi
-
Merged trunk
- 239. By Stefano Verzegnassi
-
Added ConvergenceUtils singleton. Improved desktop/pocket desktop support.
Preview Diff
1 | === modified file 'debian/control' | |||
2 | --- debian/control 2015-11-27 16:39:21 +0000 | |||
3 | +++ debian/control 2016-01-14 17:54:32 +0000 | |||
4 | @@ -17,7 +17,9 @@ | |||
5 | 17 | qtdeclarative5-qtquick2-plugin, | 17 | qtdeclarative5-qtquick2-plugin, |
6 | 18 | qtdeclarative5-private-dev, | 18 | qtdeclarative5-private-dev, |
7 | 19 | qtbase5-private-dev, | 19 | qtbase5-private-dev, |
9 | 20 | qtdeclarative5-test-plugin | 20 | qtdeclarative5-test-plugin, |
10 | 21 | libudev-dev, | ||
11 | 22 | libevdev-dev, | ||
12 | 21 | Standards-Version: 3.9.6 | 23 | Standards-Version: 3.9.6 |
13 | 22 | Section: misc | 24 | Section: misc |
14 | 23 | Homepage: https://launchpad.net/ubuntu-docviewer-app | 25 | Homepage: https://launchpad.net/ubuntu-docviewer-app |
15 | 24 | 26 | ||
16 | === modified file 'po/com.ubuntu.docviewer.pot' | |||
17 | --- po/com.ubuntu.docviewer.pot 2016-01-14 17:54:32 +0000 | |||
18 | +++ po/com.ubuntu.docviewer.pot 2016-01-14 17:54:32 +0000 | |||
19 | @@ -8,11 +8,7 @@ | |||
20 | 8 | msgstr "" | 8 | msgstr "" |
21 | 9 | "Project-Id-Version: \n" | 9 | "Project-Id-Version: \n" |
22 | 10 | "Report-Msgid-Bugs-To: \n" | 10 | "Report-Msgid-Bugs-To: \n" |
28 | 11 | <<<<<<< TREE | 11 | "POT-Creation-Date: 2016-01-14 18:54+0100\n" |
24 | 12 | "POT-Creation-Date: 2015-12-27 13:06+0100\n" | ||
25 | 13 | ======= | ||
26 | 14 | "POT-Creation-Date: 2015-12-15 20:33+0100\n" | ||
27 | 15 | >>>>>>> MERGE-SOURCE | ||
29 | 16 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
30 | 17 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
31 | 18 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
32 | @@ -46,7 +42,7 @@ | |||
33 | 46 | 42 | ||
34 | 47 | #: ../src/app/qml/common/DetailsPage.qml:26 | 43 | #: ../src/app/qml/common/DetailsPage.qml:26 |
35 | 48 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:107 | 44 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:107 |
37 | 49 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:83 | 45 | #: ../src/app/qml/pdfView/PdfView.qml:224 |
38 | 50 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:69 | 46 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:69 |
39 | 51 | msgid "Details" | 47 | msgid "Details" |
40 | 52 | msgstr "" | 48 | msgstr "" |
41 | @@ -121,6 +117,7 @@ | |||
42 | 121 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:55 | 117 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:55 |
43 | 122 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:28 | 118 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:28 |
44 | 123 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:55 | 119 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:55 |
45 | 120 | #: ../src/app/qml/pdfView/PdfView.qml:177 | ||
46 | 124 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:51 | 121 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:51 |
47 | 125 | msgid "Cancel" | 122 | msgid "Cancel" |
48 | 126 | msgstr "" | 123 | msgstr "" |
49 | @@ -193,33 +190,33 @@ | |||
50 | 193 | 190 | ||
51 | 194 | #. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings. | 191 | #. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings. |
52 | 195 | #. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum | 192 | #. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum |
54 | 196 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:100 | 193 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:103 |
55 | 197 | #, qt-format | 194 | #, qt-format |
56 | 198 | msgid "Today, %1" | 195 | msgid "Today, %1" |
57 | 199 | msgstr "" | 196 | msgstr "" |
58 | 200 | 197 | ||
59 | 201 | #. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings. | 198 | #. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings. |
60 | 202 | #. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum | 199 | #. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum |
62 | 203 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:105 | 200 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:108 |
63 | 204 | #, qt-format | 201 | #, qt-format |
64 | 205 | msgid "Yesterday, %1" | 202 | msgid "Yesterday, %1" |
65 | 206 | msgstr "" | 203 | msgstr "" |
66 | 207 | 204 | ||
67 | 208 | #. TRANSLATORS: this is a datetime formatting string, | 205 | #. TRANSLATORS: this is a datetime formatting string, |
68 | 209 | #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions. | 206 | #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions. |
71 | 210 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:112 | 207 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:115 |
72 | 211 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:131 | 208 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:134 |
73 | 212 | msgid "yyyy/MM/dd hh:mm" | 209 | msgid "yyyy/MM/dd hh:mm" |
74 | 213 | msgstr "" | 210 | msgstr "" |
75 | 214 | 211 | ||
76 | 215 | #. TRANSLATORS: this is a datetime formatting string, | 212 | #. TRANSLATORS: this is a datetime formatting string, |
77 | 216 | #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions. | 213 | #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions. |
79 | 217 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:125 | 214 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:128 |
80 | 218 | msgid "dddd, hh:mm" | 215 | msgid "dddd, hh:mm" |
81 | 219 | msgstr "" | 216 | msgstr "" |
82 | 220 | 217 | ||
83 | 221 | #: ../src/app/qml/documentPage/DocumentPage.qml:23 | 218 | #: ../src/app/qml/documentPage/DocumentPage.qml:23 |
85 | 222 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:3 | 219 | #: /tmp/uitk-bottom-edge-build/po/com.ubuntu.docviewer.desktop.in.in.h:3 |
86 | 223 | msgid "Documents" | 220 | msgid "Documents" |
87 | 224 | msgstr "" | 221 | msgstr "" |
88 | 225 | 222 | ||
89 | @@ -346,13 +343,13 @@ | |||
90 | 346 | msgstr "" | 343 | msgstr "" |
91 | 347 | 344 | ||
92 | 348 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:100 | 345 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:100 |
94 | 349 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:77 | 346 | #: ../src/app/qml/pdfView/PdfView.qml:217 |
95 | 350 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:63 | 347 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:63 |
96 | 351 | msgid "Disable night mode" | 348 | msgid "Disable night mode" |
97 | 352 | msgstr "" | 349 | msgstr "" |
98 | 353 | 350 | ||
99 | 354 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:100 | 351 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:100 |
101 | 355 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:77 | 352 | #: ../src/app/qml/pdfView/PdfView.qml:217 |
102 | 356 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:63 | 353 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:63 |
103 | 357 | msgid "Enable night mode" | 354 | msgid "Enable night mode" |
104 | 358 | msgstr "" | 355 | msgstr "" |
105 | @@ -396,31 +393,23 @@ | |||
106 | 396 | msgstr "" | 393 | msgstr "" |
107 | 397 | 394 | ||
108 | 398 | #. TRANSLATORS: "Contents" refers to the "Table of Contents" of a PDF document. | 395 | #. TRANSLATORS: "Contents" refers to the "Table of Contents" of a PDF document. |
115 | 399 | #: ../src/app/qml/pdfView/PdfContentsPage.qml:30 | 396 | #: ../src/app/qml/pdfView/PdfContentsPage.qml:31 |
116 | 400 | <<<<<<< TREE | 397 | #: ../src/app/qml/pdfView/PdfView.qml:150 |
111 | 401 | #: ../src/app/qml/pdfView/PdfView.qml:38 | ||
112 | 402 | ======= | ||
113 | 403 | #: ../src/app/qml/pdfView/PdfView.qml:40 | ||
114 | 404 | >>>>>>> MERGE-SOURCE | ||
117 | 405 | msgid "Contents" | 398 | msgid "Contents" |
118 | 406 | msgstr "" | 399 | msgstr "" |
119 | 407 | 400 | ||
120 | 408 | #: ../src/app/qml/pdfView/PdfContentsPage.qml:33 | ||
121 | 409 | msgid "Hide table of contents" | ||
122 | 410 | msgstr "" | ||
123 | 411 | |||
124 | 412 | #. TRANSLATORS: the first argument (%1) refers to the page currently shown on the screen, | 401 | #. TRANSLATORS: the first argument (%1) refers to the page currently shown on the screen, |
125 | 413 | #. while the second one (%2) refers to the total pages count. | 402 | #. while the second one (%2) refers to the total pages count. |
131 | 414 | <<<<<<< TREE | 403 | #: ../src/app/qml/pdfView/PdfView.qml:56 |
127 | 415 | #: ../src/app/qml/pdfView/PdfView.qml:35 | ||
128 | 416 | ======= | ||
129 | 417 | #: ../src/app/qml/pdfView/PdfView.qml:32 | ||
130 | 418 | >>>>>>> MERGE-SOURCE | ||
132 | 419 | #, qt-format | 404 | #, qt-format |
133 | 420 | msgid "Page %1 of %2" | 405 | msgid "Page %1 of %2" |
134 | 421 | msgstr "" | 406 | msgstr "" |
135 | 422 | 407 | ||
137 | 423 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:71 | 408 | #: ../src/app/qml/pdfView/PdfView.qml:200 |
138 | 409 | msgid "Search" | ||
139 | 410 | msgstr "" | ||
140 | 411 | |||
141 | 412 | #: ../src/app/qml/pdfView/PdfView.qml:210 | ||
142 | 424 | msgid "Go to page..." | 413 | msgid "Go to page..." |
143 | 425 | msgstr "" | 414 | msgstr "" |
144 | 426 | 415 | ||
145 | @@ -433,7 +422,7 @@ | |||
146 | 433 | msgid "Choose a page between 1 and %1" | 422 | msgid "Choose a page between 1 and %1" |
147 | 434 | msgstr "" | 423 | msgstr "" |
148 | 435 | 424 | ||
150 | 436 | #: ../src/app/qml/ubuntu-docviewer-app.qml:124 | 425 | #: ../src/app/qml/ubuntu-docviewer-app.qml:118 |
151 | 437 | msgid "File does not exist." | 426 | msgid "File does not exist." |
152 | 438 | msgstr "" | 427 | msgstr "" |
153 | 439 | 428 | ||
154 | @@ -446,15 +435,15 @@ | |||
155 | 446 | #. | 435 | #. |
156 | 447 | #. where "2" is given by the argument "%1" | 436 | #. where "2" is given by the argument "%1" |
157 | 448 | #. | 437 | #. |
159 | 449 | #: ../src/plugin/file-qml-plugin/docviewerutils.cpp:111 | 438 | #: ../src/plugin/file-qml-plugin/fileutils.cpp:101 |
160 | 450 | #, qt-format | 439 | #, qt-format |
161 | 451 | msgid "copy %1" | 440 | msgid "copy %1" |
162 | 452 | msgstr "" | 441 | msgstr "" |
163 | 453 | 442 | ||
165 | 454 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:1 | 443 | #: /tmp/uitk-bottom-edge-build/po/com.ubuntu.docviewer.desktop.in.in.h:1 |
166 | 455 | msgid "Document Viewer" | 444 | msgid "Document Viewer" |
167 | 456 | msgstr "" | 445 | msgstr "" |
168 | 457 | 446 | ||
170 | 458 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:2 | 447 | #: /tmp/uitk-bottom-edge-build/po/com.ubuntu.docviewer.desktop.in.in.h:2 |
171 | 459 | msgid "documents;viewer;pdf;reader;" | 448 | msgid "documents;viewer;pdf;reader;" |
172 | 460 | msgstr "" | 449 | msgstr "" |
173 | 461 | 450 | ||
174 | === removed file 'po/ja.po' | |||
175 | --- po/ja.po 2016-01-05 05:47:43 +0000 | |||
176 | +++ po/ja.po 1970-01-01 00:00:00 +0000 | |||
177 | @@ -1,448 +0,0 @@ | |||
178 | 1 | # Japanese translation for ubuntu-docviewer-app | ||
179 | 2 | # Copyright (c) 2016 Rosetta Contributors and Canonical Ltd 2016 | ||
180 | 3 | # This file is distributed under the same license as the ubuntu-docviewer-app package. | ||
181 | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, 2016. | ||
182 | 5 | # | ||
183 | 6 | msgid "" | ||
184 | 7 | msgstr "" | ||
185 | 8 | "Project-Id-Version: ubuntu-docviewer-app\n" | ||
186 | 9 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" | ||
187 | 10 | "POT-Creation-Date: 2015-12-27 13:06+0100\n" | ||
188 | 11 | "PO-Revision-Date: 2016-01-03 18:49+0000\n" | ||
189 | 12 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
190 | 13 | "Language-Team: Japanese <ja@li.org>\n" | ||
191 | 14 | "MIME-Version: 1.0\n" | ||
192 | 15 | "Content-Type: text/plain; charset=UTF-8\n" | ||
193 | 16 | "Content-Transfer-Encoding: 8bit\n" | ||
194 | 17 | "Plural-Forms: nplurals=1; plural=0;\n" | ||
195 | 18 | "X-Launchpad-Export-Date: 2016-01-05 05:47+0000\n" | ||
196 | 19 | "X-Generator: Launchpad (build 17876)\n" | ||
197 | 20 | |||
198 | 21 | #: ../src/app/qml/common/CommandLineProxy.qml:49 | ||
199 | 22 | msgid "Some of the provided arguments are not valid." | ||
200 | 23 | msgstr "" | ||
201 | 24 | |||
202 | 25 | #: ../src/app/qml/common/CommandLineProxy.qml:58 | ||
203 | 26 | msgid "Open ubuntu-docviewer-app displaying the selected file" | ||
204 | 27 | msgstr "" | ||
205 | 28 | |||
206 | 29 | #: ../src/app/qml/common/CommandLineProxy.qml:65 | ||
207 | 30 | msgid "Run fullscreen" | ||
208 | 31 | msgstr "" | ||
209 | 32 | |||
210 | 33 | #: ../src/app/qml/common/CommandLineProxy.qml:71 | ||
211 | 34 | msgid "Open ubuntu-docviewer-app in pick mode. Used for tests only." | ||
212 | 35 | msgstr "" | ||
213 | 36 | |||
214 | 37 | #: ../src/app/qml/common/CommandLineProxy.qml:77 | ||
215 | 38 | msgid "" | ||
216 | 39 | "Show documents from the given folder, instead of ~/Documents.\n" | ||
217 | 40 | "The path must exist prior to running ubuntu-docviewer-app" | ||
218 | 41 | msgstr "" | ||
219 | 42 | |||
220 | 43 | #: ../src/app/qml/common/DetailsPage.qml:26 | ||
221 | 44 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:107 | ||
222 | 45 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:83 | ||
223 | 46 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:69 | ||
224 | 47 | msgid "Details" | ||
225 | 48 | msgstr "" | ||
226 | 49 | |||
227 | 50 | #: ../src/app/qml/common/DetailsPage.qml:42 | ||
228 | 51 | msgid "File" | ||
229 | 52 | msgstr "" | ||
230 | 53 | |||
231 | 54 | #: ../src/app/qml/common/DetailsPage.qml:47 | ||
232 | 55 | msgid "Location" | ||
233 | 56 | msgstr "" | ||
234 | 57 | |||
235 | 58 | #: ../src/app/qml/common/DetailsPage.qml:52 | ||
236 | 59 | msgid "Size" | ||
237 | 60 | msgstr "" | ||
238 | 61 | |||
239 | 62 | #: ../src/app/qml/common/DetailsPage.qml:57 | ||
240 | 63 | msgid "Created" | ||
241 | 64 | msgstr "" | ||
242 | 65 | |||
243 | 66 | #: ../src/app/qml/common/DetailsPage.qml:62 | ||
244 | 67 | msgid "Last modified" | ||
245 | 68 | msgstr "" | ||
246 | 69 | |||
247 | 70 | #: ../src/app/qml/common/DetailsPage.qml:69 | ||
248 | 71 | msgid "MIME type" | ||
249 | 72 | msgstr "" | ||
250 | 73 | |||
251 | 74 | #: ../src/app/qml/common/ErrorDialog.qml:23 | ||
252 | 75 | msgid "Error" | ||
253 | 76 | msgstr "" | ||
254 | 77 | |||
255 | 78 | #: ../src/app/qml/common/ErrorDialog.qml:26 | ||
256 | 79 | #: ../src/app/qml/common/PickImportedDialog.qml:54 | ||
257 | 80 | #: ../src/app/qml/common/RejectedImportDialog.qml:38 | ||
258 | 81 | #: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:31 | ||
259 | 82 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:53 | ||
260 | 83 | msgid "Close" | ||
261 | 84 | msgstr "" | ||
262 | 85 | |||
263 | 86 | #: ../src/app/qml/common/PickImportedDialog.qml:29 | ||
264 | 87 | msgid "Multiple documents imported" | ||
265 | 88 | msgstr "" | ||
266 | 89 | |||
267 | 90 | #: ../src/app/qml/common/PickImportedDialog.qml:30 | ||
268 | 91 | msgid "Choose which one to open:" | ||
269 | 92 | msgstr "" | ||
270 | 93 | |||
271 | 94 | #: ../src/app/qml/common/RejectedImportDialog.qml:28 | ||
272 | 95 | msgid "File not supported" | ||
273 | 96 | msgid_plural "Files not supported" | ||
274 | 97 | msgstr[0] "" | ||
275 | 98 | msgstr[1] "" | ||
276 | 99 | |||
277 | 100 | #: ../src/app/qml/common/RejectedImportDialog.qml:29 | ||
278 | 101 | msgid "Following document has not been imported:" | ||
279 | 102 | msgid_plural "Following documents have not been imported:" | ||
280 | 103 | msgstr[0] "" | ||
281 | 104 | msgstr[1] "" | ||
282 | 105 | |||
283 | 106 | #: ../src/app/qml/common/UnknownTypeDialog.qml:27 | ||
284 | 107 | msgid "Unknown file type" | ||
285 | 108 | msgstr "" | ||
286 | 109 | |||
287 | 110 | #: ../src/app/qml/common/UnknownTypeDialog.qml:28 | ||
288 | 111 | msgid "" | ||
289 | 112 | "This file is not supported.\n" | ||
290 | 113 | "Do you want to open it as a plain text?" | ||
291 | 114 | msgstr "" | ||
292 | 115 | |||
293 | 116 | #: ../src/app/qml/common/UnknownTypeDialog.qml:38 | ||
294 | 117 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:55 | ||
295 | 118 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:28 | ||
296 | 119 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:55 | ||
297 | 120 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:51 | ||
298 | 121 | msgid "Cancel" | ||
299 | 122 | msgstr "" | ||
300 | 123 | |||
301 | 124 | #: ../src/app/qml/common/UnknownTypeDialog.qml:44 | ||
302 | 125 | msgid "Yes" | ||
303 | 126 | msgstr "" | ||
304 | 127 | |||
305 | 128 | #. TRANSLATORS: %1 is the size of a file, expressed in GB | ||
306 | 129 | #: ../src/app/qml/common/utils.js:22 | ||
307 | 130 | #, qt-format | ||
308 | 131 | msgid "%1 GB" | ||
309 | 132 | msgstr "" | ||
310 | 133 | |||
311 | 134 | #. TRANSLATORS: %1 is the size of a file, expressed in MB | ||
312 | 135 | #: ../src/app/qml/common/utils.js:26 | ||
313 | 136 | #, qt-format | ||
314 | 137 | msgid "%1 MB" | ||
315 | 138 | msgstr "" | ||
316 | 139 | |||
317 | 140 | #. TRANSLATORS: %1 is the size of a file, expressed in kB | ||
318 | 141 | #: ../src/app/qml/common/utils.js:30 | ||
319 | 142 | #, qt-format | ||
320 | 143 | msgid "%1 kB" | ||
321 | 144 | msgstr "" | ||
322 | 145 | |||
323 | 146 | #. TRANSLATORS: %1 is the size of a file, expressed in byte | ||
324 | 147 | #: ../src/app/qml/common/utils.js:33 | ||
325 | 148 | #, qt-format | ||
326 | 149 | msgid "%1 byte" | ||
327 | 150 | msgstr "" | ||
328 | 151 | |||
329 | 152 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:39 | ||
330 | 153 | msgid "Delete file" | ||
331 | 154 | msgstr "" | ||
332 | 155 | |||
333 | 156 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:40 | ||
334 | 157 | #, qt-format | ||
335 | 158 | msgid "Delete %1 file" | ||
336 | 159 | msgid_plural "Delete %1 files" | ||
337 | 160 | msgstr[0] "" | ||
338 | 161 | msgstr[1] "" | ||
339 | 162 | |||
340 | 163 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:41 | ||
341 | 164 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:42 | ||
342 | 165 | msgid "Are you sure you want to permanently delete this file?" | ||
343 | 166 | msgid_plural "Are you sure you want to permanently delete these files?" | ||
344 | 167 | msgstr[0] "" | ||
345 | 168 | msgstr[1] "" | ||
346 | 169 | |||
347 | 170 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:61 | ||
348 | 171 | #: ../src/app/qml/documentPage/DocumentDelegateActions.qml:25 | ||
349 | 172 | #: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:53 | ||
350 | 173 | msgid "Delete" | ||
351 | 174 | msgstr "" | ||
352 | 175 | |||
353 | 176 | #: ../src/app/qml/documentPage/DocumentDelegateActions.qml:44 | ||
354 | 177 | msgid "Share" | ||
355 | 178 | msgstr "" | ||
356 | 179 | |||
357 | 180 | #: ../src/app/qml/documentPage/DocumentEmptyState.qml:75 | ||
358 | 181 | msgid "No document found" | ||
359 | 182 | msgstr "" | ||
360 | 183 | |||
361 | 184 | #: ../src/app/qml/documentPage/DocumentEmptyState.qml:84 | ||
362 | 185 | msgid "" | ||
363 | 186 | "Connect your device to any computer and simply drag files to the Documents " | ||
364 | 187 | "folder or insert removable media with documents." | ||
365 | 188 | msgstr "" | ||
366 | 189 | |||
367 | 190 | #. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings. | ||
368 | 191 | #. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum | ||
369 | 192 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:100 | ||
370 | 193 | #, qt-format | ||
371 | 194 | msgid "Today, %1" | ||
372 | 195 | msgstr "" | ||
373 | 196 | |||
374 | 197 | #. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings. | ||
375 | 198 | #. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum | ||
376 | 199 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:105 | ||
377 | 200 | #, qt-format | ||
378 | 201 | msgid "Yesterday, %1" | ||
379 | 202 | msgstr "" | ||
380 | 203 | |||
381 | 204 | #. TRANSLATORS: this is a datetime formatting string, | ||
382 | 205 | #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions. | ||
383 | 206 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:112 | ||
384 | 207 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:131 | ||
385 | 208 | msgid "yyyy/MM/dd hh:mm" | ||
386 | 209 | msgstr "" | ||
387 | 210 | |||
388 | 211 | #. TRANSLATORS: this is a datetime formatting string, | ||
389 | 212 | #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions. | ||
390 | 213 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:125 | ||
391 | 214 | msgid "dddd, hh:mm" | ||
392 | 215 | msgstr "" | ||
393 | 216 | |||
394 | 217 | #: ../src/app/qml/documentPage/DocumentPage.qml:23 | ||
395 | 218 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:3 | ||
396 | 219 | msgid "Documents" | ||
397 | 220 | msgstr "" | ||
398 | 221 | |||
399 | 222 | #: ../src/app/qml/documentPage/DocumentPageDefaultHeader.qml:29 | ||
400 | 223 | msgid "Search..." | ||
401 | 224 | msgstr "" | ||
402 | 225 | |||
403 | 226 | #: ../src/app/qml/documentPage/DocumentPageDefaultHeader.qml:36 | ||
404 | 227 | msgid "Sorting settings..." | ||
405 | 228 | msgstr "" | ||
406 | 229 | |||
407 | 230 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:41 | ||
408 | 231 | msgid "Switch to single column list" | ||
409 | 232 | msgstr "" | ||
410 | 233 | |||
411 | 234 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:41 | ||
412 | 235 | msgid "Switch to grid" | ||
413 | 236 | msgstr "" | ||
414 | 237 | |||
415 | 238 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:49 | ||
416 | 239 | msgid "Pick" | ||
417 | 240 | msgstr "" | ||
418 | 241 | |||
419 | 242 | #: ../src/app/qml/documentPage/DocumentPageSearchHeader.qml:27 | ||
420 | 243 | msgid "Back" | ||
421 | 244 | msgstr "" | ||
422 | 245 | |||
423 | 246 | #: ../src/app/qml/documentPage/DocumentPageSearchHeader.qml:47 | ||
424 | 247 | msgid "search in documents..." | ||
425 | 248 | msgstr "" | ||
426 | 249 | |||
427 | 250 | #: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:40 | ||
428 | 251 | msgid "Select None" | ||
429 | 252 | msgstr "" | ||
430 | 253 | |||
431 | 254 | #: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:40 | ||
432 | 255 | msgid "Select All" | ||
433 | 256 | msgstr "" | ||
434 | 257 | |||
435 | 258 | #: ../src/app/qml/documentPage/SearchEmptyState.qml:24 | ||
436 | 259 | msgid "No matching document found" | ||
437 | 260 | msgstr "" | ||
438 | 261 | |||
439 | 262 | #: ../src/app/qml/documentPage/SearchEmptyState.qml:26 | ||
440 | 263 | msgid "" | ||
441 | 264 | "Please ensure that your query is not misspelled and/or try a different query." | ||
442 | 265 | msgstr "" | ||
443 | 266 | |||
444 | 267 | #: ../src/app/qml/documentPage/SectionHeader.qml:13 | ||
445 | 268 | msgid "Today" | ||
446 | 269 | msgstr "" | ||
447 | 270 | |||
448 | 271 | #: ../src/app/qml/documentPage/SectionHeader.qml:16 | ||
449 | 272 | msgid "Yesterday" | ||
450 | 273 | msgstr "" | ||
451 | 274 | |||
452 | 275 | #: ../src/app/qml/documentPage/SectionHeader.qml:19 | ||
453 | 276 | msgid "Earlier this week" | ||
454 | 277 | msgstr "" | ||
455 | 278 | |||
456 | 279 | #: ../src/app/qml/documentPage/SectionHeader.qml:22 | ||
457 | 280 | msgid "Earlier this month" | ||
458 | 281 | msgstr "" | ||
459 | 282 | |||
460 | 283 | #: ../src/app/qml/documentPage/SectionHeader.qml:24 | ||
461 | 284 | msgid "Even earlier..." | ||
462 | 285 | msgstr "" | ||
463 | 286 | |||
464 | 287 | #: ../src/app/qml/documentPage/SharePage.qml:23 | ||
465 | 288 | msgid "Share to" | ||
466 | 289 | msgstr "" | ||
467 | 290 | |||
468 | 291 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:26 | ||
469 | 292 | msgid "Sorting settings" | ||
470 | 293 | msgstr "" | ||
471 | 294 | |||
472 | 295 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:31 | ||
473 | 296 | msgid "Sort by date (Latest first)" | ||
474 | 297 | msgstr "" | ||
475 | 298 | |||
476 | 299 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:32 | ||
477 | 300 | msgid "Sort by name (A-Z)" | ||
478 | 301 | msgstr "" | ||
479 | 302 | |||
480 | 303 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:33 | ||
481 | 304 | msgid "Sort by size (Smaller first)" | ||
482 | 305 | msgstr "" | ||
483 | 306 | |||
484 | 307 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:47 | ||
485 | 308 | msgid "Reverse order" | ||
486 | 309 | msgstr "" | ||
487 | 310 | |||
488 | 311 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:51 | ||
489 | 312 | #: ../src/app/qml/textView/TextView.qml:43 | ||
490 | 313 | msgid "Loading..." | ||
491 | 314 | msgstr "" | ||
492 | 315 | |||
493 | 316 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:55 | ||
494 | 317 | msgid "LibreOffice text document" | ||
495 | 318 | msgstr "" | ||
496 | 319 | |||
497 | 320 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:57 | ||
498 | 321 | msgid "LibreOffice spread sheet" | ||
499 | 322 | msgstr "" | ||
500 | 323 | |||
501 | 324 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:59 | ||
502 | 325 | msgid "LibreOffice presentation" | ||
503 | 326 | msgstr "" | ||
504 | 327 | |||
505 | 328 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:61 | ||
506 | 329 | msgid "LibreOffice Draw document" | ||
507 | 330 | msgstr "" | ||
508 | 331 | |||
509 | 332 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:63 | ||
510 | 333 | msgid "Unknown LibreOffice document" | ||
511 | 334 | msgstr "" | ||
512 | 335 | |||
513 | 336 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:65 | ||
514 | 337 | msgid "Unknown type document" | ||
515 | 338 | msgstr "" | ||
516 | 339 | |||
517 | 340 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:85 | ||
518 | 341 | msgid "Go to position..." | ||
519 | 342 | msgstr "" | ||
520 | 343 | |||
521 | 344 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:100 | ||
522 | 345 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:77 | ||
523 | 346 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:63 | ||
524 | 347 | msgid "Disable night mode" | ||
525 | 348 | msgstr "" | ||
526 | 349 | |||
527 | 350 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:100 | ||
528 | 351 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:77 | ||
529 | 352 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:63 | ||
530 | 353 | msgid "Enable night mode" | ||
531 | 354 | msgstr "" | ||
532 | 355 | |||
533 | 356 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:30 | ||
534 | 357 | msgid "Go to position" | ||
535 | 358 | msgstr "" | ||
536 | 359 | |||
537 | 360 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:31 | ||
538 | 361 | msgid "Choose a position between 1% and 100%" | ||
539 | 362 | msgstr "" | ||
540 | 363 | |||
541 | 364 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:62 | ||
542 | 365 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:58 | ||
543 | 366 | msgid "GO!" | ||
544 | 367 | msgstr "" | ||
545 | 368 | |||
546 | 369 | #: ../src/app/qml/loView/LOViewPage.qml:129 | ||
547 | 370 | msgid "LibreOffice binaries not found." | ||
548 | 371 | msgstr "" | ||
549 | 372 | |||
550 | 373 | #: ../src/app/qml/loView/LOViewPage.qml:132 | ||
551 | 374 | msgid "Error while loading LibreOffice." | ||
552 | 375 | msgstr "" | ||
553 | 376 | |||
554 | 377 | #: ../src/app/qml/loView/LOViewPage.qml:135 | ||
555 | 378 | msgid "" | ||
556 | 379 | "Document not loaded.\n" | ||
557 | 380 | "The requested document may be corrupt or protected by a password." | ||
558 | 381 | msgstr "" | ||
559 | 382 | |||
560 | 383 | #. TRANSLATORS: 'LibreOfficeKit' is the name of the library used by | ||
561 | 384 | #. Document Viewer for rendering LibreOffice/MS-Office documents. | ||
562 | 385 | #. Ref. https://docs.libreoffice.org/libreofficekit.html | ||
563 | 386 | #: ../src/app/qml/loView/Splashscreen.qml:45 | ||
564 | 387 | msgid "Powered by LibreOfficeKit" | ||
565 | 388 | msgstr "" | ||
566 | 389 | |||
567 | 390 | #: ../src/app/qml/loView/ZoomSelector.qml:110 | ||
568 | 391 | msgid "Fit width" | ||
569 | 392 | msgstr "" | ||
570 | 393 | |||
571 | 394 | #. TRANSLATORS: "Contents" refers to the "Table of Contents" of a PDF document. | ||
572 | 395 | #: ../src/app/qml/pdfView/PdfContentsPage.qml:30 | ||
573 | 396 | #: ../src/app/qml/pdfView/PdfView.qml:38 | ||
574 | 397 | msgid "Contents" | ||
575 | 398 | msgstr "" | ||
576 | 399 | |||
577 | 400 | #: ../src/app/qml/pdfView/PdfContentsPage.qml:36 | ||
578 | 401 | msgid "Hide table of contents" | ||
579 | 402 | msgstr "" | ||
580 | 403 | |||
581 | 404 | #. TRANSLATORS: the first argument (%1) refers to the page currently shown on the screen, | ||
582 | 405 | #. while the second one (%2) refers to the total pages count. | ||
583 | 406 | #: ../src/app/qml/pdfView/PdfView.qml:35 | ||
584 | 407 | #, qt-format | ||
585 | 408 | msgid "Page %1 of %2" | ||
586 | 409 | msgstr "" | ||
587 | 410 | |||
588 | 411 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:71 | ||
589 | 412 | msgid "Go to page..." | ||
590 | 413 | msgstr "" | ||
591 | 414 | |||
592 | 415 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:26 | ||
593 | 416 | msgid "Go to page" | ||
594 | 417 | msgstr "" | ||
595 | 418 | |||
596 | 419 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:27 | ||
597 | 420 | #, qt-format | ||
598 | 421 | msgid "Choose a page between 1 and %1" | ||
599 | 422 | msgstr "" | ||
600 | 423 | |||
601 | 424 | #: ../src/app/qml/ubuntu-docviewer-app.qml:118 | ||
602 | 425 | msgid "File does not exist." | ||
603 | 426 | msgstr "" | ||
604 | 427 | |||
605 | 428 | #. TRANSLATORS: This string is used for renaming a copied file, | ||
606 | 429 | #. when a file with the same name already exists in user's | ||
607 | 430 | #. Documents folder. | ||
608 | 431 | #. | ||
609 | 432 | #. e.g. "Manual_Aquaris_E4.5_ubuntu_EN.pdf" will become | ||
610 | 433 | #. "Manual_Aquaris_E4.5_ubuntu_EN (copy 2).pdf" | ||
611 | 434 | #. | ||
612 | 435 | #. where "2" is given by the argument "%1" | ||
613 | 436 | #. | ||
614 | 437 | #: ../src/plugin/file-qml-plugin/docviewerutils.cpp:111 | ||
615 | 438 | #, qt-format | ||
616 | 439 | msgid "copy %1" | ||
617 | 440 | msgstr "" | ||
618 | 441 | |||
619 | 442 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:1 | ||
620 | 443 | msgid "Document Viewer" | ||
621 | 444 | msgstr "" | ||
622 | 445 | |||
623 | 446 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:2 | ||
624 | 447 | msgid "documents;viewer;pdf;reader;" | ||
625 | 448 | msgstr "" | ||
626 | 449 | 0 | ||
627 | === added file 'po/ro.po' | |||
628 | --- po/ro.po 1970-01-01 00:00:00 +0000 | |||
629 | +++ po/ro.po 2016-01-14 17:54:32 +0000 | |||
630 | @@ -0,0 +1,449 @@ | |||
631 | 1 | # Romanian translation for ubuntu-docviewer-app | ||
632 | 2 | # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 | ||
633 | 3 | # This file is distributed under the same license as the ubuntu-docviewer-app package. | ||
634 | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, 2015. | ||
635 | 5 | # | ||
636 | 6 | msgid "" | ||
637 | 7 | msgstr "" | ||
638 | 8 | "Project-Id-Version: ubuntu-docviewer-app\n" | ||
639 | 9 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" | ||
640 | 10 | "POT-Creation-Date: 2015-12-27 13:06+0100\n" | ||
641 | 11 | "PO-Revision-Date: 2015-12-23 20:27+0000\n" | ||
642 | 12 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
643 | 13 | "Language-Team: Romanian <ro@li.org>\n" | ||
644 | 14 | "MIME-Version: 1.0\n" | ||
645 | 15 | "Content-Type: text/plain; charset=UTF-8\n" | ||
646 | 16 | "Content-Transfer-Encoding: 8bit\n" | ||
647 | 17 | "Plural-Forms: nplurals=3; plural=(n == 1 ? 0: (((n % 100 > 19) || ((n % 100 " | ||
648 | 18 | "== 0) && (n != 0))) ? 2: 1));\n" | ||
649 | 19 | "X-Launchpad-Export-Date: 2016-01-05 05:47+0000\n" | ||
650 | 20 | "X-Generator: Launchpad (build 17876)\n" | ||
651 | 21 | |||
652 | 22 | #: ../src/app/qml/common/CommandLineProxy.qml:49 | ||
653 | 23 | msgid "Some of the provided arguments are not valid." | ||
654 | 24 | msgstr "" | ||
655 | 25 | |||
656 | 26 | #: ../src/app/qml/common/CommandLineProxy.qml:58 | ||
657 | 27 | msgid "Open ubuntu-docviewer-app displaying the selected file" | ||
658 | 28 | msgstr "" | ||
659 | 29 | |||
660 | 30 | #: ../src/app/qml/common/CommandLineProxy.qml:65 | ||
661 | 31 | msgid "Run fullscreen" | ||
662 | 32 | msgstr "" | ||
663 | 33 | |||
664 | 34 | #: ../src/app/qml/common/CommandLineProxy.qml:71 | ||
665 | 35 | msgid "Open ubuntu-docviewer-app in pick mode. Used for tests only." | ||
666 | 36 | msgstr "" | ||
667 | 37 | |||
668 | 38 | #: ../src/app/qml/common/CommandLineProxy.qml:77 | ||
669 | 39 | msgid "" | ||
670 | 40 | "Show documents from the given folder, instead of ~/Documents.\n" | ||
671 | 41 | "The path must exist prior to running ubuntu-docviewer-app" | ||
672 | 42 | msgstr "" | ||
673 | 43 | |||
674 | 44 | #: ../src/app/qml/common/DetailsPage.qml:26 | ||
675 | 45 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:107 | ||
676 | 46 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:83 | ||
677 | 47 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:69 | ||
678 | 48 | msgid "Details" | ||
679 | 49 | msgstr "" | ||
680 | 50 | |||
681 | 51 | #: ../src/app/qml/common/DetailsPage.qml:42 | ||
682 | 52 | msgid "File" | ||
683 | 53 | msgstr "" | ||
684 | 54 | |||
685 | 55 | #: ../src/app/qml/common/DetailsPage.qml:47 | ||
686 | 56 | msgid "Location" | ||
687 | 57 | msgstr "" | ||
688 | 58 | |||
689 | 59 | #: ../src/app/qml/common/DetailsPage.qml:52 | ||
690 | 60 | msgid "Size" | ||
691 | 61 | msgstr "" | ||
692 | 62 | |||
693 | 63 | #: ../src/app/qml/common/DetailsPage.qml:57 | ||
694 | 64 | msgid "Created" | ||
695 | 65 | msgstr "" | ||
696 | 66 | |||
697 | 67 | #: ../src/app/qml/common/DetailsPage.qml:62 | ||
698 | 68 | msgid "Last modified" | ||
699 | 69 | msgstr "" | ||
700 | 70 | |||
701 | 71 | #: ../src/app/qml/common/DetailsPage.qml:69 | ||
702 | 72 | msgid "MIME type" | ||
703 | 73 | msgstr "" | ||
704 | 74 | |||
705 | 75 | #: ../src/app/qml/common/ErrorDialog.qml:23 | ||
706 | 76 | msgid "Error" | ||
707 | 77 | msgstr "" | ||
708 | 78 | |||
709 | 79 | #: ../src/app/qml/common/ErrorDialog.qml:26 | ||
710 | 80 | #: ../src/app/qml/common/PickImportedDialog.qml:54 | ||
711 | 81 | #: ../src/app/qml/common/RejectedImportDialog.qml:38 | ||
712 | 82 | #: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:31 | ||
713 | 83 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:53 | ||
714 | 84 | msgid "Close" | ||
715 | 85 | msgstr "" | ||
716 | 86 | |||
717 | 87 | #: ../src/app/qml/common/PickImportedDialog.qml:29 | ||
718 | 88 | msgid "Multiple documents imported" | ||
719 | 89 | msgstr "" | ||
720 | 90 | |||
721 | 91 | #: ../src/app/qml/common/PickImportedDialog.qml:30 | ||
722 | 92 | msgid "Choose which one to open:" | ||
723 | 93 | msgstr "" | ||
724 | 94 | |||
725 | 95 | #: ../src/app/qml/common/RejectedImportDialog.qml:28 | ||
726 | 96 | msgid "File not supported" | ||
727 | 97 | msgid_plural "Files not supported" | ||
728 | 98 | msgstr[0] "" | ||
729 | 99 | msgstr[1] "" | ||
730 | 100 | |||
731 | 101 | #: ../src/app/qml/common/RejectedImportDialog.qml:29 | ||
732 | 102 | msgid "Following document has not been imported:" | ||
733 | 103 | msgid_plural "Following documents have not been imported:" | ||
734 | 104 | msgstr[0] "" | ||
735 | 105 | msgstr[1] "" | ||
736 | 106 | |||
737 | 107 | #: ../src/app/qml/common/UnknownTypeDialog.qml:27 | ||
738 | 108 | msgid "Unknown file type" | ||
739 | 109 | msgstr "" | ||
740 | 110 | |||
741 | 111 | #: ../src/app/qml/common/UnknownTypeDialog.qml:28 | ||
742 | 112 | msgid "" | ||
743 | 113 | "This file is not supported.\n" | ||
744 | 114 | "Do you want to open it as a plain text?" | ||
745 | 115 | msgstr "" | ||
746 | 116 | |||
747 | 117 | #: ../src/app/qml/common/UnknownTypeDialog.qml:38 | ||
748 | 118 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:55 | ||
749 | 119 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:28 | ||
750 | 120 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:55 | ||
751 | 121 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:51 | ||
752 | 122 | msgid "Cancel" | ||
753 | 123 | msgstr "" | ||
754 | 124 | |||
755 | 125 | #: ../src/app/qml/common/UnknownTypeDialog.qml:44 | ||
756 | 126 | msgid "Yes" | ||
757 | 127 | msgstr "" | ||
758 | 128 | |||
759 | 129 | #. TRANSLATORS: %1 is the size of a file, expressed in GB | ||
760 | 130 | #: ../src/app/qml/common/utils.js:22 | ||
761 | 131 | #, qt-format | ||
762 | 132 | msgid "%1 GB" | ||
763 | 133 | msgstr "" | ||
764 | 134 | |||
765 | 135 | #. TRANSLATORS: %1 is the size of a file, expressed in MB | ||
766 | 136 | #: ../src/app/qml/common/utils.js:26 | ||
767 | 137 | #, qt-format | ||
768 | 138 | msgid "%1 MB" | ||
769 | 139 | msgstr "" | ||
770 | 140 | |||
771 | 141 | #. TRANSLATORS: %1 is the size of a file, expressed in kB | ||
772 | 142 | #: ../src/app/qml/common/utils.js:30 | ||
773 | 143 | #, qt-format | ||
774 | 144 | msgid "%1 kB" | ||
775 | 145 | msgstr "" | ||
776 | 146 | |||
777 | 147 | #. TRANSLATORS: %1 is the size of a file, expressed in byte | ||
778 | 148 | #: ../src/app/qml/common/utils.js:33 | ||
779 | 149 | #, qt-format | ||
780 | 150 | msgid "%1 byte" | ||
781 | 151 | msgstr "" | ||
782 | 152 | |||
783 | 153 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:39 | ||
784 | 154 | msgid "Delete file" | ||
785 | 155 | msgstr "" | ||
786 | 156 | |||
787 | 157 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:40 | ||
788 | 158 | #, qt-format | ||
789 | 159 | msgid "Delete %1 file" | ||
790 | 160 | msgid_plural "Delete %1 files" | ||
791 | 161 | msgstr[0] "" | ||
792 | 162 | msgstr[1] "" | ||
793 | 163 | |||
794 | 164 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:41 | ||
795 | 165 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:42 | ||
796 | 166 | msgid "Are you sure you want to permanently delete this file?" | ||
797 | 167 | msgid_plural "Are you sure you want to permanently delete these files?" | ||
798 | 168 | msgstr[0] "" | ||
799 | 169 | msgstr[1] "" | ||
800 | 170 | |||
801 | 171 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:61 | ||
802 | 172 | #: ../src/app/qml/documentPage/DocumentDelegateActions.qml:25 | ||
803 | 173 | #: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:53 | ||
804 | 174 | msgid "Delete" | ||
805 | 175 | msgstr "" | ||
806 | 176 | |||
807 | 177 | #: ../src/app/qml/documentPage/DocumentDelegateActions.qml:44 | ||
808 | 178 | msgid "Share" | ||
809 | 179 | msgstr "" | ||
810 | 180 | |||
811 | 181 | #: ../src/app/qml/documentPage/DocumentEmptyState.qml:75 | ||
812 | 182 | msgid "No document found" | ||
813 | 183 | msgstr "" | ||
814 | 184 | |||
815 | 185 | #: ../src/app/qml/documentPage/DocumentEmptyState.qml:84 | ||
816 | 186 | msgid "" | ||
817 | 187 | "Connect your device to any computer and simply drag files to the Documents " | ||
818 | 188 | "folder or insert removable media with documents." | ||
819 | 189 | msgstr "" | ||
820 | 190 | |||
821 | 191 | #. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings. | ||
822 | 192 | #. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum | ||
823 | 193 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:100 | ||
824 | 194 | #, qt-format | ||
825 | 195 | msgid "Today, %1" | ||
826 | 196 | msgstr "" | ||
827 | 197 | |||
828 | 198 | #. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings. | ||
829 | 199 | #. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum | ||
830 | 200 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:105 | ||
831 | 201 | #, qt-format | ||
832 | 202 | msgid "Yesterday, %1" | ||
833 | 203 | msgstr "" | ||
834 | 204 | |||
835 | 205 | #. TRANSLATORS: this is a datetime formatting string, | ||
836 | 206 | #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions. | ||
837 | 207 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:112 | ||
838 | 208 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:131 | ||
839 | 209 | msgid "yyyy/MM/dd hh:mm" | ||
840 | 210 | msgstr "" | ||
841 | 211 | |||
842 | 212 | #. TRANSLATORS: this is a datetime formatting string, | ||
843 | 213 | #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions. | ||
844 | 214 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:125 | ||
845 | 215 | msgid "dddd, hh:mm" | ||
846 | 216 | msgstr "" | ||
847 | 217 | |||
848 | 218 | #: ../src/app/qml/documentPage/DocumentPage.qml:23 | ||
849 | 219 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:3 | ||
850 | 220 | msgid "Documents" | ||
851 | 221 | msgstr "" | ||
852 | 222 | |||
853 | 223 | #: ../src/app/qml/documentPage/DocumentPageDefaultHeader.qml:29 | ||
854 | 224 | msgid "Search..." | ||
855 | 225 | msgstr "" | ||
856 | 226 | |||
857 | 227 | #: ../src/app/qml/documentPage/DocumentPageDefaultHeader.qml:36 | ||
858 | 228 | msgid "Sorting settings..." | ||
859 | 229 | msgstr "" | ||
860 | 230 | |||
861 | 231 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:41 | ||
862 | 232 | msgid "Switch to single column list" | ||
863 | 233 | msgstr "" | ||
864 | 234 | |||
865 | 235 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:41 | ||
866 | 236 | msgid "Switch to grid" | ||
867 | 237 | msgstr "" | ||
868 | 238 | |||
869 | 239 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:49 | ||
870 | 240 | msgid "Pick" | ||
871 | 241 | msgstr "" | ||
872 | 242 | |||
873 | 243 | #: ../src/app/qml/documentPage/DocumentPageSearchHeader.qml:27 | ||
874 | 244 | msgid "Back" | ||
875 | 245 | msgstr "" | ||
876 | 246 | |||
877 | 247 | #: ../src/app/qml/documentPage/DocumentPageSearchHeader.qml:47 | ||
878 | 248 | msgid "search in documents..." | ||
879 | 249 | msgstr "" | ||
880 | 250 | |||
881 | 251 | #: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:40 | ||
882 | 252 | msgid "Select None" | ||
883 | 253 | msgstr "" | ||
884 | 254 | |||
885 | 255 | #: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:40 | ||
886 | 256 | msgid "Select All" | ||
887 | 257 | msgstr "" | ||
888 | 258 | |||
889 | 259 | #: ../src/app/qml/documentPage/SearchEmptyState.qml:24 | ||
890 | 260 | msgid "No matching document found" | ||
891 | 261 | msgstr "" | ||
892 | 262 | |||
893 | 263 | #: ../src/app/qml/documentPage/SearchEmptyState.qml:26 | ||
894 | 264 | msgid "" | ||
895 | 265 | "Please ensure that your query is not misspelled and/or try a different query." | ||
896 | 266 | msgstr "" | ||
897 | 267 | |||
898 | 268 | #: ../src/app/qml/documentPage/SectionHeader.qml:13 | ||
899 | 269 | msgid "Today" | ||
900 | 270 | msgstr "" | ||
901 | 271 | |||
902 | 272 | #: ../src/app/qml/documentPage/SectionHeader.qml:16 | ||
903 | 273 | msgid "Yesterday" | ||
904 | 274 | msgstr "" | ||
905 | 275 | |||
906 | 276 | #: ../src/app/qml/documentPage/SectionHeader.qml:19 | ||
907 | 277 | msgid "Earlier this week" | ||
908 | 278 | msgstr "" | ||
909 | 279 | |||
910 | 280 | #: ../src/app/qml/documentPage/SectionHeader.qml:22 | ||
911 | 281 | msgid "Earlier this month" | ||
912 | 282 | msgstr "" | ||
913 | 283 | |||
914 | 284 | #: ../src/app/qml/documentPage/SectionHeader.qml:24 | ||
915 | 285 | msgid "Even earlier..." | ||
916 | 286 | msgstr "" | ||
917 | 287 | |||
918 | 288 | #: ../src/app/qml/documentPage/SharePage.qml:23 | ||
919 | 289 | msgid "Share to" | ||
920 | 290 | msgstr "" | ||
921 | 291 | |||
922 | 292 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:26 | ||
923 | 293 | msgid "Sorting settings" | ||
924 | 294 | msgstr "" | ||
925 | 295 | |||
926 | 296 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:31 | ||
927 | 297 | msgid "Sort by date (Latest first)" | ||
928 | 298 | msgstr "" | ||
929 | 299 | |||
930 | 300 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:32 | ||
931 | 301 | msgid "Sort by name (A-Z)" | ||
932 | 302 | msgstr "" | ||
933 | 303 | |||
934 | 304 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:33 | ||
935 | 305 | msgid "Sort by size (Smaller first)" | ||
936 | 306 | msgstr "" | ||
937 | 307 | |||
938 | 308 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:47 | ||
939 | 309 | msgid "Reverse order" | ||
940 | 310 | msgstr "" | ||
941 | 311 | |||
942 | 312 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:51 | ||
943 | 313 | #: ../src/app/qml/textView/TextView.qml:43 | ||
944 | 314 | msgid "Loading..." | ||
945 | 315 | msgstr "" | ||
946 | 316 | |||
947 | 317 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:55 | ||
948 | 318 | msgid "LibreOffice text document" | ||
949 | 319 | msgstr "" | ||
950 | 320 | |||
951 | 321 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:57 | ||
952 | 322 | msgid "LibreOffice spread sheet" | ||
953 | 323 | msgstr "" | ||
954 | 324 | |||
955 | 325 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:59 | ||
956 | 326 | msgid "LibreOffice presentation" | ||
957 | 327 | msgstr "" | ||
958 | 328 | |||
959 | 329 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:61 | ||
960 | 330 | msgid "LibreOffice Draw document" | ||
961 | 331 | msgstr "" | ||
962 | 332 | |||
963 | 333 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:63 | ||
964 | 334 | msgid "Unknown LibreOffice document" | ||
965 | 335 | msgstr "" | ||
966 | 336 | |||
967 | 337 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:65 | ||
968 | 338 | msgid "Unknown type document" | ||
969 | 339 | msgstr "" | ||
970 | 340 | |||
971 | 341 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:85 | ||
972 | 342 | msgid "Go to position..." | ||
973 | 343 | msgstr "" | ||
974 | 344 | |||
975 | 345 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:100 | ||
976 | 346 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:77 | ||
977 | 347 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:63 | ||
978 | 348 | msgid "Disable night mode" | ||
979 | 349 | msgstr "" | ||
980 | 350 | |||
981 | 351 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:100 | ||
982 | 352 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:77 | ||
983 | 353 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:63 | ||
984 | 354 | msgid "Enable night mode" | ||
985 | 355 | msgstr "" | ||
986 | 356 | |||
987 | 357 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:30 | ||
988 | 358 | msgid "Go to position" | ||
989 | 359 | msgstr "" | ||
990 | 360 | |||
991 | 361 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:31 | ||
992 | 362 | msgid "Choose a position between 1% and 100%" | ||
993 | 363 | msgstr "" | ||
994 | 364 | |||
995 | 365 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:62 | ||
996 | 366 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:58 | ||
997 | 367 | msgid "GO!" | ||
998 | 368 | msgstr "" | ||
999 | 369 | |||
1000 | 370 | #: ../src/app/qml/loView/LOViewPage.qml:129 | ||
1001 | 371 | msgid "LibreOffice binaries not found." | ||
1002 | 372 | msgstr "" | ||
1003 | 373 | |||
1004 | 374 | #: ../src/app/qml/loView/LOViewPage.qml:132 | ||
1005 | 375 | msgid "Error while loading LibreOffice." | ||
1006 | 376 | msgstr "" | ||
1007 | 377 | |||
1008 | 378 | #: ../src/app/qml/loView/LOViewPage.qml:135 | ||
1009 | 379 | msgid "" | ||
1010 | 380 | "Document not loaded.\n" | ||
1011 | 381 | "The requested document may be corrupt or protected by a password." | ||
1012 | 382 | msgstr "" | ||
1013 | 383 | |||
1014 | 384 | #. TRANSLATORS: 'LibreOfficeKit' is the name of the library used by | ||
1015 | 385 | #. Document Viewer for rendering LibreOffice/MS-Office documents. | ||
1016 | 386 | #. Ref. https://docs.libreoffice.org/libreofficekit.html | ||
1017 | 387 | #: ../src/app/qml/loView/Splashscreen.qml:45 | ||
1018 | 388 | msgid "Powered by LibreOfficeKit" | ||
1019 | 389 | msgstr "" | ||
1020 | 390 | |||
1021 | 391 | #: ../src/app/qml/loView/ZoomSelector.qml:110 | ||
1022 | 392 | msgid "Fit width" | ||
1023 | 393 | msgstr "" | ||
1024 | 394 | |||
1025 | 395 | #. TRANSLATORS: "Contents" refers to the "Table of Contents" of a PDF document. | ||
1026 | 396 | #: ../src/app/qml/pdfView/PdfContentsPage.qml:30 | ||
1027 | 397 | #: ../src/app/qml/pdfView/PdfView.qml:38 | ||
1028 | 398 | msgid "Contents" | ||
1029 | 399 | msgstr "" | ||
1030 | 400 | |||
1031 | 401 | #: ../src/app/qml/pdfView/PdfContentsPage.qml:36 | ||
1032 | 402 | msgid "Hide table of contents" | ||
1033 | 403 | msgstr "" | ||
1034 | 404 | |||
1035 | 405 | #. TRANSLATORS: the first argument (%1) refers to the page currently shown on the screen, | ||
1036 | 406 | #. while the second one (%2) refers to the total pages count. | ||
1037 | 407 | #: ../src/app/qml/pdfView/PdfView.qml:35 | ||
1038 | 408 | #, qt-format | ||
1039 | 409 | msgid "Page %1 of %2" | ||
1040 | 410 | msgstr "" | ||
1041 | 411 | |||
1042 | 412 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:71 | ||
1043 | 413 | msgid "Go to page..." | ||
1044 | 414 | msgstr "" | ||
1045 | 415 | |||
1046 | 416 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:26 | ||
1047 | 417 | msgid "Go to page" | ||
1048 | 418 | msgstr "" | ||
1049 | 419 | |||
1050 | 420 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:27 | ||
1051 | 421 | #, qt-format | ||
1052 | 422 | msgid "Choose a page between 1 and %1" | ||
1053 | 423 | msgstr "" | ||
1054 | 424 | |||
1055 | 425 | #: ../src/app/qml/ubuntu-docviewer-app.qml:118 | ||
1056 | 426 | msgid "File does not exist." | ||
1057 | 427 | msgstr "" | ||
1058 | 428 | |||
1059 | 429 | #. TRANSLATORS: This string is used for renaming a copied file, | ||
1060 | 430 | #. when a file with the same name already exists in user's | ||
1061 | 431 | #. Documents folder. | ||
1062 | 432 | #. | ||
1063 | 433 | #. e.g. "Manual_Aquaris_E4.5_ubuntu_EN.pdf" will become | ||
1064 | 434 | #. "Manual_Aquaris_E4.5_ubuntu_EN (copy 2).pdf" | ||
1065 | 435 | #. | ||
1066 | 436 | #. where "2" is given by the argument "%1" | ||
1067 | 437 | #. | ||
1068 | 438 | #: ../src/plugin/file-qml-plugin/docviewerutils.cpp:111 | ||
1069 | 439 | #, qt-format | ||
1070 | 440 | msgid "copy %1" | ||
1071 | 441 | msgstr "" | ||
1072 | 442 | |||
1073 | 443 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:1 | ||
1074 | 444 | msgid "Document Viewer" | ||
1075 | 445 | msgstr "" | ||
1076 | 446 | |||
1077 | 447 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:2 | ||
1078 | 448 | msgid "documents;viewer;pdf;reader;" | ||
1079 | 449 | msgstr "" | ||
1080 | 0 | 450 | ||
1081 | === removed file 'po/ro.po' | |||
1082 | --- po/ro.po 2016-01-05 05:47:43 +0000 | |||
1083 | +++ po/ro.po 1970-01-01 00:00:00 +0000 | |||
1084 | @@ -1,449 +0,0 @@ | |||
1085 | 1 | # Romanian translation for ubuntu-docviewer-app | ||
1086 | 2 | # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 | ||
1087 | 3 | # This file is distributed under the same license as the ubuntu-docviewer-app package. | ||
1088 | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, 2015. | ||
1089 | 5 | # | ||
1090 | 6 | msgid "" | ||
1091 | 7 | msgstr "" | ||
1092 | 8 | "Project-Id-Version: ubuntu-docviewer-app\n" | ||
1093 | 9 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" | ||
1094 | 10 | "POT-Creation-Date: 2015-12-27 13:06+0100\n" | ||
1095 | 11 | "PO-Revision-Date: 2015-12-23 20:27+0000\n" | ||
1096 | 12 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
1097 | 13 | "Language-Team: Romanian <ro@li.org>\n" | ||
1098 | 14 | "MIME-Version: 1.0\n" | ||
1099 | 15 | "Content-Type: text/plain; charset=UTF-8\n" | ||
1100 | 16 | "Content-Transfer-Encoding: 8bit\n" | ||
1101 | 17 | "Plural-Forms: nplurals=3; plural=(n == 1 ? 0: (((n % 100 > 19) || ((n % 100 " | ||
1102 | 18 | "== 0) && (n != 0))) ? 2: 1));\n" | ||
1103 | 19 | "X-Launchpad-Export-Date: 2016-01-05 05:47+0000\n" | ||
1104 | 20 | "X-Generator: Launchpad (build 17876)\n" | ||
1105 | 21 | |||
1106 | 22 | #: ../src/app/qml/common/CommandLineProxy.qml:49 | ||
1107 | 23 | msgid "Some of the provided arguments are not valid." | ||
1108 | 24 | msgstr "" | ||
1109 | 25 | |||
1110 | 26 | #: ../src/app/qml/common/CommandLineProxy.qml:58 | ||
1111 | 27 | msgid "Open ubuntu-docviewer-app displaying the selected file" | ||
1112 | 28 | msgstr "" | ||
1113 | 29 | |||
1114 | 30 | #: ../src/app/qml/common/CommandLineProxy.qml:65 | ||
1115 | 31 | msgid "Run fullscreen" | ||
1116 | 32 | msgstr "" | ||
1117 | 33 | |||
1118 | 34 | #: ../src/app/qml/common/CommandLineProxy.qml:71 | ||
1119 | 35 | msgid "Open ubuntu-docviewer-app in pick mode. Used for tests only." | ||
1120 | 36 | msgstr "" | ||
1121 | 37 | |||
1122 | 38 | #: ../src/app/qml/common/CommandLineProxy.qml:77 | ||
1123 | 39 | msgid "" | ||
1124 | 40 | "Show documents from the given folder, instead of ~/Documents.\n" | ||
1125 | 41 | "The path must exist prior to running ubuntu-docviewer-app" | ||
1126 | 42 | msgstr "" | ||
1127 | 43 | |||
1128 | 44 | #: ../src/app/qml/common/DetailsPage.qml:26 | ||
1129 | 45 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:107 | ||
1130 | 46 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:83 | ||
1131 | 47 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:69 | ||
1132 | 48 | msgid "Details" | ||
1133 | 49 | msgstr "" | ||
1134 | 50 | |||
1135 | 51 | #: ../src/app/qml/common/DetailsPage.qml:42 | ||
1136 | 52 | msgid "File" | ||
1137 | 53 | msgstr "" | ||
1138 | 54 | |||
1139 | 55 | #: ../src/app/qml/common/DetailsPage.qml:47 | ||
1140 | 56 | msgid "Location" | ||
1141 | 57 | msgstr "" | ||
1142 | 58 | |||
1143 | 59 | #: ../src/app/qml/common/DetailsPage.qml:52 | ||
1144 | 60 | msgid "Size" | ||
1145 | 61 | msgstr "" | ||
1146 | 62 | |||
1147 | 63 | #: ../src/app/qml/common/DetailsPage.qml:57 | ||
1148 | 64 | msgid "Created" | ||
1149 | 65 | msgstr "" | ||
1150 | 66 | |||
1151 | 67 | #: ../src/app/qml/common/DetailsPage.qml:62 | ||
1152 | 68 | msgid "Last modified" | ||
1153 | 69 | msgstr "" | ||
1154 | 70 | |||
1155 | 71 | #: ../src/app/qml/common/DetailsPage.qml:69 | ||
1156 | 72 | msgid "MIME type" | ||
1157 | 73 | msgstr "" | ||
1158 | 74 | |||
1159 | 75 | #: ../src/app/qml/common/ErrorDialog.qml:23 | ||
1160 | 76 | msgid "Error" | ||
1161 | 77 | msgstr "" | ||
1162 | 78 | |||
1163 | 79 | #: ../src/app/qml/common/ErrorDialog.qml:26 | ||
1164 | 80 | #: ../src/app/qml/common/PickImportedDialog.qml:54 | ||
1165 | 81 | #: ../src/app/qml/common/RejectedImportDialog.qml:38 | ||
1166 | 82 | #: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:31 | ||
1167 | 83 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:53 | ||
1168 | 84 | msgid "Close" | ||
1169 | 85 | msgstr "" | ||
1170 | 86 | |||
1171 | 87 | #: ../src/app/qml/common/PickImportedDialog.qml:29 | ||
1172 | 88 | msgid "Multiple documents imported" | ||
1173 | 89 | msgstr "" | ||
1174 | 90 | |||
1175 | 91 | #: ../src/app/qml/common/PickImportedDialog.qml:30 | ||
1176 | 92 | msgid "Choose which one to open:" | ||
1177 | 93 | msgstr "" | ||
1178 | 94 | |||
1179 | 95 | #: ../src/app/qml/common/RejectedImportDialog.qml:28 | ||
1180 | 96 | msgid "File not supported" | ||
1181 | 97 | msgid_plural "Files not supported" | ||
1182 | 98 | msgstr[0] "" | ||
1183 | 99 | msgstr[1] "" | ||
1184 | 100 | |||
1185 | 101 | #: ../src/app/qml/common/RejectedImportDialog.qml:29 | ||
1186 | 102 | msgid "Following document has not been imported:" | ||
1187 | 103 | msgid_plural "Following documents have not been imported:" | ||
1188 | 104 | msgstr[0] "" | ||
1189 | 105 | msgstr[1] "" | ||
1190 | 106 | |||
1191 | 107 | #: ../src/app/qml/common/UnknownTypeDialog.qml:27 | ||
1192 | 108 | msgid "Unknown file type" | ||
1193 | 109 | msgstr "" | ||
1194 | 110 | |||
1195 | 111 | #: ../src/app/qml/common/UnknownTypeDialog.qml:28 | ||
1196 | 112 | msgid "" | ||
1197 | 113 | "This file is not supported.\n" | ||
1198 | 114 | "Do you want to open it as a plain text?" | ||
1199 | 115 | msgstr "" | ||
1200 | 116 | |||
1201 | 117 | #: ../src/app/qml/common/UnknownTypeDialog.qml:38 | ||
1202 | 118 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:55 | ||
1203 | 119 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:28 | ||
1204 | 120 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:55 | ||
1205 | 121 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:51 | ||
1206 | 122 | msgid "Cancel" | ||
1207 | 123 | msgstr "" | ||
1208 | 124 | |||
1209 | 125 | #: ../src/app/qml/common/UnknownTypeDialog.qml:44 | ||
1210 | 126 | msgid "Yes" | ||
1211 | 127 | msgstr "" | ||
1212 | 128 | |||
1213 | 129 | #. TRANSLATORS: %1 is the size of a file, expressed in GB | ||
1214 | 130 | #: ../src/app/qml/common/utils.js:22 | ||
1215 | 131 | #, qt-format | ||
1216 | 132 | msgid "%1 GB" | ||
1217 | 133 | msgstr "" | ||
1218 | 134 | |||
1219 | 135 | #. TRANSLATORS: %1 is the size of a file, expressed in MB | ||
1220 | 136 | #: ../src/app/qml/common/utils.js:26 | ||
1221 | 137 | #, qt-format | ||
1222 | 138 | msgid "%1 MB" | ||
1223 | 139 | msgstr "" | ||
1224 | 140 | |||
1225 | 141 | #. TRANSLATORS: %1 is the size of a file, expressed in kB | ||
1226 | 142 | #: ../src/app/qml/common/utils.js:30 | ||
1227 | 143 | #, qt-format | ||
1228 | 144 | msgid "%1 kB" | ||
1229 | 145 | msgstr "" | ||
1230 | 146 | |||
1231 | 147 | #. TRANSLATORS: %1 is the size of a file, expressed in byte | ||
1232 | 148 | #: ../src/app/qml/common/utils.js:33 | ||
1233 | 149 | #, qt-format | ||
1234 | 150 | msgid "%1 byte" | ||
1235 | 151 | msgstr "" | ||
1236 | 152 | |||
1237 | 153 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:39 | ||
1238 | 154 | msgid "Delete file" | ||
1239 | 155 | msgstr "" | ||
1240 | 156 | |||
1241 | 157 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:40 | ||
1242 | 158 | #, qt-format | ||
1243 | 159 | msgid "Delete %1 file" | ||
1244 | 160 | msgid_plural "Delete %1 files" | ||
1245 | 161 | msgstr[0] "" | ||
1246 | 162 | msgstr[1] "" | ||
1247 | 163 | |||
1248 | 164 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:41 | ||
1249 | 165 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:42 | ||
1250 | 166 | msgid "Are you sure you want to permanently delete this file?" | ||
1251 | 167 | msgid_plural "Are you sure you want to permanently delete these files?" | ||
1252 | 168 | msgstr[0] "" | ||
1253 | 169 | msgstr[1] "" | ||
1254 | 170 | |||
1255 | 171 | #: ../src/app/qml/documentPage/DeleteFileDialog.qml:61 | ||
1256 | 172 | #: ../src/app/qml/documentPage/DocumentDelegateActions.qml:25 | ||
1257 | 173 | #: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:53 | ||
1258 | 174 | msgid "Delete" | ||
1259 | 175 | msgstr "" | ||
1260 | 176 | |||
1261 | 177 | #: ../src/app/qml/documentPage/DocumentDelegateActions.qml:44 | ||
1262 | 178 | msgid "Share" | ||
1263 | 179 | msgstr "" | ||
1264 | 180 | |||
1265 | 181 | #: ../src/app/qml/documentPage/DocumentEmptyState.qml:75 | ||
1266 | 182 | msgid "No document found" | ||
1267 | 183 | msgstr "" | ||
1268 | 184 | |||
1269 | 185 | #: ../src/app/qml/documentPage/DocumentEmptyState.qml:84 | ||
1270 | 186 | msgid "" | ||
1271 | 187 | "Connect your device to any computer and simply drag files to the Documents " | ||
1272 | 188 | "folder or insert removable media with documents." | ||
1273 | 189 | msgstr "" | ||
1274 | 190 | |||
1275 | 191 | #. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings. | ||
1276 | 192 | #. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum | ||
1277 | 193 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:100 | ||
1278 | 194 | #, qt-format | ||
1279 | 195 | msgid "Today, %1" | ||
1280 | 196 | msgstr "" | ||
1281 | 197 | |||
1282 | 198 | #. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings. | ||
1283 | 199 | #. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum | ||
1284 | 200 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:105 | ||
1285 | 201 | #, qt-format | ||
1286 | 202 | msgid "Yesterday, %1" | ||
1287 | 203 | msgstr "" | ||
1288 | 204 | |||
1289 | 205 | #. TRANSLATORS: this is a datetime formatting string, | ||
1290 | 206 | #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions. | ||
1291 | 207 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:112 | ||
1292 | 208 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:131 | ||
1293 | 209 | msgid "yyyy/MM/dd hh:mm" | ||
1294 | 210 | msgstr "" | ||
1295 | 211 | |||
1296 | 212 | #. TRANSLATORS: this is a datetime formatting string, | ||
1297 | 213 | #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions. | ||
1298 | 214 | #: ../src/app/qml/documentPage/DocumentListDelegate.qml:125 | ||
1299 | 215 | msgid "dddd, hh:mm" | ||
1300 | 216 | msgstr "" | ||
1301 | 217 | |||
1302 | 218 | #: ../src/app/qml/documentPage/DocumentPage.qml:23 | ||
1303 | 219 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:3 | ||
1304 | 220 | msgid "Documents" | ||
1305 | 221 | msgstr "" | ||
1306 | 222 | |||
1307 | 223 | #: ../src/app/qml/documentPage/DocumentPageDefaultHeader.qml:29 | ||
1308 | 224 | msgid "Search..." | ||
1309 | 225 | msgstr "" | ||
1310 | 226 | |||
1311 | 227 | #: ../src/app/qml/documentPage/DocumentPageDefaultHeader.qml:36 | ||
1312 | 228 | msgid "Sorting settings..." | ||
1313 | 229 | msgstr "" | ||
1314 | 230 | |||
1315 | 231 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:41 | ||
1316 | 232 | msgid "Switch to single column list" | ||
1317 | 233 | msgstr "" | ||
1318 | 234 | |||
1319 | 235 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:41 | ||
1320 | 236 | msgid "Switch to grid" | ||
1321 | 237 | msgstr "" | ||
1322 | 238 | |||
1323 | 239 | #: ../src/app/qml/documentPage/DocumentPagePickModeHeader.qml:49 | ||
1324 | 240 | msgid "Pick" | ||
1325 | 241 | msgstr "" | ||
1326 | 242 | |||
1327 | 243 | #: ../src/app/qml/documentPage/DocumentPageSearchHeader.qml:27 | ||
1328 | 244 | msgid "Back" | ||
1329 | 245 | msgstr "" | ||
1330 | 246 | |||
1331 | 247 | #: ../src/app/qml/documentPage/DocumentPageSearchHeader.qml:47 | ||
1332 | 248 | msgid "search in documents..." | ||
1333 | 249 | msgstr "" | ||
1334 | 250 | |||
1335 | 251 | #: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:40 | ||
1336 | 252 | msgid "Select None" | ||
1337 | 253 | msgstr "" | ||
1338 | 254 | |||
1339 | 255 | #: ../src/app/qml/documentPage/DocumentPageSelectionModeHeader.qml:40 | ||
1340 | 256 | msgid "Select All" | ||
1341 | 257 | msgstr "" | ||
1342 | 258 | |||
1343 | 259 | #: ../src/app/qml/documentPage/SearchEmptyState.qml:24 | ||
1344 | 260 | msgid "No matching document found" | ||
1345 | 261 | msgstr "" | ||
1346 | 262 | |||
1347 | 263 | #: ../src/app/qml/documentPage/SearchEmptyState.qml:26 | ||
1348 | 264 | msgid "" | ||
1349 | 265 | "Please ensure that your query is not misspelled and/or try a different query." | ||
1350 | 266 | msgstr "" | ||
1351 | 267 | |||
1352 | 268 | #: ../src/app/qml/documentPage/SectionHeader.qml:13 | ||
1353 | 269 | msgid "Today" | ||
1354 | 270 | msgstr "" | ||
1355 | 271 | |||
1356 | 272 | #: ../src/app/qml/documentPage/SectionHeader.qml:16 | ||
1357 | 273 | msgid "Yesterday" | ||
1358 | 274 | msgstr "" | ||
1359 | 275 | |||
1360 | 276 | #: ../src/app/qml/documentPage/SectionHeader.qml:19 | ||
1361 | 277 | msgid "Earlier this week" | ||
1362 | 278 | msgstr "" | ||
1363 | 279 | |||
1364 | 280 | #: ../src/app/qml/documentPage/SectionHeader.qml:22 | ||
1365 | 281 | msgid "Earlier this month" | ||
1366 | 282 | msgstr "" | ||
1367 | 283 | |||
1368 | 284 | #: ../src/app/qml/documentPage/SectionHeader.qml:24 | ||
1369 | 285 | msgid "Even earlier..." | ||
1370 | 286 | msgstr "" | ||
1371 | 287 | |||
1372 | 288 | #: ../src/app/qml/documentPage/SharePage.qml:23 | ||
1373 | 289 | msgid "Share to" | ||
1374 | 290 | msgstr "" | ||
1375 | 291 | |||
1376 | 292 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:26 | ||
1377 | 293 | msgid "Sorting settings" | ||
1378 | 294 | msgstr "" | ||
1379 | 295 | |||
1380 | 296 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:31 | ||
1381 | 297 | msgid "Sort by date (Latest first)" | ||
1382 | 298 | msgstr "" | ||
1383 | 299 | |||
1384 | 300 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:32 | ||
1385 | 301 | msgid "Sort by name (A-Z)" | ||
1386 | 302 | msgstr "" | ||
1387 | 303 | |||
1388 | 304 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:33 | ||
1389 | 305 | msgid "Sort by size (Smaller first)" | ||
1390 | 306 | msgstr "" | ||
1391 | 307 | |||
1392 | 308 | #: ../src/app/qml/documentPage/SortSettingsDialog.qml:47 | ||
1393 | 309 | msgid "Reverse order" | ||
1394 | 310 | msgstr "" | ||
1395 | 311 | |||
1396 | 312 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:51 | ||
1397 | 313 | #: ../src/app/qml/textView/TextView.qml:43 | ||
1398 | 314 | msgid "Loading..." | ||
1399 | 315 | msgstr "" | ||
1400 | 316 | |||
1401 | 317 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:55 | ||
1402 | 318 | msgid "LibreOffice text document" | ||
1403 | 319 | msgstr "" | ||
1404 | 320 | |||
1405 | 321 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:57 | ||
1406 | 322 | msgid "LibreOffice spread sheet" | ||
1407 | 323 | msgstr "" | ||
1408 | 324 | |||
1409 | 325 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:59 | ||
1410 | 326 | msgid "LibreOffice presentation" | ||
1411 | 327 | msgstr "" | ||
1412 | 328 | |||
1413 | 329 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:61 | ||
1414 | 330 | msgid "LibreOffice Draw document" | ||
1415 | 331 | msgstr "" | ||
1416 | 332 | |||
1417 | 333 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:63 | ||
1418 | 334 | msgid "Unknown LibreOffice document" | ||
1419 | 335 | msgstr "" | ||
1420 | 336 | |||
1421 | 337 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:65 | ||
1422 | 338 | msgid "Unknown type document" | ||
1423 | 339 | msgstr "" | ||
1424 | 340 | |||
1425 | 341 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:85 | ||
1426 | 342 | msgid "Go to position..." | ||
1427 | 343 | msgstr "" | ||
1428 | 344 | |||
1429 | 345 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:100 | ||
1430 | 346 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:77 | ||
1431 | 347 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:63 | ||
1432 | 348 | msgid "Disable night mode" | ||
1433 | 349 | msgstr "" | ||
1434 | 350 | |||
1435 | 351 | #: ../src/app/qml/loView/LOViewDefaultHeader.qml:100 | ||
1436 | 352 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:77 | ||
1437 | 353 | #: ../src/app/qml/textView/TextViewDefaultHeader.qml:63 | ||
1438 | 354 | msgid "Enable night mode" | ||
1439 | 355 | msgstr "" | ||
1440 | 356 | |||
1441 | 357 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:30 | ||
1442 | 358 | msgid "Go to position" | ||
1443 | 359 | msgstr "" | ||
1444 | 360 | |||
1445 | 361 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:31 | ||
1446 | 362 | msgid "Choose a position between 1% and 100%" | ||
1447 | 363 | msgstr "" | ||
1448 | 364 | |||
1449 | 365 | #: ../src/app/qml/loView/LOViewGotoDialog.qml:62 | ||
1450 | 366 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:58 | ||
1451 | 367 | msgid "GO!" | ||
1452 | 368 | msgstr "" | ||
1453 | 369 | |||
1454 | 370 | #: ../src/app/qml/loView/LOViewPage.qml:129 | ||
1455 | 371 | msgid "LibreOffice binaries not found." | ||
1456 | 372 | msgstr "" | ||
1457 | 373 | |||
1458 | 374 | #: ../src/app/qml/loView/LOViewPage.qml:132 | ||
1459 | 375 | msgid "Error while loading LibreOffice." | ||
1460 | 376 | msgstr "" | ||
1461 | 377 | |||
1462 | 378 | #: ../src/app/qml/loView/LOViewPage.qml:135 | ||
1463 | 379 | msgid "" | ||
1464 | 380 | "Document not loaded.\n" | ||
1465 | 381 | "The requested document may be corrupt or protected by a password." | ||
1466 | 382 | msgstr "" | ||
1467 | 383 | |||
1468 | 384 | #. TRANSLATORS: 'LibreOfficeKit' is the name of the library used by | ||
1469 | 385 | #. Document Viewer for rendering LibreOffice/MS-Office documents. | ||
1470 | 386 | #. Ref. https://docs.libreoffice.org/libreofficekit.html | ||
1471 | 387 | #: ../src/app/qml/loView/Splashscreen.qml:45 | ||
1472 | 388 | msgid "Powered by LibreOfficeKit" | ||
1473 | 389 | msgstr "" | ||
1474 | 390 | |||
1475 | 391 | #: ../src/app/qml/loView/ZoomSelector.qml:110 | ||
1476 | 392 | msgid "Fit width" | ||
1477 | 393 | msgstr "" | ||
1478 | 394 | |||
1479 | 395 | #. TRANSLATORS: "Contents" refers to the "Table of Contents" of a PDF document. | ||
1480 | 396 | #: ../src/app/qml/pdfView/PdfContentsPage.qml:30 | ||
1481 | 397 | #: ../src/app/qml/pdfView/PdfView.qml:38 | ||
1482 | 398 | msgid "Contents" | ||
1483 | 399 | msgstr "" | ||
1484 | 400 | |||
1485 | 401 | #: ../src/app/qml/pdfView/PdfContentsPage.qml:36 | ||
1486 | 402 | msgid "Hide table of contents" | ||
1487 | 403 | msgstr "" | ||
1488 | 404 | |||
1489 | 405 | #. TRANSLATORS: the first argument (%1) refers to the page currently shown on the screen, | ||
1490 | 406 | #. while the second one (%2) refers to the total pages count. | ||
1491 | 407 | #: ../src/app/qml/pdfView/PdfView.qml:35 | ||
1492 | 408 | #, qt-format | ||
1493 | 409 | msgid "Page %1 of %2" | ||
1494 | 410 | msgstr "" | ||
1495 | 411 | |||
1496 | 412 | #: ../src/app/qml/pdfView/PdfViewDefaultHeader.qml:71 | ||
1497 | 413 | msgid "Go to page..." | ||
1498 | 414 | msgstr "" | ||
1499 | 415 | |||
1500 | 416 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:26 | ||
1501 | 417 | msgid "Go to page" | ||
1502 | 418 | msgstr "" | ||
1503 | 419 | |||
1504 | 420 | #: ../src/app/qml/pdfView/PdfViewGotoDialog.qml:27 | ||
1505 | 421 | #, qt-format | ||
1506 | 422 | msgid "Choose a page between 1 and %1" | ||
1507 | 423 | msgstr "" | ||
1508 | 424 | |||
1509 | 425 | #: ../src/app/qml/ubuntu-docviewer-app.qml:118 | ||
1510 | 426 | msgid "File does not exist." | ||
1511 | 427 | msgstr "" | ||
1512 | 428 | |||
1513 | 429 | #. TRANSLATORS: This string is used for renaming a copied file, | ||
1514 | 430 | #. when a file with the same name already exists in user's | ||
1515 | 431 | #. Documents folder. | ||
1516 | 432 | #. | ||
1517 | 433 | #. e.g. "Manual_Aquaris_E4.5_ubuntu_EN.pdf" will become | ||
1518 | 434 | #. "Manual_Aquaris_E4.5_ubuntu_EN (copy 2).pdf" | ||
1519 | 435 | #. | ||
1520 | 436 | #. where "2" is given by the argument "%1" | ||
1521 | 437 | #. | ||
1522 | 438 | #: ../src/plugin/file-qml-plugin/docviewerutils.cpp:111 | ||
1523 | 439 | #, qt-format | ||
1524 | 440 | msgid "copy %1" | ||
1525 | 441 | msgstr "" | ||
1526 | 442 | |||
1527 | 443 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:1 | ||
1528 | 444 | msgid "Document Viewer" | ||
1529 | 445 | msgstr "" | ||
1530 | 446 | |||
1531 | 447 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:2 | ||
1532 | 448 | msgid "documents;viewer;pdf;reader;" | ||
1533 | 449 | msgstr "" | ||
1534 | 450 | 0 | ||
1535 | === modified file 'src/app/qml/common/ContentHubProxy.qml' | |||
1536 | --- src/app/qml/common/ContentHubProxy.qml 2015-10-10 12:03:30 +0000 | |||
1537 | +++ src/app/qml/common/ContentHubProxy.qml 2016-01-14 17:54:32 +0000 | |||
1538 | @@ -53,11 +53,11 @@ | |||
1539 | 53 | for (var i=0; i<activeTransfer.items.length; i++) { | 53 | for (var i=0; i<activeTransfer.items.length; i++) { |
1540 | 54 | var sourcePath = internal.getPathFromUrl(activeTransfer.items[i].url) | 54 | var sourcePath = internal.getPathFromUrl(activeTransfer.items[i].url) |
1541 | 55 | 55 | ||
1544 | 56 | if (DocumentViewer.isFileSupported(sourcePath)) { | 56 | if (FileUtils.isFileSupported(sourcePath)) { |
1545 | 57 | var documentsLocation = DocumentViewer.getXdgDocumentsLocation() | 57 | var documentsLocation = FileUtils.getXdgDocumentsLocation() |
1546 | 58 | 58 | ||
1547 | 59 | // Check if we have already imported the same document in the past. | 59 | // Check if we have already imported the same document in the past. |
1549 | 60 | var earlierImportedFile = DocumentViewer.checkIfFileAlreadyImported(sourcePath, [documentsLocation]) | 60 | var earlierImportedFile = FileUtils.checkIfFileAlreadyImported(sourcePath, [documentsLocation]) |
1550 | 61 | if (earlierImportedFile.length > 0) { | 61 | if (earlierImportedFile.length > 0) { |
1551 | 62 | // Document has been already imported in the past. | 62 | // Document has been already imported in the past. |
1552 | 63 | // Append the path of the earlier copy of the | 63 | // Append the path of the earlier copy of the |
1553 | @@ -65,7 +65,7 @@ | |||
1554 | 65 | importedDocsModel.append({ path: earlierImportedFile }) | 65 | importedDocsModel.append({ path: earlierImportedFile }) |
1555 | 66 | } else { | 66 | } else { |
1556 | 67 | // No document has been found, so we can safely copy it. | 67 | // No document has been found, so we can safely copy it. |
1558 | 68 | var destPath = DocumentViewer.buildDestinationPath(documentsLocation, sourcePath); | 68 | var destPath = FileUtils.buildDestinationPath(documentsLocation, sourcePath); |
1559 | 69 | 69 | ||
1560 | 70 | internal.importDocument(sourcePath, destPath) | 70 | internal.importDocument(sourcePath, destPath) |
1561 | 71 | } | 71 | } |
1562 | @@ -120,7 +120,7 @@ | |||
1563 | 120 | } | 120 | } |
1564 | 121 | 121 | ||
1565 | 122 | function importDocument(sourcePath, destPath) { | 122 | function importDocument(sourcePath, destPath) { |
1567 | 123 | DocumentViewer.copy(sourcePath, destPath) | 123 | FileUtils.copy(sourcePath, destPath) |
1568 | 124 | importedDocsModel.append({ path: destPath }) | 124 | importedDocsModel.append({ path: destPath }) |
1569 | 125 | } | 125 | } |
1570 | 126 | 126 | ||
1571 | 127 | 127 | ||
1572 | === modified file 'src/app/qml/common/DetailsPage.qml' | |||
1573 | --- src/app/qml/common/DetailsPage.qml 2015-12-27 12:10:06 +0000 | |||
1574 | +++ src/app/qml/common/DetailsPage.qml 2016-01-14 17:54:32 +0000 | |||
1575 | @@ -40,12 +40,12 @@ | |||
1576 | 40 | 40 | ||
1577 | 41 | SubtitledListItem { | 41 | SubtitledListItem { |
1578 | 42 | text: i18n.tr("File") | 42 | text: i18n.tr("File") |
1580 | 43 | subText: DocumentViewer.getFileNameFromPath(file.path) | 43 | subText: FileUtils.getFileNameFromPath(file.path) |
1581 | 44 | } | 44 | } |
1582 | 45 | 45 | ||
1583 | 46 | SubtitledListItem { | 46 | SubtitledListItem { |
1584 | 47 | text: i18n.tr("Location") | 47 | text: i18n.tr("Location") |
1586 | 48 | subText: DocumentViewer.getCanonicalPath(file.path) | 48 | subText: FileUtils.getCanonicalPath(file.path) |
1587 | 49 | } | 49 | } |
1588 | 50 | 50 | ||
1589 | 51 | SubtitledListItem { | 51 | SubtitledListItem { |
1590 | 52 | 52 | ||
1591 | === modified file 'src/app/qml/common/PickImportedDialog.qml' | |||
1592 | --- src/app/qml/common/PickImportedDialog.qml 2015-12-26 18:27:13 +0000 | |||
1593 | +++ src/app/qml/common/PickImportedDialog.qml 2016-01-14 17:54:32 +0000 | |||
1594 | @@ -40,7 +40,7 @@ | |||
1595 | 40 | } | 40 | } |
1596 | 41 | 41 | ||
1597 | 42 | Label { | 42 | Label { |
1599 | 43 | text: DocumentViewer.getFileBaseNameFromPath(model.path) | 43 | text: FileUtils.getFileBaseNameFromPath(model.path) |
1600 | 44 | anchors { | 44 | anchors { |
1601 | 45 | left: parent.left; right: parent.right | 45 | left: parent.left; right: parent.right |
1602 | 46 | margins: units.gu(2) | 46 | margins: units.gu(2) |
1603 | 47 | 47 | ||
1604 | === modified file 'src/app/qml/loView/LOViewDefaultHeader.qml' | |||
1605 | --- src/app/qml/loView/LOViewDefaultHeader.qml 2015-11-30 12:12:10 +0000 | |||
1606 | +++ src/app/qml/loView/LOViewDefaultHeader.qml 2016-01-14 17:54:32 +0000 | |||
1607 | @@ -73,7 +73,7 @@ | |||
1608 | 73 | Layout.preferredHeight: units.gu(4) | 73 | Layout.preferredHeight: units.gu(4) |
1609 | 74 | 74 | ||
1610 | 75 | view: targetPage.contentItem.loView | 75 | view: targetPage.contentItem.loView |
1612 | 76 | visible: targetPage.contentItem && (DocumentViewer.desktopMode || mainView.wideWindow) | 76 | visible: targetPage.contentItem && (ConvergenceUtils.desktopMode || mainView.wideWindow) |
1613 | 77 | } | 77 | } |
1614 | 78 | } | 78 | } |
1615 | 79 | 79 | ||
1616 | 80 | 80 | ||
1617 | === modified file 'src/app/qml/loView/LOViewPage.qml' | |||
1618 | --- src/app/qml/loView/LOViewPage.qml 2015-12-27 07:30:41 +0000 | |||
1619 | +++ src/app/qml/loView/LOViewPage.qml 2016-01-14 17:54:32 +0000 | |||
1620 | @@ -31,7 +31,7 @@ | |||
1621 | 31 | property bool isPresentation: loPage.contentItem && (loPage.contentItem.loDocument.documentType === LibreOffice.Document.PresentationDocument) | 31 | property bool isPresentation: loPage.contentItem && (loPage.contentItem.loDocument.documentType === LibreOffice.Document.PresentationDocument) |
1622 | 32 | property bool isTextDocument: loPage.contentItem && (loPage.contentItem.loDocument.documentType === LibreOffice.Document.TextDocument) | 32 | property bool isTextDocument: loPage.contentItem && (loPage.contentItem.loDocument.documentType === LibreOffice.Document.TextDocument) |
1623 | 33 | 33 | ||
1625 | 34 | title: DocumentViewer.getFileBaseNameFromPath(file.path); | 34 | title: FileUtils.getFileBaseNameFromPath(file.path); |
1626 | 35 | flickable: isTextDocument ? loPage.contentItem.loView : null | 35 | flickable: isTextDocument ? loPage.contentItem.loView : null |
1627 | 36 | 36 | ||
1628 | 37 | splashScreen: Splashscreen { } | 37 | splashScreen: Splashscreen { } |
1629 | 38 | 38 | ||
1630 | === modified file 'src/app/qml/pdfView/PdfView.qml' | |||
1631 | --- src/app/qml/pdfView/PdfView.qml 2016-01-14 17:54:32 +0000 | |||
1632 | +++ src/app/qml/pdfView/PdfView.qml 2016-01-14 17:54:32 +0000 | |||
1633 | @@ -16,12 +16,9 @@ | |||
1634 | 16 | 16 | ||
1635 | 17 | import QtQuick 2.4 | 17 | import QtQuick 2.4 |
1636 | 18 | import Ubuntu.Components 1.3 | 18 | import Ubuntu.Components 1.3 |
1637 | 19 | <<<<<<< TREE | ||
1638 | 20 | import DocumentViewer 1.0 | ||
1639 | 21 | ======= | ||
1640 | 22 | import Ubuntu.Components.Popups 1.3 | 19 | import Ubuntu.Components.Popups 1.3 |
1641 | 23 | import QtQuick.Layouts 1.1 | 20 | import QtQuick.Layouts 1.1 |
1643 | 24 | >>>>>>> MERGE-SOURCE | 21 | import DocumentViewer 1.0 |
1644 | 25 | import DocumentViewer.PDF 1.0 as PDF | 22 | import DocumentViewer.PDF 1.0 as PDF |
1645 | 26 | 23 | ||
1646 | 27 | import "../common" | 24 | import "../common" |
1647 | @@ -29,7 +26,7 @@ | |||
1648 | 29 | 26 | ||
1649 | 30 | Page { | 27 | Page { |
1650 | 31 | id: pdfPage | 28 | id: pdfPage |
1652 | 32 | title: DocumentViewer.getFileBaseNameFromPath(file.path) | 29 | title: FileUtils.getFileBaseNameFromPath(file.path) |
1653 | 33 | 30 | ||
1654 | 34 | header: PageHeader { | 31 | header: PageHeader { |
1655 | 35 | flickable: pdfView | 32 | flickable: pdfView |
1656 | 36 | 33 | ||
1657 | === modified file 'src/app/qml/textView/TextView.qml' | |||
1658 | --- src/app/qml/textView/TextView.qml 2015-12-26 18:27:13 +0000 | |||
1659 | +++ src/app/qml/textView/TextView.qml 2016-01-14 17:54:32 +0000 | |||
1660 | @@ -23,7 +23,7 @@ | |||
1661 | 23 | 23 | ||
1662 | 24 | Page { | 24 | Page { |
1663 | 25 | id: textPage | 25 | id: textPage |
1665 | 26 | title: DocumentViewer.getFileBaseNameFromPath(file.path) | 26 | title: FileUtils.getFileBaseNameFromPath(file.path) |
1666 | 27 | 27 | ||
1667 | 28 | // Reset night mode shader settings when closing the page | 28 | // Reset night mode shader settings when closing the page |
1668 | 29 | // Component.onDestruction: mainView.nightModeEnabled = false | 29 | // Component.onDestruction: mainView.nightModeEnabled = false |
1669 | 30 | 30 | ||
1670 | === modified file 'src/app/qml/ubuntu-docviewer-app.qml' | |||
1671 | --- src/app/qml/ubuntu-docviewer-app.qml 2015-11-30 12:12:10 +0000 | |||
1672 | +++ src/app/qml/ubuntu-docviewer-app.qml 2016-01-14 17:54:32 +0000 | |||
1673 | @@ -80,7 +80,7 @@ | |||
1674 | 80 | onIsLandscapeChanged: { | 80 | onIsLandscapeChanged: { |
1675 | 81 | // If device orientation is landscape and screen width is limited, | 81 | // If device orientation is landscape and screen width is limited, |
1676 | 82 | // force hiding Unity 8 indicators panel. | 82 | // force hiding Unity 8 indicators panel. |
1678 | 83 | if (!DocumentViewer.desktopMode && mainView.isLandscape && | 83 | if (!ConvergenceUtils.desktopMode && mainView.isLandscape && |
1679 | 84 | mainView.width < units.gu(51)) { | 84 | mainView.width < units.gu(51)) { |
1680 | 85 | mainView.fullscreen = true | 85 | mainView.fullscreen = true |
1681 | 86 | return; | 86 | return; |
1682 | @@ -202,6 +202,13 @@ | |||
1683 | 202 | } | 202 | } |
1684 | 203 | } | 203 | } |
1685 | 204 | 204 | ||
1686 | 205 | // WORKAROUND: Not yet implemented in the SDK | ||
1687 | 206 | Binding { | ||
1688 | 207 | target: QuickUtils | ||
1689 | 208 | property: "mouseAttached" | ||
1690 | 209 | value: ConvergenceUtils.mouseAttached | ||
1691 | 210 | } | ||
1692 | 211 | |||
1693 | 205 | property bool nightModeEnabled: false | 212 | property bool nightModeEnabled: false |
1694 | 206 | layer.effect: NightModeShader {} | 213 | layer.effect: NightModeShader {} |
1695 | 207 | layer.enabled: nightModeEnabled && (pageStack.depth > 1) | 214 | layer.enabled: nightModeEnabled && (pageStack.depth > 1) |
1696 | 208 | 215 | ||
1697 | === modified file 'src/plugin/file-qml-plugin/CMakeLists.txt' | |||
1698 | --- src/plugin/file-qml-plugin/CMakeLists.txt 2015-10-21 13:16:12 +0000 | |||
1699 | +++ src/plugin/file-qml-plugin/CMakeLists.txt 2016-01-14 17:54:32 +0000 | |||
1700 | @@ -1,23 +1,48 @@ | |||
1701 | 1 | # This includes a temporary snapshot of the WIP QInputInfo API as we | ||
1702 | 2 | # require this in docviewer now but upstream isn't finished yet. | ||
1703 | 3 | # Eventually this should be dropped in favor of the upstream | ||
1704 | 4 | # QInputInfo API. | ||
1705 | 5 | |||
1706 | 1 | set(PLUGIN_DIR DocumentViewer) | 6 | set(PLUGIN_DIR DocumentViewer) |
1707 | 2 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) | ||
1708 | 3 | 7 | ||
1709 | 4 | find_package(Qt5Core) | 8 | find_package(Qt5Core) |
1710 | 5 | find_package(Qt5Qml) | 9 | find_package(Qt5Qml) |
1711 | 6 | find_package(Qt5Quick) | 10 | find_package(Qt5Quick) |
1712 | 7 | 11 | ||
1713 | 12 | pkg_check_modules(LIBUDEV REQUIRED libudev) | ||
1714 | 13 | pkg_check_modules(LIBEVDEV REQUIRED libevdev) | ||
1715 | 14 | |||
1716 | 15 | include_directories( | ||
1717 | 16 | ${CMAKE_CURRENT_SOURCE_DIR} | ||
1718 | 17 | ${LIBUDEV_INCLUDE_DIRS} | ||
1719 | 18 | ${LIBEVDEV_INCLUDE_DIRS} | ||
1720 | 19 | InputInfo/ | ||
1721 | 20 | ) | ||
1722 | 21 | |||
1723 | 22 | # QInputInfo sources | ||
1724 | 23 | set(inputinfo_SRCS | ||
1725 | 24 | InputInfo/qinputinfo.cpp | ||
1726 | 25 | InputInfo/qinputinfo.h | ||
1727 | 26 | InputInfo/linux/qinputdeviceinfo_linux.cpp | ||
1728 | 27 | InputInfo/linux/qinputdeviceinfo_linux_p.h | ||
1729 | 28 | ) | ||
1730 | 29 | |||
1731 | 8 | #add the sources to compile | 30 | #add the sources to compile |
1732 | 9 | set(fileqmlplugin_SRCS | 31 | set(fileqmlplugin_SRCS |
1733 | 10 | backend.cpp | 32 | backend.cpp |
1734 | 11 | documentmodel.cpp | 33 | documentmodel.cpp |
1735 | 12 | fswatcher.cpp | 34 | fswatcher.cpp |
1736 | 13 | docviewerfile.cpp | 35 | docviewerfile.cpp |
1738 | 14 | docviewerutils.cpp | 36 | fileutils.cpp |
1739 | 37 | ubuntuconvergenceutils.cpp | ||
1740 | 15 | ) | 38 | ) |
1741 | 16 | 39 | ||
1742 | 17 | add_library(fileqmlplugin MODULE | 40 | add_library(fileqmlplugin MODULE |
1743 | 41 | ${inputinfo_SRCS} | ||
1744 | 18 | ${fileqmlplugin_SRCS} | 42 | ${fileqmlplugin_SRCS} |
1745 | 19 | ) | 43 | ) |
1746 | 20 | 44 | ||
1747 | 45 | target_link_libraries(fileqmlplugin ${LIBUDEV_LDFLAGS} ${LIBEVDEV_LDFLAGS} ) | ||
1748 | 21 | qt5_use_modules(fileqmlplugin Qml Quick) | 46 | qt5_use_modules(fileqmlplugin Qml Quick) |
1749 | 22 | 47 | ||
1750 | 23 | # Copy the plugin, the qmldir file and other assets to the build dir for running in QtCreator | 48 | # Copy the plugin, the qmldir file and other assets to the build dir for running in QtCreator |
1751 | 24 | 49 | ||
1752 | === added directory 'src/plugin/file-qml-plugin/InputInfo' | |||
1753 | === added file 'src/plugin/file-qml-plugin/InputInfo/CMakeLists.txt' | |||
1754 | --- src/plugin/file-qml-plugin/InputInfo/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1755 | +++ src/plugin/file-qml-plugin/InputInfo/CMakeLists.txt 2016-01-14 17:54:32 +0000 | |||
1756 | @@ -0,0 +1,39 @@ | |||
1757 | 1 | # This is a temporary snapshot of the WIP QInputInfo API as we | ||
1758 | 2 | # require this in unity now but upstream isn't finished yet. | ||
1759 | 3 | # Eventually this should be dropped in favor of the upstream | ||
1760 | 4 | # QInputInfo API. | ||
1761 | 5 | |||
1762 | 6 | project(InputInfo) | ||
1763 | 7 | |||
1764 | 8 | find_package(Qt5Core REQUIRED) | ||
1765 | 9 | find_package(Qt5Quick REQUIRED) | ||
1766 | 10 | |||
1767 | 11 | pkg_check_modules(LIBUDEV REQUIRED libudev) | ||
1768 | 12 | pkg_check_modules(LIBEVDEV REQUIRED libevdev) | ||
1769 | 13 | |||
1770 | 14 | include_directories( | ||
1771 | 15 | ${CMAKE_CURRENT_SOURCE_DIR} | ||
1772 | 16 | ${CMAKE_CURRENT_BINARY_DIR} | ||
1773 | 17 | ${LIBUDEV_INCLUDE_DIRS} | ||
1774 | 18 | ${LIBEVDEV_INCLUDE_DIRS} | ||
1775 | 19 | ) | ||
1776 | 20 | |||
1777 | 21 | set(InputInfo_SOURCES | ||
1778 | 22 | plugin.cpp | ||
1779 | 23 | qinputinfo.cpp | ||
1780 | 24 | qdeclarativeinputdevicemodel.cpp | ||
1781 | 25 | linux/qinputdeviceinfo_linux.cpp | ||
1782 | 26 | ) | ||
1783 | 27 | |||
1784 | 28 | add_library(InputInfo SHARED | ||
1785 | 29 | ${InputInfo_SOURCES} | ||
1786 | 30 | ) | ||
1787 | 31 | |||
1788 | 32 | target_link_libraries(InputInfo | ||
1789 | 33 | ${LIBUDEV_LDFLAGS} | ||
1790 | 34 | ${LIBEVDEV_LDFLAGS} | ||
1791 | 35 | ) | ||
1792 | 36 | |||
1793 | 37 | qt5_use_modules(InputInfo Core Qml Quick) | ||
1794 | 38 | |||
1795 | 39 | add_unity8_plugin(Unity.InputInfo 0.1 Unity/InputInfo TARGETS InputInfo) | ||
1796 | 0 | 40 | ||
1797 | === added directory 'src/plugin/file-qml-plugin/InputInfo/linux' | |||
1798 | === added file 'src/plugin/file-qml-plugin/InputInfo/linux/qinputdeviceinfo_linux.cpp' | |||
1799 | --- src/plugin/file-qml-plugin/InputInfo/linux/qinputdeviceinfo_linux.cpp 1970-01-01 00:00:00 +0000 | |||
1800 | +++ src/plugin/file-qml-plugin/InputInfo/linux/qinputdeviceinfo_linux.cpp 2016-01-14 17:54:32 +0000 | |||
1801 | @@ -0,0 +1,288 @@ | |||
1802 | 1 | /**************************************************************************** | ||
1803 | 2 | ** | ||
1804 | 3 | ** Copyright (C) 2014 Canonical, Ltd. and/or its subsidiary(-ies). | ||
1805 | 4 | ** Contact: http://www.qt-project.org/legal | ||
1806 | 5 | ** | ||
1807 | 6 | ** This file is part of the QtSystems module of the Qt Toolkit. | ||
1808 | 7 | ** | ||
1809 | 8 | ** $QT_BEGIN_LICENSE:LGPL$ | ||
1810 | 9 | ** Commercial License Usage | ||
1811 | 10 | ** Licensees holding valid commercial Qt licenses may use this file in | ||
1812 | 11 | ** accordance with the commercial license agreement provided with the | ||
1813 | 12 | ** Software or, alternatively, in accordance with the terms contained in | ||
1814 | 13 | ** a written agreement between you and Digia. For licensing terms and | ||
1815 | 14 | ** conditions see http://qt.digia.com/licensing. For further information | ||
1816 | 15 | ** use the contact form at http://qt.digia.com/contact-us. | ||
1817 | 16 | ** | ||
1818 | 17 | ** GNU Lesser General Public License Usage | ||
1819 | 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | ||
1820 | 19 | ** General Public License version 2.1 as published by the Free Software | ||
1821 | 20 | ** Foundation and appearing in the file LICENSE.LGPL included in the | ||
1822 | 21 | ** packaging of this file. Please review the following information to | ||
1823 | 22 | ** ensure the GNU Lesser General Public License version 2.1 requirements | ||
1824 | 23 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | ||
1825 | 24 | ** | ||
1826 | 25 | ** In addition, as a special exception, Digia gives you certain additional | ||
1827 | 26 | ** rights. These rights are described in the Digia Qt LGPL Exception | ||
1828 | 27 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | ||
1829 | 28 | ** | ||
1830 | 29 | ** GNU General Public License Usage | ||
1831 | 30 | ** Alternatively, this file may be used under the terms of the GNU | ||
1832 | 31 | ** General Public License version 3.0 as published by the Free Software | ||
1833 | 32 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
1834 | 33 | ** packaging of this file. Please review the following information to | ||
1835 | 34 | ** ensure the GNU General Public License version 3.0 requirements will be | ||
1836 | 35 | ** met: http://www.gnu.org/copyleft/gpl.html. | ||
1837 | 36 | ** | ||
1838 | 37 | ** | ||
1839 | 38 | ** $QT_END_LICENSE$ | ||
1840 | 39 | ** | ||
1841 | 40 | ****************************************************************************/ | ||
1842 | 41 | |||
1843 | 42 | #include "qinputdeviceinfo_linux_p.h" | ||
1844 | 43 | |||
1845 | 44 | #include <libudev.h> | ||
1846 | 45 | #include <libevdev/libevdev.h> | ||
1847 | 46 | #include <fcntl.h> | ||
1848 | 47 | #include <QDebug> | ||
1849 | 48 | #include <QSocketNotifier> | ||
1850 | 49 | #include <QTimer> | ||
1851 | 50 | #include <QDir> | ||
1852 | 51 | |||
1853 | 52 | QInputDeviceManagerPrivate::QInputDeviceManagerPrivate(QObject *parent) : | ||
1854 | 53 | QObject(parent), | ||
1855 | 54 | currentFilter(QInputDevice::Unknown), | ||
1856 | 55 | udevice(0) | ||
1857 | 56 | { | ||
1858 | 57 | QTimer::singleShot(250,this,SLOT(init())); | ||
1859 | 58 | } | ||
1860 | 59 | |||
1861 | 60 | QInputDeviceManagerPrivate::~QInputDeviceManagerPrivate() | ||
1862 | 61 | { | ||
1863 | 62 | udev_unref(udevice); | ||
1864 | 63 | udev_monitor_unref(udevMonitor); | ||
1865 | 64 | } | ||
1866 | 65 | |||
1867 | 66 | void QInputDeviceManagerPrivate::init() | ||
1868 | 67 | { | ||
1869 | 68 | if (!udevice) | ||
1870 | 69 | udevice = udev_new(); | ||
1871 | 70 | |||
1872 | 71 | udev_list_entry *devices; | ||
1873 | 72 | udev_list_entry *dev_list_entry; | ||
1874 | 73 | udev_device *dev; | ||
1875 | 74 | |||
1876 | 75 | QString subsystem = QStringLiteral("input"); | ||
1877 | 76 | struct udev_enumerate *enumerate = 0; | ||
1878 | 77 | |||
1879 | 78 | if (udevice) { | ||
1880 | 79 | |||
1881 | 80 | udevMonitor = udev_monitor_new_from_netlink(udevice, "udev"); | ||
1882 | 81 | udev_monitor_filter_add_match_subsystem_devtype(udevMonitor, subsystem.toLatin1(), NULL); | ||
1883 | 82 | enumerate = udev_enumerate_new(udevice); | ||
1884 | 83 | udev_enumerate_add_match_subsystem(enumerate, subsystem.toLatin1()); | ||
1885 | 84 | |||
1886 | 85 | udev_monitor_enable_receiving(udevMonitor); | ||
1887 | 86 | notifierFd = udev_monitor_get_fd(udevMonitor); | ||
1888 | 87 | |||
1889 | 88 | notifier = new QSocketNotifier(notifierFd, QSocketNotifier::Read, this); | ||
1890 | 89 | connect(notifier, SIGNAL(activated(int)), this, SLOT(onUDevChanges())); | ||
1891 | 90 | |||
1892 | 91 | udev_enumerate_scan_devices(enumerate); | ||
1893 | 92 | devices = udev_enumerate_get_list_entry(enumerate); | ||
1894 | 93 | |||
1895 | 94 | udev_list_entry_foreach(dev_list_entry, devices) { | ||
1896 | 95 | const char *path; | ||
1897 | 96 | path = udev_list_entry_get_name(dev_list_entry); | ||
1898 | 97 | |||
1899 | 98 | dev = udev_device_new_from_syspath(udevice, path); | ||
1900 | 99 | if (qstrcmp(udev_device_get_subsystem(dev), "input") == 0 ) { | ||
1901 | 100 | QInputDevice *iDevice = addDevice(dev); | ||
1902 | 101 | if (iDevice && !iDevice->devicePath().isEmpty()) { | ||
1903 | 102 | deviceMap.insert(iDevice->devicePath(),iDevice); | ||
1904 | 103 | } | ||
1905 | 104 | } | ||
1906 | 105 | udev_device_unref(dev); | ||
1907 | 106 | } | ||
1908 | 107 | udev_enumerate_unref(enumerate); | ||
1909 | 108 | } | ||
1910 | 109 | // udev_unref(udevice); | ||
1911 | 110 | Q_FOREACH (const QString &devicePath, deviceMap.keys()) { | ||
1912 | 111 | Q_EMIT deviceAdded(devicePath); | ||
1913 | 112 | } | ||
1914 | 113 | Q_EMIT ready(); | ||
1915 | 114 | } | ||
1916 | 115 | |||
1917 | 116 | QInputDevice::InputTypeFlags QInputDeviceManagerPrivate::getInputTypeFlags(struct udev_device *dev) | ||
1918 | 117 | { | ||
1919 | 118 | QInputDevice::InputTypeFlags flags = QInputDevice::Unknown; | ||
1920 | 119 | if (qstrcmp(udev_device_get_property_value(dev, "ID_INPUT_KEY"), "1") == 0 ) { | ||
1921 | 120 | flags |= QInputDevice::Button; | ||
1922 | 121 | } | ||
1923 | 122 | if (qstrcmp(udev_device_get_property_value(dev, "ID_INPUT_MOUSE"), "1") == 0) { | ||
1924 | 123 | flags |= QInputDevice::Mouse; | ||
1925 | 124 | } | ||
1926 | 125 | if (qstrcmp(udev_device_get_property_value(dev, "ID_INPUT_TOUCHPAD"), "1") == 0) { | ||
1927 | 126 | flags |= QInputDevice::TouchPad; | ||
1928 | 127 | } | ||
1929 | 128 | if (qstrcmp(udev_device_get_property_value(dev, "ID_INPUT_TOUCHSCREEN"), "1") == 0 | ||
1930 | 129 | || qstrcmp(udev_device_get_property_value(dev, "ID_INPUT_TABLET"), "1") == 0) { | ||
1931 | 130 | flags |= QInputDevice::TouchScreen; | ||
1932 | 131 | } | ||
1933 | 132 | if (qstrcmp(udev_device_get_property_value(dev, "ID_INPUT_KEYBOARD"), "1") == 0 ) { | ||
1934 | 133 | flags |= QInputDevice::Keyboard; | ||
1935 | 134 | } | ||
1936 | 135 | if (!QString::fromLatin1(udev_device_get_property_value(dev, "SW")).isEmpty()) { | ||
1937 | 136 | flags |= QInputDevice::Switch; | ||
1938 | 137 | } | ||
1939 | 138 | |||
1940 | 139 | return flags; | ||
1941 | 140 | } | ||
1942 | 141 | |||
1943 | 142 | QInputDevice *QInputDeviceManagerPrivate::addDevice(struct udev_device *udev) | ||
1944 | 143 | { | ||
1945 | 144 | QString eventPath = QString::fromLatin1(udev_device_get_sysname(udev)); | ||
1946 | 145 | |||
1947 | 146 | if (eventPath.contains(QStringLiteral("event"))) | ||
1948 | 147 | eventPath.prepend(QStringLiteral("/dev/input/")); | ||
1949 | 148 | |||
1950 | 149 | if (deviceMap.contains(eventPath)) { | ||
1951 | 150 | return Q_NULLPTR; | ||
1952 | 151 | } | ||
1953 | 152 | struct libevdev *dev = NULL; | ||
1954 | 153 | int fd; | ||
1955 | 154 | int rc = 1; | ||
1956 | 155 | QInputDevice *inputDevice; | ||
1957 | 156 | inputDevice = addUdevDevice(udev); | ||
1958 | 157 | if (!inputDevice) { | ||
1959 | 158 | return Q_NULLPTR; | ||
1960 | 159 | } | ||
1961 | 160 | eventPath = inputDevice->devicePath(); | ||
1962 | 161 | |||
1963 | 162 | fd = open(eventPath.toLatin1(), O_RDONLY|O_NONBLOCK); | ||
1964 | 163 | if (fd == -1) { | ||
1965 | 164 | return inputDevice; | ||
1966 | 165 | } | ||
1967 | 166 | rc = libevdev_new_from_fd(fd, &dev); | ||
1968 | 167 | if (rc < 0) { | ||
1969 | 168 | qWarning() << "Failed to init libevdev ("<< strerror(-rc) << ")"; | ||
1970 | 169 | return Q_NULLPTR; | ||
1971 | 170 | } | ||
1972 | 171 | |||
1973 | 172 | for (int i = 0; i < EV_MAX; i++) { | ||
1974 | 173 | if (i == EV_KEY || i == EV_SW || i == EV_REL | ||
1975 | 174 | || i == EV_REL || i == EV_ABS) { | ||
1976 | 175 | for (int j = 0; j < libevdev_event_type_get_max(i); j++) { | ||
1977 | 176 | if (libevdev_has_event_code(dev, i, j)) { | ||
1978 | 177 | switch (i) { | ||
1979 | 178 | case EV_KEY: | ||
1980 | 179 | inputDevice->addButton(j); | ||
1981 | 180 | break; | ||
1982 | 181 | case EV_SW: | ||
1983 | 182 | inputDevice->addSwitch(j); | ||
1984 | 183 | break; | ||
1985 | 184 | case EV_REL: | ||
1986 | 185 | inputDevice->addRelativeAxis(j); | ||
1987 | 186 | break; | ||
1988 | 187 | case EV_ABS: | ||
1989 | 188 | inputDevice->addAbsoluteAxis(j); | ||
1990 | 189 | break; | ||
1991 | 190 | }; | ||
1992 | 191 | } | ||
1993 | 192 | } | ||
1994 | 193 | } | ||
1995 | 194 | } | ||
1996 | 195 | |||
1997 | 196 | return inputDevice; | ||
1998 | 197 | } | ||
1999 | 198 | |||
2000 | 199 | void QInputDeviceManagerPrivate::addDetails(struct udev_device *) | ||
2001 | 200 | { | ||
2002 | 201 | } | ||
2003 | 202 | |||
2004 | 203 | void QInputDeviceManagerPrivate::removeDevice(const QString &path) | ||
2005 | 204 | { | ||
2006 | 205 | // this path is not a full evdev path | ||
2007 | 206 | Q_FOREACH (const QString devicePath, deviceMap.keys()) { | ||
2008 | 207 | if (devicePath.contains(path)) { | ||
2009 | 208 | deviceMap.remove(devicePath); | ||
2010 | 209 | Q_EMIT deviceRemoved(devicePath); | ||
2011 | 210 | } | ||
2012 | 211 | } | ||
2013 | 212 | } | ||
2014 | 213 | |||
2015 | 214 | QInputDevice *QInputDeviceManagerPrivate::addUdevDevice(struct udev_device *udev) | ||
2016 | 215 | { | ||
2017 | 216 | QInputDevice *iDevice; | ||
2018 | 217 | |||
2019 | 218 | struct udev_list_entry *list; | ||
2020 | 219 | struct udev_list_entry *node; | ||
2021 | 220 | |||
2022 | 221 | list = udev_device_get_properties_list_entry (udev); | ||
2023 | 222 | QString syspath = QString::fromLatin1(udev_device_get_syspath(udev)); | ||
2024 | 223 | QDir sysdir(syspath); | ||
2025 | 224 | |||
2026 | 225 | QStringList infoList = sysdir.entryList(QStringList() << QStringLiteral("event*"),QDir::Dirs); | ||
2027 | 226 | |||
2028 | 227 | if (infoList.count() > 0) { | ||
2029 | 228 | QString token = infoList.at(0); | ||
2030 | 229 | |||
2031 | 230 | token.prepend(QStringLiteral("/dev/input/")); | ||
2032 | 231 | iDevice = new QInputDevice(this); | ||
2033 | 232 | iDevice->setDevicePath(token); | ||
2034 | 233 | } else { | ||
2035 | 234 | return Q_NULLPTR; | ||
2036 | 235 | } | ||
2037 | 236 | udev_list_entry_foreach (node, list) { | ||
2038 | 237 | |||
2039 | 238 | QString key = QString::fromLatin1(udev_list_entry_get_name(node)); | ||
2040 | 239 | QString value = QString::fromLatin1(udev_list_entry_get_value(node)); | ||
2041 | 240 | |||
2042 | 241 | if (key == QStringLiteral("NAME")) { | ||
2043 | 242 | iDevice->setName(value.remove(QStringLiteral("\""))); | ||
2044 | 243 | } | ||
2045 | 244 | } | ||
2046 | 245 | iDevice->setType(getInputTypeFlags(udev)); | ||
2047 | 246 | return iDevice; | ||
2048 | 247 | } | ||
2049 | 248 | |||
2050 | 249 | void QInputDeviceManagerPrivate::onUDevChanges() | ||
2051 | 250 | { | ||
2052 | 251 | if (!udevMonitor) | ||
2053 | 252 | return; | ||
2054 | 253 | |||
2055 | 254 | udev_device *dev = udev_monitor_receive_device(udevMonitor); | ||
2056 | 255 | |||
2057 | 256 | if (dev) { | ||
2058 | 257 | if (qstrcmp(udev_device_get_subsystem(dev), "input") == 0 ) { | ||
2059 | 258 | QString eventPath = QString::fromLatin1(udev_device_get_sysname(dev)); | ||
2060 | 259 | |||
2061 | 260 | QString action = QString::fromStdString(udev_device_get_action(dev)); | ||
2062 | 261 | |||
2063 | 262 | if (!eventPath.contains(QStringLiteral("/dev/input/"))) | ||
2064 | 263 | eventPath.prepend(QStringLiteral("/dev/input/")); | ||
2065 | 264 | |||
2066 | 265 | if (action == QStringLiteral("add")) { | ||
2067 | 266 | if (deviceMap.contains(eventPath)){ | ||
2068 | 267 | udev_device_unref(dev); | ||
2069 | 268 | return; | ||
2070 | 269 | } | ||
2071 | 270 | |||
2072 | 271 | QInputDevice *iDevice = addDevice(dev); | ||
2073 | 272 | if (!iDevice) { | ||
2074 | 273 | delete iDevice; | ||
2075 | 274 | return; | ||
2076 | 275 | } | ||
2077 | 276 | iDevice->setType(getInputTypeFlags(dev)); | ||
2078 | 277 | udev_device_unref(dev); | ||
2079 | 278 | |||
2080 | 279 | deviceMap.insert(eventPath,iDevice); | ||
2081 | 280 | |||
2082 | 281 | Q_EMIT deviceAdded(eventPath); | ||
2083 | 282 | |||
2084 | 283 | } else if (action == QStringLiteral("remove")) { | ||
2085 | 284 | removeDevice(eventPath); | ||
2086 | 285 | } | ||
2087 | 286 | } | ||
2088 | 287 | } | ||
2089 | 288 | } | ||
2090 | 0 | 289 | ||
2091 | === added file 'src/plugin/file-qml-plugin/InputInfo/linux/qinputdeviceinfo_linux_p.h' | |||
2092 | --- src/plugin/file-qml-plugin/InputInfo/linux/qinputdeviceinfo_linux_p.h 1970-01-01 00:00:00 +0000 | |||
2093 | +++ src/plugin/file-qml-plugin/InputInfo/linux/qinputdeviceinfo_linux_p.h 2016-01-14 17:54:32 +0000 | |||
2094 | @@ -0,0 +1,98 @@ | |||
2095 | 1 | /**************************************************************************** | ||
2096 | 2 | ** | ||
2097 | 3 | ** Copyright (C) 2014 Canonical, Ltd. and/or its subsidiary(-ies). | ||
2098 | 4 | ** Contact: http://www.qt-project.org/legal | ||
2099 | 5 | ** | ||
2100 | 6 | ** This file is part of the QtSystems module of the Qt Toolkit. | ||
2101 | 7 | ** | ||
2102 | 8 | ** $QT_BEGIN_LICENSE:LGPL$ | ||
2103 | 9 | ** Commercial License Usage | ||
2104 | 10 | ** Licensees holding valid commercial Qt licenses may use this file in | ||
2105 | 11 | ** accordance with the commercial license agreement provided with the | ||
2106 | 12 | ** Software or, alternatively, in accordance with the terms contained in | ||
2107 | 13 | ** a written agreement between you and Digia. For licensing terms and | ||
2108 | 14 | ** conditions see http://qt.digia.com/licensing. For further information | ||
2109 | 15 | ** use the contact form at http://qt.digia.com/contact-us. | ||
2110 | 16 | ** | ||
2111 | 17 | ** GNU Lesser General Public License Usage | ||
2112 | 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | ||
2113 | 19 | ** General Public License version 2.1 as published by the Free Software | ||
2114 | 20 | ** Foundation and appearing in the file LICENSE.LGPL included in the | ||
2115 | 21 | ** packaging of this file. Please review the following information to | ||
2116 | 22 | ** ensure the GNU Lesser General Public License version 2.1 requirements | ||
2117 | 23 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | ||
2118 | 24 | ** | ||
2119 | 25 | ** In addition, as a special exception, Digia gives you certain additional | ||
2120 | 26 | ** rights. These rights are described in the Digia Qt LGPL Exception | ||
2121 | 27 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | ||
2122 | 28 | ** | ||
2123 | 29 | ** GNU General Public License Usage | ||
2124 | 30 | ** Alternatively, this file may be used under the terms of the GNU | ||
2125 | 31 | ** General Public License version 3.0 as published by the Free Software | ||
2126 | 32 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
2127 | 33 | ** packaging of this file. Please review the following information to | ||
2128 | 34 | ** ensure the GNU General Public License version 3.0 requirements will be | ||
2129 | 35 | ** met: http://www.gnu.org/copyleft/gpl.html. | ||
2130 | 36 | ** | ||
2131 | 37 | ** | ||
2132 | 38 | ** $QT_END_LICENSE$ | ||
2133 | 39 | ** | ||
2134 | 40 | ****************************************************************************/ | ||
2135 | 41 | |||
2136 | 42 | #ifndef QINPUTDEVICEINFO_LINUX_P_H | ||
2137 | 43 | #define QINPUTDEVICEINFO_LINUX_P_H | ||
2138 | 44 | |||
2139 | 45 | #include <QObject> | ||
2140 | 46 | #include "qinputinfo.h" | ||
2141 | 47 | #include <libudev.h> | ||
2142 | 48 | |||
2143 | 49 | class QInputDevicePrivate : public QObject | ||
2144 | 50 | { | ||
2145 | 51 | Q_OBJECT | ||
2146 | 52 | public: | ||
2147 | 53 | explicit QInputDevicePrivate(QObject *parent = 0); | ||
2148 | 54 | |||
2149 | 55 | QString name; | ||
2150 | 56 | QString devicePath; | ||
2151 | 57 | QList <int> buttons; //keys | ||
2152 | 58 | QList <int> switches; | ||
2153 | 59 | QList <int> relativeAxis; | ||
2154 | 60 | QList <int> absoluteAxis; | ||
2155 | 61 | QInputDevice::InputTypeFlags type; | ||
2156 | 62 | }; | ||
2157 | 63 | |||
2158 | 64 | class QInputDeviceManagerPrivate : public QObject | ||
2159 | 65 | { | ||
2160 | 66 | Q_OBJECT | ||
2161 | 67 | public: | ||
2162 | 68 | explicit QInputDeviceManagerPrivate(QObject *parent = 0); | ||
2163 | 69 | ~QInputDeviceManagerPrivate(); | ||
2164 | 70 | QVector <QInputDevice *> deviceList; | ||
2165 | 71 | QMap <QString, QInputDevice *> deviceMap; | ||
2166 | 72 | static QInputDeviceManagerPrivate * instance(); | ||
2167 | 73 | QInputDevice::InputType currentFilter; | ||
2168 | 74 | |||
2169 | 75 | Q_SIGNALS: | ||
2170 | 76 | void deviceAdded(const QString &); | ||
2171 | 77 | void deviceRemoved(const QString &); | ||
2172 | 78 | void ready(); | ||
2173 | 79 | |||
2174 | 80 | private: | ||
2175 | 81 | QInputDevice *addDevice(struct udev_device *udev); | ||
2176 | 82 | QInputDevice *addUdevDevice(struct udev_device *); | ||
2177 | 83 | |||
2178 | 84 | QInputDevice *addDevice(const QString &path); | ||
2179 | 85 | void removeDevice(const QString &path); | ||
2180 | 86 | QSocketNotifier *notifier; | ||
2181 | 87 | int notifierFd; | ||
2182 | 88 | struct udev_monitor *udevMonitor; | ||
2183 | 89 | QInputDevice::InputTypeFlags getInputTypeFlags(struct udev_device *); | ||
2184 | 90 | struct udev *udevice; | ||
2185 | 91 | void addDetails(struct udev_device *); | ||
2186 | 92 | |||
2187 | 93 | private Q_SLOTS: | ||
2188 | 94 | void onUDevChanges(); | ||
2189 | 95 | void init(); | ||
2190 | 96 | }; | ||
2191 | 97 | |||
2192 | 98 | #endif // QINPUTDEVICEINFO_LINUX_P_H | ||
2193 | 0 | 99 | ||
2194 | === added file 'src/plugin/file-qml-plugin/InputInfo/plugin.cpp' | |||
2195 | --- src/plugin/file-qml-plugin/InputInfo/plugin.cpp 1970-01-01 00:00:00 +0000 | |||
2196 | +++ src/plugin/file-qml-plugin/InputInfo/plugin.cpp 2016-01-14 17:54:32 +0000 | |||
2197 | @@ -0,0 +1,32 @@ | |||
2198 | 1 | /* | ||
2199 | 2 | * Copyright 2015 Canonical Ltd. | ||
2200 | 3 | * | ||
2201 | 4 | * This program is free software; you can redistribute it and/or modify | ||
2202 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
2203 | 6 | * the Free Software Foundation; version 3. | ||
2204 | 7 | * | ||
2205 | 8 | * This program is distributed in the hope that it will be useful, | ||
2206 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2207 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2208 | 11 | * GNU Lesser General Public License for more details. | ||
2209 | 12 | * | ||
2210 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
2211 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2212 | 15 | */ | ||
2213 | 16 | |||
2214 | 17 | // Qt | ||
2215 | 18 | #include <QtQml/qqml.h> | ||
2216 | 19 | |||
2217 | 20 | // self | ||
2218 | 21 | #include "plugin.h" | ||
2219 | 22 | |||
2220 | 23 | // local | ||
2221 | 24 | #include "qdeclarativeinputdevicemodel_p.h" | ||
2222 | 25 | |||
2223 | 26 | void InputInfoPlugin::registerTypes(const char *uri) | ||
2224 | 27 | { | ||
2225 | 28 | int major = 0; | ||
2226 | 29 | int minor = 1; | ||
2227 | 30 | qmlRegisterType<QDeclarativeInputDeviceModel>(uri, major, minor, "InputDeviceModel"); | ||
2228 | 31 | qmlRegisterType<QInputDevice>(uri, major, minor, "InputInfo"); | ||
2229 | 32 | } | ||
2230 | 0 | 33 | ||
2231 | === added file 'src/plugin/file-qml-plugin/InputInfo/plugin.h' | |||
2232 | --- src/plugin/file-qml-plugin/InputInfo/plugin.h 1970-01-01 00:00:00 +0000 | |||
2233 | +++ src/plugin/file-qml-plugin/InputInfo/plugin.h 2016-01-14 17:54:32 +0000 | |||
2234 | @@ -0,0 +1,30 @@ | |||
2235 | 1 | /* | ||
2236 | 2 | * Copyright 2015 Canonical Ltd. | ||
2237 | 3 | * | ||
2238 | 4 | * This program is free software; you can redistribute it and/or modify | ||
2239 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
2240 | 6 | * the Free Software Foundation; version 3. | ||
2241 | 7 | * | ||
2242 | 8 | * This program is distributed in the hope that it will be useful, | ||
2243 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2244 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2245 | 11 | * GNU Lesser General Public License for more details. | ||
2246 | 12 | * | ||
2247 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
2248 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2249 | 15 | */ | ||
2250 | 16 | |||
2251 | 17 | #ifndef INPUTINFO_PLUGIN_H | ||
2252 | 18 | #define INPUTINFO_PLUGIN_H | ||
2253 | 19 | |||
2254 | 20 | #include <QtQml/QQmlExtensionPlugin> | ||
2255 | 21 | |||
2256 | 22 | class InputInfoPlugin : public QQmlExtensionPlugin | ||
2257 | 23 | { | ||
2258 | 24 | Q_OBJECT | ||
2259 | 25 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") | ||
2260 | 26 | public: | ||
2261 | 27 | void registerTypes(const char *uri); | ||
2262 | 28 | }; | ||
2263 | 29 | |||
2264 | 30 | #endif // INPUTINFO_PLUGIN_H | ||
2265 | 0 | 31 | ||
2266 | === added file 'src/plugin/file-qml-plugin/InputInfo/qdeclarativeinputdevicemodel.cpp' | |||
2267 | --- src/plugin/file-qml-plugin/InputInfo/qdeclarativeinputdevicemodel.cpp 1970-01-01 00:00:00 +0000 | |||
2268 | +++ src/plugin/file-qml-plugin/InputInfo/qdeclarativeinputdevicemodel.cpp 2016-01-14 17:54:32 +0000 | |||
2269 | @@ -0,0 +1,196 @@ | |||
2270 | 1 | /**************************************************************************** | ||
2271 | 2 | ** | ||
2272 | 3 | ** Copyright (C) 2015 Jolla. | ||
2273 | 4 | ** Contact: http://www.qt-project.org/legal | ||
2274 | 5 | ** | ||
2275 | 6 | ** This file is part of the QtSystems module of the Qt Toolkit. | ||
2276 | 7 | ** | ||
2277 | 8 | ** $QT_BEGIN_LICENSE:LGPL$ | ||
2278 | 9 | ** Commercial License Usage | ||
2279 | 10 | ** Licensees holding valid commercial Qt licenses may use this file in | ||
2280 | 11 | ** accordance with the commercial license agreement provided with the | ||
2281 | 12 | ** Software or, alternatively, in accordance with the terms contained in | ||
2282 | 13 | ** a written agreement between you and Digia. For licensing terms and | ||
2283 | 14 | ** conditions see http://qt.digia.com/licensing. For further information | ||
2284 | 15 | ** use the contact form at http://qt.digia.com/contact-us. | ||
2285 | 16 | ** | ||
2286 | 17 | ** GNU Lesser General Public License Usage | ||
2287 | 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | ||
2288 | 19 | ** General Public License version 2.1 as published by the Free Software | ||
2289 | 20 | ** Foundation and appearing in the file LICENSE.LGPL included in the | ||
2290 | 21 | ** packaging of this file. Please review the following information to | ||
2291 | 22 | ** ensure the GNU Lesser General Public License version 2.1 requirements | ||
2292 | 23 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | ||
2293 | 24 | ** | ||
2294 | 25 | ** In addition, as a special exception, Digia gives you certain additional | ||
2295 | 26 | ** rights. These rights are described in the Digia Qt LGPL Exception | ||
2296 | 27 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | ||
2297 | 28 | ** | ||
2298 | 29 | ** GNU General Public License Usage | ||
2299 | 30 | ** Alternatively, this file may be used under the terms of the GNU | ||
2300 | 31 | ** General Public License version 3.0 as published by the Free Software | ||
2301 | 32 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
2302 | 33 | ** packaging of this file. Please review the following information to | ||
2303 | 34 | ** ensure the GNU General Public License version 3.0 requirements will be | ||
2304 | 35 | ** met: http://www.gnu.org/copyleft/gpl.html. | ||
2305 | 36 | ** | ||
2306 | 37 | ** | ||
2307 | 38 | ** $QT_END_LICENSE$ | ||
2308 | 39 | ** | ||
2309 | 40 | ****************************************************************************/ | ||
2310 | 41 | #include "qdeclarativeinputdevicemodel_p.h" | ||
2311 | 42 | #include "qinputinfo.h" | ||
2312 | 43 | |||
2313 | 44 | QDeclarativeInputDeviceModel::QDeclarativeInputDeviceModel(QObject *parent) : | ||
2314 | 45 | QAbstractListModel(parent), | ||
2315 | 46 | deviceInfo(new QInputDeviceManager), | ||
2316 | 47 | currentFilter(QInputDevice::Unknown) | ||
2317 | 48 | { | ||
2318 | 49 | connect(deviceInfo,SIGNAL(ready()),this,SLOT(updateDeviceList())); | ||
2319 | 50 | connect(deviceInfo, &QInputDeviceManager::deviceAdded,this,&QDeclarativeInputDeviceModel::addedDevice); | ||
2320 | 51 | connect(deviceInfo, &QInputDeviceManager::deviceRemoved,this,&QDeclarativeInputDeviceModel::removedDevice); | ||
2321 | 52 | } | ||
2322 | 53 | |||
2323 | 54 | QDeclarativeInputDeviceModel::~QDeclarativeInputDeviceModel() | ||
2324 | 55 | { | ||
2325 | 56 | delete deviceInfo; | ||
2326 | 57 | } | ||
2327 | 58 | |||
2328 | 59 | QVariant QDeclarativeInputDeviceModel::data(const QModelIndex &index, int role) const | ||
2329 | 60 | { | ||
2330 | 61 | switch (role) { | ||
2331 | 62 | case ServiceRole: | ||
2332 | 63 | return QVariant::fromValue(static_cast<QObject *>(inputDevices.value(index.row()))); | ||
2333 | 64 | break; | ||
2334 | 65 | case NameRole: | ||
2335 | 66 | return QVariant::fromValue(static_cast<QString>(inputDevices.value(index.row())->name())); | ||
2336 | 67 | break; | ||
2337 | 68 | case DevicePathRole: | ||
2338 | 69 | return QVariant::fromValue(static_cast<QString>(inputDevices.value(index.row())->devicePath())); | ||
2339 | 70 | break; | ||
2340 | 71 | case ButtonsRole: | ||
2341 | 72 | return QVariant::fromValue(static_cast<QList <int> >(inputDevices.value(index.row())->buttons())); | ||
2342 | 73 | break; | ||
2343 | 74 | case SwitchesRole: | ||
2344 | 75 | return QVariant::fromValue(static_cast<QList <int> >(inputDevices.value(index.row())->switches())); | ||
2345 | 76 | break; | ||
2346 | 77 | case RelativeAxisRole: | ||
2347 | 78 | return QVariant::fromValue(static_cast<QList <int> >(inputDevices.value(index.row())->relativeAxis())); | ||
2348 | 79 | break; | ||
2349 | 80 | case AbsoluteAxisRole: | ||
2350 | 81 | return QVariant::fromValue(static_cast<QList <int> >(inputDevices.value(index.row())->absoluteAxis())); | ||
2351 | 82 | break; | ||
2352 | 83 | case TypesRole: | ||
2353 | 84 | return QVariant::fromValue(static_cast<int>(inputDevices.value(index.row())->type())); | ||
2354 | 85 | break; | ||
2355 | 86 | }; | ||
2356 | 87 | |||
2357 | 88 | return QVariant(); | ||
2358 | 89 | } | ||
2359 | 90 | |||
2360 | 91 | int QDeclarativeInputDeviceModel::rowCount(const QModelIndex &parent) const | ||
2361 | 92 | { | ||
2362 | 93 | Q_UNUSED(parent); | ||
2363 | 94 | |||
2364 | 95 | return inputDevices.count(); | ||
2365 | 96 | } | ||
2366 | 97 | |||
2367 | 98 | int QDeclarativeInputDeviceModel::indexOf(const QString &devicePath) const | ||
2368 | 99 | { | ||
2369 | 100 | int idx(-1); | ||
2370 | 101 | Q_FOREACH (QInputDevice *device, inputDevices) { | ||
2371 | 102 | idx++; | ||
2372 | 103 | if (device->devicePath() == devicePath) return idx; | ||
2373 | 104 | } | ||
2374 | 105 | |||
2375 | 106 | return -1; | ||
2376 | 107 | } | ||
2377 | 108 | |||
2378 | 109 | QInputDevice *QDeclarativeInputDeviceModel::get(int index) const | ||
2379 | 110 | { | ||
2380 | 111 | if (index < 0 || index > inputDevices.count()) | ||
2381 | 112 | return 0; | ||
2382 | 113 | return inputDevices.value(index); | ||
2383 | 114 | } | ||
2384 | 115 | |||
2385 | 116 | void QDeclarativeInputDeviceModel::updateDeviceList() | ||
2386 | 117 | { | ||
2387 | 118 | QVector <QInputDevice *> newDevices = deviceInfo->deviceListOfType(currentFilter); | ||
2388 | 119 | |||
2389 | 120 | int numNew = newDevices.count(); | ||
2390 | 121 | |||
2391 | 122 | for (int i = 0; i < numNew; i++) { | ||
2392 | 123 | int j = inputDevices.indexOf(newDevices.value(i)); | ||
2393 | 124 | |||
2394 | 125 | if (j == -1) { | ||
2395 | 126 | beginInsertRows(QModelIndex(), i, i); | ||
2396 | 127 | inputDevices.insert(i, newDevices.value(i)); | ||
2397 | 128 | endInsertRows(); | ||
2398 | 129 | Q_EMIT countChanged(); | ||
2399 | 130 | } else if (i != j) { | ||
2400 | 131 | // changed its position -> move it | ||
2401 | 132 | QInputDevice* device = inputDevices.value(j); | ||
2402 | 133 | beginMoveRows(QModelIndex(), j, j, QModelIndex(), i); | ||
2403 | 134 | inputDevices.remove(j); | ||
2404 | 135 | inputDevices.insert(i, device); | ||
2405 | 136 | endMoveRows(); | ||
2406 | 137 | Q_EMIT countChanged(); | ||
2407 | 138 | } //else { | ||
2408 | 139 | QModelIndex changedIndex(this->index(j, 0, QModelIndex())); | ||
2409 | 140 | Q_EMIT dataChanged(changedIndex, changedIndex); | ||
2410 | 141 | } | ||
2411 | 142 | |||
2412 | 143 | int numOld = inputDevices.count(); | ||
2413 | 144 | if (numOld > numNew) { | ||
2414 | 145 | beginRemoveRows(QModelIndex(), numNew, numOld - 1); | ||
2415 | 146 | inputDevices.remove(numNew, numOld - numNew); | ||
2416 | 147 | endRemoveRows(); | ||
2417 | 148 | Q_EMIT countChanged(); | ||
2418 | 149 | } | ||
2419 | 150 | } | ||
2420 | 151 | |||
2421 | 152 | void QDeclarativeInputDeviceModel::addedDevice(const QString &devicePath) | ||
2422 | 153 | { | ||
2423 | 154 | updateDeviceList(); | ||
2424 | 155 | Q_EMIT deviceAdded(devicePath); | ||
2425 | 156 | } | ||
2426 | 157 | |||
2427 | 158 | void QDeclarativeInputDeviceModel::removedDevice(const QString &devicePath) | ||
2428 | 159 | { | ||
2429 | 160 | updateDeviceList(); | ||
2430 | 161 | Q_EMIT deviceRemoved(devicePath); | ||
2431 | 162 | } | ||
2432 | 163 | |||
2433 | 164 | QHash<int,QByteArray> QDeclarativeInputDeviceModel::roleNames() const | ||
2434 | 165 | { | ||
2435 | 166 | QHash<int, QByteArray> roles; | ||
2436 | 167 | roles[NameRole] = "name"; | ||
2437 | 168 | roles[DevicePathRole] = "devicePath"; | ||
2438 | 169 | roles[ButtonsRole] = "buttons"; | ||
2439 | 170 | roles[SwitchesRole] = "switches"; | ||
2440 | 171 | roles[RelativeAxisRole] = "rAxis"; | ||
2441 | 172 | roles[AbsoluteAxisRole] = "aAxis"; | ||
2442 | 173 | roles[TypesRole] = "types"; | ||
2443 | 174 | return roles; | ||
2444 | 175 | } | ||
2445 | 176 | |||
2446 | 177 | /* | ||
2447 | 178 | * Returns the currently set device filter. | ||
2448 | 179 | * */ | ||
2449 | 180 | QInputDevice::InputType QDeclarativeInputDeviceModel::deviceFilter() | ||
2450 | 181 | { | ||
2451 | 182 | return currentFilter; | ||
2452 | 183 | } | ||
2453 | 184 | |||
2454 | 185 | /* | ||
2455 | 186 | * Sets the current input device filter to filter. | ||
2456 | 187 | * */ | ||
2457 | 188 | void QDeclarativeInputDeviceModel::setDeviceFilter(QInputDevice::InputType filter) | ||
2458 | 189 | { | ||
2459 | 190 | if (filter != currentFilter) { | ||
2460 | 191 | deviceInfo->setDeviceFilter(filter); | ||
2461 | 192 | currentFilter = filter; | ||
2462 | 193 | updateDeviceList(); | ||
2463 | 194 | Q_EMIT deviceFilterChanged(filter); | ||
2464 | 195 | } | ||
2465 | 196 | } | ||
2466 | 0 | 197 | ||
2467 | === added file 'src/plugin/file-qml-plugin/InputInfo/qdeclarativeinputdevicemodel_p.h' | |||
2468 | --- src/plugin/file-qml-plugin/InputInfo/qdeclarativeinputdevicemodel_p.h 1970-01-01 00:00:00 +0000 | |||
2469 | +++ src/plugin/file-qml-plugin/InputInfo/qdeclarativeinputdevicemodel_p.h 2016-01-14 17:54:32 +0000 | |||
2470 | @@ -0,0 +1,102 @@ | |||
2471 | 1 | /**************************************************************************** | ||
2472 | 2 | ** | ||
2473 | 3 | ** Copyright (C) 2015 Jolla. | ||
2474 | 4 | ** Contact: http://www.qt-project.org/legal | ||
2475 | 5 | ** | ||
2476 | 6 | ** This file is part of the QtSystems module of the Qt Toolkit. | ||
2477 | 7 | ** | ||
2478 | 8 | ** $QT_BEGIN_LICENSE:LGPL$ | ||
2479 | 9 | ** Commercial License Usage | ||
2480 | 10 | ** Licensees holding valid commercial Qt licenses may use this file in | ||
2481 | 11 | ** accordance with the commercial license agreement provided with the | ||
2482 | 12 | ** Software or, alternatively, in accordance with the terms contained in | ||
2483 | 13 | ** a written agreement between you and Digia. For licensing terms and | ||
2484 | 14 | ** conditions see http://qt.digia.com/licensing. For further information | ||
2485 | 15 | ** use the contact form at http://qt.digia.com/contact-us. | ||
2486 | 16 | ** | ||
2487 | 17 | ** GNU Lesser General Public License Usage | ||
2488 | 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | ||
2489 | 19 | ** General Public License version 2.1 as published by the Free Software | ||
2490 | 20 | ** Foundation and appearing in the file LICENSE.LGPL included in the | ||
2491 | 21 | ** packaging of this file. Please review the following information to | ||
2492 | 22 | ** ensure the GNU Lesser General Public License version 2.1 requirements | ||
2493 | 23 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | ||
2494 | 24 | ** | ||
2495 | 25 | ** In addition, as a special exception, Digia gives you certain additional | ||
2496 | 26 | ** rights. These rights are described in the Digia Qt LGPL Exception | ||
2497 | 27 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | ||
2498 | 28 | ** | ||
2499 | 29 | ** GNU General Public License Usage | ||
2500 | 30 | ** Alternatively, this file may be used under the terms of the GNU | ||
2501 | 31 | ** General Public License version 3.0 as published by the Free Software | ||
2502 | 32 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
2503 | 33 | ** packaging of this file. Please review the following information to | ||
2504 | 34 | ** ensure the GNU General Public License version 3.0 requirements will be | ||
2505 | 35 | ** met: http://www.gnu.org/copyleft/gpl.html. | ||
2506 | 36 | ** | ||
2507 | 37 | ** | ||
2508 | 38 | ** $QT_END_LICENSE$ | ||
2509 | 39 | ** | ||
2510 | 40 | ****************************************************************************/ | ||
2511 | 41 | |||
2512 | 42 | #ifndef QDECLARATIVEINPUTDEVICEMODEL_H | ||
2513 | 43 | #define QDECLARATIVEINPUTDEVICEMODEL_H | ||
2514 | 44 | |||
2515 | 45 | #include <QObject> | ||
2516 | 46 | #include <QAbstractListModel> | ||
2517 | 47 | #include "qinputinfo.h" | ||
2518 | 48 | |||
2519 | 49 | class QDeclarativeInputDeviceModel : public QAbstractListModel | ||
2520 | 50 | { | ||
2521 | 51 | Q_OBJECT | ||
2522 | 52 | Q_DISABLE_COPY(QDeclarativeInputDeviceModel) | ||
2523 | 53 | Q_PROPERTY(QInputDevice::InputType deviceFilter READ deviceFilter WRITE setDeviceFilter NOTIFY deviceFilterChanged) | ||
2524 | 54 | |||
2525 | 55 | Q_PROPERTY(int count READ rowCount NOTIFY countChanged) | ||
2526 | 56 | |||
2527 | 57 | public: | ||
2528 | 58 | enum ItemRoles { | ||
2529 | 59 | ServiceRole = Qt::UserRole + 1, | ||
2530 | 60 | NameRole, | ||
2531 | 61 | DevicePathRole, | ||
2532 | 62 | ButtonsRole, | ||
2533 | 63 | SwitchesRole, | ||
2534 | 64 | RelativeAxisRole, | ||
2535 | 65 | AbsoluteAxisRole, | ||
2536 | 66 | TypesRole | ||
2537 | 67 | }; | ||
2538 | 68 | |||
2539 | 69 | explicit QDeclarativeInputDeviceModel(QObject *parent = 0); | ||
2540 | 70 | virtual ~QDeclarativeInputDeviceModel(); | ||
2541 | 71 | |||
2542 | 72 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; | ||
2543 | 73 | int rowCount(const QModelIndex &parent = QModelIndex()) const; | ||
2544 | 74 | |||
2545 | 75 | void setDeviceFilter(QInputDevice::InputType filter); | ||
2546 | 76 | QInputDevice::InputType deviceFilter(); | ||
2547 | 77 | |||
2548 | 78 | Q_INVOKABLE int indexOf(const QString &devicePath) const; | ||
2549 | 79 | |||
2550 | 80 | Q_INVOKABLE QInputDevice *get(int index) const; | ||
2551 | 81 | QHash<int, QByteArray> roleNames() const; | ||
2552 | 82 | |||
2553 | 83 | Q_SIGNALS: | ||
2554 | 84 | void deviceAdded(const QString &devicePath); | ||
2555 | 85 | void deviceRemoved(const QString &devicePath); | ||
2556 | 86 | void deviceFilterChanged(const QInputDevice::InputType filter); | ||
2557 | 87 | void countChanged(); | ||
2558 | 88 | |||
2559 | 89 | public Q_SLOTS: | ||
2560 | 90 | void updateDeviceList(); | ||
2561 | 91 | private: | ||
2562 | 92 | QInputDeviceManager *deviceInfo; | ||
2563 | 93 | QVector<QInputDevice *> inputDevices; | ||
2564 | 94 | QInputDevice::InputType currentFilter; | ||
2565 | 95 | |||
2566 | 96 | private Q_SLOTS: | ||
2567 | 97 | void addedDevice(const QString &); | ||
2568 | 98 | void removedDevice(const QString &path); | ||
2569 | 99 | |||
2570 | 100 | }; | ||
2571 | 101 | |||
2572 | 102 | #endif // QDECLARATIVEINPUTDEVICEMODEL_H | ||
2573 | 0 | 103 | ||
2574 | === added file 'src/plugin/file-qml-plugin/InputInfo/qinputinfo.cpp' | |||
2575 | --- src/plugin/file-qml-plugin/InputInfo/qinputinfo.cpp 1970-01-01 00:00:00 +0000 | |||
2576 | +++ src/plugin/file-qml-plugin/InputInfo/qinputinfo.cpp 2016-01-14 17:54:32 +0000 | |||
2577 | @@ -0,0 +1,270 @@ | |||
2578 | 1 | /**************************************************************************** | ||
2579 | 2 | ** | ||
2580 | 3 | ** Copyright (C) 2014 Canonical, Ltd. and/or its subsidiary(-ies). | ||
2581 | 4 | ** Contact: http://www.qt-project.org/legal | ||
2582 | 5 | ** | ||
2583 | 6 | ** This file is part of the QtSystems module of the Qt Toolkit. | ||
2584 | 7 | ** | ||
2585 | 8 | ** $QT_BEGIN_LICENSE:LGPL$ | ||
2586 | 9 | ** Commercial License Usage | ||
2587 | 10 | ** Licensees holding valid commercial Qt licenses may use this file in | ||
2588 | 11 | ** accordance with the commercial license agreement provided with the | ||
2589 | 12 | ** Software or, alternatively, in accordance with the terms contained in | ||
2590 | 13 | ** a written agreement between you and Digia. For licensing terms and | ||
2591 | 14 | ** conditions see http://qt.digia.com/licensing. For further information | ||
2592 | 15 | ** use the contact form at http://qt.digia.com/contact-us. | ||
2593 | 16 | ** | ||
2594 | 17 | ** GNU Lesser General Public License Usage | ||
2595 | 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | ||
2596 | 19 | ** General Public License version 2.1 as published by the Free Software | ||
2597 | 20 | ** Foundation and appearing in the file LICENSE.LGPL included in the | ||
2598 | 21 | ** packaging of this file. Please review the following information to | ||
2599 | 22 | ** ensure the GNU Lesser General Public License version 2.1 requirements | ||
2600 | 23 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | ||
2601 | 24 | ** | ||
2602 | 25 | ** In addition, as a special exception, Digia gives you certain additional | ||
2603 | 26 | ** rights. These rights are described in the Digia Qt LGPL Exception | ||
2604 | 27 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | ||
2605 | 28 | ** | ||
2606 | 29 | ** GNU General Public License Usage | ||
2607 | 30 | ** Alternatively, this file may be used under the terms of the GNU | ||
2608 | 31 | ** General Public License version 3.0 as published by the Free Software | ||
2609 | 32 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
2610 | 33 | ** packaging of this file. Please review the following information to | ||
2611 | 34 | ** ensure the GNU General Public License version 3.0 requirements will be | ||
2612 | 35 | ** met: http://www.gnu.org/copyleft/gpl.html. | ||
2613 | 36 | ** | ||
2614 | 37 | ** | ||
2615 | 38 | ** $QT_END_LICENSE$ | ||
2616 | 39 | ** | ||
2617 | 40 | ****************************************************************************/ | ||
2618 | 41 | |||
2619 | 42 | #include "qinputinfo.h" | ||
2620 | 43 | |||
2621 | 44 | #if defined(UNITY_MOCKS) | ||
2622 | 45 | #include "qinputdeviceinfo_mock_p.h" | ||
2623 | 46 | #elif defined(Q_OS_LINUX) | ||
2624 | 47 | #include "linux/qinputdeviceinfo_linux_p.h" | ||
2625 | 48 | #endif | ||
2626 | 49 | |||
2627 | 50 | Q_GLOBAL_STATIC(QInputDeviceManagerPrivate, inputDeviceManagerPrivate) | ||
2628 | 51 | |||
2629 | 52 | QT_BEGIN_NAMESPACE | ||
2630 | 53 | |||
2631 | 54 | QInputDeviceManagerPrivate * QInputDeviceManagerPrivate::instance() | ||
2632 | 55 | { | ||
2633 | 56 | QInputDeviceManagerPrivate *priv = inputDeviceManagerPrivate(); | ||
2634 | 57 | return priv; | ||
2635 | 58 | } | ||
2636 | 59 | |||
2637 | 60 | QInputDevicePrivate::QInputDevicePrivate(QObject *parent) : | ||
2638 | 61 | QObject(parent), | ||
2639 | 62 | type(QInputDevice::Unknown) | ||
2640 | 63 | { | ||
2641 | 64 | } | ||
2642 | 65 | |||
2643 | 66 | QInputDevice::QInputDevice(QObject *parent) : | ||
2644 | 67 | QObject(parent), | ||
2645 | 68 | d_ptr(new QInputDevicePrivate(this)) | ||
2646 | 69 | { | ||
2647 | 70 | } | ||
2648 | 71 | |||
2649 | 72 | /* | ||
2650 | 73 | * Returns the name of this input device. | ||
2651 | 74 | */ | ||
2652 | 75 | QString QInputDevice::name() const | ||
2653 | 76 | { | ||
2654 | 77 | return d_ptr->name; | ||
2655 | 78 | } | ||
2656 | 79 | |||
2657 | 80 | /* | ||
2658 | 81 | * Sets the name of this input device to \b name. | ||
2659 | 82 | */ | ||
2660 | 83 | void QInputDevice::setName(const QString &name) | ||
2661 | 84 | { | ||
2662 | 85 | d_ptr->name = name; | ||
2663 | 86 | } | ||
2664 | 87 | |||
2665 | 88 | /* | ||
2666 | 89 | * Returns the device path of this device. | ||
2667 | 90 | */ | ||
2668 | 91 | QString QInputDevice::devicePath() const | ||
2669 | 92 | { | ||
2670 | 93 | return d_ptr->devicePath; | ||
2671 | 94 | } | ||
2672 | 95 | |||
2673 | 96 | /* | ||
2674 | 97 | * Sets the device ppath of this device to /b path. | ||
2675 | 98 | */ | ||
2676 | 99 | void QInputDevice::setDevicePath(const QString &path) | ||
2677 | 100 | { | ||
2678 | 101 | d_ptr->devicePath = path; | ||
2679 | 102 | } | ||
2680 | 103 | |||
2681 | 104 | /* | ||
2682 | 105 | * Returns the number of buttons this device has. | ||
2683 | 106 | */ | ||
2684 | 107 | QList <int> QInputDevice::buttons() const | ||
2685 | 108 | { | ||
2686 | 109 | return d_ptr->buttons; | ||
2687 | 110 | } | ||
2688 | 111 | |||
2689 | 112 | /* | ||
2690 | 113 | * Adds a button | ||
2691 | 114 | */ | ||
2692 | 115 | void QInputDevice::addButton(int buttonCode) | ||
2693 | 116 | { | ||
2694 | 117 | d_ptr->buttons.append(buttonCode); | ||
2695 | 118 | } | ||
2696 | 119 | |||
2697 | 120 | /* | ||
2698 | 121 | * Returns the number of switch of this device. | ||
2699 | 122 | */ | ||
2700 | 123 | QList <int> QInputDevice::switches() const | ||
2701 | 124 | { | ||
2702 | 125 | return d_ptr->switches; | ||
2703 | 126 | } | ||
2704 | 127 | |||
2705 | 128 | /* | ||
2706 | 129 | * Adds a switch | ||
2707 | 130 | */ | ||
2708 | 131 | void QInputDevice::addSwitch(int switchCode) | ||
2709 | 132 | { | ||
2710 | 133 | d_ptr->switches.append(switchCode); | ||
2711 | 134 | } | ||
2712 | 135 | |||
2713 | 136 | /* | ||
2714 | 137 | * Returns a list of the relative axis of this device | ||
2715 | 138 | */ | ||
2716 | 139 | QList <int> QInputDevice::relativeAxis() const | ||
2717 | 140 | { | ||
2718 | 141 | return d_ptr->relativeAxis; | ||
2719 | 142 | } | ||
2720 | 143 | |||
2721 | 144 | /* | ||
2722 | 145 | */ | ||
2723 | 146 | void QInputDevice::addRelativeAxis(int axisCode) | ||
2724 | 147 | { | ||
2725 | 148 | d_ptr->relativeAxis.append(axisCode); | ||
2726 | 149 | } | ||
2727 | 150 | |||
2728 | 151 | /* | ||
2729 | 152 | * Returns a list of the absolute axis of this device | ||
2730 | 153 | */ | ||
2731 | 154 | QList <int> QInputDevice::absoluteAxis() const | ||
2732 | 155 | { | ||
2733 | 156 | return d_ptr->absoluteAxis; | ||
2734 | 157 | } | ||
2735 | 158 | |||
2736 | 159 | /* | ||
2737 | 160 | */ | ||
2738 | 161 | void QInputDevice::addAbsoluteAxis(int axisCode) | ||
2739 | 162 | { | ||
2740 | 163 | d_ptr->absoluteAxis.append(axisCode); | ||
2741 | 164 | } | ||
2742 | 165 | |||
2743 | 166 | /* | ||
2744 | 167 | * Returns a QInputDevice::InputTypeFlags of all the types of types. | ||
2745 | 168 | */ | ||
2746 | 169 | QInputDevice::InputTypeFlags QInputDevice::type() const | ||
2747 | 170 | { | ||
2748 | 171 | return d_ptr->type; | ||
2749 | 172 | } | ||
2750 | 173 | |||
2751 | 174 | /* | ||
2752 | 175 | */ | ||
2753 | 176 | void QInputDevice::setType(QInputDevice::InputTypeFlags type) //? setTypes? | ||
2754 | 177 | { | ||
2755 | 178 | d_ptr->type = type; | ||
2756 | 179 | } | ||
2757 | 180 | |||
2758 | 181 | QInputDeviceManager::QInputDeviceManager(QObject *parent) : | ||
2759 | 182 | QObject(parent), | ||
2760 | 183 | d_ptr(inputDeviceManagerPrivate) | ||
2761 | 184 | { | ||
2762 | 185 | connect(d_ptr, &QInputDeviceManagerPrivate::deviceAdded,this,&QInputDeviceManager::addedDevice); | ||
2763 | 186 | connect(d_ptr, &QInputDeviceManagerPrivate::deviceRemoved,this,&QInputDeviceManager::deviceRemoved); | ||
2764 | 187 | |||
2765 | 188 | connect(d_ptr,SIGNAL(ready()),this,SIGNAL(ready())); | ||
2766 | 189 | } | ||
2767 | 190 | |||
2768 | 191 | /* | ||
2769 | 192 | * Returns a QMap of known input devices. | ||
2770 | 193 | */ | ||
2771 | 194 | QMap <QString, QInputDevice *> QInputDeviceManager::deviceMap() | ||
2772 | 195 | { | ||
2773 | 196 | return d_ptr->deviceMap; | ||
2774 | 197 | } | ||
2775 | 198 | |||
2776 | 199 | /* | ||
2777 | 200 | */ | ||
2778 | 201 | void QInputDeviceManager::addedDevice(const QString & devicePath) | ||
2779 | 202 | { | ||
2780 | 203 | Q_EMIT deviceAdded(devicePath); | ||
2781 | 204 | } | ||
2782 | 205 | |||
2783 | 206 | /* | ||
2784 | 207 | * Returns a QVector of InputDevices of type filter | ||
2785 | 208 | * */ | ||
2786 | 209 | QVector <QInputDevice *> QInputDeviceManager::deviceListOfType(QInputDevice::InputType filter) | ||
2787 | 210 | { | ||
2788 | 211 | QVector <QInputDevice *> dList; | ||
2789 | 212 | QMapIterator<QString, QInputDevice *> i(d_ptr->deviceMap); | ||
2790 | 213 | while (i.hasNext()) { | ||
2791 | 214 | i.next(); | ||
2792 | 215 | if (i.value()->type().testFlag(filter) || filter == QInputDevice::Unknown) { | ||
2793 | 216 | dList.append(i.value()); | ||
2794 | 217 | } | ||
2795 | 218 | } | ||
2796 | 219 | return dList; | ||
2797 | 220 | } | ||
2798 | 221 | |||
2799 | 222 | /* | ||
2800 | 223 | * Returns the number of input devices with the currently set QInputDevice::InputType filter. | ||
2801 | 224 | * If no device filter has been set, returns number of all available input devices. | ||
2802 | 225 | * If filter has not been set, returns all available input devices | ||
2803 | 226 | */ | ||
2804 | 227 | int QInputDeviceManager::deviceCount() const | ||
2805 | 228 | { | ||
2806 | 229 | return deviceCount(static_cast< QInputDevice::InputType >(d_ptr->currentFilter)); | ||
2807 | 230 | } | ||
2808 | 231 | |||
2809 | 232 | /* | ||
2810 | 233 | * Returns the number of input devices of the type filter. | ||
2811 | 234 | */ | ||
2812 | 235 | int QInputDeviceManager::deviceCount(const QInputDevice::InputType filter) const | ||
2813 | 236 | { | ||
2814 | 237 | int dList = 0; | ||
2815 | 238 | QMapIterator<QString, QInputDevice *> i(d_ptr->deviceMap); | ||
2816 | 239 | while (i.hasNext()) { | ||
2817 | 240 | i.next(); | ||
2818 | 241 | // qDebug() << i.value()->name() << i.value()->devicePath(); | ||
2819 | 242 | // qDebug() << i.value()->type() << i.value()->type().testFlag(filter); | ||
2820 | 243 | |||
2821 | 244 | if (i.value()->type().testFlag(filter)) { | ||
2822 | 245 | dList++; | ||
2823 | 246 | } | ||
2824 | 247 | } | ||
2825 | 248 | return dList; | ||
2826 | 249 | } | ||
2827 | 250 | |||
2828 | 251 | /* | ||
2829 | 252 | * Returns the currently set device filter. | ||
2830 | 253 | * */ | ||
2831 | 254 | QInputDevice::InputType QInputDeviceManager::deviceFilter() | ||
2832 | 255 | { | ||
2833 | 256 | return d_ptr->currentFilter; | ||
2834 | 257 | } | ||
2835 | 258 | |||
2836 | 259 | /* | ||
2837 | 260 | * Sets the current input device filter to filter. | ||
2838 | 261 | * */ | ||
2839 | 262 | void QInputDeviceManager::setDeviceFilter(QInputDevice::InputType filter) | ||
2840 | 263 | { | ||
2841 | 264 | if (filter != d_ptr->currentFilter) { | ||
2842 | 265 | d_ptr->currentFilter = filter; | ||
2843 | 266 | Q_EMIT deviceFilterChanged(filter); | ||
2844 | 267 | } | ||
2845 | 268 | } | ||
2846 | 269 | |||
2847 | 270 | QT_END_NAMESPACE | ||
2848 | 0 | 271 | ||
2849 | === added file 'src/plugin/file-qml-plugin/InputInfo/qinputinfo.h' | |||
2850 | --- src/plugin/file-qml-plugin/InputInfo/qinputinfo.h 1970-01-01 00:00:00 +0000 | |||
2851 | +++ src/plugin/file-qml-plugin/InputInfo/qinputinfo.h 2016-01-14 17:54:32 +0000 | |||
2852 | @@ -0,0 +1,143 @@ | |||
2853 | 1 | /**************************************************************************** | ||
2854 | 2 | ** | ||
2855 | 3 | ** Copyright (C) 2014 Canonical, Ltd. and/or its subsidiary(-ies). | ||
2856 | 4 | ** Contact: http://www.qt-project.org/legal | ||
2857 | 5 | ** | ||
2858 | 6 | ** This file is part of the QtSystems module of the Qt Toolkit. | ||
2859 | 7 | ** | ||
2860 | 8 | ** $QT_BEGIN_LICENSE:LGPL$ | ||
2861 | 9 | ** Commercial License Usage | ||
2862 | 10 | ** Licensees holding valid commercial Qt licenses may use this file in | ||
2863 | 11 | ** accordance with the commercial license agreement provided with the | ||
2864 | 12 | ** Software or, alternatively, in accordance with the terms contained in | ||
2865 | 13 | ** a written agreement between you and Digia. For licensing terms and | ||
2866 | 14 | ** conditions see http://qt.digia.com/licensing. For further information | ||
2867 | 15 | ** use the contact form at http://qt.digia.com/contact-us. | ||
2868 | 16 | ** | ||
2869 | 17 | ** GNU Lesser General Public License Usage | ||
2870 | 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | ||
2871 | 19 | ** General Public License version 2.1 as published by the Free Software | ||
2872 | 20 | ** Foundation and appearing in the file LICENSE.LGPL included in the | ||
2873 | 21 | ** packaging of this file. Please review the following information to | ||
2874 | 22 | ** ensure the GNU Lesser General Public License version 2.1 requirements | ||
2875 | 23 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | ||
2876 | 24 | ** | ||
2877 | 25 | ** In addition, as a special exception, Digia gives you certain additional | ||
2878 | 26 | ** rights. These rights are described in the Digia Qt LGPL Exception | ||
2879 | 27 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | ||
2880 | 28 | ** | ||
2881 | 29 | ** GNU General Public License Usage | ||
2882 | 30 | ** Alternatively, this file may be used under the terms of the GNU | ||
2883 | 31 | ** General Public License version 3.0 as published by the Free Software | ||
2884 | 32 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
2885 | 33 | ** packaging of this file. Please review the following information to | ||
2886 | 34 | ** ensure the GNU General Public License version 3.0 requirements will be | ||
2887 | 35 | ** met: http://www.gnu.org/copyleft/gpl.html. | ||
2888 | 36 | ** | ||
2889 | 37 | ** | ||
2890 | 38 | ** $QT_END_LICENSE$ | ||
2891 | 39 | ** | ||
2892 | 40 | ****************************************************************************/ | ||
2893 | 41 | |||
2894 | 42 | #ifndef QINPUTINFO_H | ||
2895 | 43 | #define QINPUTINFO_H | ||
2896 | 44 | |||
2897 | 45 | #include <QObject> | ||
2898 | 46 | #include <QVector> | ||
2899 | 47 | #include <QMap> | ||
2900 | 48 | #include <QSocketNotifier> | ||
2901 | 49 | #include <QDebug> | ||
2902 | 50 | |||
2903 | 51 | class QInputDeviceManagerPrivate; | ||
2904 | 52 | class QInputDevicePrivate; | ||
2905 | 53 | class QInputDevice; | ||
2906 | 54 | |||
2907 | 55 | class QInputDeviceManager; | ||
2908 | 56 | |||
2909 | 57 | class QInputDevice : public QObject | ||
2910 | 58 | { | ||
2911 | 59 | Q_OBJECT | ||
2912 | 60 | Q_ENUMS(InputType) | ||
2913 | 61 | Q_FLAGS(InputType InputTypeFlags) | ||
2914 | 62 | friend class QInputDeviceManagerPrivate; | ||
2915 | 63 | |||
2916 | 64 | public: | ||
2917 | 65 | |||
2918 | 66 | enum InputType { | ||
2919 | 67 | Unknown = 0, | ||
2920 | 68 | Button = 1, | ||
2921 | 69 | Mouse = 2, | ||
2922 | 70 | TouchPad = 4, | ||
2923 | 71 | TouchScreen = 8, | ||
2924 | 72 | Keyboard = 16, | ||
2925 | 73 | Switch = 32 | ||
2926 | 74 | }; | ||
2927 | 75 | Q_ENUMS(InputType) | ||
2928 | 76 | Q_DECLARE_FLAGS(InputTypeFlags, InputType) | ||
2929 | 77 | |||
2930 | 78 | explicit QInputDevice(QObject *parent = 0); | ||
2931 | 79 | QString name() const; | ||
2932 | 80 | QString devicePath() const; | ||
2933 | 81 | QList <int> buttons() const; //keys event code | ||
2934 | 82 | QList <int> switches() const; | ||
2935 | 83 | QList <int> relativeAxis() const; | ||
2936 | 84 | QList <int> absoluteAxis() const; | ||
2937 | 85 | QInputDevice::InputTypeFlags type() const; | ||
2938 | 86 | |||
2939 | 87 | private: | ||
2940 | 88 | |||
2941 | 89 | QInputDevicePrivate *d_ptr; | ||
2942 | 90 | void setName(const QString &); | ||
2943 | 91 | void setDevicePath(const QString &); | ||
2944 | 92 | void addButton(int); | ||
2945 | 93 | void addSwitch(int); | ||
2946 | 94 | void addRelativeAxis(int); | ||
2947 | 95 | void addAbsoluteAxis(int); | ||
2948 | 96 | void setType(QInputDevice::InputTypeFlags flags); | ||
2949 | 97 | |||
2950 | 98 | }; | ||
2951 | 99 | |||
2952 | 100 | Q_DECLARE_METATYPE(QInputDevice::InputType) | ||
2953 | 101 | Q_DECLARE_METATYPE(QInputDevice::InputTypeFlags) | ||
2954 | 102 | |||
2955 | 103 | class QInputDeviceManagerPrivate; | ||
2956 | 104 | |||
2957 | 105 | class QInputDeviceManager : public QObject | ||
2958 | 106 | { | ||
2959 | 107 | Q_OBJECT | ||
2960 | 108 | Q_PROPERTY(int deviceCount READ deviceCount NOTIFY deviceCountChanged) | ||
2961 | 109 | Q_PROPERTY(QInputDevice::InputType deviceFilter READ deviceFilter WRITE setDeviceFilter NOTIFY deviceFilterChanged) | ||
2962 | 110 | public: | ||
2963 | 111 | |||
2964 | 112 | explicit QInputDeviceManager(QObject *parent = 0); | ||
2965 | 113 | |||
2966 | 114 | int deviceCount() const; | ||
2967 | 115 | int deviceCount(const QInputDevice::InputType filter) const; | ||
2968 | 116 | |||
2969 | 117 | void setDeviceFilter(QInputDevice::InputType filter); | ||
2970 | 118 | QInputDevice::InputType deviceFilter(); | ||
2971 | 119 | |||
2972 | 120 | QMap <QString, QInputDevice *> deviceMap(); | ||
2973 | 121 | Q_INVOKABLE QVector <QInputDevice *> deviceListOfType(QInputDevice::InputType filter); | ||
2974 | 122 | |||
2975 | 123 | Q_SIGNALS: | ||
2976 | 124 | |||
2977 | 125 | void deviceAdded(const QString & devicePath); | ||
2978 | 126 | void deviceRemoved(const QString & devicePath); | ||
2979 | 127 | |||
2980 | 128 | void ready(); | ||
2981 | 129 | void deviceCountChanged(int count); | ||
2982 | 130 | void deviceFilterChanged(const QInputDevice::InputType filter); | ||
2983 | 131 | |||
2984 | 132 | public Q_SLOTS: | ||
2985 | 133 | void addedDevice(const QString & devicePath); | ||
2986 | 134 | |||
2987 | 135 | private: | ||
2988 | 136 | Q_DISABLE_COPY(QInputDeviceManager) | ||
2989 | 137 | #if !defined(QT_SIMULATOR) | ||
2990 | 138 | QInputDeviceManagerPrivate *const d_ptr; | ||
2991 | 139 | Q_DECLARE_PRIVATE(QInputDeviceManager) | ||
2992 | 140 | #endif | ||
2993 | 141 | }; | ||
2994 | 142 | |||
2995 | 143 | #endif // QINPUTINFO_H | ||
2996 | 0 | 144 | ||
2997 | === added file 'src/plugin/file-qml-plugin/InputInfo/qmldir' | |||
2998 | --- src/plugin/file-qml-plugin/InputInfo/qmldir 1970-01-01 00:00:00 +0000 | |||
2999 | +++ src/plugin/file-qml-plugin/InputInfo/qmldir 2016-01-14 17:54:32 +0000 | |||
3000 | @@ -0,0 +1,3 @@ | |||
3001 | 1 | module Unity.InputInfo | ||
3002 | 2 | plugin InputInfo | ||
3003 | 3 | typeinfo InputInfo.qmltypes | ||
3004 | 0 | 4 | ||
3005 | === modified file 'src/plugin/file-qml-plugin/backend.cpp' | |||
3006 | --- src/plugin/file-qml-plugin/backend.cpp 2015-09-19 15:40:22 +0000 | |||
3007 | +++ src/plugin/file-qml-plugin/backend.cpp 2016-01-14 17:54:32 +0000 | |||
3008 | @@ -21,15 +21,25 @@ | |||
3009 | 21 | #include "backend.h" | 21 | #include "backend.h" |
3010 | 22 | #include "documentmodel.h" | 22 | #include "documentmodel.h" |
3011 | 23 | #include "docviewerfile.h" | 23 | #include "docviewerfile.h" |
3021 | 24 | #include "docviewerutils.h" | 24 | #include "fileutils.h" |
3022 | 25 | 25 | #include "ubuntuconvergenceutils.h" | |
3023 | 26 | static QObject *registerDocviewerUtils (QQmlEngine *engine, QJSEngine *scriptEngine) | 26 | |
3024 | 27 | { | 27 | static QObject *registerFileUtils (QQmlEngine *engine, QJSEngine *scriptEngine) |
3025 | 28 | Q_UNUSED(engine) | 28 | { |
3026 | 29 | Q_UNUSED(scriptEngine) | 29 | Q_UNUSED(engine) |
3027 | 30 | 30 | Q_UNUSED(scriptEngine) | |
3028 | 31 | DocviewerUtils *ch = new DocviewerUtils(); | 31 | |
3029 | 32 | return ch; | 32 | DocviewerFileUtils *f = new DocviewerFileUtils(); |
3030 | 33 | return f; | ||
3031 | 34 | } | ||
3032 | 35 | |||
3033 | 36 | static QObject *registerConvergenceUtils (QQmlEngine *engine, QJSEngine *scriptEngine) | ||
3034 | 37 | { | ||
3035 | 38 | Q_UNUSED(engine) | ||
3036 | 39 | Q_UNUSED(scriptEngine) | ||
3037 | 40 | |||
3038 | 41 | UbuntuConvergenceUtils *c = new UbuntuConvergenceUtils(); | ||
3039 | 42 | return c; | ||
3040 | 33 | } | 43 | } |
3041 | 34 | 44 | ||
3042 | 35 | void BackendPlugin::registerTypes(const char *uri) | 45 | void BackendPlugin::registerTypes(const char *uri) |
3043 | @@ -41,7 +51,8 @@ | |||
3044 | 41 | qmlRegisterType<DocumentModel>(uri, 1, 0, "DocumentsModel"); | 51 | qmlRegisterType<DocumentModel>(uri, 1, 0, "DocumentsModel"); |
3045 | 42 | qmlRegisterType<DocviewerFile>(uri, 1, 0, "File"); | 52 | qmlRegisterType<DocviewerFile>(uri, 1, 0, "File"); |
3046 | 43 | 53 | ||
3048 | 44 | qmlRegisterSingletonType<DocviewerUtils>(uri, 1, 0, "DocumentViewer", registerDocviewerUtils); | 54 | qmlRegisterSingletonType<DocviewerFileUtils>(uri, 1, 0, "FileUtils", registerFileUtils); |
3049 | 55 | qmlRegisterSingletonType<UbuntuConvergenceUtils>(uri, 1, 0, "ConvergenceUtils", registerConvergenceUtils); | ||
3050 | 45 | } | 56 | } |
3051 | 46 | 57 | ||
3052 | 47 | void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri) | 58 | void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri) |
3053 | 48 | 59 | ||
3054 | === modified file 'src/plugin/file-qml-plugin/documentmodel.cpp' | |||
3055 | --- src/plugin/file-qml-plugin/documentmodel.cpp 2015-09-19 15:40:22 +0000 | |||
3056 | +++ src/plugin/file-qml-plugin/documentmodel.cpp 2016-01-14 17:54:32 +0000 | |||
3057 | @@ -17,7 +17,7 @@ | |||
3058 | 17 | 17 | ||
3059 | 18 | #include "documentmodel.h" | 18 | #include "documentmodel.h" |
3060 | 19 | #include "fswatcher.h" | 19 | #include "fswatcher.h" |
3062 | 20 | #include "docviewerutils.h" | 20 | #include "fileutils.h" |
3063 | 21 | 21 | ||
3064 | 22 | #include <QStandardPaths> | 22 | #include <QStandardPaths> |
3065 | 23 | #include <QDir> | 23 | #include <QDir> |
3066 | @@ -115,7 +115,7 @@ | |||
3067 | 115 | 115 | ||
3068 | 116 | bool DocumentModel::isFileSupported(const QString &path) | 116 | bool DocumentModel::isFileSupported(const QString &path) |
3069 | 117 | { | 117 | { |
3071 | 118 | return DocviewerUtils::isFileSupported(path); | 118 | return DocviewerFileUtils::isFileSupported(path); |
3072 | 119 | } | 119 | } |
3073 | 120 | 120 | ||
3074 | 121 | QHash<int, QByteArray> DocumentModel::roleNames() const | 121 | QHash<int, QByteArray> DocumentModel::roleNames() const |
3075 | 122 | 122 | ||
3076 | === renamed file 'src/plugin/file-qml-plugin/docviewerutils.cpp' => 'src/plugin/file-qml-plugin/fileutils.cpp' | |||
3077 | --- src/plugin/file-qml-plugin/docviewerutils.cpp 2015-12-27 12:10:06 +0000 | |||
3078 | +++ src/plugin/file-qml-plugin/fileutils.cpp 2016-01-14 17:54:32 +0000 | |||
3079 | @@ -14,7 +14,7 @@ | |||
3080 | 14 | along with this program. If not, see http://www.gnu.org/licenses/. | 14 | along with this program. If not, see http://www.gnu.org/licenses/. |
3081 | 15 | */ | 15 | */ |
3082 | 16 | 16 | ||
3084 | 17 | #include "docviewerutils.h" | 17 | #include "fileutils.h" |
3085 | 18 | 18 | ||
3086 | 19 | #include <QFileInfo> | 19 | #include <QFileInfo> |
3087 | 20 | #include <QDir> | 20 | #include <QDir> |
3088 | @@ -22,18 +22,8 @@ | |||
3089 | 22 | #include <QStandardPaths> | 22 | #include <QStandardPaths> |
3090 | 23 | #include <QDirIterator> | 23 | #include <QDirIterator> |
3091 | 24 | #include <QDateTime> | 24 | #include <QDateTime> |
3104 | 25 | #include <QtGui/QGuiApplication> | 25 | |
3105 | 26 | 26 | bool DocviewerFileUtils::exists(const QString &path) | |
3094 | 27 | bool DocviewerUtils::desktopMode() const | ||
3095 | 28 | { | ||
3096 | 29 | // Assume that platformName (QtUbuntu) with ubuntu | ||
3097 | 30 | // in name means it's running on device | ||
3098 | 31 | // TODO: replace this check with SDK call for formfactor | ||
3099 | 32 | QString platform = QGuiApplication::platformName(); | ||
3100 | 33 | return !((platform == "ubuntu") || (platform == "ubuntumirclient")); | ||
3101 | 34 | } | ||
3102 | 35 | |||
3103 | 36 | bool DocviewerUtils::exists(const QString &path) | ||
3106 | 37 | { | 27 | { |
3107 | 38 | QFileInfo fi(path); | 28 | QFileInfo fi(path); |
3108 | 39 | 29 | ||
3109 | @@ -44,12 +34,12 @@ | |||
3110 | 44 | return QDir(path).exists(); | 34 | return QDir(path).exists(); |
3111 | 45 | } | 35 | } |
3112 | 46 | 36 | ||
3114 | 47 | bool DocviewerUtils::copy(const QString &source, const QString &destination) | 37 | bool DocviewerFileUtils::copy(const QString &source, const QString &destination) |
3115 | 48 | { | 38 | { |
3116 | 49 | return QFile::copy(source, destination); | 39 | return QFile::copy(source, destination); |
3117 | 50 | } | 40 | } |
3118 | 51 | 41 | ||
3120 | 52 | bool DocviewerUtils::isFileSupported(const QString &path) | 42 | bool DocviewerFileUtils::isFileSupported(const QString &path) |
3121 | 53 | { | 43 | { |
3122 | 54 | QMimeDatabase mdb; | 44 | QMimeDatabase mdb; |
3123 | 55 | const QString mimetype = mdb.mimeTypeForFile(path).name(); | 45 | const QString mimetype = mdb.mimeTypeForFile(path).name(); |
3124 | @@ -65,12 +55,12 @@ | |||
3125 | 65 | || mimetype == "application/vnd.ms-powerpoint"; | 55 | || mimetype == "application/vnd.ms-powerpoint"; |
3126 | 66 | } | 56 | } |
3127 | 67 | 57 | ||
3129 | 68 | QString DocviewerUtils::getXdgDocumentsLocation() | 58 | QString DocviewerFileUtils::getXdgDocumentsLocation() |
3130 | 69 | { | 59 | { |
3131 | 70 | return QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); | 60 | return QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); |
3132 | 71 | } | 61 | } |
3133 | 72 | 62 | ||
3135 | 73 | QString DocviewerUtils::buildDestinationPath(const QString &destinationDir, const QString &sourcePath) | 63 | QString DocviewerFileUtils::buildDestinationPath(const QString &destinationDir, const QString &sourcePath) |
3136 | 74 | { | 64 | { |
3137 | 75 | QFileInfo fi(sourcePath); | 65 | QFileInfo fi(sourcePath); |
3138 | 76 | 66 | ||
3139 | @@ -135,7 +125,7 @@ | |||
3140 | 135 | // Return the path of the file, if found in the storageLocation paths, | 125 | // Return the path of the file, if found in the storageLocation paths, |
3141 | 136 | // otherwise return an empty string. | 126 | // otherwise return an empty string. |
3142 | 137 | // Used for prevent importing of a second copy of a file through ContentHub. | 127 | // Used for prevent importing of a second copy of a file through ContentHub. |
3144 | 138 | QString DocviewerUtils::checkIfFileAlreadyImported(const QString &filePath, const QStringList &storageLocationList) | 128 | QString DocviewerFileUtils::checkIfFileAlreadyImported(const QString &filePath, const QStringList &storageLocationList) |
3145 | 139 | { | 129 | { |
3146 | 140 | QFileInfo fi(filePath); | 130 | QFileInfo fi(filePath); |
3147 | 141 | QStringList files; | 131 | QStringList files; |
3148 | @@ -168,17 +158,17 @@ | |||
3149 | 168 | return QString(); | 158 | return QString(); |
3150 | 169 | } | 159 | } |
3151 | 170 | 160 | ||
3153 | 171 | QString DocviewerUtils::getFileBaseNameFromPath(const QString &filePath) | 161 | QString DocviewerFileUtils::getFileBaseNameFromPath(const QString &filePath) |
3154 | 172 | { | 162 | { |
3155 | 173 | return QFileInfo(filePath).completeBaseName(); | 163 | return QFileInfo(filePath).completeBaseName(); |
3156 | 174 | } | 164 | } |
3157 | 175 | 165 | ||
3159 | 176 | QString DocviewerUtils::getFileNameFromPath(const QString &filePath) | 166 | QString DocviewerFileUtils::getFileNameFromPath(const QString &filePath) |
3160 | 177 | { | 167 | { |
3161 | 178 | return QFileInfo(filePath).fileName(); | 168 | return QFileInfo(filePath).fileName(); |
3162 | 179 | } | 169 | } |
3163 | 180 | 170 | ||
3165 | 181 | QString DocviewerUtils::getCanonicalPath(const QString &filePath) | 171 | QString DocviewerFileUtils::getCanonicalPath(const QString &filePath) |
3166 | 182 | { | 172 | { |
3167 | 183 | return QFileInfo(filePath).canonicalPath(); | 173 | return QFileInfo(filePath).canonicalPath(); |
3168 | 184 | } | 174 | } |
3169 | 185 | 175 | ||
3170 | === renamed file 'src/plugin/file-qml-plugin/docviewerutils.h' => 'src/plugin/file-qml-plugin/fileutils.h' | |||
3171 | --- src/plugin/file-qml-plugin/docviewerutils.h 2015-12-27 12:10:06 +0000 | |||
3172 | +++ src/plugin/file-qml-plugin/fileutils.h 2016-01-14 17:54:32 +0000 | |||
3173 | @@ -14,19 +14,16 @@ | |||
3174 | 14 | along with this program. If not, see http://www.gnu.org/licenses/. | 14 | along with this program. If not, see http://www.gnu.org/licenses/. |
3175 | 15 | */ | 15 | */ |
3176 | 16 | 16 | ||
3179 | 17 | #ifndef DOCVIEWERUTILS_H | 17 | #ifndef DOCVIEWER_FILEUTILS_H |
3180 | 18 | #define DOCVIEWERUTILS_H | 18 | #define DOCVIEWER_FILEUTILS_H |
3181 | 19 | 19 | ||
3182 | 20 | #include <QObject> | 20 | #include <QObject> |
3183 | 21 | 21 | ||
3185 | 22 | class DocviewerUtils : public QObject | 22 | class DocviewerFileUtils : public QObject |
3186 | 23 | { | 23 | { |
3187 | 24 | Q_OBJECT | 24 | Q_OBJECT |
3188 | 25 | Q_PROPERTY(bool desktopMode READ desktopMode CONSTANT) | ||
3189 | 26 | 25 | ||
3190 | 27 | public: | 26 | public: |
3191 | 28 | bool desktopMode() const; | ||
3192 | 29 | |||
3193 | 30 | Q_INVOKABLE static bool exists(const QString &path); | 27 | Q_INVOKABLE static bool exists(const QString &path); |
3194 | 31 | Q_INVOKABLE static bool copy(const QString &source, const QString &destination); | 28 | Q_INVOKABLE static bool copy(const QString &source, const QString &destination); |
3195 | 32 | 29 | ||
3196 | @@ -42,4 +39,4 @@ | |||
3197 | 42 | Q_INVOKABLE static QString getCanonicalPath(const QString &filePath); | 39 | Q_INVOKABLE static QString getCanonicalPath(const QString &filePath); |
3198 | 43 | }; | 40 | }; |
3199 | 44 | 41 | ||
3201 | 45 | #endif // DOCVIEWERUTILS_H | 42 | #endif // DOCVIEWER_FILEUTILS_H |
3202 | 46 | 43 | ||
3203 | === added file 'src/plugin/file-qml-plugin/ubuntuconvergenceutils.cpp' | |||
3204 | --- src/plugin/file-qml-plugin/ubuntuconvergenceutils.cpp 1970-01-01 00:00:00 +0000 | |||
3205 | +++ src/plugin/file-qml-plugin/ubuntuconvergenceutils.cpp 2016-01-14 17:54:32 +0000 | |||
3206 | @@ -0,0 +1,82 @@ | |||
3207 | 1 | /* | ||
3208 | 2 | Copyright (C) 2015 Stefano Verzegnassi | ||
3209 | 3 | |||
3210 | 4 | This program is free software: you can redistribute it and/or modify | ||
3211 | 5 | it under the terms of the GNU General Public License 3 as published by | ||
3212 | 6 | the Free Software Foundation. | ||
3213 | 7 | |||
3214 | 8 | This program is distributed in the hope that it will be useful, | ||
3215 | 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3216 | 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3217 | 11 | GNU General Public License for more details. | ||
3218 | 12 | |||
3219 | 13 | You should have received a copy of the GNU General Public License | ||
3220 | 14 | along with this program. If not, see http://www.gnu.org/licenses/. | ||
3221 | 15 | */ | ||
3222 | 16 | |||
3223 | 17 | #include "ubuntuconvergenceutils.h" | ||
3224 | 18 | #include "InputInfo/qinputinfo.h" | ||
3225 | 19 | |||
3226 | 20 | #include <QtGui/QGuiApplication> | ||
3227 | 21 | |||
3228 | 22 | bool isUnity8Env() | ||
3229 | 23 | { | ||
3230 | 24 | // Assume that platformName (QtUbuntu) with ubuntu | ||
3231 | 25 | // in name means it's running on device | ||
3232 | 26 | QString platform = QGuiApplication::platformName(); | ||
3233 | 27 | return (platform == "ubuntu") || (platform == "ubuntumirclient"); | ||
3234 | 28 | } | ||
3235 | 29 | |||
3236 | 30 | UbuntuConvergenceUtils::UbuntuConvergenceUtils(QObject *parent) : | ||
3237 | 31 | QObject(parent), | ||
3238 | 32 | m_desktopMode(false), | ||
3239 | 33 | m_mouseAttached(false), | ||
3240 | 34 | m_inputDevicesWatcher(new QInputDeviceManager()) | ||
3241 | 35 | { | ||
3242 | 36 | // Initialize signals when the watcher is ready. | ||
3243 | 37 | // QInputDeviceManager() emits deviceAdded() signal multiple times during its | ||
3244 | 38 | // initializations. | ||
3245 | 39 | connect(m_inputDevicesWatcher, &QInputDeviceManager::ready, | ||
3246 | 40 | this, &UbuntuConvergenceUtils::init); | ||
3247 | 41 | } | ||
3248 | 42 | |||
3249 | 43 | void UbuntuConvergenceUtils::init() | ||
3250 | 44 | { | ||
3251 | 45 | // Connect signals | ||
3252 | 46 | connect(m_inputDevicesWatcher, SIGNAL(deviceAdded(QString)), this, SLOT(checkPointersCount())); | ||
3253 | 47 | connect(m_inputDevicesWatcher, SIGNAL(deviceRemoved(QString)), this, SLOT(checkPointersCount())); | ||
3254 | 48 | |||
3255 | 49 | checkPointersCount(); | ||
3256 | 50 | } | ||
3257 | 51 | |||
3258 | 52 | void UbuntuConvergenceUtils::checkPointersCount() | ||
3259 | 53 | { | ||
3260 | 54 | int mouseCount = m_inputDevicesWatcher->deviceCount(QInputDevice::Mouse); | ||
3261 | 55 | int touchPadCount = m_inputDevicesWatcher->deviceCount(QInputDevice::TouchPad); | ||
3262 | 56 | |||
3263 | 57 | setMouseAttached(mouseCount || touchPadCount); | ||
3264 | 58 | setDesktopMode(isUnity8Env() || m_mouseAttached); | ||
3265 | 59 | } | ||
3266 | 60 | |||
3267 | 61 | void UbuntuConvergenceUtils::setDesktopMode(bool desktopMode) | ||
3268 | 62 | { | ||
3269 | 63 | if (m_desktopMode == desktopMode) | ||
3270 | 64 | return; | ||
3271 | 65 | |||
3272 | 66 | m_desktopMode = desktopMode; | ||
3273 | 67 | Q_EMIT desktopModeChanged(); | ||
3274 | 68 | } | ||
3275 | 69 | |||
3276 | 70 | void UbuntuConvergenceUtils::setMouseAttached(bool mouseAttached) | ||
3277 | 71 | { | ||
3278 | 72 | if (m_mouseAttached == mouseAttached) | ||
3279 | 73 | return; | ||
3280 | 74 | |||
3281 | 75 | m_mouseAttached = mouseAttached; | ||
3282 | 76 | Q_EMIT mouseAttachedChanged(); | ||
3283 | 77 | } | ||
3284 | 78 | |||
3285 | 79 | UbuntuConvergenceUtils::~UbuntuConvergenceUtils() | ||
3286 | 80 | { | ||
3287 | 81 | delete m_inputDevicesWatcher; | ||
3288 | 82 | } | ||
3289 | 0 | 83 | ||
3290 | === added file 'src/plugin/file-qml-plugin/ubuntuconvergenceutils.h' | |||
3291 | --- src/plugin/file-qml-plugin/ubuntuconvergenceutils.h 1970-01-01 00:00:00 +0000 | |||
3292 | +++ src/plugin/file-qml-plugin/ubuntuconvergenceutils.h 2016-01-14 17:54:32 +0000 | |||
3293 | @@ -0,0 +1,56 @@ | |||
3294 | 1 | /* | ||
3295 | 2 | Copyright (C) 2015 Stefano Verzegnassi | ||
3296 | 3 | |||
3297 | 4 | This program is free software: you can redistribute it and/or modify | ||
3298 | 5 | it under the terms of the GNU General Public License 3 as published by | ||
3299 | 6 | the Free Software Foundation. | ||
3300 | 7 | |||
3301 | 8 | This program is distributed in the hope that it will be useful, | ||
3302 | 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3303 | 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3304 | 11 | GNU General Public License for more details. | ||
3305 | 12 | |||
3306 | 13 | You should have received a copy of the GNU General Public License | ||
3307 | 14 | along with this program. If not, see http://www.gnu.org/licenses/. | ||
3308 | 15 | */ | ||
3309 | 16 | |||
3310 | 17 | #ifndef DOCVIEWER_CONVERGENCEUTILS_H | ||
3311 | 18 | #define DOCVIEWER_CONVERGENCEUTILS_H | ||
3312 | 19 | |||
3313 | 20 | #include <QObject> | ||
3314 | 21 | |||
3315 | 22 | class QInputDeviceManager; | ||
3316 | 23 | |||
3317 | 24 | class UbuntuConvergenceUtils : public QObject | ||
3318 | 25 | { | ||
3319 | 26 | Q_OBJECT | ||
3320 | 27 | Q_PROPERTY(bool desktopMode READ desktopMode NOTIFY desktopModeChanged) | ||
3321 | 28 | Q_PROPERTY(bool mouseAttached READ mouseAttached NOTIFY mouseAttachedChanged) | ||
3322 | 29 | |||
3323 | 30 | public: | ||
3324 | 31 | UbuntuConvergenceUtils(QObject *parent = 0); | ||
3325 | 32 | ~UbuntuConvergenceUtils(); | ||
3326 | 33 | |||
3327 | 34 | bool desktopMode() const { return m_desktopMode; } | ||
3328 | 35 | bool mouseAttached() const { return m_mouseAttached; } | ||
3329 | 36 | |||
3330 | 37 | Q_SIGNALS: | ||
3331 | 38 | void desktopModeChanged(); | ||
3332 | 39 | void mouseAttachedChanged(); | ||
3333 | 40 | |||
3334 | 41 | private slots: | ||
3335 | 42 | void checkPointersCount(); | ||
3336 | 43 | void init(); | ||
3337 | 44 | |||
3338 | 45 | private: | ||
3339 | 46 | bool m_desktopMode; | ||
3340 | 47 | bool m_mouseAttached; | ||
3341 | 48 | |||
3342 | 49 | private: | ||
3343 | 50 | QInputDeviceManager* m_inputDevicesWatcher; | ||
3344 | 51 | |||
3345 | 52 | void setDesktopMode(bool desktopMode); | ||
3346 | 53 | void setMouseAttached(bool mouseAttached); | ||
3347 | 54 | }; | ||
3348 | 55 | |||
3349 | 56 | #endif // DOCVIEWER_CONVERGENCEUTILS_H |
FAILED: Continuous integration, rev:241 /core-apps- jenkins. ubuntu. com/job/ docviewer- app-ci/ 70/ /core-apps- jenkins. ubuntu. com/job/ generic- update- mp/379/ console
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild: /core-apps- jenkins. ubuntu. com/job/ docviewer- app-ci/ 70/rebuild
https:/