Merge lp:~mzanetti/reminders-app/new-edit-mode into lp:reminders-app
- new-edit-mode
- Merge into trunk
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Riccardo Padovani | ||||||||
Approved revision: | 311 | ||||||||
Merged at revision: | 310 | ||||||||
Proposed branch: | lp:~mzanetti/reminders-app/new-edit-mode | ||||||||
Merge into: | lp:reminders-app | ||||||||
Prerequisite: | lp:~mzanetti/reminders-app/caching | ||||||||
Diff against target: |
4152 lines (+2777/-965) 35 files modified
po/com.ubuntu.reminders.pot (+87/-6) src/app/CMakeLists.txt (+1/-1) src/app/camerahelper.cpp (+0/-63) src/app/camerahelper.h (+0/-42) src/app/formattinghelper.cpp (+383/-0) src/app/formattinghelper.h (+132/-0) src/app/main.cpp (+4/-5) src/app/qml/components/RtfButton.qml (+72/-0) src/app/qml/components/RtfSeparator.qml (+30/-0) src/app/qml/images/block-align.svg (+172/-0) src/app/qml/images/bullet-list.svg (+197/-0) src/app/qml/images/center-align.svg (+172/-0) src/app/qml/images/indent-block.svg (+176/-0) src/app/qml/images/left-align.svg (+172/-0) src/app/qml/images/numbered-list.svg (+203/-0) src/app/qml/images/right-align.svg (+172/-0) src/app/qml/images/unindent-block.svg (+178/-0) src/app/qml/ui/CameraComponents/CameraToolbar.qml (+0/-109) src/app/qml/ui/CameraComponents/CameraToolbarButton.qml (+0/-32) src/app/qml/ui/CameraComponents/CrossFadingButton.qml (+0/-60) src/app/qml/ui/CameraComponents/FadingButton.qml (+0/-72) src/app/qml/ui/CameraComponents/FlashButton.qml (+0/-34) src/app/qml/ui/CameraComponents/ThinSliderStyle.qml (+0/-78) src/app/qml/ui/CameraComponents/ViewFinderGeometry.qml (+0/-35) src/app/qml/ui/CameraComponents/ZoomControl.qml (+0/-86) src/app/qml/ui/CameraComponents/assets/toolbar-left@18.sci (+0/-7) src/app/qml/ui/CameraComponents/assets/toolbar-middle@18.sci (+0/-7) src/app/qml/ui/CameraComponents/assets/toolbar-right@18.sci (+0/-7) src/app/qml/ui/CameraComponents/constants.js (+0/-19) src/app/qml/ui/CameraConfirm.qml (+0/-78) src/app/qml/ui/CameraPage.qml (+0/-128) src/app/qml/ui/EditNoteView.qml (+556/-80) src/libqtevernote/notebooks.cpp (+2/-0) src/libqtevernote/utils/enmldocument.cpp (+65/-15) src/libqtevernote/utils/enmldocument.h (+3/-1) |
||||||||
To merge this branch: | bzr merge lp:~mzanetti/reminders-app/new-edit-mode | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Riccardo Padovani | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+241226@code.launchpad.net |
Commit message
improve note edit view
Description of the change
- 304. By Michael Zanetti
-
implement new edit mode
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
- 305. By Michael Zanetti
-
fix textedit sizing
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:305
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Riccardo Padovani (rpadovani) wrote : | # |
Wow. Just wow, this is an amazing work!
I left some comments, mainly questions about the code.
Also, there are two little behavior I think have to be fixed:
#Text format
- Write a plain text (e.g. 123789)
- Place the cursor in the middle (e.g. 123|789)
- Set a style (e.g. bold)
- Start writing (e.g. 123*45|*789)
- Press enter (e.g.123*45\n|*789)
- Write a new char (e.g 6)
Note that the new char doesn't follow the previous style.
Result: 123*45*\n6789
Expected result: 123*45\n6*789
#Horizontal line is broke
- Write a text, click on horizontal line without going on a new line, the text is deleted. I expect the text is saved and horizontal line is created on a new line
- Write a text, create a horizontal line, insert other text, save the note.
The text after the horizontal line isn't saved
- 306. By Michael Zanetti
-
disable hr element for now
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:306
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 307. By Michael Zanetti
-
add capabilities to select text and format it
- 308. By Michael Zanetti
-
only allow text selection when formatting toolbox is open
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:308
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 309. By Michael Zanetti
-
fix selection mode
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:309
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Riccardo Padovani (rpadovani) wrote : | # |
Excellent work!
Some notes:
- It's very difficult to focus the textarea, you have to click where there is some text. I expect to click in the textarea to activate the focus. Also, I think it could autofocus when you open editmode
- Already existing checkbox aren't rendered (two testcases):
* Create a note, add a checkbox, save it, reenter edit mode, there isn't anymore the checkbox, save the note, in the noteview you see it, so isn't deleted, but it isn't rendered
* Create a note, add a checkbox, click on add attachment, return to note, no checkbox is renderd, save the note, see the checkbox in the view
- Indentation is too much, you have to replace f.setIndent(
- When I activate a list, I expect to dismiss it clicking on the same button again.
Instead, a new list is created
- The size button behavior is strange. When the cursor is between elements that have a size != 14 displays the size, but when the font is == 14 it says only 'Size'. It's like the font button says 'Font' when the text is in Ubuntu. I think you should always display the size of the text.
- Too much noise on terminal, could you please deactivate console.log for selection?
The new feature about selection works well, but there is a behavior I didn't expect. I don't know if you need to fix it, just let me know what you think.
Create a text, starting with normal text and then select both bold and italic, something like this:
abcd*_efgh_*
Select all the text: buttons say your text is both bold and italic. Click on bold button, all the text now isn't bold (as expected) but is also all italic.
So, this is the result:
_abcdefgh_
but I expect this:
abcd_efgh_
LibreOffice Writer uses another way: when you select a text it set to true attributes that all text has.
If you have something like this:
-abcd*ef_gh_*-
when you select all letters it says only strikeout, when you choose efgh it says bold and strikeout, and so on
[0]http://
Michael Zanetti (mzanetti) wrote : | # |
> Excellent work!
>
> Some notes:
> - It's very difficult to focus the textarea, you have to click where there is
> some text. I expect to click in the textarea to activate the focus. Also, I
> think it could autofocus when you open editmode
The first one, the clicking, is the behavor if the TextEdit. It's too much work to get around it. Ubuntu's TextArea does fix that, but it has other issues so we can't use it yet. I'm reporting bugs for them and hope to be able to switch to TextArea at some point.
Focusing the TextEdit when entering edit mode is fixed now.
>
> - Already existing checkbox aren't rendered (two testcases):
> * Create a note, add a checkbox, save it, reenter edit mode, there isn't
> anymore the checkbox, save the note, in the noteview you see it, so isn't
> deleted, but it isn't rendered
Hmm... can't reproduce this... works fine for me.
> * Create a note, add a checkbox, click on add attachment, return to note, no
> checkbox is renderd, save the note, see the checkbox in the view
Also this seems to be working for me...
>
> - Indentation is too much, you have to replace f.setIndent(
> with f.setIndent(
fixed
>
> - When I activate a list, I expect to dismiss it clicking on the same button
> again.
> Instead, a new list is created
fixed
>
> - The size button behavior is strange. When the cursor is between elements
> that have a size != 14 displays the size, but when the font is == 14 it says
> only 'Size'. It's like the font button says 'Font' when the text is in Ubuntu.
> I think you should always display the size of the text.
This is actually the same behavior as on the Evernote website. And it's motivated like this: If you see either "Font" or "Size" it means that no font is set. That causes it to be displayed in the default application font, that is "Ubuntu" font on Ubuntu devices, but for example in "Helvetica" on the Evernote website.
>
> - Too much noise on terminal, could you please deactivate console.log for
> selection?
fixed.
> The new feature about selection works well, but there is a behavior I didn't
> expect. I don't know if you need to fix it, just let me know what you think.
>
> Create a text, starting with normal text and then select both bold and italic,
> something like this:
> abcd*_efgh_*
>
> Select all the text: buttons say your text is both bold and italic. Click on
> bold button, all the text now isn't bold (as expected) but is also all italic.
> So, this is the result:
> _abcdefgh_
> but I expect this:
> abcd_efgh_
>
> LibreOffice Writer uses another way: when you select a text it set to true
> attributes that all text has.
> If you have something like this:
> -abcd*ef_gh_*-
> when you select all letters it says only strikeout, when you choose efgh it
> says bold and strikeout, and so on
Yeah, I noticed this myself. I did not implement "complexFormat" support yet and to be frank I'm too lazy to do that atm. It would required to walk step by step through each block and apply formatting individually. If you're ok with it, I'd prefer leaving that to another branch.
- 310. By Michael Zanetti
-
improve it as per comments from review
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:310
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 311. By Michael Zanetti
-
fix gu() if no GRID_UNIT_PX is exported
Riccardo Padovani (rpadovani) wrote : | # |
After a long review, I could say this is awesome :-)
I agree with your comments now you fixed the checkbox issue ;-)
David Planella (dpm) wrote : | # |
Hi,
Please, in the future, let's discuss before landing changes that change the UI - I had wanted to have a designer look at this branch before getting it merged.
This goes inline with the discussion that we had about controlling in more detail what lands in the next few weeks, as every Reminders release will now need to be approved before going into the store.
Preview Diff
1 | === modified file 'po/com.ubuntu.reminders.pot' |
2 | --- po/com.ubuntu.reminders.pot 2014-11-11 15:12:52 +0000 |
3 | +++ po/com.ubuntu.reminders.pot 2014-11-12 22:36:04 +0000 |
4 | @@ -8,7 +8,7 @@ |
5 | msgstr "" |
6 | "Project-Id-Version: \n" |
7 | "Report-Msgid-Bugs-To: \n" |
8 | -"POT-Creation-Date: 2014-11-07 20:51+0100\n" |
9 | +"POT-Creation-Date: 2014-11-11 00:31+0100\n" |
10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
11 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
12 | "Language-Team: LANGUAGE <LL@li.org>\n" |
13 | @@ -73,21 +73,25 @@ |
14 | msgid "Tags" |
15 | msgstr "" |
16 | |
17 | -#: src/app/qml/reminders.qml:329 |
18 | +#: src/app/qml/reminders.qml:330 |
19 | +msgid "Reconnect" |
20 | +msgstr "" |
21 | + |
22 | +#: src/app/qml/reminders.qml:354 |
23 | msgid "" |
24 | "No note selected.\n" |
25 | "Select a note to see it in detail." |
26 | msgstr "" |
27 | |
28 | -#: src/app/qml/reminders.qml:366 |
29 | +#: src/app/qml/reminders.qml:391 |
30 | msgid "No account available" |
31 | msgstr "" |
32 | |
33 | -#: src/app/qml/reminders.qml:367 |
34 | +#: src/app/qml/reminders.qml:392 |
35 | msgid "Please configure and authorize an Evernote account in System Settings" |
36 | msgstr "" |
37 | |
38 | -#: src/app/qml/reminders.qml:387 |
39 | +#: src/app/qml/reminders.qml:412 |
40 | msgid "Add account" |
41 | msgstr "" |
42 | |
43 | @@ -108,11 +112,39 @@ |
44 | msgid "Back" |
45 | msgstr "" |
46 | |
47 | -#: src/app/qml/ui/EditNoteView.qml:100 src/app/qml/ui/EditNoteView.qml:112 |
48 | +#: src/app/qml/ui/EditNoteView.qml:95 src/app/qml/ui/EditNoteView.qml:108 |
49 | #: src/app/qml/ui/NotesPage.qml:71 |
50 | msgid "Untitled" |
51 | msgstr "" |
52 | |
53 | +#: src/app/qml/ui/EditNoteView.qml:406 |
54 | +msgid "Font" |
55 | +msgstr "" |
56 | + |
57 | +#: src/app/qml/ui/EditNoteView.qml:417 |
58 | +msgid "Size" |
59 | +msgstr "" |
60 | + |
61 | +#. TRANSLATORS: Toolbar button for "Bold" |
62 | +#: src/app/qml/ui/EditNoteView.qml:438 |
63 | +msgid "B" |
64 | +msgstr "" |
65 | + |
66 | +#. TRANSLATORS: Toolbar button for "Italic" |
67 | +#: src/app/qml/ui/EditNoteView.qml:451 |
68 | +msgid "I" |
69 | +msgstr "" |
70 | + |
71 | +#. TRANSLATORS: Toolbar button for "Underline" |
72 | +#: src/app/qml/ui/EditNoteView.qml:465 |
73 | +msgid "U" |
74 | +msgstr "" |
75 | + |
76 | +#. TRANSLATORS: Toolbar button for "Strikeout" |
77 | +#: src/app/qml/ui/EditNoteView.qml:479 |
78 | +msgid "T" |
79 | +msgstr "" |
80 | + |
81 | #: src/app/qml/ui/NotePage.qml:34 src/app/qml/ui/NotesPage.qml:135 |
82 | msgid "Edit" |
83 | msgstr "" |
84 | @@ -183,6 +215,55 @@ |
85 | msgid "No tags available. You can tag notes while viewing them." |
86 | msgstr "" |
87 | |
88 | +#: src/libqtevernote/evernoteconnection.cpp:234 |
89 | +msgid "Error connecting to Evernote: Please check network connection." |
90 | +msgstr "" |
91 | + |
92 | +#: src/libqtevernote/evernoteconnection.cpp:239 |
93 | +msgid "Unknown error connecting to Evernote." |
94 | +msgstr "" |
95 | + |
96 | +#: src/libqtevernote/evernoteconnection.cpp:252 |
97 | +msgid "" |
98 | +"Error connecting to Evernote: Server version does not match app version. " |
99 | +"Please update the application." |
100 | +msgstr "" |
101 | + |
102 | +#: src/libqtevernote/evernoteconnection.cpp:258 |
103 | +#: src/libqtevernote/evernoteconnection.cpp:263 |
104 | +#, qt-format |
105 | +msgid "Error connecting to Evernote: Error code %1" |
106 | +msgstr "" |
107 | + |
108 | +#: src/libqtevernote/evernoteconnection.cpp:268 |
109 | +msgid "" |
110 | +"Error connecting to Evernote: Cannot download version information from " |
111 | +"server." |
112 | +msgstr "" |
113 | + |
114 | +#: src/libqtevernote/evernoteconnection.cpp:273 |
115 | +#: src/libqtevernote/evernoteconnection.cpp:298 |
116 | +msgid "Unknown error connecting to Evernote" |
117 | +msgstr "" |
118 | + |
119 | +#: src/libqtevernote/evernoteconnection.cpp:287 |
120 | +msgid "Error connecting to Evernote: Cannot download server information." |
121 | +msgstr "" |
122 | + |
123 | +#: src/libqtevernote/evernoteconnection.cpp:293 |
124 | +msgid "" |
125 | +"Error connecting to Evernote: Connection failure when downloading server " |
126 | +"information." |
127 | +msgstr "" |
128 | + |
129 | +#: src/libqtevernote/evernoteconnection.cpp:319 |
130 | +msgid "Error connecting to Evernote: Connection failure" |
131 | +msgstr "" |
132 | + |
133 | +#: src/libqtevernote/evernoteconnection.cpp:323 |
134 | +msgid "Unknown Error connecting to Evernote" |
135 | +msgstr "" |
136 | + |
137 | #: src/libqtevernote/jobs/evernotejob.cpp:94 |
138 | msgid "Authentication expired." |
139 | msgstr "" |
140 | |
141 | === modified file 'src/app/CMakeLists.txt' |
142 | --- src/app/CMakeLists.txt 2014-05-05 17:46:10 +0000 |
143 | +++ src/app/CMakeLists.txt 2014-11-12 22:36:04 +0000 |
144 | @@ -2,7 +2,7 @@ |
145 | |
146 | set(reminders_SRCS |
147 | main.cpp |
148 | - camerahelper.cpp |
149 | + formattinghelper.cpp |
150 | preferences.cpp |
151 | ${QML_SRCS} |
152 | ) |
153 | |
154 | === removed file 'src/app/camerahelper.cpp' |
155 | --- src/app/camerahelper.cpp 2014-07-23 21:00:14 +0000 |
156 | +++ src/app/camerahelper.cpp 1970-01-01 00:00:00 +0000 |
157 | @@ -1,63 +0,0 @@ |
158 | -/* |
159 | - * Copyright: 2013 - 2014 Canonical, Ltd |
160 | - * |
161 | - * This file is part of reminders |
162 | - * |
163 | - * reminders is free software: you can redistribute it and/or modify |
164 | - * it under the terms of the GNU General Public License as published by |
165 | - * the Free Software Foundation, either version 3 of the License, or |
166 | - * (at your option) any later version. |
167 | - * |
168 | - * reminders is distributed in the hope that it will be useful, |
169 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
170 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
171 | - * GNU General Public License for more details. |
172 | - * |
173 | - * You should have received a copy of the GNU General Public License |
174 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
175 | - * |
176 | - * Authors: Michael Zanetti <michael.zanetti@canonical.com> |
177 | - * Riccardo Padovani <rpadovani@ubuntu.com> |
178 | - */ |
179 | - |
180 | -#include "camerahelper.h" |
181 | - |
182 | -#include <QStandardPaths> |
183 | -#include <QCoreApplication> |
184 | -#include <QImage> |
185 | -#include <QTransform> |
186 | -#include <QDebug> |
187 | -#include <QFile> |
188 | - |
189 | -CameraHelper::CameraHelper(QObject *parent): |
190 | - QObject(parent) |
191 | -{ |
192 | - |
193 | -} |
194 | - |
195 | -QString CameraHelper::importLocation() const |
196 | -{ |
197 | - QString cachePath = QStandardPaths::standardLocations(QStandardPaths::CacheLocation).first(); |
198 | - return cachePath + "/tempImage.jpg"; |
199 | -} |
200 | - |
201 | -bool CameraHelper::rotate(const QString &imageFile, int angle) |
202 | -{ |
203 | - QImage image; |
204 | - if (!image.load(imageFile)) { |
205 | - return false; |
206 | - } |
207 | - QTransform transform; |
208 | - transform.rotate(angle); |
209 | - image = image.transformed(transform); |
210 | - return image.save(imageFile); |
211 | -} |
212 | - |
213 | -bool CameraHelper::removeTemp() |
214 | -{ |
215 | - const char* location = importLocation().toUtf8(); |
216 | - if(QFile::remove(location) != true ) { |
217 | - qDebug() << "No temporary file found, not deleting"; |
218 | - } |
219 | - return 0; |
220 | -} |
221 | |
222 | === removed file 'src/app/camerahelper.h' |
223 | --- src/app/camerahelper.h 2014-02-27 12:06:05 +0000 |
224 | +++ src/app/camerahelper.h 1970-01-01 00:00:00 +0000 |
225 | @@ -1,42 +0,0 @@ |
226 | -/* |
227 | - * Copyright: 2013 - 2014 Canonical, Ltd |
228 | - * |
229 | - * This file is part of reminders |
230 | - * |
231 | - * reminders is free software: you can redistribute it and/or modify |
232 | - * it under the terms of the GNU General Public License as published by |
233 | - * the Free Software Foundation, either version 3 of the License, or |
234 | - * (at your option) any later version. |
235 | - * |
236 | - * reminders is distributed in the hope that it will be useful, |
237 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
238 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
239 | - * GNU General Public License for more details. |
240 | - * |
241 | - * You should have received a copy of the GNU General Public License |
242 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
243 | - * |
244 | - * Authors: Michael Zanetti <michael.zanetti@canonical.com> |
245 | - * Riccardo Padovani <rpadovani@ubuntu.com> |
246 | - */ |
247 | - |
248 | -#ifndef CAMERAHELPER_H |
249 | -#define CAMERAHELPER_H |
250 | - |
251 | -#include <QObject> |
252 | - |
253 | -class CameraHelper: public QObject |
254 | -{ |
255 | - Q_OBJECT |
256 | - Q_PROPERTY(QString importLocation READ importLocation CONSTANT) |
257 | -public: |
258 | - CameraHelper(QObject *parent = 0); |
259 | - |
260 | - QString importLocation() const; |
261 | - |
262 | - Q_INVOKABLE bool rotate(const QString &imageFile, int angle); |
263 | - |
264 | - Q_INVOKABLE bool removeTemp(); |
265 | -}; |
266 | - |
267 | -#endif |
268 | |
269 | === added file 'src/app/formattinghelper.cpp' |
270 | --- src/app/formattinghelper.cpp 1970-01-01 00:00:00 +0000 |
271 | +++ src/app/formattinghelper.cpp 2014-11-12 22:36:04 +0000 |
272 | @@ -0,0 +1,383 @@ |
273 | +/* |
274 | + * Copyright: 2014 Canonical, Ltd |
275 | + * |
276 | + * This file is part of reminders |
277 | + * |
278 | + * reminders is free software: you can redistribute it and/or modify |
279 | + * it under the terms of the GNU General Public License as published by |
280 | + * the Free Software Foundation, either version 3 of the License, or |
281 | + * (at your option) any later version. |
282 | + * |
283 | + * reminders is distributed in the hope that it will be useful, |
284 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
285 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
286 | + * GNU General Public License for more details. |
287 | + * |
288 | + * You should have received a copy of the GNU General Public License |
289 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
290 | + * |
291 | + * Authors: Michael Zanetti <michael.zanetti@canonical.com> |
292 | + */ |
293 | + |
294 | +#include "formattinghelper.h" |
295 | + |
296 | +#include <QDebug> |
297 | +#include <QTextBlock> |
298 | +#include <QTextObject> |
299 | +#include <QTextCharFormat> |
300 | +#include <QTextList> |
301 | + |
302 | +FormattingHelper::FormattingHelper(QObject *parent): |
303 | + QObject(parent), |
304 | + m_textDoc(0), |
305 | + m_formatPosition(-2) |
306 | +{ |
307 | + |
308 | +} |
309 | + |
310 | +QQuickTextDocument *FormattingHelper::textDocument() const |
311 | +{ |
312 | + return m_textDoc; |
313 | +} |
314 | + |
315 | +void FormattingHelper::setTextDocument(QQuickTextDocument *textDocument) |
316 | +{ |
317 | + if (m_textDoc) { |
318 | + disconnect(m_textDoc->textDocument()); |
319 | + } |
320 | + |
321 | + m_textDoc = textDocument; |
322 | + emit textDocumentChanged(); |
323 | + |
324 | + if (m_textDoc) { |
325 | + connect(m_textDoc->textDocument(), &QTextDocument::undoAvailable, this, &FormattingHelper::canUndoChanged); |
326 | + connect(m_textDoc->textDocument(), &QTextDocument::redoAvailable, this, &FormattingHelper::canRedoChanged); |
327 | + m_textCursor = textDocument->textDocument()->rootFrame()->firstCursorPosition(); |
328 | + m_selectionCursor = textDocument->textDocument()->rootFrame()->firstCursorPosition(); |
329 | + } else { |
330 | + m_textCursor.setPosition(0); |
331 | + } |
332 | + emit cursorPositionChanged(); |
333 | +} |
334 | + |
335 | +QStringList FormattingHelper::allFontFamilies() const |
336 | +{ |
337 | + QFontDatabase db; |
338 | + return db.families(); |
339 | +} |
340 | + |
341 | +int FormattingHelper::cursorPosition() const |
342 | +{ |
343 | + return m_textCursor.position(); |
344 | +} |
345 | + |
346 | +void FormattingHelper::setCursorPosition(int position) |
347 | +{ |
348 | + if (m_textCursor.position() == m_formatPosition + 1) { |
349 | + m_textCursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor); |
350 | + m_textCursor.setCharFormat(m_nextFormat); |
351 | + } |
352 | + m_textCursor.setPosition(position); |
353 | + m_formatPosition = -2; |
354 | + m_nextFormat = m_textCursor.charFormat(); |
355 | + |
356 | + emit formatChanged(); |
357 | +} |
358 | + |
359 | +int FormattingHelper::selectionStart() const |
360 | +{ |
361 | + return m_selectionCursor.selectionStart(); |
362 | +} |
363 | + |
364 | +void FormattingHelper::setSelectionStart(int selectionStart) |
365 | +{ |
366 | + m_selectionStart = selectionStart; |
367 | + m_selectionCursor.setPosition(m_selectionStart, QTextCursor::MoveAnchor); |
368 | + m_selectionCursor.setPosition(m_selectionEnd, QTextCursor::KeepAnchor); |
369 | +} |
370 | + |
371 | +int FormattingHelper::selectionEnd() const |
372 | +{ |
373 | + return m_selectionCursor.selectionEnd(); |
374 | +} |
375 | + |
376 | +void FormattingHelper::setSelectionEnd(int selectionEnd) |
377 | +{ |
378 | + m_selectionEnd = selectionEnd; |
379 | + m_selectionCursor.setPosition(m_selectionStart, QTextCursor::MoveAnchor); |
380 | + m_selectionCursor.setPosition(m_selectionEnd, QTextCursor::KeepAnchor); |
381 | +} |
382 | + |
383 | +QString FormattingHelper::fontFamily() const |
384 | +{ |
385 | + if (m_selectionCursor.selectedText().isEmpty()) { |
386 | + if (m_formatPosition != -2) { |
387 | + return m_nextFormat.font().family(); |
388 | + } |
389 | + return m_textCursor.charFormat().font().family(); |
390 | + } else { |
391 | + return m_selectionCursor.charFormat().font().family(); |
392 | + } |
393 | +} |
394 | + |
395 | +void FormattingHelper::setFontFamily(const QString &fontFamily) |
396 | +{ |
397 | + if (m_selectionCursor.selectedText().isEmpty()) { |
398 | + m_nextFormat.setFontFamily(fontFamily); |
399 | + m_formatPosition = m_textCursor.position(); |
400 | + } else { |
401 | + QTextCharFormat f = m_selectionCursor.charFormat(); |
402 | + f.setFontFamily(fontFamily); |
403 | + m_selectionCursor.setCharFormat(f); |
404 | + } |
405 | + emit formatChanged(); |
406 | +} |
407 | + |
408 | +int FormattingHelper::fontSize() const |
409 | +{ |
410 | + if (m_selectionCursor.selectedText().isEmpty()) { |
411 | + if (m_formatPosition != 2) { |
412 | + return m_nextFormat.fontPointSize(); |
413 | + } |
414 | + return m_textCursor.charFormat().fontPointSize(); |
415 | + } else { |
416 | + return m_selectionCursor.charFormat().fontPointSize(); |
417 | + } |
418 | +} |
419 | + |
420 | +void FormattingHelper::setFontSize(qreal fontSize) |
421 | +{ |
422 | + if (m_selectionCursor.selectedText().isEmpty()) { |
423 | + m_nextFormat.setFontPointSize(fontSize); |
424 | + m_formatPosition = m_textCursor.position(); |
425 | + } else { |
426 | + QTextCharFormat f = m_selectionCursor.charFormat(); |
427 | + f.setFontPointSize(fontSize); |
428 | + m_selectionCursor.setCharFormat(f); |
429 | + } |
430 | + emit formatChanged(); |
431 | +} |
432 | + |
433 | +bool FormattingHelper::italic() const |
434 | +{ |
435 | + if (m_selectionCursor.selectedText().isEmpty()) { |
436 | + if (m_formatPosition != -2) { |
437 | + return m_nextFormat.fontItalic(); |
438 | + } |
439 | + return m_textCursor.charFormat().fontItalic(); |
440 | + } else { |
441 | + return m_selectionCursor.charFormat().fontItalic(); |
442 | + } |
443 | +} |
444 | + |
445 | +void FormattingHelper::setItalic(bool italic) |
446 | +{ |
447 | + if (m_selectionCursor.selectedText().isEmpty()) { |
448 | + m_nextFormat.setFontItalic(italic); |
449 | + m_formatPosition = m_textCursor.position(); |
450 | + } else { |
451 | + QTextCharFormat f = m_selectionCursor.charFormat(); |
452 | + f.setFontItalic(italic); |
453 | + m_selectionCursor.setCharFormat(f); |
454 | + } |
455 | + emit formatChanged(); |
456 | +} |
457 | + |
458 | +bool FormattingHelper::bold() const |
459 | +{ |
460 | + if (m_selectionCursor.selectedText().isEmpty()) { |
461 | + if (m_formatPosition != -2) { |
462 | + return m_nextFormat.fontWeight() >= QFont::Bold; |
463 | + } |
464 | + return m_textCursor.charFormat().fontWeight() >= QFont::Bold; |
465 | + } else { |
466 | + return m_selectionCursor.charFormat().fontWeight() >= QFont::Bold; |
467 | + } |
468 | +} |
469 | + |
470 | +void FormattingHelper::setBold(bool bold) |
471 | +{ |
472 | + if (m_selectionCursor.selectedText().isEmpty()) { |
473 | + m_nextFormat.setFontWeight(bold ? QFont::Bold : QFont::Normal); |
474 | + m_formatPosition = m_textCursor.position(); |
475 | + } else { |
476 | + QTextCharFormat f = m_selectionCursor.charFormat(); |
477 | + f.setFontWeight(bold ? QFont::Bold : QFont::Normal); |
478 | + m_selectionCursor.setCharFormat(f); |
479 | + } |
480 | + emit formatChanged(); |
481 | +} |
482 | + |
483 | +bool FormattingHelper::underline() const |
484 | +{ |
485 | + if (m_selectionCursor.selectedText().isEmpty()) { |
486 | + if (m_formatPosition != -2) { |
487 | + return m_nextFormat.fontUnderline(); |
488 | + } |
489 | + return m_textCursor.charFormat().fontUnderline(); |
490 | + } else { |
491 | + return m_selectionCursor.charFormat().fontUnderline(); |
492 | + } |
493 | +} |
494 | + |
495 | +void FormattingHelper::setUnderline(bool underline) |
496 | +{ |
497 | + if (m_selectionCursor.selectedText().isEmpty()) { |
498 | + m_nextFormat.setFontUnderline(underline); |
499 | + m_formatPosition = m_textCursor.position(); |
500 | + emit formatChanged(); |
501 | + } else { |
502 | + QTextCharFormat f = m_selectionCursor.charFormat(); |
503 | + f.setFontUnderline(underline); |
504 | + m_selectionCursor.setCharFormat(f); |
505 | + } |
506 | +} |
507 | + |
508 | +bool FormattingHelper::strikeout() const |
509 | +{ |
510 | + if (m_selectionCursor.selectedText().isEmpty()) { |
511 | + if (m_formatPosition != -2) { |
512 | + return m_nextFormat.fontStrikeOut(); |
513 | + } |
514 | + return m_textCursor.charFormat().fontStrikeOut(); |
515 | + } else { |
516 | + return m_selectionCursor.charFormat().fontStrikeOut(); |
517 | + } |
518 | +} |
519 | + |
520 | +void FormattingHelper::setStrikeout(bool strikeout) |
521 | +{ |
522 | + if (m_selectionCursor.selectedText().isEmpty()) { |
523 | + m_nextFormat.setFontStrikeOut(strikeout); |
524 | + m_formatPosition = m_textCursor.position(); |
525 | + } else { |
526 | + QTextCharFormat f = m_selectionCursor.charFormat(); |
527 | + f.setFontStrikeOut(strikeout); |
528 | + m_selectionCursor.setCharFormat(f); |
529 | + } |
530 | + emit formatChanged(); |
531 | +} |
532 | + |
533 | +QColor FormattingHelper::color() const |
534 | +{ |
535 | + if (m_selectionCursor.selectedText().isEmpty()) { |
536 | + if (m_formatPosition != -2) { |
537 | + return m_nextFormat.foreground().color(); |
538 | + } |
539 | + return m_textCursor.charFormat().foreground().color(); |
540 | + } else { |
541 | + return m_selectionCursor.charFormat().foreground().color(); |
542 | + } |
543 | +} |
544 | + |
545 | +void FormattingHelper::setColor(const QColor &color) |
546 | +{ |
547 | + if (m_selectionCursor.selectedText().isEmpty()) { |
548 | + m_nextFormat.setForeground(QBrush(color)); |
549 | + m_formatPosition = m_textCursor.position(); |
550 | + } else { |
551 | + QTextCharFormat f = m_selectionCursor.charFormat(); |
552 | + f.setForeground(QBrush(color)); |
553 | + m_selectionCursor.setCharFormat(f); |
554 | + } |
555 | + emit formatChanged(); |
556 | +} |
557 | + |
558 | +bool FormattingHelper::canUndo() const |
559 | +{ |
560 | + return m_textDoc != 0 && m_textDoc->textDocument()->isUndoAvailable(); |
561 | +} |
562 | + |
563 | +bool FormattingHelper::canRedo() const |
564 | +{ |
565 | + return m_textDoc != 0 && m_textDoc->textDocument()->isRedoAvailable(); |
566 | +} |
567 | + |
568 | +Qt::Alignment FormattingHelper::alignment() const |
569 | +{ |
570 | + return m_textCursor.blockFormat().alignment(); |
571 | +} |
572 | + |
573 | +void FormattingHelper::setAlignment(Qt::Alignment alignment) |
574 | +{ |
575 | + QTextBlockFormat f = m_textCursor.blockFormat(); |
576 | + f.setAlignment(alignment); |
577 | + m_textCursor.setBlockFormat(f); |
578 | + emit formatChanged(); |
579 | +} |
580 | + |
581 | +bool FormattingHelper::bulletList() const |
582 | +{ |
583 | + return m_textCursor.currentList() && m_textCursor.currentList()->format().style() == QTextListFormat::ListDisc; |
584 | +} |
585 | + |
586 | +void FormattingHelper::setBulletList(bool bulletList) |
587 | +{ |
588 | + if (this->bulletList() && !bulletList) { |
589 | + m_textCursor.beginEditBlock(); |
590 | + m_textCursor.currentList()->remove(m_textCursor.block()); |
591 | + unindentBlock(); |
592 | + m_textCursor.endEditBlock(); |
593 | + } else if (!this->bulletList() && bulletList) { |
594 | + QTextListFormat f; |
595 | + f.setStyle(QTextListFormat::ListDisc); |
596 | + m_textCursor.createList(f); |
597 | + } |
598 | + emit formatChanged(); |
599 | +} |
600 | + |
601 | +bool FormattingHelper::numberedList() const |
602 | +{ |
603 | + return m_textCursor.currentList() && m_textCursor.currentList()->format().style() == QTextListFormat::ListDecimal; |
604 | +} |
605 | + |
606 | +void FormattingHelper::setNumberedList(bool numberedList) |
607 | +{ |
608 | + if (this->numberedList() && !numberedList) { |
609 | + m_textCursor.beginEditBlock(); |
610 | + m_textCursor.currentList()->remove(m_textCursor.block()); |
611 | + unindentBlock(); |
612 | + m_textCursor.endEditBlock(); |
613 | + } else if (!this->numberedList() && numberedList) { |
614 | + QTextListFormat f; |
615 | + f.setStyle(QTextListFormat::ListDecimal); |
616 | + m_textCursor.createList(f); |
617 | + } |
618 | + emit formatChanged(); |
619 | +} |
620 | + |
621 | +void FormattingHelper::indentBlock() |
622 | +{ |
623 | + QTextBlockFormat f = m_textCursor.blockFormat(); |
624 | + f.setIndent(f.indent() + 1); |
625 | + m_textCursor.setBlockFormat(f); |
626 | +} |
627 | + |
628 | +void FormattingHelper::unindentBlock() |
629 | +{ |
630 | + QTextBlockFormat f = m_textCursor.blockFormat(); |
631 | + f.setIndent(f.indent() - 1); |
632 | + m_textCursor.setBlockFormat(f); |
633 | +} |
634 | + |
635 | +void FormattingHelper::undo() |
636 | +{ |
637 | + if (m_textDoc) { |
638 | + m_textDoc->textDocument()->undo(); |
639 | + } |
640 | +} |
641 | + |
642 | +void FormattingHelper::redo() |
643 | +{ |
644 | + if (m_textDoc) { |
645 | + m_textDoc->textDocument()->redo(); |
646 | + } |
647 | +} |
648 | + |
649 | +void FormattingHelper::addHorizontalLine() |
650 | +{ |
651 | + m_textCursor.beginEditBlock(); |
652 | + m_textCursor.insertHtml("____________________"); |
653 | + m_textDoc->textDocument()->setHtml(m_textDoc->textDocument()->toHtml().replace(QRegExp("____________________"), "<hr/><p></p>")); |
654 | + m_textCursor.endEditBlock(); |
655 | +} |
656 | |
657 | === added file 'src/app/formattinghelper.h' |
658 | --- src/app/formattinghelper.h 1970-01-01 00:00:00 +0000 |
659 | +++ src/app/formattinghelper.h 2014-11-12 22:36:04 +0000 |
660 | @@ -0,0 +1,132 @@ |
661 | +/* |
662 | + * Copyright: 2014 Canonical, Ltd |
663 | + * |
664 | + * This file is part of reminders |
665 | + * |
666 | + * reminders is free software: you can redistribute it and/or modify |
667 | + * it under the terms of the GNU General Public License as published by |
668 | + * the Free Software Foundation, either version 3 of the License, or |
669 | + * (at your option) any later version. |
670 | + * |
671 | + * reminders is distributed in the hope that it will be useful, |
672 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
673 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
674 | + * GNU General Public License for more details. |
675 | + * |
676 | + * You should have received a copy of the GNU General Public License |
677 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
678 | + * |
679 | + * Authors: Michael Zanetti <michael.zanetti@canonical.com> |
680 | + */ |
681 | + |
682 | +#ifndef FORMATTINGHELPER_H |
683 | +#define FORMATTINGHELPER_H |
684 | + |
685 | +#include <QObject> |
686 | +#include <QQuickTextDocument> |
687 | +#include <QTextCursor> |
688 | + |
689 | +class FormattingHelper: public QObject |
690 | +{ |
691 | + Q_OBJECT |
692 | + Q_PROPERTY(QStringList allFontFamilies READ allFontFamilies CONSTANT) |
693 | + |
694 | + Q_PROPERTY(QQuickTextDocument* textDocument READ textDocument WRITE setTextDocument NOTIFY textDocumentChanged) |
695 | + |
696 | + Q_PROPERTY(int cursorPosition READ cursorPosition WRITE setCursorPosition NOTIFY cursorPositionChanged) |
697 | + Q_PROPERTY(int selectionStart READ selectionStart WRITE setSelectionStart NOTIFY cursorPositionChanged) |
698 | + Q_PROPERTY(int selectionEnd READ selectionEnd WRITE setSelectionEnd NOTIFY cursorPositionChanged) |
699 | + |
700 | + Q_PROPERTY(QString fontFamily READ fontFamily WRITE setFontFamily NOTIFY formatChanged) |
701 | + Q_PROPERTY(qreal fontSize READ fontSize WRITE setFontSize NOTIFY formatChanged) |
702 | + Q_PROPERTY(bool italic READ italic WRITE setItalic NOTIFY formatChanged) |
703 | + Q_PROPERTY(bool bold READ bold WRITE setBold NOTIFY formatChanged) |
704 | + Q_PROPERTY(bool underline READ underline WRITE setUnderline NOTIFY formatChanged) |
705 | + Q_PROPERTY(bool strikeout READ strikeout WRITE setStrikeout NOTIFY formatChanged) |
706 | + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY formatChanged) |
707 | + Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment NOTIFY formatChanged) |
708 | + Q_PROPERTY(bool bulletList READ bulletList WRITE setBulletList NOTIFY formatChanged) |
709 | + Q_PROPERTY(bool numberedList READ numberedList WRITE setNumberedList NOTIFY formatChanged) |
710 | + |
711 | + Q_PROPERTY(bool canUndo READ canUndo NOTIFY canUndoChanged) |
712 | + Q_PROPERTY(bool canRedo READ canRedo NOTIFY canRedoChanged) |
713 | + |
714 | + |
715 | +public: |
716 | + FormattingHelper(QObject *parent = 0); |
717 | + |
718 | + QStringList allFontFamilies() const; |
719 | + |
720 | + QQuickTextDocument* textDocument() const; |
721 | + void setTextDocument(QQuickTextDocument* textDocument); |
722 | + |
723 | + int cursorPosition() const; |
724 | + void setCursorPosition(int position); |
725 | + |
726 | + int selectionStart() const; |
727 | + void setSelectionStart(int selectionStart); |
728 | + |
729 | + int selectionEnd() const; |
730 | + void setSelectionEnd(int selectionEnd); |
731 | + |
732 | + QString fontFamily() const; |
733 | + void setFontFamily(const QString &fontFamily); |
734 | + |
735 | + int fontSize() const; |
736 | + void setFontSize(qreal fontSize); |
737 | + |
738 | + bool italic() const; |
739 | + void setItalic(bool italic); |
740 | + |
741 | + bool bold() const; |
742 | + void setBold(bool bold); |
743 | + |
744 | + bool underline() const; |
745 | + void setUnderline(bool underline); |
746 | + |
747 | + bool strikeout() const; |
748 | + void setStrikeout(bool strikeout); |
749 | + |
750 | + QColor color() const; |
751 | + void setColor(const QColor &color); |
752 | + |
753 | + bool canUndo() const; |
754 | + bool canRedo() const; |
755 | + |
756 | + Qt::Alignment alignment() const; |
757 | + void setAlignment(Qt::Alignment alignment); |
758 | + |
759 | + bool bulletList() const; |
760 | + void setBulletList(bool bulletList); |
761 | + |
762 | + bool numberedList() const; |
763 | + void setNumberedList(bool numberedList); |
764 | + |
765 | +public slots: |
766 | + void addHorizontalLine(); |
767 | + void indentBlock(); |
768 | + void unindentBlock(); |
769 | + |
770 | + void undo(); |
771 | + void redo(); |
772 | + |
773 | +signals: |
774 | + void textDocumentChanged(); |
775 | + void cursorPositionChanged(); |
776 | + void formatChanged(); |
777 | + |
778 | + void canUndoChanged(bool canUndo); |
779 | + void canRedoChanged(bool canRedo); |
780 | + |
781 | +private: |
782 | + QQuickTextDocument *m_textDoc; |
783 | + QTextCursor m_textCursor; |
784 | + QTextCursor m_selectionCursor; |
785 | + |
786 | + QTextCharFormat m_nextFormat; |
787 | + int m_formatPosition; |
788 | + int m_selectionStart; |
789 | + int m_selectionEnd; |
790 | +}; |
791 | + |
792 | +#endif |
793 | |
794 | === modified file 'src/app/main.cpp' |
795 | --- src/app/main.cpp 2014-10-08 21:08:07 +0000 |
796 | +++ src/app/main.cpp 2014-11-12 22:36:04 +0000 |
797 | @@ -20,8 +20,8 @@ |
798 | * Riccardo Padovani <rpadovani@ubuntu.com> |
799 | */ |
800 | |
801 | -#include "camerahelper.h" |
802 | #include "preferences.h" |
803 | +#include "formattinghelper.h" |
804 | |
805 | #include <QtGui/QGuiApplication> |
806 | #include <QtQuick/QQuickView> |
807 | @@ -105,14 +105,13 @@ |
808 | |
809 | view.engine()->setImportPathList(importPathList); |
810 | |
811 | - // Set up camera helper |
812 | - CameraHelper helper; |
813 | - view.engine()->rootContext()->setContextProperty("cameraHelper", &helper); |
814 | - |
815 | // Set up account preferences |
816 | Preferences preferences; |
817 | view.engine()->rootContext()->setContextProperty("preferences", &preferences); |
818 | |
819 | + // Register FormattingHelper |
820 | + qmlRegisterType<FormattingHelper>("reminders", 1, 0, "FormattingHelper"); |
821 | + |
822 | QString qmlfile; |
823 | const QString filePath = QLatin1String("qml/reminders.qml"); |
824 | QStringList paths = QStandardPaths::standardLocations(QStandardPaths::DataLocation); |
825 | |
826 | === added file 'src/app/qml/components/RtfButton.qml' |
827 | --- src/app/qml/components/RtfButton.qml 1970-01-01 00:00:00 +0000 |
828 | +++ src/app/qml/components/RtfButton.qml 2014-11-12 22:36:04 +0000 |
829 | @@ -0,0 +1,72 @@ |
830 | +/* |
831 | + * Copyright: 2013-2014 Canonical, Ltd |
832 | + * |
833 | + * This file is part of reminders |
834 | + * |
835 | + * reminders is free software: you can redistribute it and/or modify |
836 | + * it under the terms of the GNU General Public License as published by |
837 | + * the Free Software Foundation; version 3. |
838 | + * |
839 | + * reminders is distributed in the hope that it will be useful, |
840 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
841 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
842 | + * GNU General Public License for more details. |
843 | + * |
844 | + * You should have received a copy of the GNU General Public License |
845 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
846 | + */ |
847 | + |
848 | +import QtQuick 2.3 |
849 | +import Ubuntu.Components 1.1 |
850 | + |
851 | +Item { |
852 | + id: root |
853 | + property alias text: textField.text |
854 | + property alias iconName: icon.name |
855 | + property alias iconSource: icon.source |
856 | + property string color: "transparent" |
857 | + property alias horizontalAlignment: textField.horizontalAlignment |
858 | + |
859 | + property alias font: textField.font |
860 | + |
861 | + property bool active: false |
862 | + |
863 | + signal clicked() |
864 | + |
865 | + opacity: enabled ? 1 : 0.5 |
866 | + |
867 | + MouseArea { |
868 | + anchors.fill: parent |
869 | + onClicked: root.clicked() |
870 | + } |
871 | + |
872 | + Rectangle { |
873 | + anchors.fill: parent |
874 | + color: UbuntuColors.darkGrey |
875 | + opacity: root.active ? 0.2 : 0 |
876 | + } |
877 | + |
878 | + Label { |
879 | + id: textField |
880 | + anchors { top: parent.top; bottom: parent.bottom; left: parent.left } |
881 | + verticalAlignment: Text.AlignVCenter |
882 | + horizontalAlignment: Text.AlignHCenter |
883 | + width: parent.width |
884 | + elide: Text.ElideRight |
885 | + } |
886 | + |
887 | + Icon { |
888 | + id: icon |
889 | + anchors.fill: parent |
890 | + anchors.margins: units.gu(0.5) |
891 | + } |
892 | + |
893 | + UbuntuShape { |
894 | + id: colorRect |
895 | + anchors.fill: parent |
896 | + anchors.margins: units.gu(0.5) |
897 | + color: root.color |
898 | + radius: "small" |
899 | + visible: root.color != "transparent" |
900 | + } |
901 | +} |
902 | |
903 | === added file 'src/app/qml/components/RtfSeparator.qml' |
904 | --- src/app/qml/components/RtfSeparator.qml 1970-01-01 00:00:00 +0000 |
905 | +++ src/app/qml/components/RtfSeparator.qml 2014-11-12 22:36:04 +0000 |
906 | @@ -0,0 +1,30 @@ |
907 | +/* |
908 | + * Copyright: 2013-2014 Canonical, Ltd |
909 | + * |
910 | + * This file is part of reminders |
911 | + * |
912 | + * reminders is free software: you can redistribute it and/or modify |
913 | + * it under the terms of the GNU General Public License as published by |
914 | + * the Free Software Foundation; version 3. |
915 | + * |
916 | + * reminders is distributed in the hope that it will be useful, |
917 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
918 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
919 | + * GNU General Public License for more details. |
920 | + * |
921 | + * You should have received a copy of the GNU General Public License |
922 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
923 | + */ |
924 | + |
925 | +import QtQuick 2.3 |
926 | +import Ubuntu.Components.ListItems 1.0 |
927 | + |
928 | +Item { |
929 | + width: units.dp(1) |
930 | + height: parent.height |
931 | + ThinDivider { |
932 | + width: parent.height |
933 | + rotation: 90 |
934 | + anchors.centerIn: parent |
935 | + } |
936 | +} |
937 | |
938 | === added file 'src/app/qml/images/block-align.svg' |
939 | --- src/app/qml/images/block-align.svg 1970-01-01 00:00:00 +0000 |
940 | +++ src/app/qml/images/block-align.svg 2014-11-12 22:36:04 +0000 |
941 | @@ -0,0 +1,172 @@ |
942 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
943 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
944 | + |
945 | +<svg |
946 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
947 | + xmlns:cc="http://creativecommons.org/ns#" |
948 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
949 | + xmlns:svg="http://www.w3.org/2000/svg" |
950 | + xmlns="http://www.w3.org/2000/svg" |
951 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
952 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
953 | + width="90" |
954 | + height="90" |
955 | + id="svg4874" |
956 | + version="1.1" |
957 | + inkscape:version="0.48.5 r10040" |
958 | + viewBox="0 0 90 90.000001" |
959 | + sodipodi:docname="right-align.svg"> |
960 | + <defs |
961 | + id="defs4876" /> |
962 | + <sodipodi:namedview |
963 | + id="base" |
964 | + pagecolor="#ffffff" |
965 | + bordercolor="#666666" |
966 | + borderopacity="1.0" |
967 | + inkscape:pageopacity="0.0" |
968 | + inkscape:pageshadow="2" |
969 | + inkscape:zoom="9.9475981" |
970 | + inkscape:cx="35.170166" |
971 | + inkscape:cy="44.786927" |
972 | + inkscape:document-units="px" |
973 | + inkscape:current-layer="g1708" |
974 | + showgrid="true" |
975 | + showborder="true" |
976 | + fit-margin-top="0" |
977 | + fit-margin-left="0" |
978 | + fit-margin-right="0" |
979 | + fit-margin-bottom="0" |
980 | + inkscape:snap-bbox="true" |
981 | + inkscape:bbox-paths="true" |
982 | + inkscape:bbox-nodes="true" |
983 | + inkscape:snap-bbox-edge-midpoints="true" |
984 | + inkscape:snap-bbox-midpoints="true" |
985 | + inkscape:object-paths="true" |
986 | + inkscape:snap-intersection-paths="true" |
987 | + inkscape:object-nodes="true" |
988 | + inkscape:snap-smooth-nodes="true" |
989 | + inkscape:snap-midpoints="true" |
990 | + inkscape:snap-object-midpoints="true" |
991 | + inkscape:snap-center="true" |
992 | + showguides="true" |
993 | + inkscape:guide-bbox="true" |
994 | + inkscape:window-width="2880" |
995 | + inkscape:window-height="1752" |
996 | + inkscape:window-x="0" |
997 | + inkscape:window-y="48" |
998 | + inkscape:window-maximized="1"> |
999 | + <inkscape:grid |
1000 | + type="xygrid" |
1001 | + id="grid5451" |
1002 | + empspacing="6" /> |
1003 | + <sodipodi:guide |
1004 | + orientation="1,0" |
1005 | + position="6,77" |
1006 | + id="guide4063" /> |
1007 | + <sodipodi:guide |
1008 | + orientation="1,0" |
1009 | + position="3,78" |
1010 | + id="guide4065" /> |
1011 | + <sodipodi:guide |
1012 | + orientation="0,1" |
1013 | + position="55,84" |
1014 | + id="guide4067" /> |
1015 | + <sodipodi:guide |
1016 | + orientation="0,1" |
1017 | + position="53,87" |
1018 | + id="guide4069" /> |
1019 | + <sodipodi:guide |
1020 | + orientation="0,1" |
1021 | + position="20,3" |
1022 | + id="guide4071" /> |
1023 | + <sodipodi:guide |
1024 | + orientation="0,1" |
1025 | + position="20,6" |
1026 | + id="guide4073" /> |
1027 | + <sodipodi:guide |
1028 | + orientation="1,0" |
1029 | + position="87,7" |
1030 | + id="guide4075" /> |
1031 | + <sodipodi:guide |
1032 | + orientation="1,0" |
1033 | + position="84,7" |
1034 | + id="guide4077" /> |
1035 | + <sodipodi:guide |
1036 | + orientation="0,1" |
1037 | + position="58,81" |
1038 | + id="guide4074" /> |
1039 | + <sodipodi:guide |
1040 | + orientation="1,0" |
1041 | + position="9,74" |
1042 | + id="guide4076" /> |
1043 | + <sodipodi:guide |
1044 | + orientation="0,1" |
1045 | + position="21,9" |
1046 | + id="guide4078" /> |
1047 | + <sodipodi:guide |
1048 | + orientation="1,0" |
1049 | + position="81,4" |
1050 | + id="guide4080" /> |
1051 | + </sodipodi:namedview> |
1052 | + <metadata |
1053 | + id="metadata4879"> |
1054 | + <rdf:RDF> |
1055 | + <cc:Work |
1056 | + rdf:about=""> |
1057 | + <dc:format>image/svg+xml</dc:format> |
1058 | + <dc:type |
1059 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
1060 | + <dc:title></dc:title> |
1061 | + </cc:Work> |
1062 | + </rdf:RDF> |
1063 | + </metadata> |
1064 | + <g |
1065 | + inkscape:label="Layer 1" |
1066 | + inkscape:groupmode="layer" |
1067 | + id="layer1" |
1068 | + transform="translate(67.857146,-84.50504)"> |
1069 | + <g |
1070 | + transform="matrix(0,-1,-1,0,373.50506,516.50504)" |
1071 | + id="g4845" |
1072 | + style="display:inline"> |
1073 | + <g |
1074 | + inkscape:label="Layer 1" |
1075 | + id="g1708" |
1076 | + transform="matrix(0,-1,-1,0,1394.3622,441.36221)" |
1077 | + inkscape:export-filename="add01.png" |
1078 | + inkscape:export-xdpi="90" |
1079 | + inkscape:export-ydpi="90"> |
1080 | + <rect |
1081 | + style="color:#000000;fill:none;stroke:none;stroke-width:7.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1082 | + id="rect1710" |
1083 | + width="90" |
1084 | + height="90" |
1085 | + x="0" |
1086 | + y="962.36218" /> |
1087 | + <rect |
1088 | + y="977.36218" |
1089 | + x="9.0000038" |
1090 | + height="12.000018" |
1091 | + width="72" |
1092 | + id="rect4724" |
1093 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1094 | + <rect |
1095 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1096 | + id="rect4726" |
1097 | + width="72.000008" |
1098 | + height="12.000018" |
1099 | + x="-81.000008" |
1100 | + y="1001.3622" |
1101 | + transform="scale(-1,1)" /> |
1102 | + <rect |
1103 | + y="1025.3622" |
1104 | + x="-81.000008" |
1105 | + height="12.000018" |
1106 | + width="72.000008" |
1107 | + id="rect4728" |
1108 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1109 | + transform="scale(-1,1)" /> |
1110 | + </g> |
1111 | + </g> |
1112 | + </g> |
1113 | +</svg> |
1114 | |
1115 | === added file 'src/app/qml/images/bullet-list.svg' |
1116 | --- src/app/qml/images/bullet-list.svg 1970-01-01 00:00:00 +0000 |
1117 | +++ src/app/qml/images/bullet-list.svg 2014-11-12 22:36:04 +0000 |
1118 | @@ -0,0 +1,197 @@ |
1119 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
1120 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
1121 | + |
1122 | +<svg |
1123 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
1124 | + xmlns:cc="http://creativecommons.org/ns#" |
1125 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
1126 | + xmlns:svg="http://www.w3.org/2000/svg" |
1127 | + xmlns="http://www.w3.org/2000/svg" |
1128 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
1129 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
1130 | + width="90" |
1131 | + height="90" |
1132 | + id="svg4874" |
1133 | + version="1.1" |
1134 | + inkscape:version="0.48.5 r10040" |
1135 | + viewBox="0 0 90 90.000001" |
1136 | + sodipodi:docname="view-list-symbolic.svg"> |
1137 | + <defs |
1138 | + id="defs4876" /> |
1139 | + <sodipodi:namedview |
1140 | + id="base" |
1141 | + pagecolor="#ffffff" |
1142 | + bordercolor="#666666" |
1143 | + borderopacity="1.0" |
1144 | + inkscape:pageopacity="0.0" |
1145 | + inkscape:pageshadow="2" |
1146 | + inkscape:zoom="9.9475981" |
1147 | + inkscape:cx="31.902171" |
1148 | + inkscape:cy="46.182001" |
1149 | + inkscape:document-units="px" |
1150 | + inkscape:current-layer="g1708" |
1151 | + showgrid="true" |
1152 | + showborder="true" |
1153 | + fit-margin-top="0" |
1154 | + fit-margin-left="0" |
1155 | + fit-margin-right="0" |
1156 | + fit-margin-bottom="0" |
1157 | + inkscape:snap-bbox="true" |
1158 | + inkscape:bbox-paths="true" |
1159 | + inkscape:bbox-nodes="true" |
1160 | + inkscape:snap-bbox-edge-midpoints="true" |
1161 | + inkscape:snap-bbox-midpoints="true" |
1162 | + inkscape:object-paths="true" |
1163 | + inkscape:snap-intersection-paths="true" |
1164 | + inkscape:object-nodes="true" |
1165 | + inkscape:snap-smooth-nodes="true" |
1166 | + inkscape:snap-midpoints="true" |
1167 | + inkscape:snap-object-midpoints="true" |
1168 | + inkscape:snap-center="true" |
1169 | + showguides="true" |
1170 | + inkscape:guide-bbox="true" |
1171 | + inkscape:window-width="2880" |
1172 | + inkscape:window-height="1752" |
1173 | + inkscape:window-x="0" |
1174 | + inkscape:window-y="48" |
1175 | + inkscape:window-maximized="1"> |
1176 | + <inkscape:grid |
1177 | + type="xygrid" |
1178 | + id="grid5451" |
1179 | + empspacing="6" /> |
1180 | + <sodipodi:guide |
1181 | + orientation="1,0" |
1182 | + position="6,77" |
1183 | + id="guide4063" /> |
1184 | + <sodipodi:guide |
1185 | + orientation="1,0" |
1186 | + position="3,78" |
1187 | + id="guide4065" /> |
1188 | + <sodipodi:guide |
1189 | + orientation="0,1" |
1190 | + position="55,84" |
1191 | + id="guide4067" /> |
1192 | + <sodipodi:guide |
1193 | + orientation="0,1" |
1194 | + position="53,87" |
1195 | + id="guide4069" /> |
1196 | + <sodipodi:guide |
1197 | + orientation="0,1" |
1198 | + position="20,3" |
1199 | + id="guide4071" /> |
1200 | + <sodipodi:guide |
1201 | + orientation="0,1" |
1202 | + position="20,6" |
1203 | + id="guide4073" /> |
1204 | + <sodipodi:guide |
1205 | + orientation="1,0" |
1206 | + position="87,7" |
1207 | + id="guide4075" /> |
1208 | + <sodipodi:guide |
1209 | + orientation="1,0" |
1210 | + position="84,7" |
1211 | + id="guide4077" /> |
1212 | + <sodipodi:guide |
1213 | + orientation="0,1" |
1214 | + position="58,81" |
1215 | + id="guide4074" /> |
1216 | + <sodipodi:guide |
1217 | + orientation="1,0" |
1218 | + position="9,74" |
1219 | + id="guide4076" /> |
1220 | + <sodipodi:guide |
1221 | + orientation="0,1" |
1222 | + position="21,9" |
1223 | + id="guide4078" /> |
1224 | + <sodipodi:guide |
1225 | + orientation="1,0" |
1226 | + position="81,4" |
1227 | + id="guide4080" /> |
1228 | + </sodipodi:namedview> |
1229 | + <metadata |
1230 | + id="metadata4879"> |
1231 | + <rdf:RDF> |
1232 | + <cc:Work |
1233 | + rdf:about=""> |
1234 | + <dc:format>image/svg+xml</dc:format> |
1235 | + <dc:type |
1236 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
1237 | + <dc:title></dc:title> |
1238 | + </cc:Work> |
1239 | + </rdf:RDF> |
1240 | + </metadata> |
1241 | + <g |
1242 | + inkscape:label="Layer 1" |
1243 | + inkscape:groupmode="layer" |
1244 | + id="layer1" |
1245 | + transform="translate(67.857146,-84.50504)"> |
1246 | + <g |
1247 | + transform="matrix(0,-1,-1,0,373.50506,516.50504)" |
1248 | + id="g4845" |
1249 | + style="display:inline"> |
1250 | + <g |
1251 | + inkscape:label="Layer 1" |
1252 | + id="g1708" |
1253 | + transform="matrix(0,-1,-1,0,1394.3622,441.36221)" |
1254 | + inkscape:export-filename="add01.png" |
1255 | + inkscape:export-xdpi="90" |
1256 | + inkscape:export-ydpi="90"> |
1257 | + <rect |
1258 | + style="color:#000000;fill:none;stroke:none;stroke-width:7.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1259 | + id="rect1710" |
1260 | + width="90" |
1261 | + height="90" |
1262 | + x="0" |
1263 | + y="962.36218" /> |
1264 | + <rect |
1265 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1266 | + id="rect4067" |
1267 | + width="11.999965" |
1268 | + height="12.000018" |
1269 | + x="9.0000391" |
1270 | + y="977.36218" |
1271 | + rx="6" |
1272 | + ry="6" /> |
1273 | + <rect |
1274 | + y="1001.3622" |
1275 | + x="9.0000391" |
1276 | + height="12.000018" |
1277 | + width="11.999965" |
1278 | + id="rect4691" |
1279 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1280 | + rx="6" |
1281 | + ry="6" /> |
1282 | + <rect |
1283 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1284 | + id="rect4697" |
1285 | + width="11.999965" |
1286 | + height="12.000018" |
1287 | + x="9.0000391" |
1288 | + y="1025.3622" |
1289 | + rx="6" |
1290 | + ry="6" /> |
1291 | + <rect |
1292 | + y="977.36218" |
1293 | + x="30.000042" |
1294 | + height="12.000018" |
1295 | + width="50.999962" |
1296 | + id="rect4724" |
1297 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1298 | + <rect |
1299 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1300 | + id="rect4726" |
1301 | + width="50.999962" |
1302 | + height="12.000018" |
1303 | + x="30.000042" |
1304 | + y="1001.3622" /> |
1305 | + <rect |
1306 | + y="1025.3622" |
1307 | + x="30.000042" |
1308 | + height="12.000018" |
1309 | + width="50.999962" |
1310 | + id="rect4728" |
1311 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1312 | + </g> |
1313 | + </g> |
1314 | + </g> |
1315 | +</svg> |
1316 | |
1317 | === added file 'src/app/qml/images/center-align.svg' |
1318 | --- src/app/qml/images/center-align.svg 1970-01-01 00:00:00 +0000 |
1319 | +++ src/app/qml/images/center-align.svg 2014-11-12 22:36:04 +0000 |
1320 | @@ -0,0 +1,172 @@ |
1321 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
1322 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
1323 | + |
1324 | +<svg |
1325 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
1326 | + xmlns:cc="http://creativecommons.org/ns#" |
1327 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
1328 | + xmlns:svg="http://www.w3.org/2000/svg" |
1329 | + xmlns="http://www.w3.org/2000/svg" |
1330 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
1331 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
1332 | + width="90" |
1333 | + height="90" |
1334 | + id="svg4874" |
1335 | + version="1.1" |
1336 | + inkscape:version="0.48.5 r10040" |
1337 | + viewBox="0 0 90 90.000001" |
1338 | + sodipodi:docname="block-align.svg"> |
1339 | + <defs |
1340 | + id="defs4876" /> |
1341 | + <sodipodi:namedview |
1342 | + id="base" |
1343 | + pagecolor="#ffffff" |
1344 | + bordercolor="#666666" |
1345 | + borderopacity="1.0" |
1346 | + inkscape:pageopacity="0.0" |
1347 | + inkscape:pageshadow="2" |
1348 | + inkscape:zoom="9.9475981" |
1349 | + inkscape:cx="35.170166" |
1350 | + inkscape:cy="44.786927" |
1351 | + inkscape:document-units="px" |
1352 | + inkscape:current-layer="g1708" |
1353 | + showgrid="true" |
1354 | + showborder="true" |
1355 | + fit-margin-top="0" |
1356 | + fit-margin-left="0" |
1357 | + fit-margin-right="0" |
1358 | + fit-margin-bottom="0" |
1359 | + inkscape:snap-bbox="true" |
1360 | + inkscape:bbox-paths="true" |
1361 | + inkscape:bbox-nodes="true" |
1362 | + inkscape:snap-bbox-edge-midpoints="true" |
1363 | + inkscape:snap-bbox-midpoints="true" |
1364 | + inkscape:object-paths="true" |
1365 | + inkscape:snap-intersection-paths="true" |
1366 | + inkscape:object-nodes="true" |
1367 | + inkscape:snap-smooth-nodes="true" |
1368 | + inkscape:snap-midpoints="true" |
1369 | + inkscape:snap-object-midpoints="true" |
1370 | + inkscape:snap-center="true" |
1371 | + showguides="true" |
1372 | + inkscape:guide-bbox="true" |
1373 | + inkscape:window-width="2880" |
1374 | + inkscape:window-height="1752" |
1375 | + inkscape:window-x="0" |
1376 | + inkscape:window-y="48" |
1377 | + inkscape:window-maximized="1"> |
1378 | + <inkscape:grid |
1379 | + type="xygrid" |
1380 | + id="grid5451" |
1381 | + empspacing="6" /> |
1382 | + <sodipodi:guide |
1383 | + orientation="1,0" |
1384 | + position="6,77" |
1385 | + id="guide4063" /> |
1386 | + <sodipodi:guide |
1387 | + orientation="1,0" |
1388 | + position="3,78" |
1389 | + id="guide4065" /> |
1390 | + <sodipodi:guide |
1391 | + orientation="0,1" |
1392 | + position="55,84" |
1393 | + id="guide4067" /> |
1394 | + <sodipodi:guide |
1395 | + orientation="0,1" |
1396 | + position="53,87" |
1397 | + id="guide4069" /> |
1398 | + <sodipodi:guide |
1399 | + orientation="0,1" |
1400 | + position="20,3" |
1401 | + id="guide4071" /> |
1402 | + <sodipodi:guide |
1403 | + orientation="0,1" |
1404 | + position="20,6" |
1405 | + id="guide4073" /> |
1406 | + <sodipodi:guide |
1407 | + orientation="1,0" |
1408 | + position="87,7" |
1409 | + id="guide4075" /> |
1410 | + <sodipodi:guide |
1411 | + orientation="1,0" |
1412 | + position="84,7" |
1413 | + id="guide4077" /> |
1414 | + <sodipodi:guide |
1415 | + orientation="0,1" |
1416 | + position="58,81" |
1417 | + id="guide4074" /> |
1418 | + <sodipodi:guide |
1419 | + orientation="1,0" |
1420 | + position="9,74" |
1421 | + id="guide4076" /> |
1422 | + <sodipodi:guide |
1423 | + orientation="0,1" |
1424 | + position="21,9" |
1425 | + id="guide4078" /> |
1426 | + <sodipodi:guide |
1427 | + orientation="1,0" |
1428 | + position="81,4" |
1429 | + id="guide4080" /> |
1430 | + </sodipodi:namedview> |
1431 | + <metadata |
1432 | + id="metadata4879"> |
1433 | + <rdf:RDF> |
1434 | + <cc:Work |
1435 | + rdf:about=""> |
1436 | + <dc:format>image/svg+xml</dc:format> |
1437 | + <dc:type |
1438 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
1439 | + <dc:title></dc:title> |
1440 | + </cc:Work> |
1441 | + </rdf:RDF> |
1442 | + </metadata> |
1443 | + <g |
1444 | + inkscape:label="Layer 1" |
1445 | + inkscape:groupmode="layer" |
1446 | + id="layer1" |
1447 | + transform="translate(67.857146,-84.50504)"> |
1448 | + <g |
1449 | + transform="matrix(0,-1,-1,0,373.50506,516.50504)" |
1450 | + id="g4845" |
1451 | + style="display:inline"> |
1452 | + <g |
1453 | + inkscape:label="Layer 1" |
1454 | + id="g1708" |
1455 | + transform="matrix(0,-1,-1,0,1394.3622,441.36221)" |
1456 | + inkscape:export-filename="add01.png" |
1457 | + inkscape:export-xdpi="90" |
1458 | + inkscape:export-ydpi="90"> |
1459 | + <rect |
1460 | + style="color:#000000;fill:none;stroke:none;stroke-width:7.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1461 | + id="rect1710" |
1462 | + width="90" |
1463 | + height="90" |
1464 | + x="0" |
1465 | + y="962.36218" /> |
1466 | + <rect |
1467 | + y="977.36218" |
1468 | + x="9.0000038" |
1469 | + height="12.000018" |
1470 | + width="72" |
1471 | + id="rect4724" |
1472 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1473 | + <rect |
1474 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1475 | + id="rect4726" |
1476 | + width="54" |
1477 | + height="12.000018" |
1478 | + x="-72.000008" |
1479 | + y="1001.3622" |
1480 | + transform="scale(-1,1)" /> |
1481 | + <rect |
1482 | + y="1025.3622" |
1483 | + x="-78.000008" |
1484 | + height="12.000018" |
1485 | + width="66.000008" |
1486 | + id="rect4728" |
1487 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1488 | + transform="scale(-1,1)" /> |
1489 | + </g> |
1490 | + </g> |
1491 | + </g> |
1492 | +</svg> |
1493 | |
1494 | === added file 'src/app/qml/images/indent-block.svg' |
1495 | --- src/app/qml/images/indent-block.svg 1970-01-01 00:00:00 +0000 |
1496 | +++ src/app/qml/images/indent-block.svg 2014-11-12 22:36:04 +0000 |
1497 | @@ -0,0 +1,176 @@ |
1498 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
1499 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
1500 | + |
1501 | +<svg |
1502 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
1503 | + xmlns:cc="http://creativecommons.org/ns#" |
1504 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
1505 | + xmlns:svg="http://www.w3.org/2000/svg" |
1506 | + xmlns="http://www.w3.org/2000/svg" |
1507 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
1508 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
1509 | + width="90" |
1510 | + height="90" |
1511 | + id="svg4874" |
1512 | + version="1.1" |
1513 | + inkscape:version="0.48.5 r10040" |
1514 | + viewBox="0 0 90 90.000001" |
1515 | + sodipodi:docname="numbered-list.svg"> |
1516 | + <defs |
1517 | + id="defs4876" /> |
1518 | + <sodipodi:namedview |
1519 | + id="base" |
1520 | + pagecolor="#ffffff" |
1521 | + bordercolor="#666666" |
1522 | + borderopacity="1.0" |
1523 | + inkscape:pageopacity="0.0" |
1524 | + inkscape:pageshadow="2" |
1525 | + inkscape:zoom="14.068028" |
1526 | + inkscape:cx="40.293184" |
1527 | + inkscape:cy="46.278487" |
1528 | + inkscape:document-units="px" |
1529 | + inkscape:current-layer="g1708" |
1530 | + showgrid="true" |
1531 | + showborder="true" |
1532 | + fit-margin-top="0" |
1533 | + fit-margin-left="0" |
1534 | + fit-margin-right="0" |
1535 | + fit-margin-bottom="0" |
1536 | + inkscape:snap-bbox="true" |
1537 | + inkscape:bbox-paths="true" |
1538 | + inkscape:bbox-nodes="true" |
1539 | + inkscape:snap-bbox-edge-midpoints="true" |
1540 | + inkscape:snap-bbox-midpoints="true" |
1541 | + inkscape:object-paths="true" |
1542 | + inkscape:snap-intersection-paths="true" |
1543 | + inkscape:object-nodes="true" |
1544 | + inkscape:snap-smooth-nodes="true" |
1545 | + inkscape:snap-midpoints="true" |
1546 | + inkscape:snap-object-midpoints="true" |
1547 | + inkscape:snap-center="true" |
1548 | + showguides="true" |
1549 | + inkscape:guide-bbox="true" |
1550 | + inkscape:window-width="2880" |
1551 | + inkscape:window-height="1752" |
1552 | + inkscape:window-x="0" |
1553 | + inkscape:window-y="48" |
1554 | + inkscape:window-maximized="1"> |
1555 | + <inkscape:grid |
1556 | + type="xygrid" |
1557 | + id="grid5451" |
1558 | + empspacing="6" /> |
1559 | + <sodipodi:guide |
1560 | + orientation="1,0" |
1561 | + position="6,77" |
1562 | + id="guide4063" /> |
1563 | + <sodipodi:guide |
1564 | + orientation="1,0" |
1565 | + position="3,78" |
1566 | + id="guide4065" /> |
1567 | + <sodipodi:guide |
1568 | + orientation="0,1" |
1569 | + position="55,84" |
1570 | + id="guide4067" /> |
1571 | + <sodipodi:guide |
1572 | + orientation="0,1" |
1573 | + position="53,87" |
1574 | + id="guide4069" /> |
1575 | + <sodipodi:guide |
1576 | + orientation="0,1" |
1577 | + position="20,3" |
1578 | + id="guide4071" /> |
1579 | + <sodipodi:guide |
1580 | + orientation="0,1" |
1581 | + position="20,6" |
1582 | + id="guide4073" /> |
1583 | + <sodipodi:guide |
1584 | + orientation="1,0" |
1585 | + position="87,7" |
1586 | + id="guide4075" /> |
1587 | + <sodipodi:guide |
1588 | + orientation="1,0" |
1589 | + position="84,7" |
1590 | + id="guide4077" /> |
1591 | + <sodipodi:guide |
1592 | + orientation="0,1" |
1593 | + position="58,81" |
1594 | + id="guide4074" /> |
1595 | + <sodipodi:guide |
1596 | + orientation="1,0" |
1597 | + position="9,74" |
1598 | + id="guide4076" /> |
1599 | + <sodipodi:guide |
1600 | + orientation="0,1" |
1601 | + position="21,9" |
1602 | + id="guide4078" /> |
1603 | + <sodipodi:guide |
1604 | + orientation="1,0" |
1605 | + position="81,4" |
1606 | + id="guide4080" /> |
1607 | + </sodipodi:namedview> |
1608 | + <metadata |
1609 | + id="metadata4879"> |
1610 | + <rdf:RDF> |
1611 | + <cc:Work |
1612 | + rdf:about=""> |
1613 | + <dc:format>image/svg+xml</dc:format> |
1614 | + <dc:type |
1615 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
1616 | + <dc:title></dc:title> |
1617 | + </cc:Work> |
1618 | + </rdf:RDF> |
1619 | + </metadata> |
1620 | + <g |
1621 | + inkscape:label="Layer 1" |
1622 | + inkscape:groupmode="layer" |
1623 | + id="layer1" |
1624 | + transform="translate(67.857146,-84.50504)"> |
1625 | + <g |
1626 | + transform="matrix(0,-1,-1,0,373.50506,516.50504)" |
1627 | + id="g4845" |
1628 | + style="display:inline"> |
1629 | + <g |
1630 | + inkscape:label="Layer 1" |
1631 | + id="g1708" |
1632 | + transform="matrix(0,-1,-1,0,1394.3622,441.36221)" |
1633 | + inkscape:export-filename="add01.png" |
1634 | + inkscape:export-xdpi="90" |
1635 | + inkscape:export-ydpi="90"> |
1636 | + <rect |
1637 | + style="color:#000000;fill:none;stroke:none;stroke-width:7.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1638 | + id="rect1710" |
1639 | + width="90" |
1640 | + height="90" |
1641 | + x="0" |
1642 | + y="962.36218" /> |
1643 | + <rect |
1644 | + y="977.36218" |
1645 | + x="9.0000038" |
1646 | + height="12.000018" |
1647 | + width="72" |
1648 | + id="rect4724" |
1649 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1650 | + <rect |
1651 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1652 | + id="rect4726" |
1653 | + width="50.999962" |
1654 | + height="12.000018" |
1655 | + x="30.000042" |
1656 | + y="1001.3622" /> |
1657 | + <rect |
1658 | + y="1025.3622" |
1659 | + x="30.000042" |
1660 | + height="12.000018" |
1661 | + width="50.999962" |
1662 | + id="rect4728" |
1663 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1664 | + <path |
1665 | + style="fill:#808080;fill-opacity:1" |
1666 | + d="m 9.0000038,1007.3622 15.0000002,12 -15.0000002,12 z" |
1667 | + id="rect3849" |
1668 | + inkscape:connector-curvature="0" |
1669 | + sodipodi:nodetypes="cccc" /> |
1670 | + </g> |
1671 | + </g> |
1672 | + </g> |
1673 | +</svg> |
1674 | |
1675 | === added file 'src/app/qml/images/left-align.svg' |
1676 | --- src/app/qml/images/left-align.svg 1970-01-01 00:00:00 +0000 |
1677 | +++ src/app/qml/images/left-align.svg 2014-11-12 22:36:04 +0000 |
1678 | @@ -0,0 +1,172 @@ |
1679 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
1680 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
1681 | + |
1682 | +<svg |
1683 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
1684 | + xmlns:cc="http://creativecommons.org/ns#" |
1685 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
1686 | + xmlns:svg="http://www.w3.org/2000/svg" |
1687 | + xmlns="http://www.w3.org/2000/svg" |
1688 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
1689 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
1690 | + width="90" |
1691 | + height="90" |
1692 | + id="svg4874" |
1693 | + version="1.1" |
1694 | + inkscape:version="0.48.5 r10040" |
1695 | + viewBox="0 0 90 90.000001" |
1696 | + sodipodi:docname="unindent-block.svg"> |
1697 | + <defs |
1698 | + id="defs4876" /> |
1699 | + <sodipodi:namedview |
1700 | + id="base" |
1701 | + pagecolor="#ffffff" |
1702 | + bordercolor="#666666" |
1703 | + borderopacity="1.0" |
1704 | + inkscape:pageopacity="0.0" |
1705 | + inkscape:pageshadow="2" |
1706 | + inkscape:zoom="14.068028" |
1707 | + inkscape:cx="48.823164" |
1708 | + inkscape:cy="28.970989" |
1709 | + inkscape:document-units="px" |
1710 | + inkscape:current-layer="g1708" |
1711 | + showgrid="true" |
1712 | + showborder="true" |
1713 | + fit-margin-top="0" |
1714 | + fit-margin-left="0" |
1715 | + fit-margin-right="0" |
1716 | + fit-margin-bottom="0" |
1717 | + inkscape:snap-bbox="true" |
1718 | + inkscape:bbox-paths="true" |
1719 | + inkscape:bbox-nodes="true" |
1720 | + inkscape:snap-bbox-edge-midpoints="true" |
1721 | + inkscape:snap-bbox-midpoints="true" |
1722 | + inkscape:object-paths="true" |
1723 | + inkscape:snap-intersection-paths="true" |
1724 | + inkscape:object-nodes="true" |
1725 | + inkscape:snap-smooth-nodes="true" |
1726 | + inkscape:snap-midpoints="true" |
1727 | + inkscape:snap-object-midpoints="true" |
1728 | + inkscape:snap-center="true" |
1729 | + showguides="true" |
1730 | + inkscape:guide-bbox="true" |
1731 | + inkscape:window-width="2880" |
1732 | + inkscape:window-height="1752" |
1733 | + inkscape:window-x="0" |
1734 | + inkscape:window-y="48" |
1735 | + inkscape:window-maximized="1"> |
1736 | + <inkscape:grid |
1737 | + type="xygrid" |
1738 | + id="grid5451" |
1739 | + empspacing="6" /> |
1740 | + <sodipodi:guide |
1741 | + orientation="1,0" |
1742 | + position="6,77" |
1743 | + id="guide4063" /> |
1744 | + <sodipodi:guide |
1745 | + orientation="1,0" |
1746 | + position="3,78" |
1747 | + id="guide4065" /> |
1748 | + <sodipodi:guide |
1749 | + orientation="0,1" |
1750 | + position="55,84" |
1751 | + id="guide4067" /> |
1752 | + <sodipodi:guide |
1753 | + orientation="0,1" |
1754 | + position="53,87" |
1755 | + id="guide4069" /> |
1756 | + <sodipodi:guide |
1757 | + orientation="0,1" |
1758 | + position="20,3" |
1759 | + id="guide4071" /> |
1760 | + <sodipodi:guide |
1761 | + orientation="0,1" |
1762 | + position="20,6" |
1763 | + id="guide4073" /> |
1764 | + <sodipodi:guide |
1765 | + orientation="1,0" |
1766 | + position="87,7" |
1767 | + id="guide4075" /> |
1768 | + <sodipodi:guide |
1769 | + orientation="1,0" |
1770 | + position="84,7" |
1771 | + id="guide4077" /> |
1772 | + <sodipodi:guide |
1773 | + orientation="0,1" |
1774 | + position="58,81" |
1775 | + id="guide4074" /> |
1776 | + <sodipodi:guide |
1777 | + orientation="1,0" |
1778 | + position="9,74" |
1779 | + id="guide4076" /> |
1780 | + <sodipodi:guide |
1781 | + orientation="0,1" |
1782 | + position="21,9" |
1783 | + id="guide4078" /> |
1784 | + <sodipodi:guide |
1785 | + orientation="1,0" |
1786 | + position="81,4" |
1787 | + id="guide4080" /> |
1788 | + </sodipodi:namedview> |
1789 | + <metadata |
1790 | + id="metadata4879"> |
1791 | + <rdf:RDF> |
1792 | + <cc:Work |
1793 | + rdf:about=""> |
1794 | + <dc:format>image/svg+xml</dc:format> |
1795 | + <dc:type |
1796 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
1797 | + <dc:title></dc:title> |
1798 | + </cc:Work> |
1799 | + </rdf:RDF> |
1800 | + </metadata> |
1801 | + <g |
1802 | + inkscape:label="Layer 1" |
1803 | + inkscape:groupmode="layer" |
1804 | + id="layer1" |
1805 | + transform="translate(67.857146,-84.50504)"> |
1806 | + <g |
1807 | + transform="matrix(0,-1,-1,0,373.50506,516.50504)" |
1808 | + id="g4845" |
1809 | + style="display:inline"> |
1810 | + <g |
1811 | + inkscape:label="Layer 1" |
1812 | + id="g1708" |
1813 | + transform="matrix(0,-1,-1,0,1394.3622,441.36221)" |
1814 | + inkscape:export-filename="add01.png" |
1815 | + inkscape:export-xdpi="90" |
1816 | + inkscape:export-ydpi="90"> |
1817 | + <rect |
1818 | + style="color:#000000;fill:none;stroke:none;stroke-width:7.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1819 | + id="rect1710" |
1820 | + width="90" |
1821 | + height="90" |
1822 | + x="0" |
1823 | + y="962.36218" /> |
1824 | + <rect |
1825 | + y="977.36218" |
1826 | + x="9.0000038" |
1827 | + height="12.000018" |
1828 | + width="72" |
1829 | + id="rect4724" |
1830 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1831 | + <rect |
1832 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1833 | + id="rect4726" |
1834 | + width="50.999962" |
1835 | + height="12.000018" |
1836 | + x="-59.999966" |
1837 | + y="1001.3622" |
1838 | + transform="scale(-1,1)" /> |
1839 | + <rect |
1840 | + y="1025.3622" |
1841 | + x="-72.000008" |
1842 | + height="12.000018" |
1843 | + width="63" |
1844 | + id="rect4728" |
1845 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1846 | + transform="scale(-1,1)" /> |
1847 | + </g> |
1848 | + </g> |
1849 | + </g> |
1850 | +</svg> |
1851 | |
1852 | === added file 'src/app/qml/images/numbered-list.svg' |
1853 | --- src/app/qml/images/numbered-list.svg 1970-01-01 00:00:00 +0000 |
1854 | +++ src/app/qml/images/numbered-list.svg 2014-11-12 22:36:04 +0000 |
1855 | @@ -0,0 +1,203 @@ |
1856 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
1857 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
1858 | + |
1859 | +<svg |
1860 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
1861 | + xmlns:cc="http://creativecommons.org/ns#" |
1862 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
1863 | + xmlns:svg="http://www.w3.org/2000/svg" |
1864 | + xmlns="http://www.w3.org/2000/svg" |
1865 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
1866 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
1867 | + width="90" |
1868 | + height="90" |
1869 | + id="svg4874" |
1870 | + version="1.1" |
1871 | + inkscape:version="0.48.5 r10040" |
1872 | + viewBox="0 0 90 90.000001" |
1873 | + sodipodi:docname="numbered-list.svg"> |
1874 | + <defs |
1875 | + id="defs4876" /> |
1876 | + <sodipodi:namedview |
1877 | + id="base" |
1878 | + pagecolor="#ffffff" |
1879 | + bordercolor="#666666" |
1880 | + borderopacity="1.0" |
1881 | + inkscape:pageopacity="0.0" |
1882 | + inkscape:pageshadow="2" |
1883 | + inkscape:zoom="14.068028" |
1884 | + inkscape:cx="40.293184" |
1885 | + inkscape:cy="46.278487" |
1886 | + inkscape:document-units="px" |
1887 | + inkscape:current-layer="g1708" |
1888 | + showgrid="true" |
1889 | + showborder="true" |
1890 | + fit-margin-top="0" |
1891 | + fit-margin-left="0" |
1892 | + fit-margin-right="0" |
1893 | + fit-margin-bottom="0" |
1894 | + inkscape:snap-bbox="true" |
1895 | + inkscape:bbox-paths="true" |
1896 | + inkscape:bbox-nodes="true" |
1897 | + inkscape:snap-bbox-edge-midpoints="true" |
1898 | + inkscape:snap-bbox-midpoints="true" |
1899 | + inkscape:object-paths="true" |
1900 | + inkscape:snap-intersection-paths="true" |
1901 | + inkscape:object-nodes="true" |
1902 | + inkscape:snap-smooth-nodes="true" |
1903 | + inkscape:snap-midpoints="true" |
1904 | + inkscape:snap-object-midpoints="true" |
1905 | + inkscape:snap-center="true" |
1906 | + showguides="true" |
1907 | + inkscape:guide-bbox="true" |
1908 | + inkscape:window-width="2880" |
1909 | + inkscape:window-height="1752" |
1910 | + inkscape:window-x="0" |
1911 | + inkscape:window-y="48" |
1912 | + inkscape:window-maximized="1"> |
1913 | + <inkscape:grid |
1914 | + type="xygrid" |
1915 | + id="grid5451" |
1916 | + empspacing="6" /> |
1917 | + <sodipodi:guide |
1918 | + orientation="1,0" |
1919 | + position="6,77" |
1920 | + id="guide4063" /> |
1921 | + <sodipodi:guide |
1922 | + orientation="1,0" |
1923 | + position="3,78" |
1924 | + id="guide4065" /> |
1925 | + <sodipodi:guide |
1926 | + orientation="0,1" |
1927 | + position="55,84" |
1928 | + id="guide4067" /> |
1929 | + <sodipodi:guide |
1930 | + orientation="0,1" |
1931 | + position="53,87" |
1932 | + id="guide4069" /> |
1933 | + <sodipodi:guide |
1934 | + orientation="0,1" |
1935 | + position="20,3" |
1936 | + id="guide4071" /> |
1937 | + <sodipodi:guide |
1938 | + orientation="0,1" |
1939 | + position="20,6" |
1940 | + id="guide4073" /> |
1941 | + <sodipodi:guide |
1942 | + orientation="1,0" |
1943 | + position="87,7" |
1944 | + id="guide4075" /> |
1945 | + <sodipodi:guide |
1946 | + orientation="1,0" |
1947 | + position="84,7" |
1948 | + id="guide4077" /> |
1949 | + <sodipodi:guide |
1950 | + orientation="0,1" |
1951 | + position="58,81" |
1952 | + id="guide4074" /> |
1953 | + <sodipodi:guide |
1954 | + orientation="1,0" |
1955 | + position="9,74" |
1956 | + id="guide4076" /> |
1957 | + <sodipodi:guide |
1958 | + orientation="0,1" |
1959 | + position="21,9" |
1960 | + id="guide4078" /> |
1961 | + <sodipodi:guide |
1962 | + orientation="1,0" |
1963 | + position="81,4" |
1964 | + id="guide4080" /> |
1965 | + </sodipodi:namedview> |
1966 | + <metadata |
1967 | + id="metadata4879"> |
1968 | + <rdf:RDF> |
1969 | + <cc:Work |
1970 | + rdf:about=""> |
1971 | + <dc:format>image/svg+xml</dc:format> |
1972 | + <dc:type |
1973 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
1974 | + <dc:title></dc:title> |
1975 | + </cc:Work> |
1976 | + </rdf:RDF> |
1977 | + </metadata> |
1978 | + <g |
1979 | + inkscape:label="Layer 1" |
1980 | + inkscape:groupmode="layer" |
1981 | + id="layer1" |
1982 | + transform="translate(67.857146,-84.50504)"> |
1983 | + <g |
1984 | + transform="matrix(0,-1,-1,0,373.50506,516.50504)" |
1985 | + id="g4845" |
1986 | + style="display:inline"> |
1987 | + <g |
1988 | + inkscape:label="Layer 1" |
1989 | + id="g1708" |
1990 | + transform="matrix(0,-1,-1,0,1394.3622,441.36221)" |
1991 | + inkscape:export-filename="add01.png" |
1992 | + inkscape:export-xdpi="90" |
1993 | + inkscape:export-ydpi="90"> |
1994 | + <rect |
1995 | + style="color:#000000;fill:none;stroke:none;stroke-width:7.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
1996 | + id="rect1710" |
1997 | + width="90" |
1998 | + height="90" |
1999 | + x="0" |
2000 | + y="962.36218" /> |
2001 | + <rect |
2002 | + y="977.36218" |
2003 | + x="30.000042" |
2004 | + height="12.000018" |
2005 | + width="50.999962" |
2006 | + id="rect4724" |
2007 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
2008 | + <rect |
2009 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
2010 | + id="rect4726" |
2011 | + width="50.999962" |
2012 | + height="12.000018" |
2013 | + x="30.000042" |
2014 | + y="1001.3622" /> |
2015 | + <rect |
2016 | + y="1025.3622" |
2017 | + x="30.000042" |
2018 | + height="12.000018" |
2019 | + width="50.999962" |
2020 | + id="rect4728" |
2021 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
2022 | + <text |
2023 | + xml:space="preserve" |
2024 | + style="font-size:24.47199631px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#808080;fill-opacity:1;stroke:none;font-family:Sans" |
2025 | + x="7.0000038" |
2026 | + y="992.28229" |
2027 | + id="text3050" |
2028 | + sodipodi:linespacing="125%"><tspan |
2029 | + sodipodi:role="line" |
2030 | + id="tspan3052" |
2031 | + x="7.0000038" |
2032 | + y="992.28229">1</tspan></text> |
2033 | + <text |
2034 | + sodipodi:linespacing="125%" |
2035 | + id="text3822" |
2036 | + y="1016.1451" |
2037 | + x="7.333921" |
2038 | + style="font-size:23.96021271px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#808080;fill-opacity:1;stroke:none;font-family:Sans" |
2039 | + xml:space="preserve"><tspan |
2040 | + y="1016.1451" |
2041 | + x="7.333921" |
2042 | + id="tspan3824" |
2043 | + sodipodi:role="line">2</tspan></text> |
2044 | + <text |
2045 | + xml:space="preserve" |
2046 | + style="font-size:23.81980896px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#808080;fill-opacity:1;stroke:none;font-family:Sans" |
2047 | + x="7.2922583" |
2048 | + y="1040.041" |
2049 | + id="text3826" |
2050 | + sodipodi:linespacing="125%"><tspan |
2051 | + sodipodi:role="line" |
2052 | + id="tspan3828" |
2053 | + x="7.2922583" |
2054 | + y="1040.041">3</tspan></text> |
2055 | + </g> |
2056 | + </g> |
2057 | + </g> |
2058 | +</svg> |
2059 | |
2060 | === added file 'src/app/qml/images/right-align.svg' |
2061 | --- src/app/qml/images/right-align.svg 1970-01-01 00:00:00 +0000 |
2062 | +++ src/app/qml/images/right-align.svg 2014-11-12 22:36:04 +0000 |
2063 | @@ -0,0 +1,172 @@ |
2064 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
2065 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
2066 | + |
2067 | +<svg |
2068 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
2069 | + xmlns:cc="http://creativecommons.org/ns#" |
2070 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
2071 | + xmlns:svg="http://www.w3.org/2000/svg" |
2072 | + xmlns="http://www.w3.org/2000/svg" |
2073 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
2074 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
2075 | + width="90" |
2076 | + height="90" |
2077 | + id="svg4874" |
2078 | + version="1.1" |
2079 | + inkscape:version="0.48.5 r10040" |
2080 | + viewBox="0 0 90 90.000001" |
2081 | + sodipodi:docname="left-align.svg"> |
2082 | + <defs |
2083 | + id="defs4876" /> |
2084 | + <sodipodi:namedview |
2085 | + id="base" |
2086 | + pagecolor="#ffffff" |
2087 | + bordercolor="#666666" |
2088 | + borderopacity="1.0" |
2089 | + inkscape:pageopacity="0.0" |
2090 | + inkscape:pageshadow="2" |
2091 | + inkscape:zoom="9.9475981" |
2092 | + inkscape:cx="35.170166" |
2093 | + inkscape:cy="44.786927" |
2094 | + inkscape:document-units="px" |
2095 | + inkscape:current-layer="g1708" |
2096 | + showgrid="true" |
2097 | + showborder="true" |
2098 | + fit-margin-top="0" |
2099 | + fit-margin-left="0" |
2100 | + fit-margin-right="0" |
2101 | + fit-margin-bottom="0" |
2102 | + inkscape:snap-bbox="true" |
2103 | + inkscape:bbox-paths="true" |
2104 | + inkscape:bbox-nodes="true" |
2105 | + inkscape:snap-bbox-edge-midpoints="true" |
2106 | + inkscape:snap-bbox-midpoints="true" |
2107 | + inkscape:object-paths="true" |
2108 | + inkscape:snap-intersection-paths="true" |
2109 | + inkscape:object-nodes="true" |
2110 | + inkscape:snap-smooth-nodes="true" |
2111 | + inkscape:snap-midpoints="true" |
2112 | + inkscape:snap-object-midpoints="true" |
2113 | + inkscape:snap-center="true" |
2114 | + showguides="true" |
2115 | + inkscape:guide-bbox="true" |
2116 | + inkscape:window-width="2880" |
2117 | + inkscape:window-height="1752" |
2118 | + inkscape:window-x="0" |
2119 | + inkscape:window-y="48" |
2120 | + inkscape:window-maximized="1"> |
2121 | + <inkscape:grid |
2122 | + type="xygrid" |
2123 | + id="grid5451" |
2124 | + empspacing="6" /> |
2125 | + <sodipodi:guide |
2126 | + orientation="1,0" |
2127 | + position="6,77" |
2128 | + id="guide4063" /> |
2129 | + <sodipodi:guide |
2130 | + orientation="1,0" |
2131 | + position="3,78" |
2132 | + id="guide4065" /> |
2133 | + <sodipodi:guide |
2134 | + orientation="0,1" |
2135 | + position="55,84" |
2136 | + id="guide4067" /> |
2137 | + <sodipodi:guide |
2138 | + orientation="0,1" |
2139 | + position="53,87" |
2140 | + id="guide4069" /> |
2141 | + <sodipodi:guide |
2142 | + orientation="0,1" |
2143 | + position="20,3" |
2144 | + id="guide4071" /> |
2145 | + <sodipodi:guide |
2146 | + orientation="0,1" |
2147 | + position="20,6" |
2148 | + id="guide4073" /> |
2149 | + <sodipodi:guide |
2150 | + orientation="1,0" |
2151 | + position="87,7" |
2152 | + id="guide4075" /> |
2153 | + <sodipodi:guide |
2154 | + orientation="1,0" |
2155 | + position="84,7" |
2156 | + id="guide4077" /> |
2157 | + <sodipodi:guide |
2158 | + orientation="0,1" |
2159 | + position="58,81" |
2160 | + id="guide4074" /> |
2161 | + <sodipodi:guide |
2162 | + orientation="1,0" |
2163 | + position="9,74" |
2164 | + id="guide4076" /> |
2165 | + <sodipodi:guide |
2166 | + orientation="0,1" |
2167 | + position="21,9" |
2168 | + id="guide4078" /> |
2169 | + <sodipodi:guide |
2170 | + orientation="1,0" |
2171 | + position="81,4" |
2172 | + id="guide4080" /> |
2173 | + </sodipodi:namedview> |
2174 | + <metadata |
2175 | + id="metadata4879"> |
2176 | + <rdf:RDF> |
2177 | + <cc:Work |
2178 | + rdf:about=""> |
2179 | + <dc:format>image/svg+xml</dc:format> |
2180 | + <dc:type |
2181 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
2182 | + <dc:title></dc:title> |
2183 | + </cc:Work> |
2184 | + </rdf:RDF> |
2185 | + </metadata> |
2186 | + <g |
2187 | + inkscape:label="Layer 1" |
2188 | + inkscape:groupmode="layer" |
2189 | + id="layer1" |
2190 | + transform="translate(67.857146,-84.50504)"> |
2191 | + <g |
2192 | + transform="matrix(0,-1,-1,0,373.50506,516.50504)" |
2193 | + id="g4845" |
2194 | + style="display:inline"> |
2195 | + <g |
2196 | + inkscape:label="Layer 1" |
2197 | + id="g1708" |
2198 | + transform="matrix(0,-1,-1,0,1394.3622,441.36221)" |
2199 | + inkscape:export-filename="add01.png" |
2200 | + inkscape:export-xdpi="90" |
2201 | + inkscape:export-ydpi="90"> |
2202 | + <rect |
2203 | + style="color:#000000;fill:none;stroke:none;stroke-width:7.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
2204 | + id="rect1710" |
2205 | + width="90" |
2206 | + height="90" |
2207 | + x="0" |
2208 | + y="962.36218" /> |
2209 | + <rect |
2210 | + y="977.36218" |
2211 | + x="9.0000038" |
2212 | + height="12.000018" |
2213 | + width="72" |
2214 | + id="rect4724" |
2215 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
2216 | + <rect |
2217 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
2218 | + id="rect4726" |
2219 | + width="50.999962" |
2220 | + height="12.000018" |
2221 | + x="-81.000008" |
2222 | + y="1001.3622" |
2223 | + transform="scale(-1,1)" /> |
2224 | + <rect |
2225 | + y="1025.3622" |
2226 | + x="-81.000008" |
2227 | + height="12.000018" |
2228 | + width="63" |
2229 | + id="rect4728" |
2230 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
2231 | + transform="scale(-1,1)" /> |
2232 | + </g> |
2233 | + </g> |
2234 | + </g> |
2235 | +</svg> |
2236 | |
2237 | === added file 'src/app/qml/images/unindent-block.svg' |
2238 | --- src/app/qml/images/unindent-block.svg 1970-01-01 00:00:00 +0000 |
2239 | +++ src/app/qml/images/unindent-block.svg 2014-11-12 22:36:04 +0000 |
2240 | @@ -0,0 +1,178 @@ |
2241 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
2242 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
2243 | + |
2244 | +<svg |
2245 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
2246 | + xmlns:cc="http://creativecommons.org/ns#" |
2247 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
2248 | + xmlns:svg="http://www.w3.org/2000/svg" |
2249 | + xmlns="http://www.w3.org/2000/svg" |
2250 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
2251 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
2252 | + width="90" |
2253 | + height="90" |
2254 | + id="svg4874" |
2255 | + version="1.1" |
2256 | + inkscape:version="0.48.5 r10040" |
2257 | + viewBox="0 0 90 90.000001" |
2258 | + sodipodi:docname="indent-block.svg"> |
2259 | + <defs |
2260 | + id="defs4876" /> |
2261 | + <sodipodi:namedview |
2262 | + id="base" |
2263 | + pagecolor="#ffffff" |
2264 | + bordercolor="#666666" |
2265 | + borderopacity="1.0" |
2266 | + inkscape:pageopacity="0.0" |
2267 | + inkscape:pageshadow="2" |
2268 | + inkscape:zoom="14.068028" |
2269 | + inkscape:cx="48.823164" |
2270 | + inkscape:cy="28.970989" |
2271 | + inkscape:document-units="px" |
2272 | + inkscape:current-layer="g1708" |
2273 | + showgrid="true" |
2274 | + showborder="true" |
2275 | + fit-margin-top="0" |
2276 | + fit-margin-left="0" |
2277 | + fit-margin-right="0" |
2278 | + fit-margin-bottom="0" |
2279 | + inkscape:snap-bbox="true" |
2280 | + inkscape:bbox-paths="true" |
2281 | + inkscape:bbox-nodes="true" |
2282 | + inkscape:snap-bbox-edge-midpoints="true" |
2283 | + inkscape:snap-bbox-midpoints="true" |
2284 | + inkscape:object-paths="true" |
2285 | + inkscape:snap-intersection-paths="true" |
2286 | + inkscape:object-nodes="true" |
2287 | + inkscape:snap-smooth-nodes="true" |
2288 | + inkscape:snap-midpoints="true" |
2289 | + inkscape:snap-object-midpoints="true" |
2290 | + inkscape:snap-center="true" |
2291 | + showguides="true" |
2292 | + inkscape:guide-bbox="true" |
2293 | + inkscape:window-width="2880" |
2294 | + inkscape:window-height="1752" |
2295 | + inkscape:window-x="0" |
2296 | + inkscape:window-y="48" |
2297 | + inkscape:window-maximized="1"> |
2298 | + <inkscape:grid |
2299 | + type="xygrid" |
2300 | + id="grid5451" |
2301 | + empspacing="6" /> |
2302 | + <sodipodi:guide |
2303 | + orientation="1,0" |
2304 | + position="6,77" |
2305 | + id="guide4063" /> |
2306 | + <sodipodi:guide |
2307 | + orientation="1,0" |
2308 | + position="3,78" |
2309 | + id="guide4065" /> |
2310 | + <sodipodi:guide |
2311 | + orientation="0,1" |
2312 | + position="55,84" |
2313 | + id="guide4067" /> |
2314 | + <sodipodi:guide |
2315 | + orientation="0,1" |
2316 | + position="53,87" |
2317 | + id="guide4069" /> |
2318 | + <sodipodi:guide |
2319 | + orientation="0,1" |
2320 | + position="20,3" |
2321 | + id="guide4071" /> |
2322 | + <sodipodi:guide |
2323 | + orientation="0,1" |
2324 | + position="20,6" |
2325 | + id="guide4073" /> |
2326 | + <sodipodi:guide |
2327 | + orientation="1,0" |
2328 | + position="87,7" |
2329 | + id="guide4075" /> |
2330 | + <sodipodi:guide |
2331 | + orientation="1,0" |
2332 | + position="84,7" |
2333 | + id="guide4077" /> |
2334 | + <sodipodi:guide |
2335 | + orientation="0,1" |
2336 | + position="58,81" |
2337 | + id="guide4074" /> |
2338 | + <sodipodi:guide |
2339 | + orientation="1,0" |
2340 | + position="9,74" |
2341 | + id="guide4076" /> |
2342 | + <sodipodi:guide |
2343 | + orientation="0,1" |
2344 | + position="21,9" |
2345 | + id="guide4078" /> |
2346 | + <sodipodi:guide |
2347 | + orientation="1,0" |
2348 | + position="81,4" |
2349 | + id="guide4080" /> |
2350 | + </sodipodi:namedview> |
2351 | + <metadata |
2352 | + id="metadata4879"> |
2353 | + <rdf:RDF> |
2354 | + <cc:Work |
2355 | + rdf:about=""> |
2356 | + <dc:format>image/svg+xml</dc:format> |
2357 | + <dc:type |
2358 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
2359 | + <dc:title></dc:title> |
2360 | + </cc:Work> |
2361 | + </rdf:RDF> |
2362 | + </metadata> |
2363 | + <g |
2364 | + inkscape:label="Layer 1" |
2365 | + inkscape:groupmode="layer" |
2366 | + id="layer1" |
2367 | + transform="translate(67.857146,-84.50504)"> |
2368 | + <g |
2369 | + transform="matrix(0,-1,-1,0,373.50506,516.50504)" |
2370 | + id="g4845" |
2371 | + style="display:inline"> |
2372 | + <g |
2373 | + inkscape:label="Layer 1" |
2374 | + id="g1708" |
2375 | + transform="matrix(0,-1,-1,0,1394.3622,441.36221)" |
2376 | + inkscape:export-filename="add01.png" |
2377 | + inkscape:export-xdpi="90" |
2378 | + inkscape:export-ydpi="90"> |
2379 | + <rect |
2380 | + style="color:#000000;fill:none;stroke:none;stroke-width:7.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
2381 | + id="rect1710" |
2382 | + width="90" |
2383 | + height="90" |
2384 | + x="0" |
2385 | + y="962.36218" /> |
2386 | + <rect |
2387 | + y="977.36218" |
2388 | + x="9.0000038" |
2389 | + height="12.000018" |
2390 | + width="72" |
2391 | + id="rect4724" |
2392 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
2393 | + <rect |
2394 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
2395 | + id="rect4726" |
2396 | + width="50.999962" |
2397 | + height="12.000018" |
2398 | + x="-59.999966" |
2399 | + y="1001.3622" |
2400 | + transform="scale(-1,1)" /> |
2401 | + <rect |
2402 | + y="1025.3622" |
2403 | + x="-59.999966" |
2404 | + height="12.000018" |
2405 | + width="50.999962" |
2406 | + id="rect4728" |
2407 | + style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
2408 | + transform="scale(-1,1)" /> |
2409 | + <path |
2410 | + style="fill:#808080;fill-opacity:1" |
2411 | + d="m 81.000004,1007.3622 -15,12 15,12 z" |
2412 | + id="rect3849" |
2413 | + inkscape:connector-curvature="0" |
2414 | + sodipodi:nodetypes="cccc" /> |
2415 | + </g> |
2416 | + </g> |
2417 | + </g> |
2418 | +</svg> |
2419 | |
2420 | === removed file 'src/app/qml/ui/CameraComponents/CameraToolbar.qml' |
2421 | --- src/app/qml/ui/CameraComponents/CameraToolbar.qml 2014-09-23 12:39:27 +0000 |
2422 | +++ src/app/qml/ui/CameraComponents/CameraToolbar.qml 1970-01-01 00:00:00 +0000 |
2423 | @@ -1,109 +0,0 @@ |
2424 | -/* |
2425 | - * Copyright 2012 - 2014 Canonical Ltd. |
2426 | - * |
2427 | - * This program is free software; you can redistribute it and/or modify |
2428 | - * it under the terms of the GNU General Public License as published by |
2429 | - * the Free Software Foundation; version 3. |
2430 | - * |
2431 | - * This program is distributed in the hope that it will be useful, |
2432 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2433 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2434 | - * GNU General Public License for more details. |
2435 | - * |
2436 | - * You should have received a copy of the GNU General Public License |
2437 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2438 | - */ |
2439 | - |
2440 | -import QtQuick 2.3 |
2441 | -import QtMultimedia 5.0 |
2442 | -import Ubuntu.Components 1.1 |
2443 | - |
2444 | -Item { |
2445 | - id: toolbar |
2446 | - |
2447 | - property Camera camera |
2448 | - |
2449 | - signal zoomClicked() |
2450 | - |
2451 | - Behavior on opacity { NumberAnimation { duration: 500 } } |
2452 | - |
2453 | - height: middle.height |
2454 | - property int iconWidth: units.gu(6) |
2455 | - property int iconHeight: units.gu(5) |
2456 | - property bool canCapture |
2457 | - |
2458 | - function switchFlashMode() { |
2459 | - camera.flash.mode = (flashButton.flashState == "off") ? Camera.FlashOn : |
2460 | - ((flashButton.flashState == "on") ? Camera.FlashAuto : Camera.FlashOff); |
2461 | - } |
2462 | - |
2463 | - BorderImage { |
2464 | - id: leftBackground |
2465 | - anchors { |
2466 | - left: parent.left; top: parent.top; bottom: parent.bottom; right: middle.left; |
2467 | - topMargin: units.dp(2); bottomMargin: units.dp(2) |
2468 | - } |
2469 | - source: "assets/toolbar-left.sci" |
2470 | - |
2471 | - property int iconSpacing: (width - toolbar.iconWidth * children.length) / 3 |
2472 | - |
2473 | - FlashButton { |
2474 | - id: flashButton |
2475 | - anchors { verticalCenter: parent.verticalCenter; left: parent.left; leftMargin: parent.iconSpacing } |
2476 | - |
2477 | - height: toolbar.iconHeight |
2478 | - width: toolbar.iconWidth |
2479 | - enabled: toolbar.opacity > 0.0 |
2480 | - |
2481 | - flashState: { switch (camera.flash.mode) { |
2482 | - case Camera.FlashAuto: return "auto"; |
2483 | - case Camera.FlashOn: |
2484 | - case Camera.FlashVideoLight: return "on"; |
2485 | - case Camera.FlashOff: |
2486 | - default: return "off" |
2487 | - }} |
2488 | - |
2489 | - onClicked: toolbar.switchFlashMode() |
2490 | - |
2491 | - property variant previousFlashMode: Camera.FlashOff |
2492 | - } |
2493 | - } |
2494 | - |
2495 | - BorderImage { |
2496 | - id: middle |
2497 | - anchors { top: parent.top; bottom: parent.bottom; horizontalCenter: parent.horizontalCenter } |
2498 | - height: shootButton.height + units.gu(1) |
2499 | - source: "assets/toolbar-middle.sci" |
2500 | - |
2501 | - CameraToolbarButton { |
2502 | - id: shootButton |
2503 | - anchors.centerIn: parent |
2504 | - iconWidth: units.gu(8) |
2505 | - iconHeight: units.gu(8) |
2506 | - iconSource: "assets/shoot.png" |
2507 | - |
2508 | - onClicked: camera.imageCapture.captureToLocation(cameraHelper.importLocation); |
2509 | - enabled: toolbar.canCapture |
2510 | - opacity: enabled ? 1.0 : 0.5 |
2511 | - } |
2512 | - } |
2513 | - |
2514 | - BorderImage { |
2515 | - id: rightBackground |
2516 | - anchors { |
2517 | - right: parent.right; top: parent.top; bottom: parent.bottom; left: middle.right; |
2518 | - topMargin: units.dp(2); bottomMargin: units.dp(2) |
2519 | - } |
2520 | - source: "assets/toolbar-right.sci" |
2521 | - |
2522 | - CameraToolbarButton { |
2523 | - id: closeButton |
2524 | - anchors.centerIn: parent |
2525 | - iconWidth: toolbar.iconWidth |
2526 | - iconHeight: toolbar.iconHeight |
2527 | - iconSource: "assets/close.png" |
2528 | - |
2529 | - onClicked: pagestack.pop(); |
2530 | - } |
2531 | - } |
2532 | -} |
2533 | |
2534 | === removed file 'src/app/qml/ui/CameraComponents/CameraToolbarButton.qml' |
2535 | --- src/app/qml/ui/CameraComponents/CameraToolbarButton.qml 2014-09-23 12:39:27 +0000 |
2536 | +++ src/app/qml/ui/CameraComponents/CameraToolbarButton.qml 1970-01-01 00:00:00 +0000 |
2537 | @@ -1,32 +0,0 @@ |
2538 | -/* |
2539 | - * Copyright 2012 Canonical Ltd. |
2540 | - * |
2541 | - * This program is free software; you can redistribute it and/or modify |
2542 | - * it under the terms of the GNU General Public License as published by |
2543 | - * the Free Software Foundation; version 3. |
2544 | - * |
2545 | - * This program is distributed in the hope that it will be useful, |
2546 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2547 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2548 | - * GNU General Public License for more details. |
2549 | - * |
2550 | - * You should have received a copy of the GNU General Public License |
2551 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2552 | - */ |
2553 | - |
2554 | -import QtQuick 2.3 |
2555 | -import Ubuntu.Components 1.1 |
2556 | - |
2557 | -AbstractButton { |
2558 | - property alias iconWidth: icon.width |
2559 | - property alias iconHeight: icon.height |
2560 | - property alias iconSource: icon.source |
2561 | - |
2562 | - width: icon.paintedWidth |
2563 | - height: icon.paintedHeight |
2564 | - |
2565 | - Image { |
2566 | - id: icon |
2567 | - } |
2568 | -} |
2569 | - |
2570 | |
2571 | === removed file 'src/app/qml/ui/CameraComponents/CrossFadingButton.qml' |
2572 | --- src/app/qml/ui/CameraComponents/CrossFadingButton.qml 2014-09-23 12:39:27 +0000 |
2573 | +++ src/app/qml/ui/CameraComponents/CrossFadingButton.qml 1970-01-01 00:00:00 +0000 |
2574 | @@ -1,60 +0,0 @@ |
2575 | -/* |
2576 | - * Copyright (C) 2012 Canonical, Ltd. |
2577 | - * |
2578 | - * This program is free software; you can redistribute it and/or modify |
2579 | - * it under the terms of the GNU General Public License as published by |
2580 | - * the Free Software Foundation; version 3. |
2581 | - * |
2582 | - * This program is distributed in the hope that it will be useful, |
2583 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2584 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2585 | - * GNU General Public License for more details. |
2586 | - * |
2587 | - * You should have received a copy of the GNU General Public License |
2588 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2589 | - */ |
2590 | - |
2591 | -import QtQuick 2.3 |
2592 | -import Ubuntu.Components 1.1 |
2593 | -import "constants.js" as Const |
2594 | - |
2595 | -AbstractButton { |
2596 | - id: button |
2597 | - property string iconSource |
2598 | - |
2599 | - property Image __active: icon1 |
2600 | - property Image __inactive: icon2 |
2601 | - |
2602 | - onIconSourceChanged: { |
2603 | - if (__active && __inactive) { |
2604 | - __inactive.source = iconSource |
2605 | - __active.opacity = 0.0 |
2606 | - __inactive.opacity = 1.0 |
2607 | - var swap = __active |
2608 | - __active = __inactive |
2609 | - __inactive = swap |
2610 | - } else icon1.source = iconSource |
2611 | - } |
2612 | - |
2613 | - Image { |
2614 | - id: icon1 |
2615 | - anchors.fill: parent |
2616 | - Behavior on opacity { |
2617 | - NumberAnimation { |
2618 | - duration: Const.iconFadeDuration; easing.type: Easing.InOutQuad |
2619 | - } |
2620 | - } |
2621 | - } |
2622 | - |
2623 | - Image { |
2624 | - id: icon2 |
2625 | - anchors.fill: parent |
2626 | - opacity: 0.0 |
2627 | - Behavior on opacity { |
2628 | - NumberAnimation { |
2629 | - duration: Const.iconFadeDuration; easing.type: Easing.InOutQuad |
2630 | - } |
2631 | - } |
2632 | - } |
2633 | -} |
2634 | - |
2635 | |
2636 | === removed file 'src/app/qml/ui/CameraComponents/FadingButton.qml' |
2637 | --- src/app/qml/ui/CameraComponents/FadingButton.qml 2014-09-23 12:39:27 +0000 |
2638 | +++ src/app/qml/ui/CameraComponents/FadingButton.qml 1970-01-01 00:00:00 +0000 |
2639 | @@ -1,72 +0,0 @@ |
2640 | -/* |
2641 | - * Copyright (C) 2012 Canonical, Ltd. |
2642 | - * |
2643 | - * This program is free software; you can redistribute it and/or modify |
2644 | - * it under the terms of the GNU General Public License as published by |
2645 | - * the Free Software Foundation; version 3. |
2646 | - * |
2647 | - * This program is distributed in the hope that it will be useful, |
2648 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2649 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2650 | - * GNU General Public License for more details. |
2651 | - * |
2652 | - * You should have received a copy of the GNU General Public License |
2653 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2654 | - */ |
2655 | - |
2656 | -import QtQuick 2.3 |
2657 | -import Ubuntu.Components 1.1 |
2658 | -import "constants.js" as Const |
2659 | - |
2660 | -AbstractButton { |
2661 | - id: button |
2662 | - property string iconSource |
2663 | - |
2664 | - property Image __active: icon1 |
2665 | - property Image __inactive: icon2 |
2666 | - |
2667 | - onIconSourceChanged: { |
2668 | - if (__active && __inactive) { |
2669 | - __inactive.source = iconSource |
2670 | - __active.opacity = 0.0 |
2671 | - } else icon1.source = iconSource |
2672 | - } |
2673 | - |
2674 | - Image { |
2675 | - id: icon1 |
2676 | - anchors.fill: parent |
2677 | - Behavior on opacity { |
2678 | - NumberAnimation { |
2679 | - duration: Const.iconFadeDuration; easing.type: Easing.InOutQuad |
2680 | - } |
2681 | - } |
2682 | - } |
2683 | - |
2684 | - Image { |
2685 | - id: icon2 |
2686 | - anchors.fill: parent |
2687 | - opacity: 0.0 |
2688 | - Behavior on opacity { |
2689 | - NumberAnimation { |
2690 | - duration: Const.iconFadeDuration; easing.type: Easing.InOutQuad |
2691 | - } |
2692 | - } |
2693 | - } |
2694 | - |
2695 | - Connections { |
2696 | - target: __active |
2697 | - onOpacityChanged: if (__active.opacity == 0.0) __inactive.opacity = 1.0 |
2698 | - } |
2699 | - |
2700 | - Connections { |
2701 | - target: __inactive |
2702 | - onOpacityChanged: { |
2703 | - if (__inactive.opacity == 1.0) { |
2704 | - var swap = __active |
2705 | - __active = __inactive |
2706 | - __inactive = swap |
2707 | - } |
2708 | - } |
2709 | - } |
2710 | -} |
2711 | - |
2712 | |
2713 | === removed file 'src/app/qml/ui/CameraComponents/FlashButton.qml' |
2714 | --- src/app/qml/ui/CameraComponents/FlashButton.qml 2014-09-20 10:52:20 +0000 |
2715 | +++ src/app/qml/ui/CameraComponents/FlashButton.qml 1970-01-01 00:00:00 +0000 |
2716 | @@ -1,34 +0,0 @@ |
2717 | -/* |
2718 | - * Copyright (C) 2012 Canonical, Ltd. |
2719 | - * |
2720 | - * This program is free software; you can redistribute it and/or modify |
2721 | - * it under the terms of the GNU General Public License as published by |
2722 | - * the Free Software Foundation; version 3. |
2723 | - * |
2724 | - * This program is distributed in the hope that it will be useful, |
2725 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2726 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2727 | - * GNU General Public License for more details. |
2728 | - * |
2729 | - * You should have received a copy of the GNU General Public License |
2730 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2731 | - */ |
2732 | - |
2733 | -import QtQuick 2.3 |
2734 | -import "constants.js" as Const |
2735 | - |
2736 | -Item { |
2737 | - id: button |
2738 | - |
2739 | - property bool flashAllowed: true |
2740 | - property string flashState: "off" |
2741 | - signal clicked() |
2742 | - |
2743 | - CrossFadingButton { |
2744 | - id: flash |
2745 | - anchors.fill: parent |
2746 | - iconSource: (flashState == "off") ? "assets/flash_off.png" : |
2747 | - ((flashState == "on") ? "assets/flash_on.png" : "assets/flash_auto.png") |
2748 | - onClicked: button.clicked() |
2749 | - } |
2750 | -} |
2751 | |
2752 | === removed file 'src/app/qml/ui/CameraComponents/ThinSliderStyle.qml' |
2753 | --- src/app/qml/ui/CameraComponents/ThinSliderStyle.qml 2014-09-23 12:39:27 +0000 |
2754 | +++ src/app/qml/ui/CameraComponents/ThinSliderStyle.qml 1970-01-01 00:00:00 +0000 |
2755 | @@ -1,78 +0,0 @@ |
2756 | -/* |
2757 | - * Copyright 2012 Canonical Ltd. |
2758 | - * |
2759 | - * This program is free software; you can redistribute it and/or modify |
2760 | - * it under the terms of the GNU General Public License as published by |
2761 | - * the Free Software Foundation; version 3. |
2762 | - * |
2763 | - * This program is distributed in the hope that it will be useful, |
2764 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2765 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2766 | - * GNU General Public License for more details. |
2767 | - * |
2768 | - * You should have received a copy of the GNU General Public License |
2769 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2770 | - */ |
2771 | - |
2772 | -import QtQuick 2.3 |
2773 | -import Ubuntu.Components 1.1 |
2774 | - |
2775 | -/* |
2776 | - This delegate is styled using the following properties: |
2777 | - - backgroundImage: image source for the bar |
2778 | - - backgroundImageHeight: specifies the height of the image to be used; |
2779 | - if not specified, the images source height will be used |
2780 | - - thumbImage: image source for the thumb |
2781 | - - thumbWidth, thumbHeight: width and height of the thumb; source measurements |
2782 | - will be used if not specified |
2783 | - - thumbSpacing: spacing between the thumb and the bar; 0 if not specified |
2784 | - */ |
2785 | - |
2786 | -Item { |
2787 | - |
2788 | - id: main |
2789 | - anchors.fill: parent |
2790 | - |
2791 | - property Item bar: backgroundShape |
2792 | - property Item thumb: thumbShape |
2793 | - |
2794 | - property real normalizedValue: SliderUtils.normalizedValue(styledItem) |
2795 | - property real thumbSpacing: 0.0 |
2796 | - property real thumbSpace: backgroundShape.width - (2.0 * thumbSpacing + thumbWidth) |
2797 | - property real thumbWidth: units.gu(1.5) |
2798 | - property real thumbHeight: units.gu(1.5) |
2799 | - |
2800 | - property string backgroundImage: "assets/zoom_bar@18.png" |
2801 | - property string thumbImage: "assets/zoom_point@18.png" |
2802 | - |
2803 | - Image { |
2804 | - id: backgroundShape |
2805 | - anchors { |
2806 | - left: parent.left |
2807 | - right: parent.right |
2808 | - verticalCenter: parent.verticalCenter |
2809 | - } |
2810 | - source: backgroundImage |
2811 | - height: sourceSize.height |
2812 | - } |
2813 | - |
2814 | - Image { |
2815 | - id: thumbShape |
2816 | - objectName: "sliderThumb" |
2817 | - |
2818 | - x: backgroundShape.x + thumbSpacing + normalizedValue * thumbSpace |
2819 | - y: backgroundShape.y + thumbSpacing |
2820 | - width: thumbWidth |
2821 | - height: thumbHeight |
2822 | - anchors.verticalCenter: backgroundShape.verticalCenter |
2823 | - source: thumbImage |
2824 | - } |
2825 | - |
2826 | - // set styledItem's implicitHeight to the thumbShape's height |
2827 | - // this can also control the default sensing area |
2828 | - Binding { |
2829 | - target: styledItem |
2830 | - property: "implicitHeight" |
2831 | - value: thumbShape.height + 2.0 * thumbSpacing |
2832 | - } |
2833 | -} |
2834 | |
2835 | === removed file 'src/app/qml/ui/CameraComponents/ViewFinderGeometry.qml' |
2836 | --- src/app/qml/ui/CameraComponents/ViewFinderGeometry.qml 2014-09-20 10:52:20 +0000 |
2837 | +++ src/app/qml/ui/CameraComponents/ViewFinderGeometry.qml 1970-01-01 00:00:00 +0000 |
2838 | @@ -1,35 +0,0 @@ |
2839 | -/* |
2840 | - * Copyright 2013 Canonical Ltd. |
2841 | - * |
2842 | - * This program is free software; you can redistribute it and/or modify |
2843 | - * it under the terms of the GNU General Public License as published by |
2844 | - * the Free Software Foundation; version 3. |
2845 | - * |
2846 | - * This program is distributed in the hope that it will be useful, |
2847 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2848 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2849 | - * GNU General Public License for more details. |
2850 | - * |
2851 | - * You should have received a copy of the GNU General Public License |
2852 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2853 | - */ |
2854 | - |
2855 | -import QtQuick 2.3 |
2856 | - |
2857 | -Item { |
2858 | - property size cameraResolution; |
2859 | - property int viewFinderHeight; |
2860 | - property int viewFinderWidth; |
2861 | - property int viewFinderOrientation; |
2862 | - |
2863 | - property int __cameraWidth: Math.abs(viewFinderOrientation) == 90 ? |
2864 | - cameraResolution.height : cameraResolution.width |
2865 | - property int __cameraHeight: Math.abs(viewFinderOrientation) == 90 ? |
2866 | - cameraResolution.width : cameraResolution.height |
2867 | - |
2868 | - property real widthScale: viewFinderWidth / __cameraWidth |
2869 | - property real heightScale: viewFinderHeight / __cameraHeight |
2870 | - |
2871 | - width: (widthScale <= heightScale) ? viewFinderWidth : __cameraWidth * heightScale |
2872 | - height: (widthScale <= heightScale) ? __cameraHeight * widthScale : viewFinderHeight |
2873 | -} |
2874 | |
2875 | === removed file 'src/app/qml/ui/CameraComponents/ZoomControl.qml' |
2876 | --- src/app/qml/ui/CameraComponents/ZoomControl.qml 2014-09-23 12:39:27 +0000 |
2877 | +++ src/app/qml/ui/CameraComponents/ZoomControl.qml 1970-01-01 00:00:00 +0000 |
2878 | @@ -1,86 +0,0 @@ |
2879 | -/* |
2880 | - * Copyright 2012 Canonical Ltd. |
2881 | - * |
2882 | - * This program is free software; you can redistribute it and/or modify |
2883 | - * it under the terms of the GNU General Public License as published by |
2884 | - * the Free Software Foundation; version 3. |
2885 | - * |
2886 | - * This program is distributed in the hope that it will be useful, |
2887 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2888 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2889 | - * GNU General Public License for more details. |
2890 | - * |
2891 | - * You should have received a copy of the GNU General Public License |
2892 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2893 | - */ |
2894 | - |
2895 | -import QtQuick 2.3 |
2896 | -import Ubuntu.Components 1.1 |
2897 | - |
2898 | -Item { |
2899 | - id: zoom |
2900 | - property alias maximumValue: slider.maximumValue |
2901 | - property alias value: slider.value |
2902 | - property real zoomStep: (slider.maximumValue - slider.minimumValue) / 20 |
2903 | - |
2904 | - AbstractButton { |
2905 | - id: minus |
2906 | - objectName: "zoomMinus" |
2907 | - anchors {left: parent.left; verticalCenter: parent.verticalCenter} |
2908 | - width: minusIcon.width |
2909 | - height: minusIcon.height |
2910 | - onClicked: slider.value = Math.max(value - zoom.zoomStep, slider.minimumValue) |
2911 | - onPressedChanged: if (pressed) minusTimer.restart(); else minusTimer.stop(); |
2912 | - |
2913 | - Image { |
2914 | - id: minusIcon |
2915 | - anchors.centerIn: parent |
2916 | - source: "assets/zoom_minus.png" |
2917 | - sourceSize.height: units.gu(2) |
2918 | - smooth: true |
2919 | - } |
2920 | - |
2921 | - Timer { |
2922 | - id: minusTimer |
2923 | - interval: 40 |
2924 | - repeat: true |
2925 | - onTriggered: slider.value = Math.max(value - zoom.zoomStep, slider.minimumValue) |
2926 | - } |
2927 | - } |
2928 | - |
2929 | - Slider { |
2930 | - id: slider |
2931 | - style: ThinSliderStyle {} |
2932 | - anchors { left: minus.right; right: plus.left; verticalCenter: parent.verticalCenter } |
2933 | - live: true |
2934 | - minimumValue: 1.0 // No zoom => 1.0 zoom factor |
2935 | - value: minimumValue |
2936 | - height: slider.implicitHeight + units.gu(4) |
2937 | - } |
2938 | - |
2939 | - AbstractButton { |
2940 | - id: plus |
2941 | - objectName: "zoomPlus" |
2942 | - anchors { right: parent.right; verticalCenter: parent.verticalCenter } |
2943 | - width: plusIcon.width |
2944 | - height: plusIcon.height |
2945 | - onClicked: slider.value = Math.min(value + zoom.zoomStep, slider.maximumValue) |
2946 | - onPressedChanged: if (pressed) plusTimer.restart(); else plusTimer.stop(); |
2947 | - |
2948 | - Image { |
2949 | - id: plusIcon |
2950 | - anchors.centerIn: parent |
2951 | - source: "assets/zoom_plus.png" |
2952 | - sourceSize.height: units.gu(2) |
2953 | - smooth: true |
2954 | - } |
2955 | - |
2956 | - Timer { |
2957 | - id: plusTimer |
2958 | - interval: 40 |
2959 | - repeat: true |
2960 | - onTriggered: slider.value = Math.min(value + zoom.zoomStep, slider.maximumValue) |
2961 | - } |
2962 | - } |
2963 | -} |
2964 | - |
2965 | |
2966 | === removed file 'src/app/qml/ui/CameraComponents/assets/toolbar-left@18.sci' |
2967 | --- src/app/qml/ui/CameraComponents/assets/toolbar-left@18.sci 2014-02-19 00:05:24 +0000 |
2968 | +++ src/app/qml/ui/CameraComponents/assets/toolbar-left@18.sci 1970-01-01 00:00:00 +0000 |
2969 | @@ -1,7 +0,0 @@ |
2970 | -source: toolbar-left@18.png |
2971 | -border.left: 80 |
2972 | -border.right: 0 |
2973 | -border.top: 30 |
2974 | -border.bottom: 30 |
2975 | -horizontalTileMode: Stretch |
2976 | -verticalTileMode: Stretch |
2977 | |
2978 | === removed file 'src/app/qml/ui/CameraComponents/assets/toolbar-middle@18.sci' |
2979 | --- src/app/qml/ui/CameraComponents/assets/toolbar-middle@18.sci 2014-02-19 00:05:24 +0000 |
2980 | +++ src/app/qml/ui/CameraComponents/assets/toolbar-middle@18.sci 1970-01-01 00:00:00 +0000 |
2981 | @@ -1,7 +0,0 @@ |
2982 | -source: toolbar-middle@18.png |
2983 | -border.left: 0 |
2984 | -border.right: 0 |
2985 | -border.top: 41 |
2986 | -border.bottom: 41 |
2987 | -horizontalTileMode: Stretch |
2988 | -verticalTileMode: Stretch |
2989 | |
2990 | === removed file 'src/app/qml/ui/CameraComponents/assets/toolbar-right@18.sci' |
2991 | --- src/app/qml/ui/CameraComponents/assets/toolbar-right@18.sci 2014-02-19 00:05:24 +0000 |
2992 | +++ src/app/qml/ui/CameraComponents/assets/toolbar-right@18.sci 1970-01-01 00:00:00 +0000 |
2993 | @@ -1,7 +0,0 @@ |
2994 | -source: toolbar-right@18.png |
2995 | -border.right: 80 |
2996 | -border.left: 0 |
2997 | -border.top: 30 |
2998 | -border.bottom: 30 |
2999 | -horizontalTileMode: Stretch |
3000 | -verticalTileMode: Stretch |
3001 | |
3002 | === removed file 'src/app/qml/ui/CameraComponents/constants.js' |
3003 | --- src/app/qml/ui/CameraComponents/constants.js 2014-02-19 00:05:24 +0000 |
3004 | +++ src/app/qml/ui/CameraComponents/constants.js 1970-01-01 00:00:00 +0000 |
3005 | @@ -1,19 +0,0 @@ |
3006 | -/* |
3007 | - * Copyright 2012 Canonical Ltd. |
3008 | - * |
3009 | - * This program is free software; you can redistribute it and/or modify |
3010 | - * it under the terms of the GNU General Public License as published by |
3011 | - * the Free Software Foundation; version 3. |
3012 | - * |
3013 | - * This program is distributed in the hope that it will be useful, |
3014 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3015 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3016 | - * GNU General Public License for more details. |
3017 | - * |
3018 | - * You should have received a copy of the GNU General Public License |
3019 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
3020 | - */ |
3021 | - |
3022 | -.pragma library |
3023 | - |
3024 | -var iconFadeDuration = 300; |
3025 | |
3026 | === removed file 'src/app/qml/ui/CameraConfirm.qml' |
3027 | --- src/app/qml/ui/CameraConfirm.qml 2014-09-23 12:39:27 +0000 |
3028 | +++ src/app/qml/ui/CameraConfirm.qml 1970-01-01 00:00:00 +0000 |
3029 | @@ -1,78 +0,0 @@ |
3030 | -/* |
3031 | - * Copyright: 2014 Canonical, Ltd |
3032 | - * |
3033 | - * This file is part of reminders-app |
3034 | - * |
3035 | - * reminders-app is free software: you can redistribute it and/or modify |
3036 | - * it under the terms of the GNU General Public License as published by |
3037 | - * the Free Software Foundation; version 3. |
3038 | - * |
3039 | - * reminders-app is distributed in the hope that it will be useful, |
3040 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3041 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3042 | - * GNU General Public License for more details. |
3043 | - * |
3044 | - * You should have received a copy of the GNU General Public License |
3045 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
3046 | - */ |
3047 | - |
3048 | -import QtQuick 2.3 |
3049 | -import Ubuntu.Components 1.1 |
3050 | -import Evernote 0.1 |
3051 | - |
3052 | -Page { |
3053 | - id: confirmPage |
3054 | - |
3055 | - property var imageLocation |
3056 | - |
3057 | - Image { |
3058 | - source: imageLocation |
3059 | - anchors { |
3060 | - fill: parent; |
3061 | - } |
3062 | - } |
3063 | - |
3064 | - Rectangle { |
3065 | - anchors { left: parent.left; right: parent.right; bottom: parent.bottom } |
3066 | - height: units.gu(6) |
3067 | - color: "white" |
3068 | - |
3069 | - Icon { |
3070 | - name: "back" |
3071 | - |
3072 | - height: units.gu(3) |
3073 | - width: height |
3074 | - |
3075 | - anchors.left: parent.left |
3076 | - anchors.verticalCenter: parent.verticalCenter |
3077 | - anchors.margins: units.gu(2) |
3078 | - |
3079 | - MouseArea { |
3080 | - anchors.fill: parent |
3081 | - onClicked: { |
3082 | - cameraHelper.removeTemp(); |
3083 | - pagestack.pop(); |
3084 | - } |
3085 | - } |
3086 | - } |
3087 | - |
3088 | - Icon { |
3089 | - name: "tick" |
3090 | - |
3091 | - height: units.gu(3) |
3092 | - width: height |
3093 | - |
3094 | - anchors.right: parent.right |
3095 | - anchors.verticalCenter: parent.verticalCenter |
3096 | - anchors.margins: units.gu(2) |
3097 | - |
3098 | - MouseArea { |
3099 | - anchors.fill: parent |
3100 | - onClicked: { |
3101 | - root.imageConfirmed(); |
3102 | - pagestack.pop(); |
3103 | - } |
3104 | - } |
3105 | - } |
3106 | - } |
3107 | -} |
3108 | |
3109 | === removed file 'src/app/qml/ui/CameraPage.qml' |
3110 | --- src/app/qml/ui/CameraPage.qml 2014-09-23 12:39:27 +0000 |
3111 | +++ src/app/qml/ui/CameraPage.qml 1970-01-01 00:00:00 +0000 |
3112 | @@ -1,128 +0,0 @@ |
3113 | -/* |
3114 | - * Copyright: 2013 - 2014 Canonical, Ltd |
3115 | - * |
3116 | - * This file is part of reminders-app |
3117 | - * |
3118 | - * reminders-app is free software: you can redistribute it and/or modify |
3119 | - * it under the terms of the GNU General Public License as published by |
3120 | - * the Free Software Foundation; version 3. |
3121 | - * |
3122 | - * reminders-app is distributed in the hope that it will be useful, |
3123 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3124 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3125 | - * GNU General Public License for more details. |
3126 | - * |
3127 | - * You should have received a copy of the GNU General Public License |
3128 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
3129 | - */ |
3130 | - |
3131 | -import QtQuick 2.3 |
3132 | -import Ubuntu.Components 1.1 |
3133 | -import QtMultimedia 5.0 |
3134 | -import QtQuick.Window 2.0 |
3135 | -import Evernote 0.1 |
3136 | - |
3137 | -import "CameraComponents" |
3138 | - |
3139 | -Page { |
3140 | - id: root |
3141 | - property var note |
3142 | - property int position |
3143 | - property var imageLocation |
3144 | - |
3145 | - signal imageConfirmed() |
3146 | - |
3147 | - onImageConfirmed: { |
3148 | - root.note.attachFile(root.position, imageLocation); |
3149 | - print("got image", imageLocation); |
3150 | - pagestack.pop(); |
3151 | - } |
3152 | - |
3153 | - tools: ToolbarItems { |
3154 | - locked: true |
3155 | - opened: false |
3156 | - } |
3157 | - |
3158 | - Camera { |
3159 | - id: camera |
3160 | - flash.mode: Camera.FlashOff |
3161 | - focus.focusMode: Camera.FocusContinuous |
3162 | - focus.focusPointMode: Camera.FocusPointAuto |
3163 | - |
3164 | - property alias currentZoom: camera.digitalZoom |
3165 | - property alias maximumZoom: camera.maximumDigitalZoom |
3166 | - |
3167 | - Component.onCompleted: cameraHelper.removeTemp(); |
3168 | - |
3169 | - imageCapture { |
3170 | - onImageSaved: { |
3171 | - if (videoOutput.orientation != 0) { |
3172 | - cameraHelper.rotate(path, -videoOutput.orientation) |
3173 | - } |
3174 | - imageLocation = path; |
3175 | - var component = Qt.createComponent(Qt.resolvedUrl("CameraConfirm.qml")); |
3176 | - var page = component.createObject(root, {imageLocation: imageLocation}); |
3177 | - pagestack.push(page); |
3178 | - } |
3179 | - } |
3180 | - } |
3181 | - |
3182 | - VideoOutput { |
3183 | - id: videoOutput |
3184 | - anchors { |
3185 | - fill: parent |
3186 | - } |
3187 | - fillMode: Image.PreserveAspectCrop |
3188 | - orientation: Screen.primaryOrientation === Qt.PortraitOrientation ? -90 : 0 |
3189 | - source: camera |
3190 | - focus: visible |
3191 | - |
3192 | - ViewFinderGeometry { |
3193 | - id: viewFinderGeometry |
3194 | - anchors.centerIn: parent |
3195 | - |
3196 | - Item { |
3197 | - id: itemScale |
3198 | - visible: false |
3199 | - } |
3200 | - } |
3201 | - } |
3202 | - |
3203 | - Item { |
3204 | - id: controlsArea |
3205 | - anchors { |
3206 | - centerIn: parent; |
3207 | - fill: parent |
3208 | - } |
3209 | - |
3210 | - ZoomControl { |
3211 | - id: zoomControl |
3212 | - maximumValue: camera.maximumZoom |
3213 | - height: units.gu(4.5) |
3214 | - |
3215 | - anchors { |
3216 | - left: parent.left; right: parent.right; bottom: toolbar.top; |
3217 | - leftMargin: units.gu(0.75); rightMargin: units.gu(0.75); bottomMargin: units.gu(0.5); topMargin: units.gu(0.5) |
3218 | - } |
3219 | - |
3220 | - visible: camera.maximumZoom > 1 |
3221 | - |
3222 | - // Create a two way binding between the zoom control value and the actual camera zoom, |
3223 | - // so that they can stay in sync when the zoom is changed from the UI or from the hardware |
3224 | - Binding { target: zoomControl; property: "value"; value: camera.currentZoom } |
3225 | - Binding { target: camera; property: "currentZoom"; value: zoomControl.value } |
3226 | - } |
3227 | - |
3228 | - CameraToolbar { |
3229 | - id: toolbar |
3230 | - |
3231 | - anchors { |
3232 | - bottom: parent.bottom; left: parent.left; right: parent.right; |
3233 | - bottomMargin: units.gu(1); leftMargin: units.gu(1); rightMargin: units.gu(1) |
3234 | - } |
3235 | - |
3236 | - camera: camera |
3237 | - canCapture: camera.imageCapture.ready |
3238 | - } |
3239 | - } |
3240 | -} |
3241 | |
3242 | === modified file 'src/app/qml/ui/EditNoteView.qml' |
3243 | --- src/app/qml/ui/EditNoteView.qml 2014-09-23 12:39:27 +0000 |
3244 | +++ src/app/qml/ui/EditNoteView.qml 2014-11-12 22:36:04 +0000 |
3245 | @@ -1,5 +1,5 @@ |
3246 | /* |
3247 | - * Copyright: 2013 Canonical, Ltd |
3248 | + * Copyright: 2013-2014 Canonical, Ltd |
3249 | * |
3250 | * This file is part of reminders |
3251 | * |
3252 | @@ -17,10 +17,14 @@ |
3253 | */ |
3254 | |
3255 | import QtQuick 2.3 |
3256 | +import QtQuick.Layouts 1.1 |
3257 | import Ubuntu.Components 1.1 |
3258 | +import Ubuntu.Components.Popups 1.0 |
3259 | import Ubuntu.Components.ListItems 1.0 |
3260 | import Ubuntu.Content 0.1 |
3261 | +import Ubuntu.Components.Themes.Ambiance 1.1 |
3262 | import Evernote 0.1 |
3263 | +import reminders 1.0 |
3264 | import "../components" |
3265 | |
3266 | Item { |
3267 | @@ -29,15 +33,14 @@ |
3268 | property bool isBottomEdge: false |
3269 | |
3270 | onNoteChanged: { |
3271 | - for (var i = 0; i < notebookSelector.model.count; i++) { |
3272 | - if (notebookSelector.model.notebook(i).guid == note.notebookGuid) { |
3273 | + for (var i = 0; i < notebookSelector.values.count; i++) { |
3274 | + if (notebookSelector.values.notebook(i).guid == note.notebookGuid) { |
3275 | notebookSelector.selectedIndex = i; |
3276 | } |
3277 | } |
3278 | } |
3279 | |
3280 | signal exitEditMode(var note) |
3281 | - signal attachFromCamera(int position, var note) |
3282 | |
3283 | QtObject { |
3284 | id: priv |
3285 | @@ -51,13 +54,6 @@ |
3286 | activeTransfer: priv.activeTransfer |
3287 | } |
3288 | |
3289 | - ContentPeer { |
3290 | - id: picSource |
3291 | - contentType: ContentType.Pictures |
3292 | - handler: ContentHandler.Source |
3293 | - selectionType: ContentTransfer.Single |
3294 | - } |
3295 | - |
3296 | Connections { |
3297 | target: priv.activeTransfer ? priv.activeTransfer : null |
3298 | onStateChanged: { |
3299 | @@ -65,19 +61,18 @@ |
3300 | var file = priv.activeTransfer.items[0].url.toString() |
3301 | print("attaching file", file, "on note", note) |
3302 | note.attachFile(priv.insertPosition, file); |
3303 | + noteTextArea.insert(priv.insertPosition + 1, "<br> ") |
3304 | } |
3305 | } |
3306 | } |
3307 | |
3308 | Column { |
3309 | anchors { left: parent.left; top: parent.top; right: parent.right; bottom: toolbox.top } |
3310 | - anchors.margins: units.gu(2) |
3311 | - spacing: units.gu(1) |
3312 | |
3313 | Row { |
3314 | visible: !root.isBottomEdge |
3315 | - anchors { left: parent.left; right: parent.right } |
3316 | - height: units.gu(5) |
3317 | + anchors { left: parent.left; right: parent.right; margins: units.gu(1) } |
3318 | + height: units.gu(7) |
3319 | spacing: units.gu(2) |
3320 | Icon { |
3321 | id: backIcon |
3322 | @@ -98,8 +93,9 @@ |
3323 | id: titleTextField |
3324 | text: root.note ? root.note.title : "" |
3325 | placeholderText: i18n.tr("Untitled") |
3326 | - height: units.gu(5) |
3327 | + height: units.gu(4) |
3328 | width: parent.width - (backIcon.width + parent.spacing) * 2 |
3329 | + anchors.verticalCenter: parent.verticalCenter |
3330 | } |
3331 | Icon { |
3332 | name: "save" |
3333 | @@ -129,84 +125,548 @@ |
3334 | |
3335 | Divider { |
3336 | visible: !root.isBottomEdge |
3337 | - anchors { leftMargin: -units.gu(2); rightMargin: -units.gu(2) } |
3338 | height: units.gu(2) |
3339 | } |
3340 | |
3341 | - OptionSelector { |
3342 | - id: notebookSelector |
3343 | - model: Notebooks {} |
3344 | - property string selectedGuid: model.notebook(selectedIndex) ? model.notebook(selectedIndex).guid : "" |
3345 | - |
3346 | - delegate: OptionSelectorDelegate { |
3347 | - text: model.name |
3348 | + Rectangle { |
3349 | + anchors { left: parent.left; right: parent.right } |
3350 | + height: notebookSelector.height |
3351 | + ValueSelector { |
3352 | + id: notebookSelector |
3353 | + text: values.notebook(selectedIndex).name |
3354 | + property string selectedGuid: values.notebook(selectedIndex) ? values.notebook(selectedIndex).guid : "" |
3355 | + values: Notebooks {} |
3356 | } |
3357 | } |
3358 | |
3359 | - TextArea { |
3360 | - id: noteTextArea |
3361 | + Rectangle { |
3362 | anchors { left: parent.left; right: parent.right } |
3363 | height: parent.height - y |
3364 | - highlighted: true |
3365 | - |
3366 | - textFormat: TextEdit.RichText |
3367 | - text: root.note ? root.note.richTextContent : "" |
3368 | + color: "white" |
3369 | + |
3370 | +// TextArea { |
3371 | +// id: noteTextArea |
3372 | +// anchors.fill: parent |
3373 | +// focus: true |
3374 | +// wrapMode: TextEdit.Wrap |
3375 | +// textFormat: TextEdit.RichText |
3376 | +// text: root.note ? root.note.richTextContent : "" |
3377 | +// } |
3378 | + |
3379 | + Flickable { |
3380 | + id: flick |
3381 | + anchors.fill: parent |
3382 | + contentWidth: noteTextArea.paintedWidth |
3383 | + contentHeight: noteTextArea.paintedHeight |
3384 | + flickableDirection: Flickable.VerticalFlick |
3385 | + clip: true |
3386 | + |
3387 | + function ensureVisible(r) |
3388 | + { |
3389 | + if (contentX >= r.x) |
3390 | + contentX = r.x; |
3391 | + else if (contentX+width <= r.x+r.width) |
3392 | + contentX = r.x+r.width-width; |
3393 | + if (contentY >= r.y) |
3394 | + contentY = r.y; |
3395 | + else if (contentY+height <= r.y+r.height) |
3396 | + contentY = r.y+r.height-height; |
3397 | + } |
3398 | + |
3399 | + TextEdit { |
3400 | + id: noteTextArea |
3401 | + width: flick.width |
3402 | + height: paintedHeight |
3403 | + focus: true |
3404 | + wrapMode: TextEdit.Wrap |
3405 | + textFormat: TextEdit.RichText |
3406 | + text: root.note ? root.note.richTextContent : "" |
3407 | + onCursorRectangleChanged: flick.ensureVisible(cursorRectangle) |
3408 | + selectByMouse: toolbox.charFormatExpanded |
3409 | + |
3410 | + // Due to various things updating when creating the view, |
3411 | + // we need to set the focus in the next event loop pass |
3412 | + // in order to have any effect. |
3413 | + Timer { |
3414 | + id: setFocusTimer |
3415 | + interval: 1 |
3416 | + running: true |
3417 | + repeat: false |
3418 | + onTriggered: { |
3419 | + noteTextArea.cursorPosition = noteTextArea.length; |
3420 | + noteTextArea.forceActiveFocus(); |
3421 | + } |
3422 | + } |
3423 | + } |
3424 | + } |
3425 | + } |
3426 | + } |
3427 | + |
3428 | + FormattingHelper { |
3429 | + id: formattingHelper |
3430 | + textDocument: noteTextArea.textDocument |
3431 | + cursorPosition: noteTextArea.cursorPosition |
3432 | + selectionStart: noteTextArea.selectionStart |
3433 | + selectionEnd: noteTextArea.selectionEnd |
3434 | + } |
3435 | + |
3436 | + Component { |
3437 | + id: fontPopoverComponent |
3438 | + Popover { |
3439 | + id: fontPopover |
3440 | + |
3441 | + property int selectionStart: -1 |
3442 | + property int selectionEnd: -1 |
3443 | + |
3444 | + ListView { |
3445 | + width: parent.width - units.gu(2) |
3446 | + height: Math.min(contentHeight, root.height / 2) |
3447 | + model: formattingHelper.allFontFamilies |
3448 | + clip: true |
3449 | + delegate: Empty { |
3450 | + height: units.gu(6) |
3451 | + width: parent.width |
3452 | + Label { |
3453 | + anchors.fill: parent |
3454 | + anchors.margins: units.gu(1) |
3455 | + verticalAlignment: Text.AlignVCenter |
3456 | + text: modelData |
3457 | + font.family: modelData |
3458 | + } |
3459 | + onClicked: { |
3460 | + noteTextArea.cursorPosition = fontPopover.selectionStart; |
3461 | + noteTextArea.moveCursorSelection(fontPopover.selectionEnd); |
3462 | + formattingHelper.fontFamily = modelData; |
3463 | + PopupUtils.close(fontPopover) |
3464 | + } |
3465 | + } |
3466 | + } |
3467 | + } |
3468 | + } |
3469 | + Component { |
3470 | + id: fontSizePopoverComponent |
3471 | + Popover { |
3472 | + id: fontSizePopover |
3473 | + |
3474 | + property int selectionStart: -1 |
3475 | + property int selectionEnd: -1 |
3476 | + |
3477 | + ListView { |
3478 | + anchors { left: parent.left; right: parent.right; top: parent.top } |
3479 | + height: Math.min(contentHeight, root.height / 2) |
3480 | + clip:true |
3481 | + model: ListModel { |
3482 | + ListElement { modelData: "8" } |
3483 | + ListElement { modelData: "10" } |
3484 | + ListElement { modelData: "12" } |
3485 | + ListElement { modelData: "14" } |
3486 | + ListElement { modelData: "18" } |
3487 | + ListElement { modelData: "24" } |
3488 | + ListElement { modelData: "36" } |
3489 | + } |
3490 | + |
3491 | + delegate: Empty { |
3492 | + Label { |
3493 | + anchors.fill: parent |
3494 | + anchors.margins: units.gu(1) |
3495 | + verticalAlignment: Text.AlignVCenter |
3496 | + text: modelData |
3497 | + font.family: modelData |
3498 | + } |
3499 | + onClicked: { |
3500 | + noteTextArea.cursorPosition = fontSizePopover.selectionStart; |
3501 | + noteTextArea.moveCursorSelection(fontSizePopover.selectionEnd); |
3502 | + formattingHelper.fontSize = modelData; |
3503 | + PopupUtils.close(fontSizePopover) |
3504 | + } |
3505 | + } |
3506 | + } |
3507 | + } |
3508 | + } |
3509 | + |
3510 | + Component { |
3511 | + id: colorPopoverComponent |
3512 | + Popover { |
3513 | + id: colorPopover |
3514 | + |
3515 | + property int selectionStart: -1 |
3516 | + property int selectionEnd: -1 |
3517 | + |
3518 | + GridView { |
3519 | + id: colorsGrid |
3520 | + anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(0.5) } |
3521 | + height: cellWidth * 5 + units.gu(1) |
3522 | + |
3523 | + |
3524 | + cellWidth: width / 8 |
3525 | + cellHeight: cellWidth |
3526 | + |
3527 | + model: ListModel { |
3528 | + ListElement { color: "#000000" } |
3529 | + ListElement { color: "#993300" } |
3530 | + ListElement { color: "#333300" } |
3531 | + ListElement { color: "#003300" } |
3532 | + ListElement { color: "#003366" } |
3533 | + ListElement { color: "#000080" } |
3534 | + ListElement { color: "#333399" } |
3535 | + ListElement { color: "#333333" } |
3536 | + |
3537 | + ListElement { color: "#800000" } |
3538 | + ListElement { color: "#ff6600" } |
3539 | + ListElement { color: "#808000" } |
3540 | + ListElement { color: "#008000" } |
3541 | + ListElement { color: "#008080" } |
3542 | + ListElement { color: "#0000ff" } |
3543 | + ListElement { color: "#666699" } |
3544 | + ListElement { color: "#808080" } |
3545 | + |
3546 | + ListElement { color: "#ff0000" } |
3547 | + ListElement { color: "#ff6600" } |
3548 | + ListElement { color: "#99CC00" } |
3549 | + ListElement { color: "#339966" } |
3550 | + ListElement { color: "#33CCCC" } |
3551 | + ListElement { color: "#3366FF" } |
3552 | + ListElement { color: "#800080" } |
3553 | + ListElement { color: "#999999" } |
3554 | + |
3555 | + ListElement { color: "#ff00ff" } |
3556 | + ListElement { color: "#ffcc00" } |
3557 | + ListElement { color: "#ffff00" } |
3558 | + ListElement { color: "#00ff00" } |
3559 | + ListElement { color: "#00ffff" } |
3560 | + ListElement { color: "#00ccff" } |
3561 | + ListElement { color: "#993366" } |
3562 | + ListElement { color: "#c0c0c0" } |
3563 | + |
3564 | + ListElement { color: "#ff99cc" } |
3565 | + ListElement { color: "#ffcc99" } |
3566 | + ListElement { color: "#ffff99" } |
3567 | + ListElement { color: "#ccffcc" } |
3568 | + ListElement { color: "#ccffff" } |
3569 | + ListElement { color: "#99ccff" } |
3570 | + ListElement { color: "#cc99ff" } |
3571 | + ListElement { color: "#ffffff" } |
3572 | + } |
3573 | + delegate: AbstractButton { |
3574 | + width: colorsGrid.cellWidth |
3575 | + height: colorsGrid.cellHeight |
3576 | + UbuntuShape { |
3577 | + anchors.fill: parent |
3578 | + anchors.margins: units.gu(.5) |
3579 | + color: model.color |
3580 | + radius: "small" |
3581 | + } |
3582 | + onClicked: { |
3583 | + noteTextArea.cursorPosition = colorPopover.selectionStart; |
3584 | + noteTextArea.moveCursorSelection(colorPopover.selectionEnd); |
3585 | + formattingHelper.color = color |
3586 | + PopupUtils.close(colorPopover) |
3587 | + } |
3588 | + } |
3589 | + } |
3590 | } |
3591 | } |
3592 | |
3593 | Rectangle { |
3594 | + anchors.fill: toolbox |
3595 | + color: "#efefef" |
3596 | + } |
3597 | + |
3598 | + Column { |
3599 | id: toolbox |
3600 | anchors { left: parent.left; right: parent.right; bottom: keyboardRect.top } |
3601 | - height: units.gu(6) |
3602 | - color: "white" |
3603 | - |
3604 | - Icon { |
3605 | - name: "import-image" |
3606 | - height: units.gu(3) |
3607 | - width: height |
3608 | - anchors.verticalCenter: parent.verticalCenter |
3609 | - anchors.left: parent.left |
3610 | - anchors.margins: units.gu(2) |
3611 | - MouseArea { |
3612 | - anchors.fill: parent |
3613 | - onClicked: { |
3614 | - priv.insertPosition = noteTextArea.cursorPosition; |
3615 | - note.richTextContent = noteTextArea.text; |
3616 | - priv.activeTransfer = picSource.request(); |
3617 | - } |
3618 | - } |
3619 | - } |
3620 | - |
3621 | - Icon { |
3622 | - name: "camera-symbolic" |
3623 | - height: units.gu(3) |
3624 | - width: height |
3625 | - anchors.centerIn: parent |
3626 | - MouseArea { |
3627 | - anchors.fill: parent |
3628 | - onClicked: { |
3629 | - note.richTextContent = noteTextArea.text; |
3630 | - priv.insertPosition = noteTextArea.cursorPosition; |
3631 | - pagestack.push(Qt.resolvedUrl("CameraPage.qml"), {note: root.note, position: priv.insertPosition}) |
3632 | - } |
3633 | - } |
3634 | - } |
3635 | - |
3636 | - Icon { |
3637 | - name: "edit" |
3638 | - height: units.gu(3) |
3639 | - width: height |
3640 | - anchors.verticalCenter: parent.verticalCenter |
3641 | - anchors.right: parent.right |
3642 | - anchors.margins: units.gu(2) |
3643 | - MouseArea { |
3644 | - anchors.fill: parent |
3645 | - onClicked: { |
3646 | - } |
3647 | - } |
3648 | - } |
3649 | - |
3650 | - |
3651 | + height: implicitHeight + units.gu(1) |
3652 | + clip: true |
3653 | + spacing: units.gu(1) |
3654 | + |
3655 | + property bool charFormatExpanded: false |
3656 | + property bool blockFormatExpanded: false |
3657 | + |
3658 | + Behavior on height { UbuntuNumberAnimation {} } |
3659 | + |
3660 | + move: Transition { |
3661 | + UbuntuNumberAnimation { properties: "y" } |
3662 | + } |
3663 | + add: Transition { |
3664 | + UbuntuNumberAnimation { property: "opacity"; from: 0; to: 1 } |
3665 | + } |
3666 | + |
3667 | + Item { |
3668 | + anchors { |
3669 | + left: parent.left |
3670 | + right: parent.right |
3671 | + leftMargin: units.gu(1) |
3672 | + rightMargin: units.gu(1) |
3673 | + } |
3674 | + height: 1 |
3675 | + } |
3676 | + |
3677 | + RowLayout { |
3678 | + anchors { |
3679 | + left: parent.left |
3680 | + right: parent.right |
3681 | + leftMargin: units.gu(1) |
3682 | + rightMargin: units.gu(1) |
3683 | + } |
3684 | + height: units.gu(4) |
3685 | + visible: toolbox.charFormatExpanded |
3686 | + opacity: visible ? 1 : 0 |
3687 | + |
3688 | + RtfButton { |
3689 | + id: fontButton |
3690 | + text: formattingHelper.fontFamily || i18n.tr("Font") |
3691 | + height: parent.height |
3692 | + horizontalAlignment: Text.AlignLeft |
3693 | + Layout.fillWidth: true |
3694 | + onClicked: { |
3695 | + PopupUtils.open(fontPopoverComponent, fontButton, {selectionStart: noteTextArea.selectionStart, selectionEnd: noteTextArea.selectionEnd}) |
3696 | + } |
3697 | + } |
3698 | + |
3699 | + RtfButton { |
3700 | + id: fontSizeButton |
3701 | + text: formattingHelper.fontSize || i18n.tr("Size") |
3702 | + height: parent.height |
3703 | + width: height |
3704 | + onClicked: { |
3705 | + PopupUtils.open(fontSizePopoverComponent, fontSizeButton, {selectionStart: noteTextArea.selectionStart, selectionEnd: noteTextArea.selectionEnd}) |
3706 | + } |
3707 | + } |
3708 | + RtfButton { |
3709 | + id: colorButton |
3710 | + height: parent.height |
3711 | + width: height |
3712 | + color: formattingHelper.color |
3713 | + onClicked: { |
3714 | + PopupUtils.open(colorPopoverComponent, colorButton, {selectionStart: noteTextArea.selectionStart, selectionEnd: noteTextArea.selectionEnd}) |
3715 | + } |
3716 | + } |
3717 | + |
3718 | + RtfButton { |
3719 | + height: parent.height |
3720 | + width: height |
3721 | + // TRANSLATORS: Toolbar button for "Bold" |
3722 | + text: i18n.tr("B") |
3723 | + font.bold: true |
3724 | + font.family: "Serif" |
3725 | + active: formattingHelper.bold |
3726 | + onClicked: { |
3727 | + formattingHelper.bold = !formattingHelper.bold |
3728 | + } |
3729 | + } |
3730 | + |
3731 | + RtfButton { |
3732 | + height: parent.height |
3733 | + width: height |
3734 | + // TRANSLATORS: Toolbar button for "Italic" |
3735 | + text: i18n.tr("I") |
3736 | + font.bold: true |
3737 | + font.italic: true |
3738 | + font.family: "Serif" |
3739 | + active: formattingHelper.italic |
3740 | + onClicked: { |
3741 | + formattingHelper.italic = !formattingHelper.italic; |
3742 | + } |
3743 | + } |
3744 | + |
3745 | + RtfButton { |
3746 | + height: parent.height |
3747 | + width: height |
3748 | + // TRANSLATORS: Toolbar button for "Underline" |
3749 | + text: i18n.tr("U") |
3750 | + font.bold: true |
3751 | + font.underline: true |
3752 | + font.family: "Serif" |
3753 | + active: formattingHelper.underline |
3754 | + onClicked: { |
3755 | + formattingHelper.underline = !formattingHelper.underline; |
3756 | + } |
3757 | + } |
3758 | + |
3759 | + RtfButton { |
3760 | + height: parent.height |
3761 | + width: height |
3762 | + // TRANSLATORS: Toolbar button for "Strikeout" |
3763 | + text: i18n.tr("T") |
3764 | + font.bold: true |
3765 | + font.strikeout: true |
3766 | + font.family: "Serif" |
3767 | + active: formattingHelper.strikeout |
3768 | + onClicked: { |
3769 | + formattingHelper.strikeout = !formattingHelper.strikeout; |
3770 | + } |
3771 | + } |
3772 | + } |
3773 | + |
3774 | + RowLayout { |
3775 | + anchors { |
3776 | + left: parent.left |
3777 | + right: parent.right |
3778 | + leftMargin: units.gu(1) |
3779 | + rightMargin: units.gu(1) |
3780 | + } |
3781 | + height: units.gu(4) |
3782 | + visible: toolbox.blockFormatExpanded |
3783 | + opacity: visible ? 1 : 0 |
3784 | + |
3785 | + RtfButton { |
3786 | + iconSource: "../images/bullet-list.svg" |
3787 | + height: parent.height |
3788 | + width: height |
3789 | + active: formattingHelper.bulletList |
3790 | + onClicked: { |
3791 | + formattingHelper.bulletList = !formattingHelper.bulletList; |
3792 | + } |
3793 | + } |
3794 | + |
3795 | + RtfButton { |
3796 | + iconSource: "../images/numbered-list.svg" |
3797 | + height: parent.height |
3798 | + width: height |
3799 | + active: formattingHelper.numberedList |
3800 | + onClicked: { |
3801 | + formattingHelper.numberedList = !formattingHelper.numberedList; |
3802 | + } |
3803 | + } |
3804 | + |
3805 | + RtfSeparator {} |
3806 | + |
3807 | + RtfButton { |
3808 | + height: parent.height |
3809 | + width: height |
3810 | + iconSource: "../images/indent-block.svg" |
3811 | + onClicked: { |
3812 | + formattingHelper.indentBlock(); |
3813 | + } |
3814 | + } |
3815 | + RtfButton { |
3816 | + height: parent.height |
3817 | + width: height |
3818 | + iconSource: "../images/unindent-block.svg" |
3819 | + onClicked: { |
3820 | + formattingHelper.unindentBlock(); |
3821 | + } |
3822 | + } |
3823 | + |
3824 | + RtfSeparator {} |
3825 | + |
3826 | + RtfButton { |
3827 | + height: parent.height |
3828 | + width: height |
3829 | + iconSource: "../images/left-align.svg" |
3830 | + active: formattingHelper.alignment & Qt.AlignLeft |
3831 | + onClicked: { |
3832 | + formattingHelper.alignment = Qt.AlignLeft |
3833 | + } |
3834 | + } |
3835 | + RtfButton { |
3836 | + height: parent.height |
3837 | + width: height |
3838 | + iconSource: "../images/center-align.svg" |
3839 | + active: formattingHelper.alignment & Qt.AlignHCenter |
3840 | + onClicked: { |
3841 | + formattingHelper.alignment = Qt.AlignHCenter |
3842 | + } |
3843 | + } |
3844 | + RtfButton { |
3845 | + height: parent.height |
3846 | + width: height |
3847 | + iconSource: "../images/right-align.svg" |
3848 | + active: formattingHelper.alignment & Qt.AlignRight |
3849 | + onClicked: { |
3850 | + formattingHelper.alignment = Qt.AlignRight |
3851 | + } |
3852 | + } |
3853 | + } |
3854 | + |
3855 | + RowLayout { |
3856 | + anchors { left: parent.left; right: parent.right } |
3857 | + anchors.margins: units.gu(1) |
3858 | + height: units.gu(4) |
3859 | + |
3860 | + RtfButton { |
3861 | + iconName: "undo" |
3862 | + height: parent.height |
3863 | + width: height |
3864 | + enabled: formattingHelper.canUndo |
3865 | + onClicked: { |
3866 | + formattingHelper.undo(); |
3867 | + } |
3868 | + } |
3869 | + RtfButton { |
3870 | + iconName: "redo" |
3871 | + height: parent.height |
3872 | + width: height |
3873 | + enabled: formattingHelper.canRedo |
3874 | + onClicked: { |
3875 | + formattingHelper.redo(); |
3876 | + } |
3877 | + } |
3878 | + |
3879 | + RtfSeparator {} |
3880 | + |
3881 | + Item { |
3882 | + Layout.fillWidth: true |
3883 | + } |
3884 | + |
3885 | + RtfButton { |
3886 | + iconName: "select" |
3887 | + height: parent.height |
3888 | + width: height |
3889 | + onClicked: { |
3890 | + var pos = noteTextArea.cursorPosition |
3891 | + noteTextArea.insert(pos, "<img src=\"../images/unchecked.svg\" height=" + units.gu(2) + ">") |
3892 | + noteTextArea.cursorPosition = pos + 1; |
3893 | + } |
3894 | + } |
3895 | + |
3896 | + |
3897 | +// TextEdit can't display horizontal lines yet :/ |
3898 | +// https://bugreports.qt-project.org/browse/QTBUG-42545 |
3899 | +// RtfButton { |
3900 | +// text: "__" |
3901 | +// height: parent.height |
3902 | +// width: height |
3903 | +// onClicked: { |
3904 | +// formattingHelper.addHorizontalLine(); |
3905 | +// } |
3906 | +// } |
3907 | + |
3908 | + RtfButton { |
3909 | + iconName: "attachment" |
3910 | + height: parent.height |
3911 | + width: height |
3912 | + onClicked: { |
3913 | + priv.insertPosition = noteTextArea.cursorPosition; |
3914 | + note.richTextContent = noteTextArea.text; |
3915 | + importPicker.visible = true; |
3916 | + } |
3917 | + } |
3918 | + |
3919 | + RtfSeparator {} |
3920 | + |
3921 | + RtfButton { |
3922 | + iconName: "navigation-menu" |
3923 | + height: parent.height |
3924 | + width: height |
3925 | + active: toolbox.blockFormatExpanded |
3926 | + onClicked: { |
3927 | + toolbox.blockFormatExpanded = !toolbox.blockFormatExpanded |
3928 | + } |
3929 | + } |
3930 | + |
3931 | + RtfSeparator {} |
3932 | + |
3933 | + RtfButton { |
3934 | + iconName: "edit-select-all" |
3935 | + height: parent.height |
3936 | + width: height |
3937 | + active: toolbox.charFormatExpanded |
3938 | + onClicked: { |
3939 | + toolbox.charFormatExpanded = !toolbox.charFormatExpanded |
3940 | + } |
3941 | + } |
3942 | + } |
3943 | } |
3944 | |
3945 | Item { |
3946 | @@ -214,5 +674,21 @@ |
3947 | anchors { left: parent.left; right: parent.right; bottom: parent.bottom } |
3948 | height: Qt.inputMethod.keyboardRectangle.height |
3949 | } |
3950 | + |
3951 | + ContentPeerPicker { |
3952 | + id: importPicker |
3953 | + anchors.fill: parent |
3954 | + contentType: ContentType.Pictures |
3955 | + handler: ContentHandler.Source |
3956 | + visible: false |
3957 | + |
3958 | + onCancelPressed: visible = false |
3959 | + |
3960 | + onPeerSelected: { |
3961 | + peer.selectionType = ContentTransfer.Single |
3962 | + priv.activeTransfer = peer.request() |
3963 | + visible = false; |
3964 | + } |
3965 | + } |
3966 | } |
3967 | |
3968 | |
3969 | === modified file 'src/libqtevernote/notebooks.cpp' |
3970 | --- src/libqtevernote/notebooks.cpp 2014-10-23 21:27:46 +0000 |
3971 | +++ src/libqtevernote/notebooks.cpp 2014-11-12 22:36:04 +0000 |
3972 | @@ -58,6 +58,7 @@ |
3973 | switch(role) { |
3974 | case RoleGuid: |
3975 | return notebook->guid(); |
3976 | + case Qt::UserRole: |
3977 | case RoleName: |
3978 | return notebook->name(); |
3979 | case RoleNoteCount: |
3980 | @@ -81,6 +82,7 @@ |
3981 | QHash<int, QByteArray> Notebooks::roleNames() const |
3982 | { |
3983 | QHash<int, QByteArray> roles; |
3984 | + roles.insert(Qt::UserRole, "modelData"); |
3985 | roles.insert(RoleGuid, "guid"); |
3986 | roles.insert(RoleName, "name"); |
3987 | roles.insert(RoleNoteCount, "noteCount"); |
3988 | |
3989 | === modified file 'src/libqtevernote/utils/enmldocument.cpp' |
3990 | --- src/libqtevernote/utils/enmldocument.cpp 2014-02-19 12:25:52 +0000 |
3991 | +++ src/libqtevernote/utils/enmldocument.cpp 2014-11-12 22:36:04 +0000 |
3992 | @@ -80,10 +80,13 @@ |
3993 | // output |
3994 | QString html; |
3995 | QXmlStreamWriter writer(&html); |
3996 | - writer.writeStartDocument(); |
3997 | + writer.writeDTD("<!DOCTYPE html>"); |
3998 | + writer.writeStartElement("html"); |
3999 | + writer.writeStartElement("head"); |
4000 | writer.writeStartElement("meta"); |
4001 | writer.writeAttribute("name", "viewport"); |
4002 | - writer.writeAttribute("content", QString("width=%1px").arg(QString::number(EnmlDocument::s_richtextContentWidth))); |
4003 | + writer.writeAttribute("content", QString("width=device-width, initial-scale=1.0")); |
4004 | + writer.writeEndElement(); |
4005 | writer.writeEndElement(); |
4006 | |
4007 | // input |
4008 | @@ -114,18 +117,35 @@ |
4009 | if (s_commonTags.contains(reader.name().toString())) { |
4010 | writer.writeStartElement(reader.name().toString()); |
4011 | |
4012 | - writer.writeAttributes(reader.attributes()); |
4013 | - |
4014 | - // Fix paragraph alignment (text-align -> align) |
4015 | if (reader.name() == "p") { |
4016 | foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { |
4017 | - if (attribute.name() == "style" && attribute.value().contains("text-align")) { |
4018 | - QString style = attribute.value().toString(); |
4019 | - QString textAlign = style.split("text-align: ").at(1).split(';').first(); |
4020 | - writer.writeAttribute("align", textAlign); |
4021 | - break; |
4022 | + if (attribute.name() == "style") { |
4023 | + // Fix paragraph alignment (text-align -> align) |
4024 | + if (attribute.value().contains("text-align")) { |
4025 | + QString style = attribute.value().toString(); |
4026 | + QString textAlign = style.split("text-align: ").at(1).split(';').first(); |
4027 | + writer.writeAttribute("align", textAlign); |
4028 | + break; |
4029 | + } |
4030 | + if (type == TypeRichText) { |
4031 | + if (attribute.value().contains("padding-left")) { |
4032 | + QString style = attribute.value().toString(); |
4033 | + int padding = style.split("padding-left:").at(1).split("px").first().toInt(); |
4034 | + int indent = padding / 30 * 4; |
4035 | + style.replace(QRegExp("padding-left:[ 0-9]*px;"), "-qt-block-indent:" + QString::number(indent) + ";"); |
4036 | + writer.writeAttribute("style", style); |
4037 | + } else { |
4038 | + writer.writeAttribute(attribute); |
4039 | + } |
4040 | + } else { |
4041 | + writer.writeAttribute(attribute); |
4042 | + } |
4043 | + } else { |
4044 | + writer.writeAttribute(attribute); |
4045 | } |
4046 | } |
4047 | + } else { |
4048 | + writer.writeAttributes(reader.attributes()); |
4049 | } |
4050 | } |
4051 | |
4052 | @@ -201,7 +221,8 @@ |
4053 | |
4054 | if (type == TypeRichText) { |
4055 | writer.writeStartElement("img"); |
4056 | - writer.writeAttribute("src", checked ? "image://theme/select" : "image://theme/help"); |
4057 | + writer.writeAttribute("src", checked ? "image://theme/select" : "../images/unchecked.svg"); |
4058 | + writer.writeAttribute("height", QString::number(gu(2))); |
4059 | } else if (type == TypeHtml){ |
4060 | writer.writeStartElement("input"); |
4061 | writer.writeAttribute("id", "en-todo" + QString::number(todoIndex++)); |
4062 | @@ -246,10 +267,22 @@ |
4063 | } |
4064 | } |
4065 | |
4066 | + writer.writeEndElement(); |
4067 | writer.writeEndDocument(); |
4068 | + qDebug() << "converted to html" << html; |
4069 | return html; |
4070 | } |
4071 | |
4072 | +qreal EnmlDocument::gu(qreal px) const |
4073 | +{ |
4074 | + QByteArray ppguString = qgetenv("GRID_UNIT_PX"); |
4075 | + int ppgu = ppguString.toInt(); |
4076 | + if (ppgu == 0) { |
4077 | + ppgu = 8; |
4078 | + } |
4079 | + return px * ppgu; |
4080 | +} |
4081 | + |
4082 | void EnmlDocument::setRichText(const QString &richText) |
4083 | { |
4084 | // output |
4085 | @@ -282,7 +315,6 @@ |
4086 | if (!isBody) { |
4087 | if (reader.name() == "body") { |
4088 | writer.writeStartElement("en-note"); |
4089 | - writer.writeAttributes(reader.attributes()); |
4090 | isBody = true; |
4091 | } |
4092 | continue; |
4093 | @@ -292,9 +324,27 @@ |
4094 | if (s_commonTags.contains(reader.name().toString())) { |
4095 | writer.writeStartElement(reader.name().toString()); |
4096 | if (!s_argumentBlackListTags.contains(reader.name().toString())) { |
4097 | - writer.writeAttributes(reader.attributes()); |
4098 | + |
4099 | + if (reader.name() == "p") { |
4100 | + foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { |
4101 | + if (attribute.name() == "style") { |
4102 | + if (attribute.value().contains("-qt-block-indent")) { |
4103 | + QString style = attribute.value().toString(); |
4104 | + int indent = style.split("-qt-block-indent:").at(1).split(";").first().toInt(); |
4105 | + int padding = indent / 4 * 30; |
4106 | + style.replace(QRegExp("-qt-block-indent:[0-9]*;"), "padding-left:" + QString::number(padding) + "px;"); |
4107 | + writer.writeAttribute("style", style); |
4108 | + } else { |
4109 | + writer.writeAttribute(attribute); |
4110 | + } |
4111 | + } else { |
4112 | + writer.writeAttribute(attribute); |
4113 | + } |
4114 | + } |
4115 | + } else { |
4116 | + writer.writeAttributes(reader.attributes()); |
4117 | + } |
4118 | } |
4119 | - |
4120 | } |
4121 | |
4122 | if (reader.name() == "img") { |
4123 | @@ -308,7 +358,7 @@ |
4124 | writer.writeStartElement("en-media"); |
4125 | writer.writeAttribute("hash", hash); |
4126 | writer.writeAttribute("type", type); |
4127 | - } else if (imageUrl.authority() == "theme") { |
4128 | + } else if (imageUrl.authority() == "theme" || imageUrl.path() == "../images/unchecked.svg") { |
4129 | writer.writeStartElement("en-todo"); |
4130 | writer.writeAttribute("checked", imageUrl.path() == "/select" ? "true" : "false"); |
4131 | } else { |
4132 | |
4133 | === modified file 'src/libqtevernote/utils/enmldocument.h' |
4134 | --- src/libqtevernote/utils/enmldocument.h 2014-02-19 12:25:52 +0000 |
4135 | +++ src/libqtevernote/utils/enmldocument.h 2014-11-12 22:36:04 +0000 |
4136 | @@ -50,13 +50,15 @@ |
4137 | }; |
4138 | |
4139 | QString convert(const QString ¬eGuid, Type type) const; |
4140 | + |
4141 | + qreal gu(qreal px) const; |
4142 | + |
4143 | private: |
4144 | QString m_enml; |
4145 | |
4146 | static QStringList s_commonTags; |
4147 | static QStringList s_argumentBlackListTags; |
4148 | static int s_richtextContentWidth; |
4149 | - |
4150 | }; |
4151 | |
4152 | #endif // ENMLDOCUMENT_H |
PASSED: Continuous integration, rev:304 91.189. 93.70:8080/ job/reminders- app-ci/ 599/ 91.189. 93.70:8080/ job/generic- mediumtests- vivid/109 91.189. 93.70:8080/ job/generic- mediumtests- vivid/109/ artifact/ work/output/ *zip*/output. zip 91.189. 93.70:8080/ job/reminders- app-vivid- amd64-ci/ 20
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/reminders- app-ci/ 599/rebuild
http://