Merge lp:~ibelieve/lang/layout_improvements into lp:lang
- layout_improvements
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Bogdan |
Approved revision: | 13 |
Merged at revision: | 11 |
Proposed branch: | lp:~ibelieve/lang/layout_improvements |
Merge into: | lp:lang |
Diff against target: |
959 lines (+310/-575) 9 files modified
.bzrignore (+1/-0) Lang.qmlproject (+2/-2) Lang.qmlproject.user (+0/-407) QML/AddCollectionDialog.qml (+83/-0) QML/CollectionsPage.qml (+77/-0) QML/DeleteCollectionDialog.qml (+28/-0) QML/Lang.qml (+5/-166) components/ConfirmDialog.qml (+47/-0) components/DialogButtonRow.qml (+67/-0) |
To merge this branch: | bzr merge lp:~ibelieve/lang/layout_improvements |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Bogdan | Approve | ||
Review via email: mp+233090@code.launchpad.net |
Commit message
Improve the layout of the collections page and some of the dialogs
Description of the change
Improve the layout of the collections page and some of the dialogs
- Use a grid view on the collections page with auto-resizing cells so the padding is always even on all sides
- Add an empty placeholder label to the colections page when there are no vocabulary collections
- Move the collections page into a separate file
- Move the add collection dialog into a separate file and improve the layout
- Move the delete collection into a separate file and improve the layout
Michael Spencer (ibelieve) wrote : | # |
I'm not entirely sure of the process outside of the Ubuntu core apps, but since you don't have a ubuntu bot running Jenkins and automatically doing the merges, I think you're going to have to merge my branch from the command line, push the new commit to Launchpad, and then mark the Status as Merged.
See the "Making the Merge" section here: https:/
Preview Diff
1 | === added file '.bzrignore' | |||
2 | --- .bzrignore 1970-01-01 00:00:00 +0000 | |||
3 | +++ .bzrignore 2014-09-02 16:35:07 +0000 | |||
4 | @@ -0,0 +1,1 @@ | |||
5 | 1 | *.qmlproject.user* | ||
6 | 0 | 2 | ||
7 | === modified file 'Lang.qmlproject' | |||
8 | --- Lang.qmlproject 2014-08-27 12:09:40 +0000 | |||
9 | +++ Lang.qmlproject 2014-09-02 16:35:07 +0000 | |||
10 | @@ -4,13 +4,13 @@ | |||
11 | 4 | mainFile: "QML/Lang.qml" | 4 | mainFile: "QML/Lang.qml" |
12 | 5 | 5 | ||
13 | 6 | QmlFiles { | 6 | QmlFiles { |
15 | 7 | directory: "QML" | 7 | directory: "." |
16 | 8 | } | 8 | } |
17 | 9 | JavaScriptFiles { | 9 | JavaScriptFiles { |
18 | 10 | directory: "." | 10 | directory: "." |
19 | 11 | } | 11 | } |
20 | 12 | ImageFiles { | 12 | ImageFiles { |
22 | 13 | directory: "IMG" | 13 | directory: "." |
23 | 14 | } | 14 | } |
24 | 15 | Files { | 15 | Files { |
25 | 16 | filter: "*.desktop" | 16 | filter: "*.desktop" |
26 | 17 | 17 | ||
27 | === removed file 'Lang.qmlproject.user' | |||
28 | --- Lang.qmlproject.user 2014-08-31 11:06:51 +0000 | |||
29 | +++ Lang.qmlproject.user 1970-01-01 00:00:00 +0000 | |||
30 | @@ -1,407 +0,0 @@ | |||
31 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
32 | 2 | <!DOCTYPE QtCreatorProject> | ||
33 | 3 | <!-- Written by QtCreator 3.1.1, 2014-08-31T14:06:16. --> | ||
34 | 4 | <qtcreator> | ||
35 | 5 | <data> | ||
36 | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | ||
37 | 7 | <value type="int">1</value> | ||
38 | 8 | </data> | ||
39 | 9 | <data> | ||
40 | 10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | ||
41 | 11 | <valuemap type="QVariantMap"> | ||
42 | 12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | ||
43 | 13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | ||
44 | 14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> | ||
45 | 15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | ||
46 | 16 | <value type="QString" key="language">Cpp</value> | ||
47 | 17 | <valuemap type="QVariantMap" key="value"> | ||
48 | 18 | <value type="QByteArray" key="CurrentPreferences">CppGlobal</value> | ||
49 | 19 | </valuemap> | ||
50 | 20 | </valuemap> | ||
51 | 21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | ||
52 | 22 | <value type="QString" key="language">QmlJS</value> | ||
53 | 23 | <valuemap type="QVariantMap" key="value"> | ||
54 | 24 | <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value> | ||
55 | 25 | </valuemap> | ||
56 | 26 | </valuemap> | ||
57 | 27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | ||
58 | 28 | <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value> | ||
59 | 29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | ||
60 | 30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | ||
61 | 31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> | ||
62 | 32 | <value type="int" key="EditorConfiguration.MarginColumn">80</value> | ||
63 | 33 | <value type="bool" key="EditorConfiguration.MouseHiding">true</value> | ||
64 | 34 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | ||
65 | 35 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | ||
66 | 36 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | ||
67 | 37 | <value type="bool" key="EditorConfiguration.ShowMargin">false</value> | ||
68 | 38 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | ||
69 | 39 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | ||
70 | 40 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | ||
71 | 41 | <value type="int" key="EditorConfiguration.TabSize">8</value> | ||
72 | 42 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | ||
73 | 43 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | ||
74 | 44 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | ||
75 | 45 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | ||
76 | 46 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | ||
77 | 47 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | ||
78 | 48 | </valuemap> | ||
79 | 49 | </data> | ||
80 | 50 | <data> | ||
81 | 51 | <variable>ProjectExplorer.Project.PluginSettings</variable> | ||
82 | 52 | <valuemap type="QVariantMap"/> | ||
83 | 53 | </data> | ||
84 | 54 | <data> | ||
85 | 55 | <variable>ProjectExplorer.Project.Target.0</variable> | ||
86 | 56 | <valuemap type="QVariantMap"> | ||
87 | 57 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> | ||
88 | 58 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> | ||
89 | 59 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{4f363ae6-5c8c-4713-89e7-07655994b0fa}</value> | ||
90 | 60 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | ||
91 | 61 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | ||
92 | 62 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">2</value> | ||
93 | 63 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | ||
94 | 64 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/boghison/Projects/build-Lang-Desktop-default</value> | ||
95 | 65 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | ||
96 | 66 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | ||
97 | 67 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | ||
98 | 68 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
99 | 69 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | ||
100 | 70 | </valuemap> | ||
101 | 71 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | ||
102 | 72 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | ||
103 | 73 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | ||
104 | 74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
105 | 75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | ||
106 | 76 | </valuemap> | ||
107 | 77 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | ||
108 | 78 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | ||
109 | 79 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | ||
110 | 80 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Default</value> | ||
111 | 81 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
112 | 82 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">UbuntuProjectManager.UbuntuQml.BuildConfiguration</value> | ||
113 | 83 | </valuemap> | ||
114 | 84 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | ||
115 | 85 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | ||
116 | 86 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | ||
117 | 87 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | ||
118 | 88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | ||
119 | 89 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
120 | 90 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | ||
121 | 91 | </valuemap> | ||
122 | 92 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | ||
123 | 93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> | ||
124 | 94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
125 | 95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | ||
126 | 96 | </valuemap> | ||
127 | 97 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | ||
128 | 98 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | ||
129 | 99 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | ||
130 | 100 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | ||
131 | 101 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | ||
132 | 102 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | ||
133 | 103 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | ||
134 | 104 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | ||
135 | 105 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | ||
136 | 106 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | ||
137 | 107 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | ||
138 | 108 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | ||
139 | 109 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> | ||
140 | 110 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | ||
141 | 111 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | ||
142 | 112 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> | ||
143 | 113 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> | ||
144 | 114 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> | ||
145 | 115 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | ||
146 | 116 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | ||
147 | 117 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | ||
148 | 118 | <value type="int">0</value> | ||
149 | 119 | <value type="int">1</value> | ||
150 | 120 | <value type="int">2</value> | ||
151 | 121 | <value type="int">3</value> | ||
152 | 122 | <value type="int">4</value> | ||
153 | 123 | <value type="int">5</value> | ||
154 | 124 | <value type="int">6</value> | ||
155 | 125 | <value type="int">7</value> | ||
156 | 126 | <value type="int">8</value> | ||
157 | 127 | <value type="int">9</value> | ||
158 | 128 | <value type="int">10</value> | ||
159 | 129 | <value type="int">11</value> | ||
160 | 130 | <value type="int">12</value> | ||
161 | 131 | <value type="int">13</value> | ||
162 | 132 | <value type="int">14</value> | ||
163 | 133 | </valuelist> | ||
164 | 134 | <value type="int" key="PE.EnvironmentAspect.Base">0</value> | ||
165 | 135 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | ||
166 | 136 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value> | ||
167 | 137 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Scene</value> | ||
168 | 138 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration.QmlScene</value> | ||
169 | 139 | <value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value> | ||
170 | 140 | <value type="QString" key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"></value> | ||
171 | 141 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | ||
172 | 142 | <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> | ||
173 | 143 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> | ||
174 | 144 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | ||
175 | 145 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | ||
176 | 146 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | ||
177 | 147 | </valuemap> | ||
178 | 148 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1"> | ||
179 | 149 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | ||
180 | 150 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | ||
181 | 151 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | ||
182 | 152 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | ||
183 | 153 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | ||
184 | 154 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | ||
185 | 155 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | ||
186 | 156 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | ||
187 | 157 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | ||
188 | 158 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> | ||
189 | 159 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | ||
190 | 160 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | ||
191 | 161 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> | ||
192 | 162 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> | ||
193 | 163 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> | ||
194 | 164 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | ||
195 | 165 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | ||
196 | 166 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | ||
197 | 167 | <value type="int">0</value> | ||
198 | 168 | <value type="int">1</value> | ||
199 | 169 | <value type="int">2</value> | ||
200 | 170 | <value type="int">3</value> | ||
201 | 171 | <value type="int">4</value> | ||
202 | 172 | <value type="int">5</value> | ||
203 | 173 | <value type="int">6</value> | ||
204 | 174 | <value type="int">7</value> | ||
205 | 175 | <value type="int">8</value> | ||
206 | 176 | <value type="int">9</value> | ||
207 | 177 | <value type="int">10</value> | ||
208 | 178 | <value type="int">11</value> | ||
209 | 179 | <value type="int">12</value> | ||
210 | 180 | <value type="int">13</value> | ||
211 | 181 | <value type="int">14</value> | ||
212 | 182 | </valuelist> | ||
213 | 183 | <value type="int" key="PE.EnvironmentAspect.Base">-1</value> | ||
214 | 184 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | ||
215 | 185 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value> | ||
216 | 186 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Viewer</value> | ||
217 | 187 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration</value> | ||
218 | 188 | <value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value> | ||
219 | 189 | <value type="QString" key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"></value> | ||
220 | 190 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | ||
221 | 191 | <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> | ||
222 | 192 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> | ||
223 | 193 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | ||
224 | 194 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | ||
225 | 195 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | ||
226 | 196 | </valuemap> | ||
227 | 197 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.2"> | ||
228 | 198 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | ||
229 | 199 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | ||
230 | 200 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | ||
231 | 201 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | ||
232 | 202 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | ||
233 | 203 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | ||
234 | 204 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | ||
235 | 205 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | ||
236 | 206 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | ||
237 | 207 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> | ||
238 | 208 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | ||
239 | 209 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | ||
240 | 210 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> | ||
241 | 211 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> | ||
242 | 212 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> | ||
243 | 213 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | ||
244 | 214 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | ||
245 | 215 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | ||
246 | 216 | <value type="int">0</value> | ||
247 | 217 | <value type="int">1</value> | ||
248 | 218 | <value type="int">2</value> | ||
249 | 219 | <value type="int">3</value> | ||
250 | 220 | <value type="int">4</value> | ||
251 | 221 | <value type="int">5</value> | ||
252 | 222 | <value type="int">6</value> | ||
253 | 223 | <value type="int">7</value> | ||
254 | 224 | <value type="int">8</value> | ||
255 | 225 | <value type="int">9</value> | ||
256 | 226 | <value type="int">10</value> | ||
257 | 227 | <value type="int">11</value> | ||
258 | 228 | <value type="int">12</value> | ||
259 | 229 | <value type="int">13</value> | ||
260 | 230 | <value type="int">14</value> | ||
261 | 231 | </valuelist> | ||
262 | 232 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | ||
263 | 233 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | ||
264 | 234 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value> | ||
265 | 235 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Lang</value> | ||
266 | 236 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">UbuntuProjectManager.UbuntuRunConfigurationLang</value> | ||
267 | 237 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | ||
268 | 238 | <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> | ||
269 | 239 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> | ||
270 | 240 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | ||
271 | 241 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | ||
272 | 242 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | ||
273 | 243 | </valuemap> | ||
274 | 244 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">3</value> | ||
275 | 245 | </valuemap> | ||
276 | 246 | </data> | ||
277 | 247 | <data> | ||
278 | 248 | <variable>ProjectExplorer.Project.Target.1</variable> | ||
279 | 249 | <valuemap type="QVariantMap"> | ||
280 | 250 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">UbuntuSDK for armhf (GCC ubuntu-sdk-14.10-utopic)</value> | ||
281 | 251 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">UbuntuSDK for armhf (GCC ubuntu-sdk-14.10-utopic)</value> | ||
282 | 252 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{a37e5551-8273-42ae-978c-2364c32a933a}</value> | ||
283 | 253 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | ||
284 | 254 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | ||
285 | 255 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | ||
286 | 256 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | ||
287 | 257 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/boghison/Projects/build-Lang-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_14_10_utopic-default</value> | ||
288 | 258 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | ||
289 | 259 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | ||
290 | 260 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | ||
291 | 261 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
292 | 262 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | ||
293 | 263 | </valuemap> | ||
294 | 264 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | ||
295 | 265 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | ||
296 | 266 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | ||
297 | 267 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
298 | 268 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | ||
299 | 269 | </valuemap> | ||
300 | 270 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | ||
301 | 271 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | ||
302 | 272 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | ||
303 | 273 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Default</value> | ||
304 | 274 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
305 | 275 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">UbuntuProjectManager.UbuntuQml.BuildConfiguration</value> | ||
306 | 276 | </valuemap> | ||
307 | 277 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | ||
308 | 278 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | ||
309 | 279 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | ||
310 | 280 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | ||
311 | 281 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | ||
312 | 282 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">UbuntuSDK Click build</value> | ||
313 | 283 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
314 | 284 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">UbuntuProjectManager.ClickPackageStep</value> | ||
315 | 285 | <value type="int" key="Ubuntu.UbuntuPackageStep.PackageMode">0</value> | ||
316 | 286 | </valuemap> | ||
317 | 287 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | ||
318 | 288 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | ||
319 | 289 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Upload files to Ubuntu Device</value> | ||
320 | 290 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
321 | 291 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">UbuntuProjectManager.UploadStep</value> | ||
322 | 292 | <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedFiles"> | ||
323 | 293 | <value type="QString">/home/boghison/Projects/build-Lang-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_14_10_utopic-default/com.ubuntu.developer.boghison.lang_0.1_all.click</value> | ||
324 | 294 | <value type="QString">/home/boghison/Projects/build-Lang-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_14_10_utopic-default/com.ubuntu.developer.boghison.lang_0.5_all.click</value> | ||
325 | 295 | <value type="QString">/home/boghison/Projects/build-Lang-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_14_10_utopic-default/com.ubuntu.developer.boghison.lang_0.4_all.click</value> | ||
326 | 296 | <value type="QString">/usr/share/qtcreator/ubuntu/scripts/qtc_device_applaunch.py</value> | ||
327 | 297 | <value type="QString">/home/boghison/Projects/build-Lang-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_14_10_utopic-default/com.ubuntu.developer.boghison.lang_0.3_all.click</value> | ||
328 | 298 | <value type="QString">/home/boghison/Projects/build-Lang-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_14_10_utopic-default/com.ubuntu.developer.boghison.lang_0.6_all.click</value> | ||
329 | 299 | </valuelist> | ||
330 | 300 | <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedHosts"> | ||
331 | 301 | <value type="QString">127.0.0.1</value> | ||
332 | 302 | <value type="QString">127.0.0.1</value> | ||
333 | 303 | <value type="QString">127.0.0.1</value> | ||
334 | 304 | <value type="QString">127.0.0.1</value> | ||
335 | 305 | <value type="QString">127.0.0.1</value> | ||
336 | 306 | <value type="QString">127.0.0.1</value> | ||
337 | 307 | </valuelist> | ||
338 | 308 | <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedRemotePaths"> | ||
339 | 309 | <value type="QString">/tmp</value> | ||
340 | 310 | <value type="QString">/tmp</value> | ||
341 | 311 | <value type="QString">/tmp</value> | ||
342 | 312 | <value type="QString">/tmp</value> | ||
343 | 313 | <value type="QString">/tmp</value> | ||
344 | 314 | <value type="QString">/tmp</value> | ||
345 | 315 | </valuelist> | ||
346 | 316 | <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedSysroots"> | ||
347 | 317 | <value type="QString">/var/lib/schroot/chroots/click-ubuntu-sdk-14.10-armhf</value> | ||
348 | 318 | <value type="QString">/var/lib/schroot/chroots/click-ubuntu-sdk-14.10-armhf</value> | ||
349 | 319 | <value type="QString">/var/lib/schroot/chroots/click-ubuntu-sdk-14.10-armhf</value> | ||
350 | 320 | <value type="QString">/var/lib/schroot/chroots/click-ubuntu-sdk-14.10-armhf</value> | ||
351 | 321 | <value type="QString">/var/lib/schroot/chroots/click-ubuntu-sdk-14.10-armhf</value> | ||
352 | 322 | <value type="QString">/var/lib/schroot/chroots/click-ubuntu-sdk-14.10-armhf</value> | ||
353 | 323 | </valuelist> | ||
354 | 324 | <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedTimes"> | ||
355 | 325 | <value type="QDateTime">2014-08-27T15:05:28</value> | ||
356 | 326 | <value type="QDateTime">2014-08-31T12:44:01</value> | ||
357 | 327 | <value type="QDateTime">2014-08-30T15:04:19</value> | ||
358 | 328 | <value type="QDateTime">2014-08-31T13:59:11</value> | ||
359 | 329 | <value type="QDateTime">2014-08-28T16:25:06</value> | ||
360 | 330 | <value type="QDateTime">2014-08-31T13:59:11</value> | ||
361 | 331 | </valuelist> | ||
362 | 332 | </valuemap> | ||
363 | 333 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | ||
364 | 334 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | ||
365 | 335 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
366 | 336 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | ||
367 | 337 | </valuemap> | ||
368 | 338 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | ||
369 | 339 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy to Ubuntu Device</value> | ||
370 | 340 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
371 | 341 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">UbuntuProjectManager.DeployConfiguration</value> | ||
372 | 342 | </valuemap> | ||
373 | 343 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | ||
374 | 344 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | ||
375 | 345 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | ||
376 | 346 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | ||
377 | 347 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | ||
378 | 348 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | ||
379 | 349 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | ||
380 | 350 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | ||
381 | 351 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | ||
382 | 352 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | ||
383 | 353 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | ||
384 | 354 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | ||
385 | 355 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> | ||
386 | 356 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | ||
387 | 357 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | ||
388 | 358 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> | ||
389 | 359 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> | ||
390 | 360 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> | ||
391 | 361 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | ||
392 | 362 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | ||
393 | 363 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | ||
394 | 364 | <value type="int">0</value> | ||
395 | 365 | <value type="int">1</value> | ||
396 | 366 | <value type="int">2</value> | ||
397 | 367 | <value type="int">3</value> | ||
398 | 368 | <value type="int">4</value> | ||
399 | 369 | <value type="int">5</value> | ||
400 | 370 | <value type="int">6</value> | ||
401 | 371 | <value type="int">7</value> | ||
402 | 372 | <value type="int">8</value> | ||
403 | 373 | <value type="int">9</value> | ||
404 | 374 | <value type="int">10</value> | ||
405 | 375 | <value type="int">11</value> | ||
406 | 376 | <value type="int">12</value> | ||
407 | 377 | <value type="int">13</value> | ||
408 | 378 | <value type="int">14</value> | ||
409 | 379 | </valuelist> | ||
410 | 380 | <value type="int" key="PE.EnvironmentAspect.Base">1</value> | ||
411 | 381 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | ||
412 | 382 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value> | ||
413 | 383 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Lang</value> | ||
414 | 384 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">UbuntuProjectManager.RemoteRunConfigurationLang</value> | ||
415 | 385 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | ||
416 | 386 | <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> | ||
417 | 387 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> | ||
418 | 388 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | ||
419 | 389 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | ||
420 | 390 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | ||
421 | 391 | </valuemap> | ||
422 | 392 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | ||
423 | 393 | </valuemap> | ||
424 | 394 | </data> | ||
425 | 395 | <data> | ||
426 | 396 | <variable>ProjectExplorer.Project.TargetCount</variable> | ||
427 | 397 | <value type="int">2</value> | ||
428 | 398 | </data> | ||
429 | 399 | <data> | ||
430 | 400 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | ||
431 | 401 | <value type="QByteArray">{933be325-2d5b-4358-a163-774b77eeb676}</value> | ||
432 | 402 | </data> | ||
433 | 403 | <data> | ||
434 | 404 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | ||
435 | 405 | <value type="int">15</value> | ||
436 | 406 | </data> | ||
437 | 407 | </qtcreator> | ||
438 | 408 | 0 | ||
439 | === added file 'QML/AddCollectionDialog.qml' | |||
440 | --- QML/AddCollectionDialog.qml 1970-01-01 00:00:00 +0000 | |||
441 | +++ QML/AddCollectionDialog.qml 2014-09-02 16:35:07 +0000 | |||
442 | @@ -0,0 +1,83 @@ | |||
443 | 1 | import QtQuick 2.0 | ||
444 | 2 | |||
445 | 3 | import Ubuntu.Components 1.1 | ||
446 | 4 | import Ubuntu.Components.Popups 1.0 | ||
447 | 5 | |||
448 | 6 | import "../components" | ||
449 | 7 | |||
450 | 8 | Dialog { | ||
451 | 9 | id: dialog | ||
452 | 10 | |||
453 | 11 | title: i18n.tr("Add Vocabulary Collection") | ||
454 | 12 | |||
455 | 13 | text: i18n.tr("Enter the name of the language and pick a color for it:") | ||
456 | 14 | |||
457 | 15 | TextField { | ||
458 | 16 | id: langField | ||
459 | 17 | width: parent.width | ||
460 | 18 | |||
461 | 19 | placeholderText: i18n.tr("Language name") | ||
462 | 20 | |||
463 | 21 | validator: RegExpValidator { | ||
464 | 22 | regExp: /.+/ | ||
465 | 23 | } | ||
466 | 24 | } | ||
467 | 25 | |||
468 | 26 | Label { | ||
469 | 27 | text: i18n.tr("Preview (tap to change color)") | ||
470 | 28 | } | ||
471 | 29 | |||
472 | 30 | |||
473 | 31 | Item { | ||
474 | 32 | height: units.gu(20) | ||
475 | 33 | |||
476 | 34 | // The UbuntuShape is within a wrapper Item because the Dialog forces all children items | ||
477 | 35 | // to be full-width. | ||
478 | 36 | UbuntuShape { | ||
479 | 37 | id: colorShape | ||
480 | 38 | width: units.gu(15) | ||
481 | 39 | height: units.gu(20) | ||
482 | 40 | color: "#0000ff" | ||
483 | 41 | |||
484 | 42 | anchors.horizontalCenter: parent.horizontalCenter | ||
485 | 43 | |||
486 | 44 | MouseArea { | ||
487 | 45 | anchors.fill: parent | ||
488 | 46 | onClicked: { | ||
489 | 47 | var colorArray = ["#0000ff", "#800080", "#ffa500", "#00ff00", "#30d5c8", "#000000", "#ff0000", "#ffc0cb", "#a5682a"]; | ||
490 | 48 | colorShape.color = (String(colorShape.color) !== colorArray[colorArray.length - 1]) ? colorArray[colorArray.indexOf(String(colorShape.color)) + 1] : colorArray[0] | ||
491 | 49 | } | ||
492 | 50 | } | ||
493 | 51 | |||
494 | 52 | Label { | ||
495 | 53 | text: langField.text | ||
496 | 54 | color: "white" | ||
497 | 55 | anchors.centerIn: parent | ||
498 | 56 | } | ||
499 | 57 | } | ||
500 | 58 | } | ||
501 | 59 | |||
502 | 60 | DialogButtonRow { | ||
503 | 61 | enabled: langField.acceptableInput | ||
504 | 62 | |||
505 | 63 | onAccepted: { | ||
506 | 64 | PopupUtils.close(dialog) | ||
507 | 65 | |||
508 | 66 | var tempContents = {}; | ||
509 | 67 | tempContents = vocabDB.contents; | ||
510 | 68 | var existing; | ||
511 | 69 | for (var i = 0; i < tempContents["vocabularies"].length; i++) { | ||
512 | 70 | if (tempContents["vocabularies"][i].color == colorShape.color && tempContents["vocabularies"][i].name == langField.text) existing = true | ||
513 | 71 | } | ||
514 | 72 | if (existing == null) { | ||
515 | 73 | tempContents["vocabularies"].push({"name": langField.text, "color": colorShape.color, "translations": [], "definitions": []}); | ||
516 | 74 | vocabDB.contents = tempContents; | ||
517 | 75 | PopupUtils.close(addVocabDialog); | ||
518 | 76 | mainStack.clear(); | ||
519 | 77 | mainStack.push(vocabPage); | ||
520 | 78 | } | ||
521 | 79 | } | ||
522 | 80 | |||
523 | 81 | onRejected: PopupUtils.close(dialog) | ||
524 | 82 | } | ||
525 | 83 | } | ||
526 | 0 | 84 | ||
527 | === added file 'QML/CollectionsPage.qml' | |||
528 | --- QML/CollectionsPage.qml 1970-01-01 00:00:00 +0000 | |||
529 | +++ QML/CollectionsPage.qml 2014-09-02 16:35:07 +0000 | |||
530 | @@ -0,0 +1,77 @@ | |||
531 | 1 | import QtQuick 2.0 | ||
532 | 2 | |||
533 | 3 | import Ubuntu.Components 1.1 | ||
534 | 4 | import Ubuntu.Components.Popups 1.0 | ||
535 | 5 | import Ubuntu.Components.ListItems 1.0 as ListItem | ||
536 | 6 | |||
537 | 7 | |||
538 | 8 | Page { | ||
539 | 9 | id: page | ||
540 | 10 | title: i18n.tr("Vocabulary Collections") | ||
541 | 11 | |||
542 | 12 | head.actions: [ | ||
543 | 13 | Action { | ||
544 | 14 | text: i18n.tr("Add Collection") | ||
545 | 15 | iconName: "add" | ||
546 | 16 | onTriggered: PopupUtils.open(addVocab) | ||
547 | 17 | } | ||
548 | 18 | ] | ||
549 | 19 | |||
550 | 20 | property int columns: width/units.gu(20) | ||
551 | 21 | |||
552 | 22 | property int padding: units.gu(2) | ||
553 | 23 | property int columnWidth: gridView.count < columns ? units.gu(20) : (width - padding * (columns + 1))/columns | ||
554 | 24 | |||
555 | 25 | // We must set this to null when displaying the empty label so the label is centered | ||
556 | 26 | // correctly under the header | ||
557 | 27 | flickable: gridView.count == 0 ? null : gridView | ||
558 | 28 | |||
559 | 29 | GridView { | ||
560 | 30 | id: gridView | ||
561 | 31 | |||
562 | 32 | anchors { | ||
563 | 33 | fill: parent | ||
564 | 34 | margins: page.padding/2 | ||
565 | 35 | } | ||
566 | 36 | |||
567 | 37 | cellWidth: columnWidth + padding | ||
568 | 38 | cellHeight: columnWidth * 4/3 + padding | ||
569 | 39 | |||
570 | 40 | model: vocabDB.contents["vocabularies"] | ||
571 | 41 | delegate: Item { | ||
572 | 42 | width: gridView.cellWidth | ||
573 | 43 | height: gridView.cellHeight | ||
574 | 44 | |||
575 | 45 | UbuntuShape { | ||
576 | 46 | anchors.centerIn: parent | ||
577 | 47 | |||
578 | 48 | width: columnWidth | ||
579 | 49 | height: width * 4/3 | ||
580 | 50 | color: modelData.color | ||
581 | 51 | |||
582 | 52 | Label { | ||
583 | 53 | anchors.centerIn: parent | ||
584 | 54 | text: modelData.name | ||
585 | 55 | color: "white" | ||
586 | 56 | } | ||
587 | 57 | MouseArea { | ||
588 | 58 | anchors.fill: parent | ||
589 | 59 | onClicked: handleShape(parent.color, parent.children[0].text) | ||
590 | 60 | } | ||
591 | 61 | } | ||
592 | 62 | } | ||
593 | 63 | } | ||
594 | 64 | |||
595 | 65 | Scrollbar { | ||
596 | 66 | flickableItem: gridView | ||
597 | 67 | } | ||
598 | 68 | |||
599 | 69 | Label { | ||
600 | 70 | anchors.centerIn: parent | ||
601 | 71 | fontSize: "large" | ||
602 | 72 | opacity: 0.5 | ||
603 | 73 | visible: gridView.count == 0 | ||
604 | 74 | |||
605 | 75 | text: "No vocabulary collections yet" | ||
606 | 76 | } | ||
607 | 77 | } | ||
608 | 0 | 78 | ||
609 | === added file 'QML/DeleteCollectionDialog.qml' | |||
610 | --- QML/DeleteCollectionDialog.qml 1970-01-01 00:00:00 +0000 | |||
611 | +++ QML/DeleteCollectionDialog.qml 2014-09-02 16:35:07 +0000 | |||
612 | @@ -0,0 +1,28 @@ | |||
613 | 1 | import QtQuick 2.0 | ||
614 | 2 | |||
615 | 3 | import "../components" | ||
616 | 4 | |||
617 | 5 | ConfirmDialog { | ||
618 | 6 | title: i18n.tr("Delete Vocabulary Collection") | ||
619 | 7 | text: i18n.tr("Are you sure you want to delete '%1'?").arg(name) | ||
620 | 8 | |||
621 | 9 | acceptText: i18n.tr("Delete") | ||
622 | 10 | acceptColor: "#d9534f" | ||
623 | 11 | |||
624 | 12 | property string name | ||
625 | 13 | |||
626 | 14 | onAccepted: { | ||
627 | 15 | var tempContents = vocabDB.contents; | ||
628 | 16 | var newArray = []; | ||
629 | 17 | for (var y = 0; y < tempContents.vocabularies.length; y++){ | ||
630 | 18 | if (String(tempContents.vocabularies[y].name) == String(name)){ | ||
631 | 19 | continue; | ||
632 | 20 | } | ||
633 | 21 | newArray.push(tempContents.vocabularies[y]); | ||
634 | 22 | } | ||
635 | 23 | tempContents.vocabularies = newArray; | ||
636 | 24 | vocabDB.contents = tempContents; | ||
637 | 25 | |||
638 | 26 | mainStack.pop(mainPage); | ||
639 | 27 | } | ||
640 | 28 | } | ||
641 | 0 | 29 | ||
642 | === modified file 'QML/Lang.qml' | |||
643 | --- QML/Lang.qml 2014-08-31 11:06:51 +0000 | |||
644 | +++ QML/Lang.qml 2014-09-02 16:35:07 +0000 | |||
645 | @@ -65,140 +65,13 @@ | |||
646 | 65 | Component { | 65 | Component { |
647 | 66 | id: vocabPage | 66 | id: vocabPage |
648 | 67 | 67 | ||
692 | 68 | Page { | 68 | CollectionsPage {} |
650 | 69 | title: i18n.tr("Your Vocabularies") | ||
651 | 70 | head.actions: [ | ||
652 | 71 | Action { | ||
653 | 72 | text: i18n.tr("Add") | ||
654 | 73 | iconName: "add" | ||
655 | 74 | onTriggered: PopupUtils.open(addVocab) | ||
656 | 75 | } | ||
657 | 76 | ] | ||
658 | 77 | |||
659 | 78 | Flickable{ | ||
660 | 79 | anchors.fill: parent | ||
661 | 80 | clip: true | ||
662 | 81 | interactive: contentHeight > height | ||
663 | 82 | contentHeight: vocabFlow.height | ||
664 | 83 | |||
665 | 84 | Flow { | ||
666 | 85 | id: vocabFlow | ||
667 | 86 | width: parent.parent.width | ||
668 | 87 | spacing: units.gu(5) | ||
669 | 88 | |||
670 | 89 | Repeater{ | ||
671 | 90 | model: vocabDB.contents["vocabularies"] | ||
672 | 91 | delegate: UbuntuShape { | ||
673 | 92 | width: units.gu(15) | ||
674 | 93 | height: units.gu(20) | ||
675 | 94 | color: modelData.color | ||
676 | 95 | |||
677 | 96 | Label { | ||
678 | 97 | anchors.centerIn: parent | ||
679 | 98 | text: modelData.name | ||
680 | 99 | color: "white" | ||
681 | 100 | } | ||
682 | 101 | MouseArea { | ||
683 | 102 | anchors.fill: parent | ||
684 | 103 | onClicked: handleShape(parent.color, parent.children[0].text) | ||
685 | 104 | } | ||
686 | 105 | } | ||
687 | 106 | } | ||
688 | 107 | |||
689 | 108 | } | ||
690 | 109 | } | ||
691 | 110 | } | ||
693 | 111 | } | 69 | } |
694 | 112 | 70 | ||
695 | 113 | Component { | 71 | Component { |
696 | 114 | id: addVocab | 72 | id: addVocab |
697 | 115 | 73 | ||
784 | 116 | Dialog { | 74 | AddCollectionDialog {} |
699 | 117 | id: addVocabDialog | ||
700 | 118 | title: i18n.tr("Add a new vocabulary") | ||
701 | 119 | |||
702 | 120 | Item { | ||
703 | 121 | width: parent.width | ||
704 | 122 | height: units.gu(40) | ||
705 | 123 | |||
706 | 124 | Flickable { | ||
707 | 125 | width: parent.width | ||
708 | 126 | height: parent.height | ||
709 | 127 | clip: true | ||
710 | 128 | interactive: contentHeight > height | ||
711 | 129 | contentHeight: vocabColumn.height | ||
712 | 130 | |||
713 | 131 | Column { | ||
714 | 132 | id: vocabColumn | ||
715 | 133 | width: parent.width | ||
716 | 134 | spacing: units.gu(1) | ||
717 | 135 | |||
718 | 136 | Label { | ||
719 | 137 | text: i18n.tr("Language: ") | ||
720 | 138 | } | ||
721 | 139 | TextField { | ||
722 | 140 | id: langField | ||
723 | 141 | width: parent.width | ||
724 | 142 | } | ||
725 | 143 | Label { | ||
726 | 144 | text: i18n.tr("Preview (tap to change color)") | ||
727 | 145 | } | ||
728 | 146 | UbuntuShape { | ||
729 | 147 | id: colorShape | ||
730 | 148 | width: units.gu(15) | ||
731 | 149 | height: units.gu(20) | ||
732 | 150 | color: "#0000ff" | ||
733 | 151 | |||
734 | 152 | MouseArea { | ||
735 | 153 | anchors.fill: parent | ||
736 | 154 | onClicked: { | ||
737 | 155 | var colorArray = ["#0000ff", "#800080", "#ffa500", "#00ff00", "#30d5c8", "#000000", "#ff0000", "#ffc0cb", "#a5682a"]; | ||
738 | 156 | colorShape.color = (String(colorShape.color) !== colorArray[colorArray.length - 1]) ? colorArray[colorArray.indexOf(String(colorShape.color)) + 1] : colorArray[0] | ||
739 | 157 | } | ||
740 | 158 | } | ||
741 | 159 | Label { | ||
742 | 160 | text: langField.text | ||
743 | 161 | color: "white" | ||
744 | 162 | anchors.centerIn: parent | ||
745 | 163 | } | ||
746 | 164 | } | ||
747 | 165 | Row{ | ||
748 | 166 | width: parent.width | ||
749 | 167 | Button { | ||
750 | 168 | text: i18n.tr("Save") | ||
751 | 169 | width: parent.width/2 | ||
752 | 170 | action: Action { | ||
753 | 171 | onTriggered: { | ||
754 | 172 | if (langField.text != "") { | ||
755 | 173 | var tempContents = {}; | ||
756 | 174 | tempContents = vocabDB.contents; | ||
757 | 175 | var existing; | ||
758 | 176 | for (var i = 0; i < tempContents["vocabularies"].length; i++) { | ||
759 | 177 | if (tempContents["vocabularies"][i].color == colorShape.color && tempContents["vocabularies"][i].name == langField.text) existing = true | ||
760 | 178 | } | ||
761 | 179 | if (existing == null) { | ||
762 | 180 | tempContents["vocabularies"].push({"name": langField.text, "color": colorShape.color, "translations": [], "definitions": []}); | ||
763 | 181 | vocabDB.contents = tempContents; | ||
764 | 182 | PopupUtils.close(addVocabDialog); | ||
765 | 183 | mainStack.clear(); | ||
766 | 184 | mainStack.push(vocabPage); | ||
767 | 185 | } | ||
768 | 186 | } | ||
769 | 187 | } | ||
770 | 188 | } | ||
771 | 189 | } | ||
772 | 190 | Button { | ||
773 | 191 | text: i18n.tr("Cancel") | ||
774 | 192 | width: parent.width/2 | ||
775 | 193 | action: Action{ | ||
776 | 194 | onTriggered: PopupUtils.close(addVocabDialog) | ||
777 | 195 | } | ||
778 | 196 | } | ||
779 | 197 | } | ||
780 | 198 | } | ||
781 | 199 | } | ||
782 | 200 | } | ||
783 | 201 | } | ||
785 | 202 | } | 75 | } |
786 | 203 | Component { | 76 | Component { |
787 | 204 | id: mainPage | 77 | id: mainPage |
788 | @@ -246,43 +119,9 @@ | |||
789 | 246 | Component { | 119 | Component { |
790 | 247 | id: deleteVocab | 120 | id: deleteVocab |
791 | 248 | 121 | ||
829 | 249 | Dialog { | 122 | DeleteCollectionDialog { |
830 | 250 | id: deleteVocabDialog | 123 | name: propertyPage.title |
831 | 251 | title: i18n.tr("Are you sure?") | 124 | } |
795 | 252 | |||
796 | 253 | Column { | ||
797 | 254 | spacing: units.gu(1) | ||
798 | 255 | width: parent.width | ||
799 | 256 | |||
800 | 257 | Button { | ||
801 | 258 | width: parent.width | ||
802 | 259 | text: i18n.tr("Yes") | ||
803 | 260 | action: Action { | ||
804 | 261 | onTriggered: { | ||
805 | 262 | var tempContents = vocabDB.contents; | ||
806 | 263 | var newArray = []; | ||
807 | 264 | for (var y = 0; y < tempContents.vocabularies.length; y++){ | ||
808 | 265 | if (String(tempContents.vocabularies[y].name) == String(propertyPage.title)){ | ||
809 | 266 | continue; | ||
810 | 267 | } | ||
811 | 268 | newArray.push(tempContents.vocabularies[y]); | ||
812 | 269 | } | ||
813 | 270 | tempContents.vocabularies = newArray; | ||
814 | 271 | vocabDB.contents = tempContents; | ||
815 | 272 | PopupUtils.close(deleteVocabDialog); | ||
816 | 273 | mainStack.pop(mainPage); | ||
817 | 274 | } | ||
818 | 275 | } | ||
819 | 276 | } | ||
820 | 277 | Button { | ||
821 | 278 | width: parent.width | ||
822 | 279 | text: i18n.tr("Cancel") | ||
823 | 280 | action: Action { | ||
824 | 281 | onTriggered: PopupUtils.close(deleteVocabDialog) | ||
825 | 282 | } | ||
826 | 283 | } | ||
827 | 284 | } | ||
828 | 285 | } | ||
832 | 286 | } | 125 | } |
833 | 287 | 126 | ||
834 | 288 | Component { | 127 | Component { |
835 | 289 | 128 | ||
836 | === added directory 'components' | |||
837 | === added file 'components/ConfirmDialog.qml' | |||
838 | --- components/ConfirmDialog.qml 1970-01-01 00:00:00 +0000 | |||
839 | +++ components/ConfirmDialog.qml 2014-09-02 16:35:07 +0000 | |||
840 | @@ -0,0 +1,47 @@ | |||
841 | 1 | /* | ||
842 | 2 | * Ubuntu UI Extras - A collection of QML widgets not available | ||
843 | 3 | * in the default Ubuntu UI Toolkit | ||
844 | 4 | * Copyright (C) 2014 Michael Spencer | ||
845 | 5 | * | ||
846 | 6 | * This program is free software: you can redistribute it and/or modify | ||
847 | 7 | * it under the terms of the GNU General Public License as published by | ||
848 | 8 | * the Free Software Foundation, either version 3 of the License, or | ||
849 | 9 | * (at your option) any later version. | ||
850 | 10 | * | ||
851 | 11 | * This program is distributed in the hope that it will be useful, | ||
852 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
853 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
854 | 14 | * GNU General Public License for more details. | ||
855 | 15 | * | ||
856 | 16 | * You should have received a copy of the GNU General Public License | ||
857 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
858 | 18 | */ | ||
859 | 19 | |||
860 | 20 | import QtQuick 2.0 | ||
861 | 21 | import Ubuntu.Components 1.1 | ||
862 | 22 | import Ubuntu.Components.Popups 1.0 | ||
863 | 23 | import Ubuntu.Components.ListItems 1.0 as ListItem | ||
864 | 24 | |||
865 | 25 | Dialog { | ||
866 | 26 | id: dialog | ||
867 | 27 | |||
868 | 28 | signal accepted | ||
869 | 29 | signal rejected | ||
870 | 30 | |||
871 | 31 | property alias acceptText: buttons.acceptText | ||
872 | 32 | property alias acceptColor: buttons.acceptColor | ||
873 | 33 | |||
874 | 34 | DialogButtonRow { | ||
875 | 35 | id: buttons | ||
876 | 36 | |||
877 | 37 | onAccepted: { | ||
878 | 38 | PopupUtils.close(dialog) | ||
879 | 39 | dialog.accepted() | ||
880 | 40 | } | ||
881 | 41 | |||
882 | 42 | onRejected: { | ||
883 | 43 | PopupUtils.close(dialog) | ||
884 | 44 | dialog.rejected() | ||
885 | 45 | } | ||
886 | 46 | } | ||
887 | 47 | } | ||
888 | 0 | 48 | ||
889 | === added file 'components/DialogButtonRow.qml' | |||
890 | --- components/DialogButtonRow.qml 1970-01-01 00:00:00 +0000 | |||
891 | +++ components/DialogButtonRow.qml 2014-09-02 16:35:07 +0000 | |||
892 | @@ -0,0 +1,67 @@ | |||
893 | 1 | /* | ||
894 | 2 | * Ubuntu UI Extras - A collection of QML widgets not available | ||
895 | 3 | * in the default Ubuntu UI Toolkit | ||
896 | 4 | * Copyright (C) 2014 Michael Spencer | ||
897 | 5 | * | ||
898 | 6 | * This program is free software: you can redistribute it and/or modify | ||
899 | 7 | * it under the terms of the GNU General Public License as published by | ||
900 | 8 | * the Free Software Foundation, either version 3 of the License, or | ||
901 | 9 | * (at your option) any later version. | ||
902 | 10 | * | ||
903 | 11 | * This program is distributed in the hope that it will be useful, | ||
904 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
905 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
906 | 14 | * GNU General Public License for more details. | ||
907 | 15 | * | ||
908 | 16 | * You should have received a copy of the GNU General Public License | ||
909 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
910 | 18 | */ | ||
911 | 19 | |||
912 | 20 | import QtQuick 2.0 | ||
913 | 21 | import Ubuntu.Components 1.1 | ||
914 | 22 | |||
915 | 23 | Item { | ||
916 | 24 | width: parent.width | ||
917 | 25 | height: childrenRect.height | ||
918 | 26 | |||
919 | 27 | signal accepted | ||
920 | 28 | signal rejected | ||
921 | 29 | |||
922 | 30 | property alias enabled: okButton.enabled | ||
923 | 31 | |||
924 | 32 | property alias acceptText: okButton.text | ||
925 | 33 | property alias acceptColor: okButton.color | ||
926 | 34 | |||
927 | 35 | Button { | ||
928 | 36 | objectName: "cancelButton" | ||
929 | 37 | text: i18n.tr("Cancel") | ||
930 | 38 | |||
931 | 39 | anchors { | ||
932 | 40 | left: parent.left | ||
933 | 41 | right: parent.horizontalCenter | ||
934 | 42 | rightMargin: units.gu(1) | ||
935 | 43 | } | ||
936 | 44 | |||
937 | 45 | onTriggered: { | ||
938 | 46 | rejected() | ||
939 | 47 | } | ||
940 | 48 | } | ||
941 | 49 | |||
942 | 50 | Button { | ||
943 | 51 | id: okButton | ||
944 | 52 | objectName: "okButton" | ||
945 | 53 | |||
946 | 54 | anchors { | ||
947 | 55 | left: parent.horizontalCenter | ||
948 | 56 | right: parent.right | ||
949 | 57 | leftMargin: units.gu(1) | ||
950 | 58 | } | ||
951 | 59 | |||
952 | 60 | text: i18n.tr("Ok") | ||
953 | 61 | color: UbuntuColors.orange | ||
954 | 62 | |||
955 | 63 | onTriggered: { | ||
956 | 64 | accepted() | ||
957 | 65 | } | ||
958 | 66 | } | ||
959 | 67 | } |
Thank you very much.