Merge lp:~unity-team/libusermetrics/file-based-infographics into lp:libusermetrics
- file-based-infographics
- Merge into trunk
Status: | Approved |
---|---|
Approved by: | Antti Kaijanmäki |
Approved revision: | 182 |
Proposed branch: | lp:~unity-team/libusermetrics/file-based-infographics |
Merge into: | lp:libusermetrics |
Diff against target: |
14066 lines (+6354/-5861) 162 files modified
CMakeLists.txt (+6/-13) cmake/FindValgrind.cmake (+1/-1) cmake/Plugins.cmake (+102/-0) data/CMakeLists.txt (+37/-10) data/com.canonical.Infographics.conf (+15/-0) data/com.canonical.Infographics.service.in (+5/-0) data/com.canonical.Infographics.xml (+14/-0) data/com.canonical.UserMetrics.conf (+0/-15) data/com.canonical.UserMetrics.service.in (+0/-5) data/com.canonical.UserMetrics.xml (+0/-44) data/com.canonical.usermetrics.DataSet.xml (+0/-24) data/com.canonical.usermetrics.DataSource.xml (+0/-42) data/com.canonical.usermetrics.UserData.xml (+0/-25) data/default.json.in (+9/-0) data/usermetricsservice.conf.in (+10/-0) debian/changelog (+7/-0) debian/control (+18/-7) debian/libusermetricsinput1.symbols (+19/-8) debian/libusermetricsoutput1.symbols (+18/-0) debian/qtdeclarative5-infographics0.1.install (+1/-0) debian/rules (+6/-2) debian/usermetricsservice.infographic.click-hook (+3/-0) debian/usermetricsservice.install (+1/-0) debian/usermetricsservice.postinst (+0/-16) debian/usermetricsservice.postrm (+0/-26) debian/usermetricsservice.preinst (+0/-30) debian/usermetricsservice.prerm (+0/-7) debian/usermetricsservice.usermetrics.click-hook (+3/-0) doc/Infographic Architecture.svg (+636/-0) doc/mainpage.md (+87/-0) po/en_GB.po (+88/-120) po/libusermetrics.pot (+18/-108) po/pl.po (+92/-121) po/zh_CN.po (+28/-117) src/CMakeLists.txt (+2/-0) src/infographic/CMakeLists.txt (+20/-0) src/infographic/Infographic.cpp (+292/-0) src/infographic/Infographic.h (+79/-0) src/infographic/main.cpp (+53/-0) src/infographicservice/CMakeLists.txt (+58/-0) src/infographicservice/Service.cpp (+131/-0) src/infographicservice/Service.h (+74/-0) src/infographicservice/main.cpp (+46/-0) src/libusermetricscommon/CMakeLists.txt (+7/-29) src/libusermetricscommon/DBusPaths.cpp (+0/-41) src/libusermetricscommon/DBusPaths.h (+0/-41) src/libusermetricscommon/FileUtils.cpp (+52/-0) src/libusermetricscommon/FileUtils.h (+47/-0) src/libusermetricsinput/CMakeLists.txt (+2/-0) src/libusermetricsinput/Factory.cpp (+48/-0) src/libusermetricsinput/Factory.h (+47/-0) src/libusermetricsinput/Metric.h (+1/-1) src/libusermetricsinput/MetricImpl.cpp (+228/-75) src/libusermetricsinput/MetricImpl.h (+43/-20) src/libusermetricsinput/MetricManager.cpp (+7/-13) src/libusermetricsinput/MetricManager.h (+9/-23) src/libusermetricsinput/MetricManagerImpl.cpp (+40/-93) src/libusermetricsinput/MetricManagerImpl.h (+6/-4) src/libusermetricsinput/MetricParameters.cpp (+132/-0) src/libusermetricsinput/MetricParameters.h (+74/-0) src/libusermetricsinput/MetricUpdate.h (+1/-1) src/libusermetricsinput/MetricUpdateImpl.cpp (+6/-13) src/libusermetricsinput/MetricUpdateImpl.h (+5/-8) src/libusermetricsinput/usermetricsinput.cpp (+9/-8) src/libusermetricsoutput/CMakeLists.txt (+3/-4) src/libusermetricsoutput/ColorThemeProvider.h (+1/-0) src/libusermetricsoutput/DirectoryWatcher.cpp (+118/-0) src/libusermetricsoutput/DirectoryWatcher.h (+69/-0) src/libusermetricsoutput/InfographicList.cpp (+32/-0) src/libusermetricsoutput/InfographicList.h (+127/-0) src/libusermetricsoutput/InfographicListImpl.cpp (+181/-0) src/libusermetricsoutput/InfographicListImpl.h (+98/-0) src/libusermetricsoutput/SyncedDataSet.cpp (+0/-34) src/libusermetricsoutput/SyncedDataSet.h (+0/-43) src/libusermetricsoutput/SyncedDataSource.cpp (+0/-54) src/libusermetricsoutput/SyncedDataSource.h (+0/-46) src/libusermetricsoutput/SyncedUserData.cpp (+0/-89) src/libusermetricsoutput/SyncedUserData.h (+0/-56) src/libusermetricsoutput/SyncedUserMetricsStore.cpp (+0/-142) src/libusermetricsoutput/SyncedUserMetricsStore.h (+0/-63) src/libusermetricsoutput/UserMetrics.cpp (+4/-9) src/libusermetricsoutput/UserMetricsImpl.cpp (+6/-5) src/libusermetricsoutput/UserMetricsStore.h (+2/-0) src/modules/CMakeLists.txt (+1/-0) src/modules/Infographics/CMakeLists.txt (+39/-0) src/modules/Infographics/Components.cpp (+34/-0) src/modules/Infographics/Components.h (+34/-0) src/modules/Infographics/qmldir (+2/-0) src/modules/UserMetrics/CMakeLists.txt (+27/-34) src/usermetricsservice/Authentication.cpp (+0/-104) src/usermetricsservice/Authentication.h (+0/-54) src/usermetricsservice/CMakeLists.txt (+42/-53) src/usermetricsservice/DBusDataSet.cpp (+0/-221) src/usermetricsservice/DBusDataSet.h (+0/-100) src/usermetricsservice/DBusDataSource.cpp (+0/-244) src/usermetricsservice/DBusDataSource.h (+0/-115) src/usermetricsservice/DBusUserData.cpp (+0/-186) src/usermetricsservice/DBusUserData.h (+0/-95) src/usermetricsservice/DBusUserMetrics.cpp (+0/-291) src/usermetricsservice/DBusUserMetrics.h (+0/-90) src/usermetricsservice/Executor.cpp (+27/-0) src/usermetricsservice/Executor.h (+42/-0) src/usermetricsservice/Factory.cpp (+91/-0) src/usermetricsservice/Factory.h (+69/-0) src/usermetricsservice/Infographic.cpp (+27/-0) src/usermetricsservice/Infographic.h (+52/-0) src/usermetricsservice/InfographicImpl.cpp (+180/-0) src/usermetricsservice/InfographicImpl.h (+81/-0) src/usermetricsservice/QProcessExecutor.cpp (+75/-0) src/usermetricsservice/QProcessExecutor.h (+47/-0) src/usermetricsservice/ResultTransport.cpp (+27/-0) src/usermetricsservice/ResultTransport.h (+45/-0) src/usermetricsservice/ResultTransportImpl.cpp (+66/-0) src/usermetricsservice/ResultTransportImpl.h (+45/-0) src/usermetricsservice/Service.cpp (+27/-0) src/usermetricsservice/Service.h (+45/-0) src/usermetricsservice/ServiceImpl.cpp (+172/-0) src/usermetricsservice/ServiceImpl.h (+87/-0) src/usermetricsservice/SourceDirectory.cpp (+27/-0) src/usermetricsservice/SourceDirectory.h (+45/-0) src/usermetricsservice/SourceDirectoryImpl.cpp (+67/-0) src/usermetricsservice/SourceDirectoryImpl.h (+57/-0) src/usermetricsservice/aa-exec.cpp (+56/-0) src/usermetricsservice/database/DataSet.cpp (+0/-83) src/usermetricsservice/database/DataSet.h (+0/-93) src/usermetricsservice/database/DataSource.cpp (+0/-142) src/usermetricsservice/database/DataSource.h (+0/-139) src/usermetricsservice/database/UserData.cpp (+0/-56) src/usermetricsservice/database/UserData.h (+0/-61) src/usermetricsservice/main.cpp (+12/-63) tests/CMakeLists.txt (+4/-1) tests/data/infographics/test-aggregate.json (+13/-0) tests/data/infographics/test-iterate.json (+9/-0) tests/data/valgrind.suppression (+94/-0) tests/integration/CMakeLists.txt (+0/-2) tests/integration/libusermetricsinput/CMakeLists.txt (+0/-23) tests/integration/libusermetricsinput/TestMetricManager.cpp (+0/-52) tests/integration/libusermetricsoutput/CMakeLists.txt (+0/-23) tests/integration/libusermetricsoutput/TestUserMetrics.cpp (+0/-46) tests/testutils/CMakeLists.txt (+0/-2) tests/testutils/DBusTest.cpp (+0/-50) tests/testutils/DBusTest.h (+0/-49) tests/testutils/main.cpp (+1/-1) tests/unit/libusermetricsinput/CMakeLists.txt (+1/-0) tests/unit/libusermetricsinput/Mocks.h (+51/-0) tests/unit/libusermetricsinput/TestMetricImpl.cpp (+412/-0) tests/unit/libusermetricsinput/TestMetricManagerImpl.cpp (+127/-322) tests/unit/libusermetricsinput/TestUserMetricInputCAPI.cpp (+57/-57) tests/unit/libusermetricsoutput/CMakeLists.txt (+1/-1) tests/unit/libusermetricsoutput/TestInfographicListImpl.cpp (+121/-0) tests/unit/libusermetricsoutput/TestSyncedUserMetricsStore.cpp (+0/-426) tests/unit/qml/CMakeLists.txt (+9/-1) tests/unit/qml/UserMetricsTest/DBusQuery.cpp (+42/-47) tests/unit/qml/UserMetricsTest/DBusQuery.h (+0/-4) tests/unit/qml/UserMetricsTest/TestPlugin.cpp (+7/-0) tests/unit/qml/tst_Metrics.qml (+13/-2) tests/unit/usermetricsservice/CMakeLists.txt (+3/-3) tests/unit/usermetricsservice/Mocks.h (+84/-0) tests/unit/usermetricsservice/TestAuthentication.cpp (+0/-62) tests/unit/usermetricsservice/TestInfographicImpl.cpp (+124/-0) tests/unit/usermetricsservice/TestServiceImpl.cpp (+149/-0) tests/unit/usermetricsservice/TestUserMetricsService.cpp (+0/-807) |
To merge this branch: | bzr merge lp:~unity-team/libusermetrics/file-based-infographics |
Related bugs: | |
Related blueprints: |
Infographics component for Unity8, 14.10 tasks
(Undefined)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Antti Kaijanmäki (community) | Approve | ||
Michał Sawicz | Needs Information | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+214020@code.launchpad.net |
Commit message
Wait until the Unity8 branch for the UI is ready
Description of the change
Wait until the Unity8 branch for the UI is ready
PS Jenkins bot (ps-jenkins) wrote : | # |
- 152. By Pete Woods
-
Merge trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:152
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 153. By Pete Woods
-
Fix symbols file
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:153
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 154. By Pete Woods
-
Add new plug-in for unity8 shell to use
- 155. By Pete Woods
-
Use the correct subdirectory
- 156. By Pete Woods
-
Linewrap the control file
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:156
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 157. By Pete Woods
-
Use Qt5 by default
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:157
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 158. By Pete Woods
-
Add missing dependency
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:158
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 159. By Pete Woods
-
Avoid using new style connect method to (hopefully) fix test failures on ppc64 and arm64
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:159
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 160. By Pete Woods
-
I forgot the parameters to the signals
- 161. By Pete Woods
-
Enable -fPIE for all executables
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:161
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 162. By Ricardo Salveti
-
Merging trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:162
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 163. By Pete Woods
-
Additional documentation
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:163
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 164. By Pete Woods
-
Start on dbus started, like everyone else
- 165. By Pete Woods
-
Clean up the QML plugin
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:165
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 166. By Pete Woods
-
Derive the infographic confinement profile from the application ID
- 167. By Pete Woods
-
Remove needless logging
- 168. By Pete Woods
-
Move hook paths to ~/.local instead of ~/.cache
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:168
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 169. By Pete Woods
-
Add data get method to help UI developers
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:169
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 170. By Pete Woods
-
Merge trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:170
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 171. By Pete Woods
-
Change output API to expose simple "path" property with "next" method
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:171
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 172. By Pete Woods
-
Make jenkins happy with its non-optimised builds
- 173. By Pete Woods
-
Consistent formatting
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:172
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 174. By Pete Woods
-
Make ARM builds on Jenkins happy
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:173
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:174
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 175. By Pete Woods
-
Merge trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:175
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 176. By Pete Woods
-
Merge trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:176
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 177. By Pete Woods
-
Updated translations
- 178. By Pete Woods
-
Support sources provided by normal debian packages
- 179. By Pete Woods
-
Add package directories
- 180. By Pete Woods
-
Handle relative executable paths
- 181. By Pete Woods
-
Extra suppression
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:181
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 182. By Pete Woods
-
Extra method to specify APP_ID manually for non-UAL processes
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:182
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Michał Sawicz (saviq) wrote : | # |
Check out bug #1339002, seems to still happen - I disabled "stats on welcome screen" and locked, but they are still shown (even after reboot).
Not sure if the visualizer is here, but a few bugs for it:
- text not centered in the circle
- text is not pluralized correctly ("1 calls made today")
I wonder, (how) do we deal with language changes? I changed my display language, rebooted and infographics are still in English. Not sure if it's missing translations, or whether you're reacting to changed language at all?
Pete Woods (pete-woods) wrote : | # |
> Check out bug #1339002, seems to still happen - I disabled "stats on welcome
> screen" and locked, but they are still shown (even after reboot).
>
I think unity8 was doing this with the old infographics implementation. Is it possible for me to read a user's settings as the lightdm user? Does unity8 know about this setting already for the user that's being displayed in the greeter?
> Not sure if the visualizer is here, but a few bugs for it:
> - text not centered in the circle
I will have a go at fixing this. SVGs have no concept of vertical centering, so it's hard.
> - text is not pluralized correctly ("1 calls made today")
This is because gettext doesn't support non-whole numbers, and the value is a double. e.g. for uses like "walked 1.1 km today".
> I wonder, (how) do we deal with language changes? I changed my display
> language, rebooted and infographics are still in English. Not sure if it's
> missing translations, or whether you're reacting to changed language at all?
The data source can either provide pre-translated strings (non optimal) or provide gettext translations under a specified domain. I don't think the apps are doing this at present.
All visualisers are basically re-run at user session start.
For custom visualisers that do completely their own wacky thing, it's up to the visualiser to be translatable.
Antti Kaijanmäki (kaijanmaki) wrote : | # |
Had a review session with pete. LGTM.
Unmerged revisions
- 182. By Pete Woods
-
Extra method to specify APP_ID manually for non-UAL processes
- 181. By Pete Woods
-
Extra suppression
- 180. By Pete Woods
-
Handle relative executable paths
- 179. By Pete Woods
-
Add package directories
- 178. By Pete Woods
-
Support sources provided by normal debian packages
- 177. By Pete Woods
-
Updated translations
- 176. By Pete Woods
-
Merge trunk
- 175. By Pete Woods
-
Merge trunk
- 174. By Pete Woods
-
Make ARM builds on Jenkins happy
- 173. By Pete Woods
-
Consistent formatting
Preview Diff
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2013-09-26 09:12:58 +0000 | |||
3 | +++ CMakeLists.txt 2014-06-25 09:58:07 +0000 | |||
4 | @@ -16,15 +16,12 @@ | |||
5 | 16 | find_package(Qt5Core REQUIRED) | 16 | find_package(Qt5Core REQUIRED) |
6 | 17 | include_directories(${Qt5Core_INCLUDE_DIRS}) | 17 | include_directories(${Qt5Core_INCLUDE_DIRS}) |
7 | 18 | 18 | ||
8 | 19 | find_package(Qt5DBus REQUIRED) | ||
9 | 20 | include_directories(${Qt5DBus_INCLUDE_DIRS}) | ||
10 | 21 | |||
11 | 19 | find_package(Qt5Gui REQUIRED) | 22 | find_package(Qt5Gui REQUIRED) |
12 | 20 | include_directories(${Qt5Gui_INCLUDE_DIRS}) | 23 | include_directories(${Qt5Gui_INCLUDE_DIRS}) |
13 | 21 | 24 | ||
14 | 22 | find_package(Qt5DBus COMPONENTS Qt5DBusMacros REQUIRED) | ||
15 | 23 | include_directories(${Qt5DBus_INCLUDE_DIRS}) | ||
16 | 24 | |||
17 | 25 | find_package(Qt5Sql REQUIRED) | ||
18 | 26 | include_directories(${Qt5Sql_INCLUDE_DIRS}) | ||
19 | 27 | |||
20 | 28 | find_package(Qt5XmlPatterns REQUIRED) | 25 | find_package(Qt5XmlPatterns REQUIRED) |
21 | 29 | include_directories(${Qt5XmlPatterns_INCLUDE_DIRS}) | 26 | include_directories(${Qt5XmlPatterns_INCLUDE_DIRS}) |
22 | 30 | 27 | ||
23 | @@ -40,16 +37,11 @@ | |||
24 | 40 | find_package(Qt5Qml REQUIRED) | 37 | find_package(Qt5Qml REQUIRED) |
25 | 41 | include_directories(${Qt5Qml_INCLUDE_DIRS}) | 38 | include_directories(${Qt5Qml_INCLUDE_DIRS}) |
26 | 42 | 39 | ||
27 | 43 | pkg_check_modules(QDJANGO_DB REQUIRED qdjango-db REQUIRED) | ||
28 | 44 | include_directories(${QDJANGO_DB_INCLUDE_DIRS}) | ||
29 | 45 | |||
30 | 46 | pkg_check_modules(QTDBUSTEST REQUIRED libqtdbustest-1 REQUIRED) | ||
31 | 47 | include_directories(${QTDBUSTEST_INCLUDE_DIRS}) | ||
32 | 48 | |||
33 | 49 | set(CMAKE_AUTOMOC ON) | 40 | set(CMAKE_AUTOMOC ON) |
34 | 50 | set(CMAKE_INCLUDE_CURRENT_DIR ON) | 41 | set(CMAKE_INCLUDE_CURRENT_DIR ON) |
35 | 51 | 42 | ||
36 | 52 | set(DATA_DIR "${CMAKE_CURRENT_SOURCE_DIR}/data") | 43 | set(DATA_DIR "${CMAKE_CURRENT_SOURCE_DIR}/data") |
37 | 44 | set(INFOGRAPHIC_SERVICE_XML "${DATA_DIR}/com.canonical.Infographics.xml") | ||
38 | 53 | 45 | ||
39 | 54 | set(INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") | 46 | set(INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") |
40 | 55 | set(INCLUDE_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/include") | 47 | set(INCLUDE_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/include") |
41 | @@ -77,6 +69,7 @@ | |||
42 | 77 | -Wextra | 69 | -Wextra |
43 | 78 | -DLOCALEDIR="${CMAKE_INSTALL_FULL_DATADIR}/locale" | 70 | -DLOCALEDIR="${CMAKE_INSTALL_FULL_DATADIR}/locale" |
44 | 79 | ) | 71 | ) |
45 | 72 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIE") | ||
46 | 80 | 73 | ||
47 | 81 | set(DOXYFILE_SOURCE_DIR "include") | 74 | set(DOXYFILE_SOURCE_DIR "include") |
48 | 82 | set(DOXYFILE_EXTRA_SOURCES "doc") | 75 | set(DOXYFILE_EXTRA_SOURCES "doc") |
49 | @@ -98,4 +91,4 @@ | |||
50 | 98 | ADD_CUSTOM_TARGET( | 91 | ADD_CUSTOM_TARGET( |
51 | 99 | check | 92 | check |
52 | 100 | ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure | 93 | ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure |
53 | 101 | ) | ||
54 | 102 | \ No newline at end of file | 94 | \ No newline at end of file |
55 | 95 | ) | ||
56 | 103 | 96 | ||
57 | === modified file 'cmake/FindValgrind.cmake' | |||
58 | --- cmake/FindValgrind.cmake 2013-09-26 09:12:58 +0000 | |||
59 | +++ cmake/FindValgrind.cmake 2014-06-25 09:58:07 +0000 | |||
60 | @@ -26,7 +26,7 @@ | |||
61 | 26 | ) | 26 | ) |
62 | 27 | 27 | ||
63 | 28 | function(add_valgrind_test NAME EXECUTABLE) | 28 | function(add_valgrind_test NAME EXECUTABLE) |
65 | 29 | if(ENABLE_MEMCHECK_OPTION) | 29 | if(ENABLE_MEMCHECK_OPTION AND VALGRIND_PROGRAM) |
66 | 30 | add_test(${NAME} ${VALGRIND_PROGRAM} ${VALGRIND_PROGRAM_OPTIONS} "${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}") | 30 | add_test(${NAME} ${VALGRIND_PROGRAM} ${VALGRIND_PROGRAM_OPTIONS} "${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}") |
67 | 31 | else() | 31 | else() |
68 | 32 | add_test(${NAME} ${EXECUTABLE}) | 32 | add_test(${NAME} ${EXECUTABLE}) |
69 | 33 | 33 | ||
70 | === added file 'cmake/Plugins.cmake' | |||
71 | --- cmake/Plugins.cmake 1970-01-01 00:00:00 +0000 | |||
72 | +++ cmake/Plugins.cmake 2014-06-25 09:58:07 +0000 | |||
73 | @@ -0,0 +1,102 @@ | |||
74 | 1 | find_program(qmlplugindump_exe qmlplugindump) | ||
75 | 2 | |||
76 | 3 | if(NOT qmlplugindump_exe) | ||
77 | 4 | msg(FATAL_ERROR "Could not locate qmlplugindump.") | ||
78 | 5 | endif() | ||
79 | 6 | |||
80 | 7 | function(QUERY_QMAKE VAR RESULT) | ||
81 | 8 | exec_program(${QMAKE_EXECUTABLE} ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output ) | ||
82 | 9 | if(NOT return_code) | ||
83 | 10 | file(TO_CMAKE_PATH "${output}" output) | ||
84 | 11 | set(${RESULT} ${output} PARENT_SCOPE) | ||
85 | 12 | endif(NOT return_code) | ||
86 | 13 | endfunction(QUERY_QMAKE) | ||
87 | 14 | |||
88 | 15 | # Creates target for copying and installing qmlfiles | ||
89 | 16 | # | ||
90 | 17 | # export_qmlfiles(plugin sub_path) | ||
91 | 18 | # | ||
92 | 19 | # | ||
93 | 20 | # Target to be created: | ||
94 | 21 | # - plugin-qmlfiles - Copies the qml files (*.qml, *.js, qmldir) into the shadow build folder. | ||
95 | 22 | |||
96 | 23 | macro(export_qmlfiles PLUGIN) | ||
97 | 24 | set(one_value_args PLUGIN_SUBPATH PLUGIN_PATH) | ||
98 | 25 | CMAKE_PARSE_ARGUMENTS(_ARG "" "${one_value_args}" "" ${ARGN}) | ||
99 | 26 | |||
100 | 27 | file(GLOB QMLFILES | ||
101 | 28 | *.qml | ||
102 | 29 | *.js | ||
103 | 30 | qmldir | ||
104 | 31 | ) | ||
105 | 32 | |||
106 | 33 | # copy the qmldir file | ||
107 | 34 | add_custom_target(${PLUGIN}-qmlfiles ALL | ||
108 | 35 | COMMAND cp ${QMLFILES} ${CMAKE_CURRENT_BINARY_DIR} | ||
109 | 36 | DEPENDS ${QMLFILES} | ||
110 | 37 | ) | ||
111 | 38 | |||
112 | 39 | if(NOT _ARG_PLUGIN_PATH) | ||
113 | 40 | # Qt5's cmake does not export QT_IMPORTS_DIR, lets query qmake on our own for now | ||
114 | 41 | get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION) | ||
115 | 42 | query_qmake(QT_INSTALL_QML _ARG_PLUGIN_PATH) | ||
116 | 43 | endif() | ||
117 | 44 | |||
118 | 45 | if(_ARG_PLUGIN_SUBPATH) | ||
119 | 46 | set(PLUGIN_DESTINATION "${_ARG_PLUGIN_PATH}/${_ARG_PLUGIN_SUBPATH}") | ||
120 | 47 | else() | ||
121 | 48 | set(PLUGIN_DESTINATION "${_ARG_PLUGIN_PATH}") | ||
122 | 49 | endif() | ||
123 | 50 | |||
124 | 51 | # install the qmlfiles file. | ||
125 | 52 | install(FILES ${QMLFILES} | ||
126 | 53 | DESTINATION ${PLUGIN_DESTINATION} | ||
127 | 54 | ) | ||
128 | 55 | endmacro(export_qmlfiles) | ||
129 | 56 | |||
130 | 57 | |||
131 | 58 | # Creates target for generating the qmltypes file for a plugin and installs plugin files | ||
132 | 59 | # | ||
133 | 60 | # export_qmlplugin(plugin version sub_path [TARGETS target1 [target2 ...]]) | ||
134 | 61 | # | ||
135 | 62 | # TARGETS additional install targets (eg the plugin shared object) | ||
136 | 63 | # | ||
137 | 64 | # Target to be created: | ||
138 | 65 | # - plugin-qmltypes - Generates the qmltypes file in the shadow build folder. | ||
139 | 66 | |||
140 | 67 | macro(export_qmlplugin PLUGIN VERSION) | ||
141 | 68 | set(one_value_args PLUGIN_SUBPATH PLUGIN_PATH) | ||
142 | 69 | set(multi_value_keywords TARGETS) | ||
143 | 70 | cmake_parse_arguments(_ARG "" "${one_value_args}" "${multi_value_keywords}" ${ARGN}) | ||
144 | 71 | |||
145 | 72 | if(NOT _ARG_PLUGIN_PATH) | ||
146 | 73 | # Qt5's cmake does not export QT_IMPORTS_DIR, lets query qmake on our own for now | ||
147 | 74 | get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION) | ||
148 | 75 | query_qmake(QT_INSTALL_QML _ARG_PLUGIN_PATH) | ||
149 | 76 | endif() | ||
150 | 77 | |||
151 | 78 | if(_ARG_PLUGIN_SUBPATH) | ||
152 | 79 | set(PLUGIN_DESTINATION "${_ARG_PLUGIN_PATH}/${_ARG_PLUGIN_SUBPATH}") | ||
153 | 80 | else() | ||
154 | 81 | set(PLUGIN_DESTINATION "${_ARG_PLUGIN_PATH}") | ||
155 | 82 | endif() | ||
156 | 83 | |||
157 | 84 | # Only try to generate .qmltypes if not cross compiling | ||
158 | 85 | if(NOT CMAKE_CROSSCOMPILING) | ||
159 | 86 | # create the plugin.qmltypes file | ||
160 | 87 | add_custom_target(${PLUGIN}-qmltypes ALL | ||
161 | 88 | COMMAND ${qmlplugindump_exe} -notrelocatable ${PLUGIN} ${VERSION} ${CMAKE_CURRENT_BINARY_DIR}/../ > ${CMAKE_CURRENT_BINARY_DIR}/plugin.qmltypes | ||
162 | 89 | ) | ||
163 | 90 | add_dependencies(${PLUGIN}-qmltypes ${PLUGIN}-qmlfiles ${_ARG_TARGETS}) | ||
164 | 91 | |||
165 | 92 | # install the qmltypes file. | ||
166 | 93 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plugin.qmltypes | ||
167 | 94 | DESTINATION ${PLUGIN_DESTINATION} | ||
168 | 95 | ) | ||
169 | 96 | endif() | ||
170 | 97 | |||
171 | 98 | # install the additional targets | ||
172 | 99 | install(TARGETS ${_ARG_TARGETS} | ||
173 | 100 | DESTINATION ${PLUGIN_DESTINATION} | ||
174 | 101 | ) | ||
175 | 102 | endmacro(export_qmlplugin) | ||
176 | 0 | 103 | ||
177 | === modified file 'data/CMakeLists.txt' | |||
178 | --- data/CMakeLists.txt 2013-10-22 16:59:17 +0000 | |||
179 | +++ data/CMakeLists.txt 2014-06-25 09:58:07 +0000 | |||
180 | @@ -14,6 +14,22 @@ | |||
181 | 14 | ) | 14 | ) |
182 | 15 | 15 | ||
183 | 16 | ########################### | 16 | ########################### |
184 | 17 | # Default infographic | ||
185 | 18 | ########################### | ||
186 | 19 | |||
187 | 20 | configure_file( | ||
188 | 21 | "default.json.in" | ||
189 | 22 | "${CMAKE_CURRENT_BINARY_DIR}/default.json" @ONLY | ||
190 | 23 | ) | ||
191 | 24 | |||
192 | 25 | install( | ||
193 | 26 | FILES | ||
194 | 27 | "${CMAKE_CURRENT_BINARY_DIR}/default.json" | ||
195 | 28 | DESTINATION | ||
196 | 29 | "${CMAKE_INSTALL_DATADIR}/libusermetrics/infographics/" | ||
197 | 30 | ) | ||
198 | 31 | |||
199 | 32 | ########################### | ||
200 | 17 | # Policy | 33 | # Policy |
201 | 18 | ########################### | 34 | ########################### |
202 | 19 | 35 | ||
203 | @@ -24,7 +40,7 @@ | |||
204 | 24 | 40 | ||
205 | 25 | install( | 41 | install( |
206 | 26 | FILES | 42 | FILES |
208 | 27 | "com.canonical.UserMetrics.conf" | 43 | "com.canonical.Infographics.conf" |
209 | 28 | DESTINATION ${DBUSCONFDIR} | 44 | DESTINATION ${DBUSCONFDIR} |
210 | 29 | ) | 45 | ) |
211 | 30 | 46 | ||
212 | @@ -39,10 +55,7 @@ | |||
213 | 39 | 55 | ||
214 | 40 | install( | 56 | install( |
215 | 41 | FILES | 57 | FILES |
220 | 42 | com.canonical.usermetrics.DataSet.xml | 58 | com.canonical.Infographics.xml |
217 | 43 | com.canonical.usermetrics.DataSource.xml | ||
218 | 44 | com.canonical.usermetrics.UserData.xml | ||
219 | 45 | com.canonical.UserMetrics.xml | ||
221 | 46 | DESTINATION ${DBUSIFACEDIR} | 59 | DESTINATION ${DBUSIFACEDIR} |
222 | 47 | ) | 60 | ) |
223 | 48 | 61 | ||
224 | @@ -55,18 +68,32 @@ | |||
225 | 55 | "${CMAKE_INSTALL_DATADIR}/dbus-1/system-services/" | 68 | "${CMAKE_INSTALL_DATADIR}/dbus-1/system-services/" |
226 | 56 | ) | 69 | ) |
227 | 57 | 70 | ||
230 | 58 | set(USERMETRICS_SERVICE | 71 | set(INFOGRAPHICS_SERVICE |
231 | 59 | "${CMAKE_CURRENT_BINARY_DIR}/com.canonical.UserMetrics.service" | 72 | "${CMAKE_CURRENT_BINARY_DIR}/com.canonical.Infographics.service" |
232 | 60 | ) | 73 | ) |
233 | 61 | 74 | ||
234 | 62 | configure_file( | 75 | configure_file( |
237 | 63 | "com.canonical.UserMetrics.service.in" | 76 | "com.canonical.Infographics.service.in" |
238 | 64 | ${USERMETRICS_SERVICE} | 77 | ${INFOGRAPHICS_SERVICE} |
239 | 65 | @ONLY | 78 | @ONLY |
240 | 66 | ) | 79 | ) |
241 | 67 | 80 | ||
242 | 68 | install( | 81 | install( |
243 | 69 | FILES | 82 | FILES |
245 | 70 | ${USERMETRICS_SERVICE} | 83 | ${INFOGRAPHICS_SERVICE} |
246 | 71 | DESTINATION ${DBUSSERVICEDIR} | 84 | DESTINATION ${DBUSSERVICEDIR} |
247 | 72 | ) | 85 | ) |
248 | 86 | |||
249 | 87 | ############################## | ||
250 | 88 | # Usermetrics session service | ||
251 | 89 | ############################## | ||
252 | 90 | |||
253 | 91 | configure_file( | ||
254 | 92 | "usermetricsservice.conf.in" | ||
255 | 93 | "${CMAKE_CURRENT_BINARY_DIR}/usermetricsservice.conf" @ONLY | ||
256 | 94 | ) | ||
257 | 95 | |||
258 | 96 | install( | ||
259 | 97 | FILES "${CMAKE_CURRENT_BINARY_DIR}/usermetricsservice.conf" | ||
260 | 98 | DESTINATION "${CMAKE_INSTALL_DATADIR}/upstart/sessions" | ||
261 | 99 | ) | ||
262 | 73 | 100 | ||
263 | === added file 'data/com.canonical.Infographics.conf' | |||
264 | --- data/com.canonical.Infographics.conf 1970-01-01 00:00:00 +0000 | |||
265 | +++ data/com.canonical.Infographics.conf 2014-06-25 09:58:07 +0000 | |||
266 | @@ -0,0 +1,15 @@ | |||
267 | 1 | <!DOCTYPE busconfig PUBLIC | ||
268 | 2 | "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | ||
269 | 3 | "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | ||
270 | 4 | <busconfig> | ||
271 | 5 | |||
272 | 6 | <policy user="usermetrics"> | ||
273 | 7 | <allow own="com.canonical.Infographics"/> | ||
274 | 8 | </policy> | ||
275 | 9 | |||
276 | 10 | <policy context="default"> | ||
277 | 11 | <allow send_destination="com.canonical.Infographics"/> | ||
278 | 12 | <allow receive_sender="com.canonical.Infographics"/> | ||
279 | 13 | </policy> | ||
280 | 14 | |||
281 | 15 | </busconfig> | ||
282 | 0 | 16 | ||
283 | === added file 'data/com.canonical.Infographics.service.in' | |||
284 | --- data/com.canonical.Infographics.service.in 1970-01-01 00:00:00 +0000 | |||
285 | +++ data/com.canonical.Infographics.service.in 2014-06-25 09:58:07 +0000 | |||
286 | @@ -0,0 +1,5 @@ | |||
287 | 1 | [D-BUS Service] | ||
288 | 2 | Name=com.canonical.Infographics | ||
289 | 3 | Exec=@CMAKE_INSTALL_FULL_LIBEXECDIR@/libusermetrics/infographicservice | ||
290 | 4 | User=usermetrics | ||
291 | 5 | StandardOutput=syslog | ||
292 | 0 | 6 | ||
293 | === added file 'data/com.canonical.Infographics.xml' | |||
294 | --- data/com.canonical.Infographics.xml 1970-01-01 00:00:00 +0000 | |||
295 | +++ data/com.canonical.Infographics.xml 2014-06-25 09:58:07 +0000 | |||
296 | @@ -0,0 +1,14 @@ | |||
297 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
298 | 2 | <node name="/"> | ||
299 | 3 | <interface name="com.canonical.Infographics"> | ||
300 | 4 | <method name="update"> | ||
301 | 5 | <!-- in --> | ||
302 | 6 | <arg type="s" name="visualizer" direction="in"/> | ||
303 | 7 | <arg type="as" name="sources" direction="in"/> | ||
304 | 8 | <arg type="s" name="file" direction="in"/> | ||
305 | 9 | </method> | ||
306 | 10 | |||
307 | 11 | <method name="clear"> | ||
308 | 12 | </method> | ||
309 | 13 | </interface> | ||
310 | 14 | </node> | ||
311 | 0 | 15 | ||
312 | === removed file 'data/com.canonical.UserMetrics.conf' | |||
313 | --- data/com.canonical.UserMetrics.conf 2013-07-01 17:13:45 +0000 | |||
314 | +++ data/com.canonical.UserMetrics.conf 1970-01-01 00:00:00 +0000 | |||
315 | @@ -1,15 +0,0 @@ | |||
316 | 1 | <!DOCTYPE busconfig PUBLIC | ||
317 | 2 | "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | ||
318 | 3 | "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | ||
319 | 4 | <busconfig> | ||
320 | 5 | |||
321 | 6 | <policy user="usermetrics"> | ||
322 | 7 | <allow own="com.canonical.UserMetrics"/> | ||
323 | 8 | </policy> | ||
324 | 9 | |||
325 | 10 | <policy context="default"> | ||
326 | 11 | <allow send_destination="com.canonical.UserMetrics"/> | ||
327 | 12 | <allow receive_sender="com.canonical.UserMetrics"/> | ||
328 | 13 | </policy> | ||
329 | 14 | |||
330 | 15 | </busconfig> | ||
331 | 16 | \ No newline at end of file | 0 | \ No newline at end of file |
332 | 17 | 1 | ||
333 | === removed file 'data/com.canonical.UserMetrics.service.in' | |||
334 | --- data/com.canonical.UserMetrics.service.in 2013-07-03 13:19:20 +0000 | |||
335 | +++ data/com.canonical.UserMetrics.service.in 1970-01-01 00:00:00 +0000 | |||
336 | @@ -1,5 +0,0 @@ | |||
337 | 1 | [D-BUS Service] | ||
338 | 2 | Name=com.canonical.UserMetrics | ||
339 | 3 | Exec=@CMAKE_INSTALL_FULL_LIBEXECDIR@/libusermetrics/usermetricsservice | ||
340 | 4 | User=usermetrics | ||
341 | 5 | StandardOutput=syslog | ||
342 | 6 | 0 | ||
343 | === removed file 'data/com.canonical.UserMetrics.xml' | |||
344 | --- data/com.canonical.UserMetrics.xml 2013-10-22 08:53:23 +0000 | |||
345 | +++ data/com.canonical.UserMetrics.xml 1970-01-01 00:00:00 +0000 | |||
346 | @@ -1,44 +0,0 @@ | |||
347 | 1 | <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> | ||
348 | 2 | <node> | ||
349 | 3 | <interface name="com.canonical.UserMetrics"> | ||
350 | 4 | |||
351 | 5 | <property name="dataSources" type="ao" access="read"/> | ||
352 | 6 | |||
353 | 7 | <signal name="dataSourceAdded"> | ||
354 | 8 | <arg name="path" type="o" direction="out"/> | ||
355 | 9 | </signal> | ||
356 | 10 | |||
357 | 11 | <signal name="dataSourceRemoved"> | ||
358 | 12 | <arg name="path" type="o" direction="out"/> | ||
359 | 13 | </signal> | ||
360 | 14 | |||
361 | 15 | <method name="createDataSource"> | ||
362 | 16 | <annotation name="org.qtproject.QtDBus.QtTypeName.In5" value="QVariantMap"/> | ||
363 | 17 | <arg type="o" direction="out"/> | ||
364 | 18 | <arg name="name" type="s" direction="in"/> | ||
365 | 19 | <arg name="formatString" type="s" direction="in"/> | ||
366 | 20 | <arg name="emptyDataString" type="s" direction="in"/> | ||
367 | 21 | <arg name="textDomain" type="s" direction="in"/> | ||
368 | 22 | <arg name="metricType" type="u" direction="in"/> | ||
369 | 23 | <arg name="options" type="a{sv}" direction="in"/> | ||
370 | 24 | </method> | ||
371 | 25 | |||
372 | 26 | <property name="userDatas" type="ao" access="read"/> | ||
373 | 27 | |||
374 | 28 | <signal name="userDataAdded"> | ||
375 | 29 | <arg name="username" type="s" direction="out"/> | ||
376 | 30 | <arg name="path" type="o" direction="out"/> | ||
377 | 31 | </signal> | ||
378 | 32 | |||
379 | 33 | <signal name="userDataRemoved"> | ||
380 | 34 | <arg name="username" type="s" direction="out"/> | ||
381 | 35 | <arg name="path" type="o" direction="out"/> | ||
382 | 36 | </signal> | ||
383 | 37 | |||
384 | 38 | <method name="createUserData"> | ||
385 | 39 | <arg type="o" direction="out"/> | ||
386 | 40 | <arg name="username" type="s" direction="in"/> | ||
387 | 41 | </method> | ||
388 | 42 | |||
389 | 43 | </interface> | ||
390 | 44 | </node> | ||
391 | 45 | \ No newline at end of file | 0 | \ No newline at end of file |
392 | 46 | 1 | ||
393 | === removed file 'data/com.canonical.usermetrics.DataSet.xml' | |||
394 | --- data/com.canonical.usermetrics.DataSet.xml 2013-10-22 08:53:23 +0000 | |||
395 | +++ data/com.canonical.usermetrics.DataSet.xml 1970-01-01 00:00:00 +0000 | |||
396 | @@ -1,24 +0,0 @@ | |||
397 | 1 | <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> | ||
398 | 2 | <node> | ||
399 | 3 | <interface name="com.canonical.usermetrics.DataSet"> | ||
400 | 4 | <property name="dataSource" type="o" access="read"/> | ||
401 | 5 | |||
402 | 6 | <property name="lastUpdated" type="u" access="read"/> | ||
403 | 7 | |||
404 | 8 | <property name="data" type="av" access="read"/> | ||
405 | 9 | |||
406 | 10 | <method name="update"> | ||
407 | 11 | <arg name="data" type="av" direction="in"/> | ||
408 | 12 | </method> | ||
409 | 13 | |||
410 | 14 | <method name="increment"> | ||
411 | 15 | <arg name="amount" type="d" direction="in"/> | ||
412 | 16 | </method> | ||
413 | 17 | |||
414 | 18 | <signal name="updated"> | ||
415 | 19 | <arg name="lastUpdated" type="u" direction="out"/> | ||
416 | 20 | <arg name="data" type="av" direction="out"/> | ||
417 | 21 | </signal> | ||
418 | 22 | |||
419 | 23 | </interface> | ||
420 | 24 | </node> | ||
421 | 25 | \ No newline at end of file | 0 | \ No newline at end of file |
422 | 26 | 1 | ||
423 | === removed file 'data/com.canonical.usermetrics.DataSource.xml' | |||
424 | --- data/com.canonical.usermetrics.DataSource.xml 2013-09-03 14:59:00 +0000 | |||
425 | +++ data/com.canonical.usermetrics.DataSource.xml 1970-01-01 00:00:00 +0000 | |||
426 | @@ -1,42 +0,0 @@ | |||
427 | 1 | <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> | ||
428 | 2 | <node> | ||
429 | 3 | <interface name="com.canonical.usermetrics.DataSource"> | ||
430 | 4 | |||
431 | 5 | <property name="name" type="s" access="read"/> | ||
432 | 6 | |||
433 | 7 | <property name="formatString" type="s" access="readwrite"/> | ||
434 | 8 | |||
435 | 9 | |||
436 | 10 | <signal name="formatStringChanged"> | ||
437 | 11 | <arg name="formatString" type="s" direction="out"/> | ||
438 | 12 | </signal> | ||
439 | 13 | |||
440 | 14 | <property name="emptyDataString" type="s" access="readwrite"/> | ||
441 | 15 | |||
442 | 16 | <signal name="emptyDataStringChanged"> | ||
443 | 17 | <arg name="emptyDataString" type="s" direction="out"/> | ||
444 | 18 | </signal> | ||
445 | 19 | |||
446 | 20 | <property name="textDomain" type="s" access="read"/> | ||
447 | 21 | |||
448 | 22 | <signal name="textDomainChanged"> | ||
449 | 23 | <arg name="textDomain" type="s" direction="out"/> | ||
450 | 24 | </signal> | ||
451 | 25 | |||
452 | 26 | <property name="metricType" type="u" access="readwrite"/> | ||
453 | 27 | |||
454 | 28 | <signal name="metricTypeChanged"> | ||
455 | 29 | <arg name="metricType" type="u" direction="out"/> | ||
456 | 30 | </signal> | ||
457 | 31 | |||
458 | 32 | <property name="options" type="a{sv}" access="readwrite"> | ||
459 | 33 | <annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/> | ||
460 | 34 | </property> | ||
461 | 35 | |||
462 | 36 | <signal name="optionsChanged"> | ||
463 | 37 | <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/> | ||
464 | 38 | <arg name="options" type="a{sv}" direction="out"/> | ||
465 | 39 | </signal> | ||
466 | 40 | |||
467 | 41 | </interface> | ||
468 | 42 | </node> | ||
469 | 43 | \ No newline at end of file | 0 | \ No newline at end of file |
470 | 44 | 1 | ||
471 | === removed file 'data/com.canonical.usermetrics.UserData.xml' | |||
472 | --- data/com.canonical.usermetrics.UserData.xml 2013-10-22 08:53:23 +0000 | |||
473 | +++ data/com.canonical.usermetrics.UserData.xml 1970-01-01 00:00:00 +0000 | |||
474 | @@ -1,25 +0,0 @@ | |||
475 | 1 | <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> | ||
476 | 2 | <node> | ||
477 | 3 | <interface name="com.canonical.usermetrics.UserData"> | ||
478 | 4 | |||
479 | 5 | <property name="username" type="s" access="read"/> | ||
480 | 6 | |||
481 | 7 | <property name="dataSets" type="ao" access="read"/> | ||
482 | 8 | |||
483 | 9 | <signal name="dataSetAdded"> | ||
484 | 10 | <arg name="dataSourcePath" type="o" direction="out"/> | ||
485 | 11 | <arg name="path" type="o" direction="out"/> | ||
486 | 12 | </signal> | ||
487 | 13 | |||
488 | 14 | <signal name="dataSetRemoved"> | ||
489 | 15 | <arg name="dataSourcePath" type="o" direction="out"/> | ||
490 | 16 | <arg name="path" type="o" direction="out"/> | ||
491 | 17 | </signal> | ||
492 | 18 | |||
493 | 19 | <method name="createDataSet"> | ||
494 | 20 | <arg type="o" direction="out"/> | ||
495 | 21 | <arg name="dataSource" type="s" direction="in"/> | ||
496 | 22 | </method> | ||
497 | 23 | |||
498 | 24 | </interface> | ||
499 | 25 | </node> | ||
500 | 26 | \ No newline at end of file | 0 | \ No newline at end of file |
501 | 27 | 1 | ||
502 | === added file 'data/default.json.in' | |||
503 | --- data/default.json.in 1970-01-01 00:00:00 +0000 | |||
504 | +++ data/default.json.in 2014-06-25 09:58:07 +0000 | |||
505 | @@ -0,0 +1,9 @@ | |||
506 | 1 | { | ||
507 | 2 | "exec": "@CMAKE_INSTALL_FULL_LIBEXECDIR@/libusermetrics/infographic", | ||
508 | 3 | "type": "iterate", | ||
509 | 4 | "input": { | ||
510 | 5 | "*": [ | ||
511 | 6 | ".*.libusermetrics.json" | ||
512 | 7 | ] | ||
513 | 8 | } | ||
514 | 9 | } | ||
515 | 0 | 10 | ||
516 | === added directory 'data/libusermetrics/infographics' | |||
517 | === added directory 'data/libusermetrics/sources' | |||
518 | === added file 'data/usermetricsservice.conf.in' | |||
519 | --- data/usermetricsservice.conf.in 1970-01-01 00:00:00 +0000 | |||
520 | +++ data/usermetricsservice.conf.in 2014-06-25 09:58:07 +0000 | |||
521 | @@ -0,0 +1,10 @@ | |||
522 | 1 | description "Service to connect infographic data sources to infographic visualizations" | ||
523 | 2 | |||
524 | 3 | start on started dbus | ||
525 | 4 | stop on desktop-end | ||
526 | 5 | |||
527 | 6 | respawn | ||
528 | 7 | respawn limit 5 10 | ||
529 | 8 | |||
530 | 9 | exec @CMAKE_INSTALL_FULL_LIBEXECDIR@/libusermetrics/usermetricsservice | ||
531 | 10 | |||
532 | 0 | 11 | ||
533 | === modified file 'debian/changelog' | |||
534 | --- debian/changelog 2014-05-09 20:44:25 +0000 | |||
535 | +++ debian/changelog 2014-06-25 09:58:07 +0000 | |||
536 | @@ -1,3 +1,10 @@ | |||
537 | 1 | libusermetrics (1.2.0-0ubuntu1) UNRELEASED; urgency=medium | ||
538 | 2 | |||
539 | 3 | * Remove the usermetrics database and store metrics in json files | ||
540 | 4 | inside the ~/.cache directory. | ||
541 | 5 | |||
542 | 6 | -- Pete Woods <pete.woods@canonical.com> Mon, 06 Jan 2014 09:36:20 +0000 | ||
543 | 7 | |||
544 | 1 | libusermetrics (1.1.1+14.04.20140305-0ubuntu4) utopic; urgency=medium | 8 | libusermetrics (1.1.1+14.04.20140305-0ubuntu4) utopic; urgency=medium |
545 | 2 | 9 | ||
546 | 3 | * Disable valgrind on powerpc | 10 | * Disable valgrind on powerpc |
547 | 4 | 11 | ||
548 | === modified file 'debian/control' | |||
549 | --- debian/control 2014-05-09 20:44:13 +0000 | |||
550 | +++ debian/control 2014-06-25 09:58:07 +0000 | |||
551 | @@ -1,7 +1,8 @@ | |||
552 | 1 | Source: libusermetrics | 1 | Source: libusermetrics |
553 | 2 | Priority: optional | 2 | Priority: optional |
554 | 3 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> | 3 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
556 | 4 | Build-Depends: cmake, | 4 | Build-Depends: click-dev (>= 0.2.2), |
557 | 5 | cmake, | ||
558 | 5 | dbus, | 6 | dbus, |
559 | 6 | debhelper (>= 9), | 7 | debhelper (>= 9), |
560 | 7 | doxygen, | 8 | doxygen, |
561 | @@ -10,18 +11,17 @@ | |||
562 | 10 | libapparmor-dev, | 11 | libapparmor-dev, |
563 | 11 | libgsettings-qt-dev, | 12 | libgsettings-qt-dev, |
564 | 12 | libgtest-dev, | 13 | libgtest-dev, |
565 | 13 | libqdjango-dev, | ||
566 | 14 | libqt5sql5-sqlite, | ||
567 | 15 | libqt5xmlpatterns5-dev, | 14 | libqt5xmlpatterns5-dev, |
568 | 16 | libqtdbustest1-dev, | 15 | libqtdbustest1-dev, |
569 | 17 | pkg-config, | 16 | pkg-config, |
570 | 17 | qt5-default, | ||
571 | 18 | qtbase5-dev, | 18 | qtbase5-dev, |
573 | 19 | sqlite3, | 19 | qtdeclarative5-dev-tools, |
574 | 20 | valgrind [!arm64 !powerpc !ppc64el], | 20 | valgrind [!arm64 !powerpc !ppc64el], |
575 | 21 | qtdeclarative5-dev, | 21 | qtdeclarative5-dev, |
576 | 22 | qtdeclarative5-qtquick2-plugin, | 22 | qtdeclarative5-qtquick2-plugin, |
577 | 23 | qtdeclarative5-test-plugin, | 23 | qtdeclarative5-test-plugin, |
579 | 24 | Standards-Version: 3.9.4 | 24 | Standards-Version: 3.9.5 |
580 | 25 | Section: libs | 25 | Section: libs |
581 | 26 | Homepage: http://launchpad.net/libusermetrics | 26 | Homepage: http://launchpad.net/libusermetrics |
582 | 27 | # If you aren't a member of ~unity-team but need to upload packaging changes, | 27 | # If you aren't a member of ~unity-team but need to upload packaging changes, |
583 | @@ -103,5 +103,16 @@ | |||
584 | 103 | ${shlibs:Depends}, | 103 | ${shlibs:Depends}, |
585 | 104 | qtdeclarative5-qtquick2-plugin, | 104 | qtdeclarative5-qtquick2-plugin, |
586 | 105 | libusermetricsinput1 (= ${binary:Version}), | 105 | libusermetricsinput1 (= ${binary:Version}), |
589 | 106 | Description: QML bindings for libusermetrics | 106 | Description: QML bindings for libusermetricsinput |
590 | 107 | A set of bindings allowing the use of libusermetrics from QML applications. | 107 | A set of bindings allowing the use of libusermetricsinput from |
591 | 108 | QML applications. | ||
592 | 109 | |||
593 | 110 | Package: qtdeclarative5-infographics0.1 | ||
594 | 111 | Architecture: any | ||
595 | 112 | Depends: ${misc:Depends}, | ||
596 | 113 | ${shlibs:Depends}, | ||
597 | 114 | qtdeclarative5-qtquick2-plugin, | ||
598 | 115 | libusermetricsoutput1 (= ${binary:Version}), | ||
599 | 116 | Description: QML bindings for libusermetricsoutput | ||
600 | 117 | A set of bindings allowing the use of libusermetricsoutput from | ||
601 | 118 | QML applications. | ||
602 | 108 | \ No newline at end of file | 119 | \ No newline at end of file |
603 | 109 | 120 | ||
604 | === modified file 'debian/libusermetricsinput1.symbols' | |||
605 | --- debian/libusermetricsinput1.symbols 2013-09-04 13:44:30 +0000 | |||
606 | +++ debian/libusermetricsinput1.symbols 2014-06-25 09:58:07 +0000 | |||
607 | @@ -5,6 +5,7 @@ | |||
608 | 5 | (c++)"UserMetricsInput::MetricUpdate::~MetricUpdate()@Base" 1.0.1 | 5 | (c++)"UserMetricsInput::MetricUpdate::~MetricUpdate()@Base" 1.0.1 |
609 | 6 | (c++)"UserMetricsInput::MetricUpdate::~MetricUpdate()@Base" 1.0.1 | 6 | (c++)"UserMetricsInput::MetricUpdate::~MetricUpdate()@Base" 1.0.1 |
610 | 7 | (c++)"UserMetricsInput::MetricManager::getInstance()@Base" 1.0.1 | 7 | (c++)"UserMetricsInput::MetricManager::getInstance()@Base" 1.0.1 |
611 | 8 | (c++)"UserMetricsInput::MetricManager::getInstance(QString const&)@Base" 0replaceme | ||
612 | 8 | (c++)"UserMetricsInput::MetricManager::MetricManager(QObject*)@Base" 1.0.1 | 9 | (c++)"UserMetricsInput::MetricManager::MetricManager(QObject*)@Base" 1.0.1 |
613 | 9 | (c++)"UserMetricsInput::MetricManager::MetricManager(QObject*)@Base" 1.0.1 | 10 | (c++)"UserMetricsInput::MetricManager::MetricManager(QObject*)@Base" 1.0.1 |
614 | 10 | (c++)"UserMetricsInput::MetricManager::~MetricManager()@Base" 1.0.1 | 11 | (c++)"UserMetricsInput::MetricManager::~MetricManager()@Base" 1.0.1 |
615 | @@ -17,15 +18,25 @@ | |||
616 | 17 | (c++)"UserMetricsInput::MetricParameters::maximum(double)@Base" 1.1.1 | 18 | (c++)"UserMetricsInput::MetricParameters::maximum(double)@Base" 1.1.1 |
617 | 18 | (c++)"UserMetricsInput::MetricParameters::minimum(double)@Base" 1.1.1 | 19 | (c++)"UserMetricsInput::MetricParameters::minimum(double)@Base" 1.1.1 |
618 | 19 | (c++)"UserMetricsInput::MetricParameters::MetricParameters(QString const&)@Base" 1.1.1 | 20 | (c++)"UserMetricsInput::MetricParameters::MetricParameters(QString const&)@Base" 1.1.1 |
619 | 21 | (c++)"UserMetricsInput::MetricParameters::MetricParameters(UserMetricsInput::MetricParameters const&)@Base" 0replaceme | ||
620 | 20 | (c++)"UserMetricsInput::MetricParameters::MetricParameters(QString const&)@Base" 1.1.1 | 22 | (c++)"UserMetricsInput::MetricParameters::MetricParameters(QString const&)@Base" 1.1.1 |
629 | 21 | (c++)"UserMetricsInput::MetricParameters::~MetricParameters()@Base" 1.1.1 | 23 | (c++)"UserMetricsInput::MetricParameters::MetricParameters(UserMetricsInput::MetricParameters const&)@Base" 0replaceme |
630 | 22 | (c++)"UserMetricsInput::MetricParameters::~MetricParameters()@Base" 1.1.1 | 24 | (c++)"UserMetricsInput::MetricParameters::~MetricParameters()@Base" 1.1.1 |
631 | 23 | (c++)"UserMetricsInput::MetricParameters::~MetricParameters()@Base" 1.1.1 | 25 | (c++)"UserMetricsInput::MetricParameters::~MetricParameters()@Base" 1.1.1 |
632 | 24 | (c++)"UserMetricsInput::Metric::Metric(QObject*)@Base" 1.0.1 | 26 | (c++)"UserMetricsInput::MetricParameters::~MetricParameters()@Base" 1.1.1 |
633 | 25 | (c++)"UserMetricsInput::Metric::Metric(QObject*)@Base" 1.0.1 | 27 | (c++)"UserMetricsInput::MetricParameters::operator=(UserMetricsInput::MetricParameters const&)@Base" 0replaceme |
634 | 26 | (c++)"UserMetricsInput::Metric::~Metric()@Base" 1.0.1 | 28 | (c++)"UserMetricsInput::Metric::Metric(QObject*)@Base" 1.0.1 |
635 | 27 | (c++)"UserMetricsInput::Metric::~Metric()@Base" 1.0.1 | 29 | (c++)"UserMetricsInput::Metric::Metric(QObject*)@Base" 1.0.1 |
636 | 28 | (c++)"UserMetricsInput::Metric::~Metric()@Base" 1.0.1 | 30 | (c++)"UserMetricsInput::Metric::~Metric()@Base" 1.0.1 |
637 | 31 | (c++)"UserMetricsInput::Metric::~Metric()@Base" 1.0.1 | ||
638 | 32 | (c++)"UserMetricsInput::Metric::~Metric()@Base" 1.0.1 | ||
639 | 33 | (c++)"UserMetricsInput::MetricParameters::textDomain() const@Base" 0replaceme | ||
640 | 34 | (c++)"UserMetricsInput::MetricParameters::formatString() const@Base" 0replaceme | ||
641 | 35 | (c++)"UserMetricsInput::MetricParameters::emptyDataString() const@Base" 0replaceme | ||
642 | 36 | (c++)"UserMetricsInput::MetricParameters::id() const@Base" 0replaceme | ||
643 | 37 | (c++)"UserMetricsInput::MetricParameters::type() const@Base" 0replaceme | ||
644 | 38 | (c++)"UserMetricsInput::MetricParameters::options() const@Base" 0replaceme | ||
645 | 39 | (c++)"UserMetricsInput::MetricParameters::operator==(UserMetricsInput::MetricParameters const&) const@Base" 0replaceme | ||
646 | 29 | (c++)"typeinfo for UserMetricsInput::MetricUpdate@Base" 1.0.1 | 40 | (c++)"typeinfo for UserMetricsInput::MetricUpdate@Base" 1.0.1 |
647 | 30 | (c++)"typeinfo for UserMetricsInput::MetricManager@Base" 1.0.1 | 41 | (c++)"typeinfo for UserMetricsInput::MetricManager@Base" 1.0.1 |
648 | 31 | (c++)"typeinfo for UserMetricsInput::MetricParameters@Base" 1.1.1 | 42 | (c++)"typeinfo for UserMetricsInput::MetricParameters@Base" 1.1.1 |
649 | 32 | 43 | ||
650 | === modified file 'debian/libusermetricsoutput1.symbols' | |||
651 | --- debian/libusermetricsoutput1.symbols 2013-06-20 15:59:31 +0000 | |||
652 | +++ debian/libusermetricsoutput1.symbols 2014-06-25 09:58:07 +0000 | |||
653 | @@ -34,11 +34,29 @@ | |||
654 | 34 | (c++)"UserMetricsOutput::UserMetrics::~UserMetrics()@Base" 1.0.1 | 34 | (c++)"UserMetricsOutput::UserMetrics::~UserMetrics()@Base" 1.0.1 |
655 | 35 | (c++)"UserMetricsOutput::UserMetrics::~UserMetrics()@Base" 1.0.1 | 35 | (c++)"UserMetricsOutput::UserMetrics::~UserMetrics()@Base" 1.0.1 |
656 | 36 | (c++)"UserMetricsOutput::UserMetrics::~UserMetrics()@Base" 1.0.1 | 36 | (c++)"UserMetricsOutput::UserMetrics::~UserMetrics()@Base" 1.0.1 |
657 | 37 | (c++)"UserMetricsOutput::InfographicList::uidChanged(unsigned int)@Base" 0replaceme | ||
658 | 38 | (c++)"UserMetricsOutput::InfographicList::pathChanged(QString const&)@Base" 0replaceme | ||
659 | 39 | (c++)"UserMetricsOutput::InfographicList::getInstance(QString const&)@Base" 0replaceme | ||
660 | 40 | (c++)"UserMetricsOutput::InfographicList::qt_metacall(QMetaObject::Call, int, void**)@Base" 0replaceme | ||
661 | 41 | (c++)"UserMetricsOutput::InfographicList::qt_metacast(char const*)@Base" 0replaceme | ||
662 | 42 | (c++)"UserMetricsOutput::InfographicList::staticMetaObject@Base" 0replaceme | ||
663 | 43 | (c++)"UserMetricsOutput::InfographicList::InfographicList(QObject*)@Base" 0replaceme | ||
664 | 44 | (c++)"UserMetricsOutput::InfographicList::~InfographicList()@Base" 0replaceme | ||
665 | 45 | (c++)"UserMetricsOutput::InfographicList::metaObject() const@Base" 0replaceme | ||
666 | 37 | (c++)"UserMetricsOutput::ColorTheme::metaObject() const@Base" 1.0.1 | 46 | (c++)"UserMetricsOutput::ColorTheme::metaObject() const@Base" 1.0.1 |
667 | 38 | (c++)"UserMetricsOutput::UserMetrics::metaObject() const@Base" 1.0.1 | 47 | (c++)"UserMetricsOutput::UserMetrics::metaObject() const@Base" 1.0.1 |
668 | 48 | (c++|optional)"std::_Rb_tree<QString, std::pair<QString const, QString>, std::_Select1st<std::pair<QString const, QString> >, std::less<QString>, std::allocator<std::pair<QString const, QString> > >::equal_range(QString const&)@Base" 0replaceme | ||
669 | 49 | (c++|optional)"std::_Rb_tree<QString, std::pair<QString const, QString>, std::_Select1st<std::pair<QString const, QString> >, std::less<QString>, std::allocator<std::pair<QString const, QString> > >::find(QString const&)@Base" 0replaceme | ||
670 | 50 | (c++|optional)"std::_Rb_tree<QString, std::pair<QString const, QString>, std::_Select1st<std::pair<QString const, QString> >, std::less<QString>, std::allocator<std::pair<QString const, QString> > >::erase(QString const&)@Base" 0replaceme | ||
671 | 51 | (c++|optional)"std::_Rb_tree<QString, std::pair<QString const, QString>, std::_Select1st<std::pair<QString const, QString> >, std::less<QString>, std::allocator<std::pair<QString const, QString> > >::_M_erase(std::_Rb_tree_node<std::pair<QString const, QString> >*)@Base" 0replaceme | ||
672 | 52 | (c++|optional)"std::_Rb_tree<QString, std::pair<QString const, QString>, std::_Select1st<std::pair<QString const, QString> >, std::less<QString>, std::allocator<std::pair<QString const, QString> > >::_M_erase_aux(std::_Rb_tree_const_iterator<std::pair<QString const, QString> >, std::_Rb_tree_const_iterator<std::pair<QString const, QString> >)@Base" 0replaceme | ||
673 | 53 | (c++|optional)"std::_Rb_tree_iterator<std::pair<QString const, QString> > std::_Rb_tree<QString, std::pair<QString const, QString>, std::_Select1st<std::pair<QString const, QString> >, std::less<QString>, std::allocator<std::pair<QString const, QString> > >::_M_insert_<std::pair<QString, QString> >(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair<QString, QString>&&)@Base" 0replaceme | ||
674 | 39 | (c++)"typeinfo for UserMetricsOutput::ColorTheme@Base" 1.0.1 | 54 | (c++)"typeinfo for UserMetricsOutput::ColorTheme@Base" 1.0.1 |
675 | 40 | (c++)"typeinfo for UserMetricsOutput::UserMetrics@Base" 1.0.1 | 55 | (c++)"typeinfo for UserMetricsOutput::UserMetrics@Base" 1.0.1 |
676 | 41 | (c++)"typeinfo name for UserMetricsOutput::ColorTheme@Base" 1.0.1 | 56 | (c++)"typeinfo name for UserMetricsOutput::ColorTheme@Base" 1.0.1 |
677 | 42 | (c++)"typeinfo name for UserMetricsOutput::UserMetrics@Base" 1.0.1 | 57 | (c++)"typeinfo name for UserMetricsOutput::UserMetrics@Base" 1.0.1 |
678 | 58 | (c++)"typeinfo for UserMetricsOutput::InfographicList@Base" 0replaceme | ||
679 | 59 | (c++)"typeinfo name for UserMetricsOutput::InfographicList@Base" 0replaceme | ||
680 | 43 | (c++)"vtable for UserMetricsOutput::ColorTheme@Base" 1.0.1 | 60 | (c++)"vtable for UserMetricsOutput::ColorTheme@Base" 1.0.1 |
681 | 61 | (c++)"vtable for UserMetricsOutput::InfographicList@Base" 0replaceme | ||
682 | 44 | (c++)"vtable for UserMetricsOutput::UserMetrics@Base" 1.0.1 | 62 | (c++)"vtable for UserMetricsOutput::UserMetrics@Base" 1.0.1 |
683 | 45 | 63 | ||
684 | === added file 'debian/qtdeclarative5-infographics0.1.install' | |||
685 | --- debian/qtdeclarative5-infographics0.1.install 1970-01-01 00:00:00 +0000 | |||
686 | +++ debian/qtdeclarative5-infographics0.1.install 2014-06-25 09:58:07 +0000 | |||
687 | @@ -0,0 +1,1 @@ | |||
688 | 1 | usr/lib/*/unity8/qml/Infographics/* | ||
689 | 0 | 2 | ||
690 | === modified file 'debian/rules' | |||
691 | --- debian/rules 2014-05-09 20:44:13 +0000 | |||
692 | +++ debian/rules 2014-06-25 09:58:07 +0000 | |||
693 | @@ -8,14 +8,18 @@ | |||
694 | 8 | ifneq (,$(filter $(DEB_HOST_ARCH),armhf ppc64el powerpc arm64)) | 8 | ifneq (,$(filter $(DEB_HOST_ARCH),armhf ppc64el powerpc arm64)) |
695 | 9 | ENABLE_MEMCHECK_OPTION = OFF | 9 | ENABLE_MEMCHECK_OPTION = OFF |
696 | 10 | else | 10 | else |
698 | 11 | ENABLE_MEMCHECK_OPTION = ON | 11 | ENABLE_MEMCHECK_OPTION = OFF |
699 | 12 | endif | 12 | endif |
700 | 13 | 13 | ||
701 | 14 | %: | 14 | %: |
703 | 15 | dh $@ --parallel --fail-missing | 15 | dh $@ --parallel --fail-missing --with click |
704 | 16 | 16 | ||
705 | 17 | override_dh_auto_configure: | 17 | override_dh_auto_configure: |
706 | 18 | dh_auto_configure -- -DBUILD_DOXYGEN=YES -DENABLE_MEMCHECK_OPTION=${ENABLE_MEMCHECK_OPTION} | 18 | dh_auto_configure -- -DBUILD_DOXYGEN=YES -DENABLE_MEMCHECK_OPTION=${ENABLE_MEMCHECK_OPTION} |
707 | 19 | 19 | ||
708 | 20 | override_dh_makeshlibs: | 20 | override_dh_makeshlibs: |
709 | 21 | dh_makeshlibs -V | 21 | dh_makeshlibs -V |
710 | 22 | |||
711 | 23 | override_dh_click: | ||
712 | 24 | dh_click --name infographic | ||
713 | 25 | dh_click --name usermetrics | ||
714 | 22 | 26 | ||
715 | === added file 'debian/usermetricsservice.infographic.click-hook' | |||
716 | --- debian/usermetricsservice.infographic.click-hook 1970-01-01 00:00:00 +0000 | |||
717 | +++ debian/usermetricsservice.infographic.click-hook 2014-06-25 09:58:07 +0000 | |||
718 | @@ -0,0 +1,3 @@ | |||
719 | 1 | Pattern: ${home}/.local/share/libusermetrics/infographics/${id}.json | ||
720 | 2 | User-Level: yes | ||
721 | 3 | Hook-Name: infographic | ||
722 | 0 | 4 | ||
723 | === modified file 'debian/usermetricsservice.install' | |||
724 | --- debian/usermetricsservice.install 2013-09-26 09:12:58 +0000 | |||
725 | +++ debian/usermetricsservice.install 2014-06-25 09:58:07 +0000 | |||
726 | @@ -4,3 +4,4 @@ | |||
727 | 4 | usr/share/glib-2.0 | 4 | usr/share/glib-2.0 |
728 | 5 | usr/share/libusermetrics | 5 | usr/share/libusermetrics |
729 | 6 | usr/share/locale | 6 | usr/share/locale |
730 | 7 | usr/share/upstart | ||
731 | 7 | 8 | ||
732 | === added file 'debian/usermetricsservice.postinst' | |||
733 | --- debian/usermetricsservice.postinst 1970-01-01 00:00:00 +0000 | |||
734 | +++ debian/usermetricsservice.postinst 2014-06-25 09:58:07 +0000 | |||
735 | @@ -0,0 +1,16 @@ | |||
736 | 1 | #!/bin/sh | ||
737 | 2 | |||
738 | 3 | set -e | ||
739 | 4 | |||
740 | 5 | . /usr/share/debconf/confmodule | ||
741 | 6 | |||
742 | 7 | dbus-send --system --print-reply \ | ||
743 | 8 | --dest=org.freedesktop.DBus \ | ||
744 | 9 | /org/freedesktop/DBus \ | ||
745 | 10 | org.freedesktop.DBus.StartServiceByName \ | ||
746 | 11 | string:"com.canonical.Infographics" uint32:0 \ | ||
747 | 12 | || true | ||
748 | 13 | |||
749 | 14 | #DEBHELPER# | ||
750 | 15 | |||
751 | 16 | exit 0 | ||
752 | 0 | 17 | ||
753 | === removed file 'debian/usermetricsservice.postinst' | |||
754 | --- debian/usermetricsservice.postinst 2013-08-15 23:52:14 +0000 | |||
755 | +++ debian/usermetricsservice.postinst 1970-01-01 00:00:00 +0000 | |||
756 | @@ -1,16 +0,0 @@ | |||
757 | 1 | #!/bin/sh | ||
758 | 2 | |||
759 | 3 | set -e | ||
760 | 4 | |||
761 | 5 | . /usr/share/debconf/confmodule | ||
762 | 6 | |||
763 | 7 | dbus-send --system --print-reply \ | ||
764 | 8 | --dest=org.freedesktop.DBus \ | ||
765 | 9 | /org/freedesktop/DBus \ | ||
766 | 10 | org.freedesktop.DBus.StartServiceByName \ | ||
767 | 11 | string:"com.canonical.UserMetrics" uint32:0 \ | ||
768 | 12 | || true | ||
769 | 13 | |||
770 | 14 | #DEBHELPER# | ||
771 | 15 | |||
772 | 16 | exit 0 | ||
773 | 17 | 0 | ||
774 | === added file 'debian/usermetricsservice.postrm' | |||
775 | --- debian/usermetricsservice.postrm 1970-01-01 00:00:00 +0000 | |||
776 | +++ debian/usermetricsservice.postrm 2014-06-25 09:58:07 +0000 | |||
777 | @@ -0,0 +1,26 @@ | |||
778 | 1 | #!/bin/sh | ||
779 | 2 | set -e | ||
780 | 3 | |||
781 | 4 | if [ "$1" = "purge" ] ; then | ||
782 | 5 | if getent passwd usermetrics >/dev/null; then | ||
783 | 6 | if [ -x /usr/sbin/deluser ]; then | ||
784 | 7 | deluser --system usermetrics | ||
785 | 8 | fi | ||
786 | 9 | fi | ||
787 | 10 | |||
788 | 11 | if getent group usermetrics >/dev/null; then | ||
789 | 12 | if [ -x /usr/sbin/delgroup ]; then | ||
790 | 13 | delgroup --system usermetrics | ||
791 | 14 | fi | ||
792 | 15 | fi | ||
793 | 16 | |||
794 | 17 | # we cannot use the --remove-home option when we delete the user above | ||
795 | 18 | # because it will refuse to remove things in /var, so clean it up this | ||
796 | 19 | # way | ||
797 | 20 | if [ -d /var/lib/usermetrics ]; then | ||
798 | 21 | rm -r /var/lib/usermetrics | ||
799 | 22 | fi | ||
800 | 23 | |||
801 | 24 | fi | ||
802 | 25 | #DEBHELPER# | ||
803 | 26 | exit 0 | ||
804 | 0 | 27 | ||
805 | === removed file 'debian/usermetricsservice.postrm' | |||
806 | --- debian/usermetricsservice.postrm 2013-07-01 17:13:45 +0000 | |||
807 | +++ debian/usermetricsservice.postrm 1970-01-01 00:00:00 +0000 | |||
808 | @@ -1,26 +0,0 @@ | |||
809 | 1 | #!/bin/sh | ||
810 | 2 | set -e | ||
811 | 3 | |||
812 | 4 | if [ "$1" = "purge" ] ; then | ||
813 | 5 | if getent passwd usermetrics >/dev/null; then | ||
814 | 6 | if [ -x /usr/sbin/deluser ]; then | ||
815 | 7 | deluser --system usermetrics | ||
816 | 8 | fi | ||
817 | 9 | fi | ||
818 | 10 | |||
819 | 11 | if getent group usermetrics >/dev/null; then | ||
820 | 12 | if [ -x /usr/sbin/delgroup ]; then | ||
821 | 13 | delgroup --system usermetrics | ||
822 | 14 | fi | ||
823 | 15 | fi | ||
824 | 16 | |||
825 | 17 | # we cannot use the --remove-home option when we delete the user above | ||
826 | 18 | # because it will refuse to remove things in /var, so clean it up this | ||
827 | 19 | # way | ||
828 | 20 | if [ -d /var/lib/usermetrics ]; then | ||
829 | 21 | rm -r /var/lib/usermetrics | ||
830 | 22 | fi | ||
831 | 23 | |||
832 | 24 | fi | ||
833 | 25 | #DEBHELPER# | ||
834 | 26 | exit 0 | ||
835 | 27 | 0 | ||
836 | === added file 'debian/usermetricsservice.preinst' | |||
837 | --- debian/usermetricsservice.preinst 1970-01-01 00:00:00 +0000 | |||
838 | +++ debian/usermetricsservice.preinst 2014-06-25 09:58:07 +0000 | |||
839 | @@ -0,0 +1,30 @@ | |||
840 | 1 | #!/bin/sh | ||
841 | 2 | |||
842 | 3 | set -e | ||
843 | 4 | |||
844 | 5 | . /usr/share/debconf/confmodule | ||
845 | 6 | |||
846 | 7 | THIS_PACKAGE=usermetricsservice | ||
847 | 8 | |||
848 | 9 | # creating usermetrics group if he isn't already there | ||
849 | 10 | if ! getent group usermetrics >/dev/null; then | ||
850 | 11 | addgroup --system usermetrics | ||
851 | 12 | fi | ||
852 | 13 | |||
853 | 14 | # creating usermetrics user if he isn't already there | ||
854 | 15 | if ! getent passwd usermetrics >/dev/null; then | ||
855 | 16 | adduser --system --ingroup usermetrics --home /var/lib/usermetrics usermetrics | ||
856 | 17 | usermod -c "User Metrics" usermetrics | ||
857 | 18 | usermod -d "/var/lib/usermetrics" usermetrics | ||
858 | 19 | usermod -g "usermetrics" usermetrics | ||
859 | 20 | usermod -s "/bin/false" usermetrics | ||
860 | 21 | fi | ||
861 | 22 | |||
862 | 23 | if [ -d /var/lib/usermetrics ]; then | ||
863 | 24 | chown -R usermetrics:usermetrics /var/lib/usermetrics | ||
864 | 25 | chmod 0755 /var/lib/usermetrics | ||
865 | 26 | fi | ||
866 | 27 | |||
867 | 28 | #DEBHELPER# | ||
868 | 29 | |||
869 | 30 | exit 0 | ||
870 | 0 | 31 | ||
871 | === removed file 'debian/usermetricsservice.preinst' | |||
872 | --- debian/usermetricsservice.preinst 2013-08-15 11:05:06 +0000 | |||
873 | +++ debian/usermetricsservice.preinst 1970-01-01 00:00:00 +0000 | |||
874 | @@ -1,30 +0,0 @@ | |||
875 | 1 | #!/bin/sh | ||
876 | 2 | |||
877 | 3 | set -e | ||
878 | 4 | |||
879 | 5 | . /usr/share/debconf/confmodule | ||
880 | 6 | |||
881 | 7 | THIS_PACKAGE=usermetricsservice | ||
882 | 8 | |||
883 | 9 | # creating usermetrics group if he isn't already there | ||
884 | 10 | if ! getent group usermetrics >/dev/null; then | ||
885 | 11 | addgroup --system usermetrics | ||
886 | 12 | fi | ||
887 | 13 | |||
888 | 14 | # creating usermetrics user if he isn't already there | ||
889 | 15 | if ! getent passwd usermetrics >/dev/null; then | ||
890 | 16 | adduser --system --ingroup usermetrics --home /var/lib/usermetrics usermetrics | ||
891 | 17 | usermod -c "User Metrics" usermetrics | ||
892 | 18 | usermod -d "/var/lib/usermetrics" usermetrics | ||
893 | 19 | usermod -g "usermetrics" usermetrics | ||
894 | 20 | usermod -s "/bin/false" usermetrics | ||
895 | 21 | fi | ||
896 | 22 | |||
897 | 23 | if [ -d /var/lib/usermetrics ]; then | ||
898 | 24 | chown -R usermetrics:usermetrics /var/lib/usermetrics | ||
899 | 25 | chmod 0750 /var/lib/usermetrics | ||
900 | 26 | fi | ||
901 | 27 | |||
902 | 28 | #DEBHELPER# | ||
903 | 29 | |||
904 | 30 | exit 0 | ||
905 | 31 | 0 | ||
906 | === added file 'debian/usermetricsservice.prerm' | |||
907 | --- debian/usermetricsservice.prerm 1970-01-01 00:00:00 +0000 | |||
908 | +++ debian/usermetricsservice.prerm 2014-06-25 09:58:07 +0000 | |||
909 | @@ -0,0 +1,7 @@ | |||
910 | 1 | #!/bin/sh | ||
911 | 2 | |||
912 | 3 | set -e | ||
913 | 4 | |||
914 | 5 | pkill -U usermetrics 2>/dev/null || true | ||
915 | 6 | |||
916 | 7 | #DEBHELPER# | ||
917 | 0 | \ No newline at end of file | 8 | \ No newline at end of file |
918 | 1 | 9 | ||
919 | === removed file 'debian/usermetricsservice.prerm' | |||
920 | --- debian/usermetricsservice.prerm 2013-07-03 12:56:40 +0000 | |||
921 | +++ debian/usermetricsservice.prerm 1970-01-01 00:00:00 +0000 | |||
922 | @@ -1,7 +0,0 @@ | |||
923 | 1 | #!/bin/sh | ||
924 | 2 | |||
925 | 3 | set -e | ||
926 | 4 | |||
927 | 5 | pkill -U usermetrics 2>/dev/null || true | ||
928 | 6 | |||
929 | 7 | #DEBHELPER# | ||
930 | 8 | \ No newline at end of file | 0 | \ No newline at end of file |
931 | 9 | 1 | ||
932 | === added file 'debian/usermetricsservice.usermetrics.click-hook' | |||
933 | --- debian/usermetricsservice.usermetrics.click-hook 1970-01-01 00:00:00 +0000 | |||
934 | +++ debian/usermetricsservice.usermetrics.click-hook 2014-06-25 09:58:07 +0000 | |||
935 | @@ -0,0 +1,3 @@ | |||
936 | 1 | Pattern: ${home}/.local/share/libusermetrics/sources/${id}.json | ||
937 | 2 | User-Level: yes | ||
938 | 3 | Hook-Name: usermetrics | ||
939 | 0 | 4 | ||
940 | === added file 'doc/Infographic Architecture.svg' | |||
941 | --- doc/Infographic Architecture.svg 1970-01-01 00:00:00 +0000 | |||
942 | +++ doc/Infographic Architecture.svg 2014-06-25 09:58:07 +0000 | |||
943 | @@ -0,0 +1,636 @@ | |||
944 | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
945 | 2 | <!-- Created with Inkscape (http://www.inkscape.org/) --> | ||
946 | 3 | |||
947 | 4 | <svg | ||
948 | 5 | xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
949 | 6 | xmlns:cc="http://creativecommons.org/ns#" | ||
950 | 7 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
951 | 8 | xmlns:svg="http://www.w3.org/2000/svg" | ||
952 | 9 | xmlns="http://www.w3.org/2000/svg" | ||
953 | 10 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
954 | 11 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
955 | 12 | width="671.98975" | ||
956 | 13 | height="413.13217" | ||
957 | 14 | id="svg2" | ||
958 | 15 | version="1.1" | ||
959 | 16 | inkscape:version="0.48.4 r9939" | ||
960 | 17 | sodipodi:docname="infographics version 2.svg"> | ||
961 | 18 | <defs | ||
962 | 19 | id="defs4"> | ||
963 | 20 | <inkscape:path-effect | ||
964 | 21 | effect="spiro" | ||
965 | 22 | id="path-effect4676" | ||
966 | 23 | is_visible="true" /> | ||
967 | 24 | <marker | ||
968 | 25 | inkscape:stockid="Arrow1Mend" | ||
969 | 26 | orient="auto" | ||
970 | 27 | refY="0" | ||
971 | 28 | refX="0" | ||
972 | 29 | id="Arrow1Mend" | ||
973 | 30 | style="overflow:visible"> | ||
974 | 31 | <path | ||
975 | 32 | id="path3951" | ||
976 | 33 | d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" | ||
977 | 34 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" | ||
978 | 35 | transform="matrix(-0.4,0,0,-0.4,-4,0)" | ||
979 | 36 | inkscape:connector-curvature="0" /> | ||
980 | 37 | </marker> | ||
981 | 38 | <marker | ||
982 | 39 | inkscape:stockid="Arrow1Mend" | ||
983 | 40 | orient="auto" | ||
984 | 41 | refY="0" | ||
985 | 42 | refX="0" | ||
986 | 43 | id="Arrow1Mend-3" | ||
987 | 44 | style="overflow:visible"> | ||
988 | 45 | <path | ||
989 | 46 | inkscape:connector-curvature="0" | ||
990 | 47 | id="path3951-3" | ||
991 | 48 | d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" | ||
992 | 49 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" | ||
993 | 50 | transform="matrix(-0.4,0,0,-0.4,-4,0)" /> | ||
994 | 51 | </marker> | ||
995 | 52 | <marker | ||
996 | 53 | inkscape:stockid="Arrow1Mend" | ||
997 | 54 | orient="auto" | ||
998 | 55 | refY="0" | ||
999 | 56 | refX="0" | ||
1000 | 57 | id="Arrow1Mend-3-5" | ||
1001 | 58 | style="overflow:visible"> | ||
1002 | 59 | <path | ||
1003 | 60 | inkscape:connector-curvature="0" | ||
1004 | 61 | id="path3951-3-8" | ||
1005 | 62 | d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" | ||
1006 | 63 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" | ||
1007 | 64 | transform="matrix(-0.4,0,0,-0.4,-4,0)" /> | ||
1008 | 65 | </marker> | ||
1009 | 66 | <inkscape:path-effect | ||
1010 | 67 | effect="spiro" | ||
1011 | 68 | id="path-effect4676-5" | ||
1012 | 69 | is_visible="true" /> | ||
1013 | 70 | <marker | ||
1014 | 71 | inkscape:stockid="Arrow1Mend" | ||
1015 | 72 | orient="auto" | ||
1016 | 73 | refY="0" | ||
1017 | 74 | refX="0" | ||
1018 | 75 | id="Arrow1Mend-3-7" | ||
1019 | 76 | style="overflow:visible"> | ||
1020 | 77 | <path | ||
1021 | 78 | inkscape:connector-curvature="0" | ||
1022 | 79 | id="path3951-3-2" | ||
1023 | 80 | d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" | ||
1024 | 81 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" | ||
1025 | 82 | transform="matrix(-0.4,0,0,-0.4,-4,0)" /> | ||
1026 | 83 | </marker> | ||
1027 | 84 | <marker | ||
1028 | 85 | inkscape:stockid="Arrow1Mend" | ||
1029 | 86 | orient="auto" | ||
1030 | 87 | refY="0" | ||
1031 | 88 | refX="0" | ||
1032 | 89 | id="Arrow1Mend-3-1" | ||
1033 | 90 | style="overflow:visible"> | ||
1034 | 91 | <path | ||
1035 | 92 | inkscape:connector-curvature="0" | ||
1036 | 93 | id="path3951-3-5" | ||
1037 | 94 | d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" | ||
1038 | 95 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" | ||
1039 | 96 | transform="matrix(-0.4,0,0,-0.4,-4,0)" /> | ||
1040 | 97 | </marker> | ||
1041 | 98 | <marker | ||
1042 | 99 | inkscape:stockid="Arrow1Mend" | ||
1043 | 100 | orient="auto" | ||
1044 | 101 | refY="0" | ||
1045 | 102 | refX="0" | ||
1046 | 103 | id="Arrow1Mend-3-3" | ||
1047 | 104 | style="overflow:visible"> | ||
1048 | 105 | <path | ||
1049 | 106 | inkscape:connector-curvature="0" | ||
1050 | 107 | id="path3951-3-4" | ||
1051 | 108 | d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" | ||
1052 | 109 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" | ||
1053 | 110 | transform="matrix(-0.4,0,0,-0.4,-4,0)" /> | ||
1054 | 111 | </marker> | ||
1055 | 112 | <marker | ||
1056 | 113 | inkscape:stockid="Arrow1Mend" | ||
1057 | 114 | orient="auto" | ||
1058 | 115 | refY="0" | ||
1059 | 116 | refX="0" | ||
1060 | 117 | id="Arrow1Mend-3-2" | ||
1061 | 118 | style="overflow:visible"> | ||
1062 | 119 | <path | ||
1063 | 120 | inkscape:connector-curvature="0" | ||
1064 | 121 | id="path3951-3-80" | ||
1065 | 122 | d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" | ||
1066 | 123 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" | ||
1067 | 124 | transform="matrix(-0.4,0,0,-0.4,-4,0)" /> | ||
1068 | 125 | </marker> | ||
1069 | 126 | <marker | ||
1070 | 127 | inkscape:stockid="Arrow1Mend" | ||
1071 | 128 | orient="auto" | ||
1072 | 129 | refY="0" | ||
1073 | 130 | refX="0" | ||
1074 | 131 | id="Arrow1Mend-3-9" | ||
1075 | 132 | style="overflow:visible"> | ||
1076 | 133 | <path | ||
1077 | 134 | inkscape:connector-curvature="0" | ||
1078 | 135 | id="path3951-3-1" | ||
1079 | 136 | d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" | ||
1080 | 137 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" | ||
1081 | 138 | transform="matrix(-0.4,0,0,-0.4,-4,0)" /> | ||
1082 | 139 | </marker> | ||
1083 | 140 | <marker | ||
1084 | 141 | inkscape:stockid="Arrow1Mend" | ||
1085 | 142 | orient="auto" | ||
1086 | 143 | refY="0" | ||
1087 | 144 | refX="0" | ||
1088 | 145 | id="Arrow1Mend-3-19" | ||
1089 | 146 | style="overflow:visible"> | ||
1090 | 147 | <path | ||
1091 | 148 | inkscape:connector-curvature="0" | ||
1092 | 149 | id="path3951-3-3" | ||
1093 | 150 | d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" | ||
1094 | 151 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" | ||
1095 | 152 | transform="matrix(-0.4,0,0,-0.4,-4,0)" /> | ||
1096 | 153 | </marker> | ||
1097 | 154 | <marker | ||
1098 | 155 | inkscape:stockid="Arrow1Mend" | ||
1099 | 156 | orient="auto" | ||
1100 | 157 | refY="0" | ||
1101 | 158 | refX="0" | ||
1102 | 159 | id="Arrow1Mend-3-24" | ||
1103 | 160 | style="overflow:visible"> | ||
1104 | 161 | <path | ||
1105 | 162 | inkscape:connector-curvature="0" | ||
1106 | 163 | id="path3951-3-7" | ||
1107 | 164 | d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" | ||
1108 | 165 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" | ||
1109 | 166 | transform="matrix(-0.4,0,0,-0.4,-4,0)" /> | ||
1110 | 167 | </marker> | ||
1111 | 168 | <inkscape:path-effect | ||
1112 | 169 | effect="spiro" | ||
1113 | 170 | id="path-effect4676-6" | ||
1114 | 171 | is_visible="true" /> | ||
1115 | 172 | </defs> | ||
1116 | 173 | <sodipodi:namedview | ||
1117 | 174 | id="base" | ||
1118 | 175 | pagecolor="#ffffff" | ||
1119 | 176 | bordercolor="#666666" | ||
1120 | 177 | borderopacity="1.0" | ||
1121 | 178 | inkscape:pageopacity="0.0" | ||
1122 | 179 | inkscape:pageshadow="2" | ||
1123 | 180 | inkscape:zoom="1.7277049" | ||
1124 | 181 | inkscape:cx="335.99487" | ||
1125 | 182 | inkscape:cy="206.56609" | ||
1126 | 183 | inkscape:document-units="px" | ||
1127 | 184 | inkscape:current-layer="layer1" | ||
1128 | 185 | showgrid="false" | ||
1129 | 186 | showguides="false" | ||
1130 | 187 | inkscape:window-width="1680" | ||
1131 | 188 | inkscape:window-height="1026" | ||
1132 | 189 | inkscape:window-x="0" | ||
1133 | 190 | inkscape:window-y="24" | ||
1134 | 191 | inkscape:window-maximized="1" | ||
1135 | 192 | fit-margin-top="20" | ||
1136 | 193 | fit-margin-left="20" | ||
1137 | 194 | fit-margin-right="20" | ||
1138 | 195 | fit-margin-bottom="20" /> | ||
1139 | 196 | <metadata | ||
1140 | 197 | id="metadata7"> | ||
1141 | 198 | <rdf:RDF> | ||
1142 | 199 | <cc:Work | ||
1143 | 200 | rdf:about=""> | ||
1144 | 201 | <dc:format>image/svg+xml</dc:format> | ||
1145 | 202 | <dc:type | ||
1146 | 203 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
1147 | 204 | <dc:title /> | ||
1148 | 205 | </cc:Work> | ||
1149 | 206 | </rdf:RDF> | ||
1150 | 207 | </metadata> | ||
1151 | 208 | <g | ||
1152 | 209 | inkscape:label="Layer 1" | ||
1153 | 210 | inkscape:groupmode="layer" | ||
1154 | 211 | id="layer1" | ||
1155 | 212 | transform="translate(9.1737344,-608.13043)"> | ||
1156 | 213 | <g | ||
1157 | 214 | id="g3761" | ||
1158 | 215 | transform="translate(9.0102463,20.5802)"> | ||
1159 | 216 | <rect | ||
1160 | 217 | transform="translate(0,572.36218)" | ||
1161 | 218 | y="170.37543" | ||
1162 | 219 | x="244.09557" | ||
1163 | 220 | height="78.088745" | ||
1164 | 221 | width="133.78838" | ||
1165 | 222 | id="rect2985" | ||
1166 | 223 | style="color:#000000;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> | ||
1167 | 224 | <text | ||
1168 | 225 | sodipodi:linespacing="100%" | ||
1169 | 226 | id="text3755" | ||
1170 | 227 | y="778.51001" | ||
1171 | 228 | x="310.46051" | ||
1172 | 229 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" | ||
1173 | 230 | xml:space="preserve"><tspan | ||
1174 | 231 | y="778.51001" | ||
1175 | 232 | x="310.46051" | ||
1176 | 233 | id="tspan3757" | ||
1177 | 234 | sodipodi:role="line">Infographic</tspan><tspan | ||
1178 | 235 | id="tspan3759" | ||
1179 | 236 | y="794.51001" | ||
1180 | 237 | x="310.46051" | ||
1181 | 238 | sodipodi:role="line">Helper</tspan></text> | ||
1182 | 239 | </g> | ||
1183 | 240 | <g | ||
1184 | 241 | id="g3803" | ||
1185 | 242 | transform="translate(-8.12897,0)"> | ||
1186 | 243 | <rect | ||
1187 | 244 | style="color:#000000;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||
1188 | 245 | id="rect3767" | ||
1189 | 246 | width="159.58728" | ||
1190 | 247 | height="87.497849" | ||
1191 | 248 | x="430.33533" | ||
1192 | 249 | y="56.268272" | ||
1193 | 250 | transform="translate(0,572.36218)" /> | ||
1194 | 251 | <text | ||
1195 | 252 | xml:space="preserve" | ||
1196 | 253 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" | ||
1197 | 254 | x="436.38864" | ||
1198 | 255 | y="677.60724" | ||
1199 | 256 | id="text3769" | ||
1200 | 257 | sodipodi:linespacing="100%"><tspan | ||
1201 | 258 | sodipodi:role="line" | ||
1202 | 259 | id="tspan3771" | ||
1203 | 260 | x="436.38864" | ||
1204 | 261 | y="677.60724" | ||
1205 | 262 | style="font-size:14px" | ||
1206 | 263 | dy="-4.9527082">Infographic Source</tspan><tspan | ||
1207 | 264 | sodipodi:role="line" | ||
1208 | 265 | x="436.38864" | ||
1209 | 266 | y="691.60724" | ||
1210 | 267 | id="tspan3773" | ||
1211 | 268 | style="font-size:14px"><tspan | ||
1212 | 269 | style="font-size:14px;font-weight:bold" | ||
1213 | 270 | id="tspan3777" | ||
1214 | 271 | dy="-0.55030096">type:</tspan> foo</tspan><tspan | ||
1215 | 272 | sodipodi:role="line" | ||
1216 | 273 | x="436.38864" | ||
1217 | 274 | y="705.60724" | ||
1218 | 275 | id="tspan3775" | ||
1219 | 276 | dx="0 0 0 0 0 0 0 0 0 0 -1.1006019" | ||
1220 | 277 | style="font-size:14px"><tspan | ||
1221 | 278 | style="font-size:14px;font-weight:bold" | ||
1222 | 279 | id="tspan3779">file:</tspan> infographic.foo</tspan></text> | ||
1223 | 280 | <rect | ||
1224 | 281 | style="color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||
1225 | 282 | id="rect3767-6" | ||
1226 | 283 | width="159.03699" | ||
1227 | 284 | height="26.414476" | ||
1228 | 285 | x="430.33533" | ||
1229 | 286 | y="628.63043" /> | ||
1230 | 287 | <text | ||
1231 | 288 | xml:space="preserve" | ||
1232 | 289 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" | ||
1233 | 290 | x="442.82819" | ||
1234 | 291 | y="647.92566" | ||
1235 | 292 | id="text3799" | ||
1236 | 293 | sodipodi:linespacing="100%"><tspan | ||
1237 | 294 | sodipodi:role="line" | ||
1238 | 295 | id="tspan3801" | ||
1239 | 296 | x="442.82819" | ||
1240 | 297 | y="647.92566">Foo Click Manifest</tspan></text> | ||
1241 | 298 | </g> | ||
1242 | 299 | <g | ||
1243 | 300 | id="g3918" | ||
1244 | 301 | transform="translate(-360,-2.1289061e-6)"> | ||
1245 | 302 | <rect | ||
1246 | 303 | y="628.63043" | ||
1247 | 304 | x="418.20636" | ||
1248 | 305 | height="87.497849" | ||
1249 | 306 | width="159.58728" | ||
1250 | 307 | id="rect3767-7" | ||
1251 | 308 | style="color:#000000;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> | ||
1252 | 309 | <text | ||
1253 | 310 | sodipodi:linespacing="100%" | ||
1254 | 311 | id="text3769-5" | ||
1255 | 312 | y="677.60724" | ||
1256 | 313 | x="424.25967" | ||
1257 | 314 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" | ||
1258 | 315 | xml:space="preserve"><tspan | ||
1259 | 316 | dy="-4.9527082" | ||
1260 | 317 | style="font-size:14px" | ||
1261 | 318 | y="677.60724" | ||
1262 | 319 | x="424.25967" | ||
1263 | 320 | id="tspan3771-4" | ||
1264 | 321 | sodipodi:role="line">Infographic Sink</tspan><tspan | ||
1265 | 322 | style="font-size:14px" | ||
1266 | 323 | id="tspan3773-2" | ||
1267 | 324 | y="691.60724" | ||
1268 | 325 | x="424.25967" | ||
1269 | 326 | sodipodi:role="line"><tspan | ||
1270 | 327 | dy="-0.55030096" | ||
1271 | 328 | id="tspan3777-3" | ||
1272 | 329 | style="font-size:14px;font-weight:bold">type:</tspan> foo</tspan><tspan | ||
1273 | 330 | style="font-size:14px" | ||
1274 | 331 | dx="0 0 0 0 0 0 0 0 0 0 -1.1006019" | ||
1275 | 332 | id="tspan3775-4" | ||
1276 | 333 | y="705.60724" | ||
1277 | 334 | x="424.25967" | ||
1278 | 335 | sodipodi:role="line"><tspan | ||
1279 | 336 | id="tspan3779-2" | ||
1280 | 337 | style="font-size:14px;font-weight:bold">file:</tspan> infographic.svg</tspan></text> | ||
1281 | 338 | <rect | ||
1282 | 339 | y="628.63043" | ||
1283 | 340 | x="418.20636" | ||
1284 | 341 | height="26.414476" | ||
1285 | 342 | width="159.03699" | ||
1286 | 343 | id="rect3767-6-7" | ||
1287 | 344 | style="color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> | ||
1288 | 345 | <text | ||
1289 | 346 | sodipodi:linespacing="100%" | ||
1290 | 347 | id="text3799-8" | ||
1291 | 348 | y="647.92566" | ||
1292 | 349 | x="431.91797" | ||
1293 | 350 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" | ||
1294 | 351 | xml:space="preserve"><tspan | ||
1295 | 352 | y="647.92566" | ||
1296 | 353 | x="431.91797" | ||
1297 | 354 | id="tspan3801-6" | ||
1298 | 355 | sodipodi:role="line">Bar Click Manifest</tspan></text> | ||
1299 | 356 | </g> | ||
1300 | 357 | <text | ||
1301 | 358 | sodipodi:linespacing="100%" | ||
1302 | 359 | id="text3930" | ||
1303 | 360 | y="701.8205" | ||
1304 | 361 | x="319.61853" | ||
1305 | 362 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" | ||
1306 | 363 | xml:space="preserve"><tspan | ||
1307 | 364 | y="701.8205" | ||
1308 | 365 | x="319.61853" | ||
1309 | 366 | id="tspan3932" | ||
1310 | 367 | sodipodi:role="line">Install</tspan><tspan | ||
1311 | 368 | id="tspan3934" | ||
1312 | 369 | y="717.8205" | ||
1313 | 370 | x="319.61853" | ||
1314 | 371 | sodipodi:role="line">Hooks</tspan></text> | ||
1315 | 372 | <path | ||
1316 | 373 | inkscape:connector-curvature="0" | ||
1317 | 374 | id="path3936" | ||
1318 | 375 | d="m 226.17369,685.31145 c 45.12468,-1.1006 52.27859,36.31986 52.82889,67.13671" | ||
1319 | 376 | style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)" /> | ||
1320 | 377 | <path | ||
1321 | 378 | inkscape:connector-curvature="0" | ||
1322 | 379 | id="path3936-1" | ||
1323 | 380 | d="m 414.31778,685.49855 c -45.12468,-1.10061 -52.27859,36.31985 -52.82889,67.13671" | ||
1324 | 381 | style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)" /> | ||
1325 | 382 | <g | ||
1326 | 383 | id="g4893"> | ||
1327 | 384 | <rect | ||
1328 | 385 | style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||
1329 | 386 | id="rect4425" | ||
1330 | 387 | width="95.752365" | ||
1331 | 388 | height="95.752365" | ||
1332 | 389 | x="441.74377" | ||
1333 | 390 | y="751.89789" /> | ||
1334 | 391 | <text | ||
1335 | 392 | xml:space="preserve" | ||
1336 | 393 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" | ||
1337 | 394 | x="489.69073" | ||
1338 | 395 | y="796.50208" | ||
1339 | 396 | id="text4427" | ||
1340 | 397 | sodipodi:linespacing="100%"><tspan | ||
1341 | 398 | sodipodi:role="line" | ||
1342 | 399 | id="tspan4429" | ||
1343 | 400 | x="489.69073" | ||
1344 | 401 | y="796.50208">foo</tspan><tspan | ||
1345 | 402 | sodipodi:role="line" | ||
1346 | 403 | x="489.69073" | ||
1347 | 404 | y="812.50208" | ||
1348 | 405 | id="tspan4431">app</tspan></text> | ||
1349 | 406 | </g> | ||
1350 | 407 | <g | ||
1351 | 408 | id="g4469" | ||
1352 | 409 | transform="translate(-13.207223,24.763543)"> | ||
1353 | 410 | <rect | ||
1354 | 411 | y="887.29889" | ||
1355 | 412 | x="403.61313" | ||
1356 | 413 | height="35.715553" | ||
1357 | 414 | width="192.67056" | ||
1358 | 415 | id="rect2985-1" | ||
1359 | 416 | style="color:#000000;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> | ||
1360 | 417 | <text | ||
1361 | 418 | sodipodi:linespacing="100%" | ||
1362 | 419 | id="text3755-5" | ||
1363 | 420 | y="908.72668" | ||
1364 | 421 | x="500.00146" | ||
1365 | 422 | style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" | ||
1366 | 423 | xml:space="preserve"><tspan | ||
1367 | 424 | id="tspan3759-8" | ||
1368 | 425 | y="908.72668" | ||
1369 | 426 | x="500.00146" | ||
1370 | 427 | sodipodi:role="line">~/.cache/$(appid)/infographic.foo</tspan></text> | ||
1371 | 428 | </g> | ||
1372 | 429 | <path | ||
1373 | 430 | style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend-3)" | ||
1374 | 431 | d="M 383.55976,356.18229 C 353.84351,354.53139 348.8908,331.96904 347.7902,280.79106" | ||
1375 | 432 | id="path4474" | ||
1376 | 433 | inkscape:connector-curvature="0" | ||
1377 | 434 | transform="translate(0,572.36218)" | ||
1378 | 435 | sodipodi:nodetypes="cc" /> | ||
1379 | 436 | <text | ||
1380 | 437 | xml:space="preserve" | ||
1381 | 438 | style="font-size:14px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu Italic" | ||
1382 | 439 | x="361.54773" | ||
1383 | 440 | y="876.81616" | ||
1384 | 441 | id="text4660" | ||
1385 | 442 | sodipodi:linespacing="100%"><tspan | ||
1386 | 443 | sodipodi:role="line" | ||
1387 | 444 | id="tspan4662" | ||
1388 | 445 | x="361.54773" | ||
1389 | 446 | y="876.81616">File</tspan><tspan | ||
1390 | 447 | sodipodi:role="line" | ||
1391 | 448 | x="361.54773" | ||
1392 | 449 | y="890.81616" | ||
1393 | 450 | id="tspan4664">Watch</tspan></text> | ||
1394 | 451 | <text | ||
1395 | 452 | xml:space="preserve" | ||
1396 | 453 | style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:112.00000047999999708%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu;opacity:0.75" | ||
1397 | 454 | x="571.7627" | ||
1398 | 455 | y="755.19965" | ||
1399 | 456 | id="text4666" | ||
1400 | 457 | sodipodi:linespacing="112%"><tspan | ||
1401 | 458 | sodipodi:role="line" | ||
1402 | 459 | id="tspan4668" | ||
1403 | 460 | x="571.7627" | ||
1404 | 461 | y="755.19965">Foo</tspan><tspan | ||
1405 | 462 | sodipodi:role="line" | ||
1406 | 463 | x="571.7627" | ||
1407 | 464 | y="768.63965" | ||
1408 | 465 | id="tspan4670">AppArmor</tspan><tspan | ||
1409 | 466 | sodipodi:role="line" | ||
1410 | 467 | x="571.7627" | ||
1411 | 468 | y="782.07965" | ||
1412 | 469 | id="tspan4672">Confinement</tspan></text> | ||
1413 | 470 | <path | ||
1414 | 471 | style="opacity:0.75;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend-3)" | ||
1415 | 472 | d="m 567.36028,192.74291 c -2.53774,-0.0622 -5.08926,0.61223 -7.26478,1.92031 -0.81305,0.48887 -1.57239,1.06245 -2.381,1.55863 -0.8086,0.49619 -1.68153,0.91914 -2.61893,1.06514 -1.39269,0.2169 -2.80076,-0.19097 -4.13805,-0.63627 -1.33729,-0.44531 -2.69883,-0.93906 -4.10774,-0.89876 -1.25072,0.0358 -2.44503,0.49048 -3.65682,0.80213 -0.33784,0.0869 -0.67847,0.16288 -1.0212,0.22784" | ||
1416 | 473 | id="path4674" | ||
1417 | 474 | inkscape:path-effect="#path-effect4676" | ||
1418 | 475 | inkscape:original-d="m 567.36028,192.74291 c -2.05099,4.0056 -2.57986,1.777 -7.26478,1.92031 -10.78275,0 -8.1675,12.44489 -4.99993,2.62377 3.3427,-11.96353 -5.33958,-3.07508 -8.24579,-1.53503 -2.9062,1.54005 -3.37007,1.24208 -3.65682,0.80213 -0.28674,-0.43995 -0.39635,-1.02187 -1.0212,0.22784" | ||
1419 | 476 | inkscape:connector-curvature="0" | ||
1420 | 477 | transform="translate(0,572.36218)" | ||
1421 | 478 | sodipodi:nodetypes="ccczsc" /> | ||
1422 | 479 | <g | ||
1423 | 480 | transform="translate(-341.88525,60.753484)" | ||
1424 | 481 | id="g4893-5"> | ||
1425 | 482 | <rect | ||
1426 | 483 | style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||
1427 | 484 | id="rect4425-0" | ||
1428 | 485 | width="95.752365" | ||
1429 | 486 | height="95.752365" | ||
1430 | 487 | x="441.74377" | ||
1431 | 488 | y="751.89789" /> | ||
1432 | 489 | <text | ||
1433 | 490 | xml:space="preserve" | ||
1434 | 491 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" | ||
1435 | 492 | x="489.69073" | ||
1436 | 493 | y="796.50208" | ||
1437 | 494 | id="text4427-5" | ||
1438 | 495 | sodipodi:linespacing="100%"><tspan | ||
1439 | 496 | sodipodi:role="line" | ||
1440 | 497 | id="tspan4429-8" | ||
1441 | 498 | x="489.69073" | ||
1442 | 499 | y="796.50208">bar</tspan><tspan | ||
1443 | 500 | sodipodi:role="line" | ||
1444 | 501 | x="489.69073" | ||
1445 | 502 | y="812.50208" | ||
1446 | 503 | id="tspan4929">visual</tspan></text> | ||
1447 | 504 | </g> | ||
1448 | 505 | <text | ||
1449 | 506 | xml:space="preserve" | ||
1450 | 507 | style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:112.00000047999999708%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu;opacity:0.75" | ||
1451 | 508 | x="10.730266" | ||
1452 | 509 | y="836.82312" | ||
1453 | 510 | id="text4666-3" | ||
1454 | 511 | sodipodi:linespacing="112%"><tspan | ||
1455 | 512 | sodipodi:role="line" | ||
1456 | 513 | id="tspan4668-4" | ||
1457 | 514 | x="10.730266" | ||
1458 | 515 | y="836.82312">Bar</tspan><tspan | ||
1459 | 516 | sodipodi:role="line" | ||
1460 | 517 | x="10.730266" | ||
1461 | 518 | y="850.26312" | ||
1462 | 519 | id="tspan4670-0">AppArmor</tspan><tspan | ||
1463 | 520 | sodipodi:role="line" | ||
1464 | 521 | x="10.730266" | ||
1465 | 522 | y="863.70312" | ||
1466 | 523 | id="tspan4672-9">Confinement</tspan></text> | ||
1467 | 524 | <path | ||
1468 | 525 | style="color:#000000;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;marker-end:url(#Arrow1Mend-3);visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||
1469 | 526 | d="m 118.51852,723.61908 c 0,0 0,-0.55125 0,78.82859" | ||
1470 | 527 | id="path4987" | ||
1471 | 528 | inkscape:connector-curvature="0" /> | ||
1472 | 529 | <path | ||
1473 | 530 | style="color:#000000;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;marker-end:url(#Arrow1Mend-3);visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||
1474 | 531 | d="m 490.06029,150.90439 c 0,22.60121 0,22.60121 0,22.60121" | ||
1475 | 532 | id="path4989" | ||
1476 | 533 | inkscape:connector-curvature="0" | ||
1477 | 534 | transform="translate(0,572.36218)" /> | ||
1478 | 535 | <path | ||
1479 | 536 | style="color:#000000;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;marker-end:url(#Arrow1Mend-3);visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||
1480 | 537 | d="m 466.90784,282.65289 c 0,47.95865 0,47.95865 0,47.95865" | ||
1481 | 538 | id="path4991" | ||
1482 | 539 | inkscape:connector-curvature="0" | ||
1483 | 540 | transform="translate(0,572.36218)" /> | ||
1484 | 541 | <path | ||
1485 | 542 | style="color:#000000;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;marker-end:url(#Arrow1Mend-3);visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||
1486 | 543 | d="m 206.1671,306.90784 c 36.38243,1.1025 65.04737,-4.40999 65.59862,-28.1137" | ||
1487 | 544 | id="path4993" | ||
1488 | 545 | inkscape:connector-curvature="0" | ||
1489 | 546 | transform="translate(0,572.36218)" /> | ||
1490 | 547 | <path | ||
1491 | 548 | style="color:#000000;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;marker-end:url(#Arrow1Mend-3);visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||
1492 | 549 | d="m 245.30577,201.06804 c -47.89942,-1.36388 -68.53183,-2.05014 -70.55986,30.3187" | ||
1493 | 550 | id="path4995" | ||
1494 | 551 | inkscape:connector-curvature="0" | ||
1495 | 552 | transform="translate(0,572.36218)" | ||
1496 | 553 | sodipodi:nodetypes="cc" /> | ||
1497 | 554 | <text | ||
1498 | 555 | xml:space="preserve" | ||
1499 | 556 | style="font-size:14px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu Italic" | ||
1500 | 557 | x="478.94144" | ||
1501 | 558 | y="875.39905" | ||
1502 | 559 | id="text4660-6" | ||
1503 | 560 | sodipodi:linespacing="100%"><tspan | ||
1504 | 561 | sodipodi:role="line" | ||
1505 | 562 | x="478.94144" | ||
1506 | 563 | y="875.39905" | ||
1507 | 564 | id="tspan4664-5">Write</tspan><tspan | ||
1508 | 565 | sodipodi:role="line" | ||
1509 | 566 | x="478.94144" | ||
1510 | 567 | y="889.39905" | ||
1511 | 568 | id="tspan5086">Data</tspan></text> | ||
1512 | 569 | <text | ||
1513 | 570 | xml:space="preserve" | ||
1514 | 571 | style="font-size:14px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu Italic" | ||
1515 | 572 | x="150.39708" | ||
1516 | 573 | y="756.32922" | ||
1517 | 574 | id="text4660-8" | ||
1518 | 575 | sodipodi:linespacing="100%"><tspan | ||
1519 | 576 | sodipodi:role="line" | ||
1520 | 577 | id="tspan4662-9" | ||
1521 | 578 | x="150.39708" | ||
1522 | 579 | y="756.32922">Foo Type</tspan><tspan | ||
1523 | 580 | sodipodi:role="line" | ||
1524 | 581 | x="150.39708" | ||
1525 | 582 | y="770.32922" | ||
1526 | 583 | id="tspan4664-51">Data</tspan></text> | ||
1527 | 584 | <text | ||
1528 | 585 | xml:space="preserve" | ||
1529 | 586 | style="font-size:14px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu Italic" | ||
1530 | 587 | x="228.12317" | ||
1531 | 588 | y="896.3465" | ||
1532 | 589 | id="text4660-5" | ||
1533 | 590 | sodipodi:linespacing="100%"><tspan | ||
1534 | 591 | sodipodi:role="line" | ||
1535 | 592 | id="tspan4662-2" | ||
1536 | 593 | x="228.12317" | ||
1537 | 594 | y="896.3465">SVG</tspan><tspan | ||
1538 | 595 | sodipodi:role="line" | ||
1539 | 596 | x="228.12317" | ||
1540 | 597 | y="910.3465" | ||
1541 | 598 | id="tspan4664-2">Data</tspan></text> | ||
1542 | 599 | <g | ||
1543 | 600 | id="g4469-4" | ||
1544 | 601 | transform="translate(-216.05521,77.196901)"> | ||
1545 | 602 | <rect | ||
1546 | 603 | y="887.29889" | ||
1547 | 604 | x="403.61313" | ||
1548 | 605 | height="36.266827" | ||
1549 | 606 | width="263.23044" | ||
1550 | 607 | id="rect2985-1-7" | ||
1551 | 608 | style="color:#000000;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> | ||
1552 | 609 | <text | ||
1553 | 610 | sodipodi:linespacing="100%" | ||
1554 | 611 | id="text3755-5-0" | ||
1555 | 612 | y="908.72668" | ||
1556 | 613 | x="535.85309" | ||
1557 | 614 | style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu" | ||
1558 | 615 | xml:space="preserve"><tspan | ||
1559 | 616 | id="tspan3759-8-1" | ||
1560 | 617 | y="908.72668" | ||
1561 | 618 | x="535.85309" | ||
1562 | 619 | sodipodi:role="line">/var/cache/infographic/$(user)/bar-foo.svg</tspan></text> | ||
1563 | 620 | </g> | ||
1564 | 621 | <path | ||
1565 | 622 | style="color:#000000;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;marker-end:url(#Arrow1Mend-3);visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||
1566 | 623 | d="m 311.45565,849.40321 c 0,0 0,25.44875 0,104.82859" | ||
1567 | 624 | id="path4987-1" | ||
1568 | 625 | inkscape:connector-curvature="0" | ||
1569 | 626 | sodipodi:nodetypes="cc" /> | ||
1570 | 627 | <path | ||
1571 | 628 | style="opacity:0.75;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend-3)" | ||
1572 | 629 | d="m 70.370939,844.37253 c 2.166628,-1.32276 4.713537,-2.01444 7.251636,-1.96937 0.948556,0.0168 1.892954,0.13391 2.84132,0.15932 0.948365,0.0254 1.915816,-0.0448 2.800631,-0.38703 1.314563,-0.5085 2.330053,-1.56575 3.265528,-2.62004 0.935476,-1.0543 1.867729,-2.16266 3.108022,-2.83223 1.101035,-0.59439 2.362684,-0.79778 3.567965,-1.13375 0.336018,-0.0937 0.669019,-0.19815 0.998313,-0.31325" | ||
1573 | 630 | id="path4674-2" | ||
1574 | 631 | inkscape:path-effect="#path-effect4676-6" | ||
1575 | 632 | inkscape:original-d="m 70.370939,844.37253 c 3.779008,2.44344 3.122725,0.24899 7.251636,-1.96937 9.338135,-5.39137 13.295708,6.69384 5.641951,-0.22771 -8.876629,-8.68938 3.086675,-5.33288 6.37355,-5.45227 3.286867,-0.11938 3.539607,-0.60936 3.567965,-1.13375 0.02835,-0.52438 -0.167688,-1.08314 0.998313,-0.31325" | ||
1576 | 633 | inkscape:connector-curvature="0" | ||
1577 | 634 | sodipodi:nodetypes="ccczsc" /> | ||
1578 | 635 | </g> | ||
1579 | 636 | </svg> | ||
1580 | 0 | 637 | ||
1581 | === modified file 'doc/mainpage.md' | |||
1582 | --- doc/mainpage.md 2013-09-05 13:33:59 +0000 | |||
1583 | +++ doc/mainpage.md 2014-06-25 09:58:07 +0000 | |||
1584 | @@ -47,6 +47,21 @@ | |||
1585 | 47 | Writing metric data sources | 47 | Writing metric data sources |
1586 | 48 | --------------------------- | 48 | --------------------------- |
1587 | 49 | 49 | ||
1588 | 50 | For the usermetrics service to know your application is providing data, a click hook is required. | ||
1589 | 51 | At present, no data is read from the hook, so an empty file registered as follows is sufficient: | ||
1590 | 52 | |||
1591 | 53 | "hooks": { | ||
1592 | 54 | "camera": { | ||
1593 | 55 | ... | ||
1594 | 56 | "usermetrics": "usermetrics.json" | ||
1595 | 57 | } | ||
1596 | 58 | } | ||
1597 | 59 | |||
1598 | 60 | You then have the choice of either using libusermetricsinput to write your data files, or | ||
1599 | 61 | creating completely custom files with your own code. | ||
1600 | 62 | |||
1601 | 63 | ### Using libusermetricsinput | ||
1602 | 64 | |||
1603 | 50 | - \ref UserMetricsInput "Libusermetrics Input API Documentation" | 65 | - \ref UserMetricsInput "Libusermetrics Input API Documentation" |
1604 | 51 | 66 | ||
1605 | 52 | For simple metrics which only want to increment a counter, see the following examples: | 67 | For simple metrics which only want to increment a counter, see the following examples: |
1606 | @@ -66,6 +81,78 @@ | |||
1607 | 66 | - \subpage MetricManagerAdvanced.cpp "MetricManagerAdvanced.cpp: A Qt-based metric" | 81 | - \subpage MetricManagerAdvanced.cpp "MetricManagerAdvanced.cpp: A Qt-based metric" |
1608 | 67 | - \subpage MetricManagerAdvancedCAPI.c "MetricManagerAdvancedCAPI.c: A C-based metric" | 82 | - \subpage MetricManagerAdvancedCAPI.c "MetricManagerAdvancedCAPI.c: A C-based metric" |
1609 | 68 | 83 | ||
1610 | 84 | ### Manually | ||
1611 | 85 | To create completely custom data sources, simply have your application write files into the | ||
1612 | 86 | following directory: | ||
1613 | 87 | |||
1614 | 88 | ~/.cache/${APP_ID}/usermetrics/filename.foo | ||
1615 | 89 | |||
1616 | 90 | It is important that these files are written atomically, or your data could be corrupted. For | ||
1617 | 91 | example, libusermetricsinput library writes a new file to: | ||
1618 | 92 | |||
1619 | 93 | ~/.cache/${APP_ID}/usermetrics/.tmp/tempfile | ||
1620 | 94 | |||
1621 | 95 | and then moves it into the parent directory, ensuring atomic changes. | ||
1622 | 96 | |||
1623 | 97 | Writing an infographic visualizer | ||
1624 | 98 | --------------------------------- | ||
1625 | 99 | |||
1626 | 100 | An infographic visualizer is simply a binary that takes a one or more command line parameters | ||
1627 | 101 | that are the paths to infographic data sources, and produces SVG data on its standard output. | ||
1628 | 102 | |||
1629 | 103 | Visualizers can specify which data sources they are interested using "input" section of their | ||
1630 | 104 | click manifest. The first thing to specify is the application ID. This can either be an | ||
1631 | 105 | application's short ID, or the wildcard '*', referring to all applications. The second part is | ||
1632 | 106 | a list of regular expressions for which particular files the visualizer is interested in. | ||
1633 | 107 | |||
1634 | 108 | "input": { | ||
1635 | 109 | "${SHORT_APP_ID}": [ | ||
1636 | 110 | "${FILE_REGULAR_EXPRESSION}", | ||
1637 | 111 | "${FILE_REGULAR_EXPRESSION_2}" | ||
1638 | 112 | ], | ||
1639 | 113 | "*": [ | ||
1640 | 114 | "${FILE_REGULAR_EXPRESSION}", | ||
1641 | 115 | "${FILE_REGULAR_EXPRESSION_2}" | ||
1642 | 116 | ] | ||
1643 | 117 | } | ||
1644 | 118 | |||
1645 | 119 | ### Iterative visualizer | ||
1646 | 120 | |||
1647 | 121 | Iterative visualizers will be called once for each input file. In the example below the echo | ||
1648 | 122 | command would be called for every application providing a data source, and for each file it | ||
1649 | 123 | produces that ends in the extension 'libusermetrics.json'. Libusermetricsinput produces file | ||
1650 | 124 | names with this format, so that visualizers can easily pick them out. | ||
1651 | 125 | |||
1652 | 126 | { | ||
1653 | 127 | "exec": "/bin/echo", | ||
1654 | 128 | "type": "iterate", | ||
1655 | 129 | "input": { | ||
1656 | 130 | "*": [ | ||
1657 | 131 | ".*.libusermetrics.json" | ||
1658 | 132 | ] | ||
1659 | 133 | } | ||
1660 | 134 | } | ||
1661 | 135 | |||
1662 | 136 | ### Aggregating visualizer | ||
1663 | 137 | |||
1664 | 138 | Aggregating visualizers are called once for all inputs at once. They will not be called until | ||
1665 | 139 | every specified input exists. From that point on they will be called if any individual data | ||
1666 | 140 | source is updated. | ||
1667 | 141 | |||
1668 | 142 | { | ||
1669 | 143 | "exec": "/bin/cat", | ||
1670 | 144 | "type": "aggregate", | ||
1671 | 145 | "input": { | ||
1672 | 146 | "com.ubuntu.camera": [ | ||
1673 | 147 | "camera-photos.libusermetrics.json", | ||
1674 | 148 | "camera-videos.libusermetrics.json" | ||
1675 | 149 | ], | ||
1676 | 150 | "foo": [ | ||
1677 | 151 | "source-id.libusermetrics.json" | ||
1678 | 152 | ] | ||
1679 | 153 | } | ||
1680 | 154 | } | ||
1681 | 155 | |||
1682 | 69 | Writing a presentation application | 156 | Writing a presentation application |
1683 | 70 | ---------------------------------- | 157 | ---------------------------------- |
1684 | 71 | 158 | ||
1685 | 72 | 159 | ||
1686 | === added symlink 'include/libusermetricsinput/MetricParameters.h' | |||
1687 | === target is u'../../src/libusermetricsinput/MetricParameters.h' | |||
1688 | === added symlink 'include/libusermetricsoutput/InfographicList.h' | |||
1689 | === target is u'../../src/libusermetricsoutput/InfographicList.h' | |||
1690 | === modified file 'po/en_GB.po' | |||
1691 | --- po/en_GB.po 2014-05-19 06:24:58 +0000 | |||
1692 | +++ po/en_GB.po 2014-06-25 09:58:07 +0000 | |||
1693 | @@ -6,150 +6,118 @@ | |||
1694 | 6 | msgstr "" | 6 | msgstr "" |
1695 | 7 | "Project-Id-Version: libusermetrics\n" | 7 | "Project-Id-Version: libusermetrics\n" |
1696 | 8 | "Report-Msgid-Bugs-To: \n" | 8 | "Report-Msgid-Bugs-To: \n" |
1698 | 9 | "POT-Creation-Date: 2013-10-22 09:33+0100\n" | 9 | "POT-Creation-Date: 2014-06-23 09:41+0100\n" |
1699 | 10 | "PO-Revision-Date: 2014-05-18 01:19+0000\n" | 10 | "PO-Revision-Date: 2014-05-18 01:19+0000\n" |
1700 | 11 | "Last-Translator: Pete Woods <Unknown>\n" | 11 | "Last-Translator: Pete Woods <Unknown>\n" |
1701 | 12 | "Language-Team: British English <en@li.org>\n" | 12 | "Language-Team: British English <en@li.org>\n" |
1702 | 13 | "Language: en_GB\n" | ||
1703 | 13 | "MIME-Version: 1.0\n" | 14 | "MIME-Version: 1.0\n" |
1704 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | 15 | "Content-Type: text/plain; charset=UTF-8\n" |
1705 | 15 | "Content-Transfer-Encoding: 8bit\n" | 16 | "Content-Transfer-Encoding: 8bit\n" |
1706 | 16 | "X-Launchpad-Export-Date: 2014-05-19 06:24+0000\n" | 17 | "X-Launchpad-Export-Date: 2014-05-19 06:24+0000\n" |
1707 | 17 | "X-Generator: Launchpad (build 17007)\n" | 18 | "X-Generator: Launchpad (build 17007)\n" |
1746 | 18 | "Language: en_GB\n" | 19 | |
1747 | 19 | 20 | #: src/libusermetricsoutput/GSettingsColorThemeProvider.cpp:100 | |
1748 | 20 | #: src/usermetricsservice/main.cpp:59 | 21 | #, qt-format |
1749 | 21 | msgid "Could not open database" | 22 | msgid "Cannot open XML file '%1' for reading" |
1712 | 22 | msgstr "Could not open database" | ||
1713 | 23 | |||
1714 | 24 | #: src/usermetricsservice/main.cpp:72 | ||
1715 | 25 | msgid "Unable to register user metrics service on DBus" | ||
1716 | 26 | msgstr "Unable to register user metrics service on DBus" | ||
1717 | 27 | |||
1718 | 28 | #: src/usermetricsservice/main.cpp:82 | ||
1719 | 29 | msgid "Unable to unregister user metrics service on DBus" | ||
1720 | 30 | msgstr "Unable to unregister user metrics service on DBus" | ||
1721 | 31 | |||
1722 | 32 | #: src/usermetricsservice/DBusDataSource.cpp:68 | ||
1723 | 33 | #: src/usermetricsservice/DBusDataSource.cpp:86 | ||
1724 | 34 | #: src/usermetricsservice/DBusDataSource.cpp:104 | ||
1725 | 35 | #: src/usermetricsservice/DBusDataSource.cpp:116 | ||
1726 | 36 | #: src/usermetricsservice/DBusDataSource.cpp:134 | ||
1727 | 37 | #: src/usermetricsservice/DBusDataSource.cpp:172 | ||
1728 | 38 | #: src/usermetricsservice/DBusDataSource.cpp:190 | ||
1729 | 39 | #: src/usermetricsservice/DBusDataSource.cpp:216 | ||
1730 | 40 | #: src/usermetricsservice/DBusDataSource.cpp:234 | ||
1731 | 41 | #: src/usermetricsservice/DBusUserMetrics.cpp:187 | ||
1732 | 42 | msgid "Could not save data source" | ||
1733 | 43 | msgstr "Couldn't save data source" | ||
1734 | 44 | |||
1735 | 45 | #: src/usermetricsservice/DBusUserMetrics.cpp:54 | ||
1736 | 46 | msgid "Unable to register user metrics object on DBus" | ||
1737 | 47 | msgstr "Unable to register user metrics object on DBus" | ||
1738 | 48 | |||
1739 | 49 | #: src/usermetricsservice/DBusUserMetrics.cpp:141 | ||
1740 | 50 | #: src/usermetricsservice/DBusUserMetrics.cpp:153 | ||
1741 | 51 | msgid "Data source query failed" | ||
1742 | 52 | msgstr "Data source query failed" | ||
1743 | 53 | |||
1744 | 54 | #: src/usermetricsservice/DBusUserMetrics.cpp:249 | ||
1745 | 55 | msgid "Attempt to create user data owned by another user" | ||
1750 | 56 | msgstr "" | 23 | msgstr "" |
1751 | 57 | 24 | ||
1804 | 58 | #: src/usermetricsservice/DBusUserMetrics.cpp:258 | 25 | #: src/libusermetricsinput/main.cpp:37 |
1805 | 59 | msgid "User data query failed" | 26 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME <DATA>" |
1806 | 60 | msgstr "User data query failed" | 27 | msgstr "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME <DATA>" |
1807 | 61 | 28 | ||
1808 | 62 | #: src/usermetricsservice/DBusUserMetrics.cpp:267 | 29 | #: src/libusermetricsinput/main-increment.cpp:37 |
1809 | 63 | msgid "Could not save user data" | 30 | #, fuzzy |
1810 | 64 | msgstr "Couldn't save user data" | 31 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME [AMOUNT]" |
1811 | 65 | 32 | msgstr "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME [AMOUNT]" | |
1812 | 66 | #: src/usermetricsservice/DBusDataSet.cpp:127 | 33 | |
1813 | 67 | #: src/usermetricsservice/DBusUserData.cpp:125 | 34 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:255 |
1814 | 68 | msgid "Could not save data set" | 35 | msgid "Data source not found" |
1815 | 69 | msgstr "Could not save data set" | 36 | msgstr "Data source not found" |
1764 | 70 | |||
1765 | 71 | #: src/usermetricsservice/DBusDataSet.cpp:143 | ||
1766 | 72 | msgid "Attempt to update data owned by another user" | ||
1767 | 73 | msgstr "Attempt to update data owned by another user" | ||
1768 | 74 | |||
1769 | 75 | #: src/usermetricsservice/DBusDataSet.cpp:151 | ||
1770 | 76 | msgid "Attempt to update data owned by another application" | ||
1771 | 77 | msgstr "Attempt to update data owned by another application" | ||
1772 | 78 | |||
1773 | 79 | #: src/usermetricsservice/DBusDataSet.cpp:170 | ||
1774 | 80 | msgid "Attempt to increment data owned by another user" | ||
1775 | 81 | msgstr "Attempt to increment data owned by another user" | ||
1776 | 82 | |||
1777 | 83 | #: src/usermetricsservice/DBusDataSet.cpp:178 | ||
1778 | 84 | msgid "Attempt to increment data owned by another application" | ||
1779 | 85 | msgstr "Attempt to increment data owned by another application" | ||
1780 | 86 | |||
1781 | 87 | #: src/usermetricsservice/DBusUserData.cpp:51 | ||
1782 | 88 | msgid "Could not register user data object with DBus" | ||
1783 | 89 | msgstr "Could not register user data object with DBus" | ||
1784 | 90 | |||
1785 | 91 | #: src/usermetricsservice/DBusUserData.cpp:81 | ||
1786 | 92 | msgid "Unknown data source" | ||
1787 | 93 | msgstr "Unknown data source" | ||
1788 | 94 | |||
1789 | 95 | #: src/usermetricsservice/DBusUserData.cpp:90 | ||
1790 | 96 | msgid "Attempt to create data set owned by another user" | ||
1791 | 97 | msgstr "Attempt to create data set owned by another user" | ||
1792 | 98 | |||
1793 | 99 | #: src/usermetricsservice/DBusUserData.cpp:101 | ||
1794 | 100 | msgid "Attempt to create data set owned by another application" | ||
1795 | 101 | msgstr "Attempt to create data set owned by another application" | ||
1796 | 102 | |||
1797 | 103 | #: src/usermetricsservice/DBusUserData.cpp:112 | ||
1798 | 104 | msgid "Data set query failed" | ||
1799 | 105 | msgstr "Data set query failed" | ||
1800 | 106 | |||
1801 | 107 | #: src/usermetricsservice/DBusUserData.cpp:135 | ||
1802 | 108 | msgid "New data set could not be found" | ||
1803 | 109 | msgstr "New data set couldn't be found" | ||
1816 | 110 | 37 | ||
1817 | 111 | #: src/modules/UserMetrics/Metric.cpp:30 | 38 | #: src/modules/UserMetrics/Metric.cpp:30 |
1818 | 112 | msgid "Failed to connect to metrics service:" | 39 | msgid "Failed to connect to metrics service:" |
1819 | 113 | msgstr "Failed to connect to metrics service:" | 40 | msgstr "Failed to connect to metrics service:" |
1820 | 114 | 41 | ||
1821 | 42 | #: src/modules/UserMetrics/Metric.cpp:154 | ||
1822 | 43 | msgid "Failed to increment metric:" | ||
1823 | 44 | msgstr "" | ||
1824 | 45 | |||
1825 | 115 | #: src/modules/UserMetrics/Metric.cpp:141 | 46 | #: src/modules/UserMetrics/Metric.cpp:141 |
1826 | 116 | msgid "Failed to register user metric:" | 47 | msgid "Failed to register user metric:" |
1827 | 117 | msgstr "Failed to register user metric:" | 48 | msgstr "Failed to register user metric:" |
1828 | 118 | 49 | ||
1829 | 119 | #: src/modules/UserMetrics/Metric.cpp:154 | ||
1830 | 120 | msgid "Failed to increment metric:" | ||
1831 | 121 | msgstr "" | ||
1832 | 122 | |||
1833 | 123 | #: src/modules/UserMetrics/Metric.cpp:166 | 50 | #: src/modules/UserMetrics/Metric.cpp:166 |
1834 | 124 | msgid "Failed to update metric:" | 51 | msgid "Failed to update metric:" |
1835 | 125 | msgstr "Failed to update metric:" | 52 | msgstr "Failed to update metric:" |
1836 | 126 | 53 | ||
1837 | 54 | #: src/libusermetricsinput/MetricImpl.cpp:223 | ||
1838 | 55 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:267 | ||
1839 | 56 | msgid "No data for today" | ||
1840 | 57 | msgstr "No data for today" | ||
1841 | 58 | |||
1842 | 59 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:198 | ||
1843 | 60 | msgid "No data sources available" | ||
1844 | 61 | msgstr "No data sources available" | ||
1845 | 62 | |||
1846 | 63 | #: src/libusermetricsinput/main.cpp:35 | ||
1847 | 127 | #: src/libusermetricsinput/main-increment.cpp:35 | 64 | #: src/libusermetricsinput/main-increment.cpp:35 |
1848 | 128 | #: src/libusermetricsinput/main.cpp:35 | ||
1849 | 129 | msgid "Usage: " | 65 | msgid "Usage: " |
1850 | 130 | msgstr "Usage: " | 66 | msgstr "Usage: " |
1851 | 131 | 67 | ||
1876 | 132 | #: src/libusermetricsinput/main-increment.cpp:37 | 68 | #~ msgid "Attempt to create data set owned by another application" |
1877 | 133 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME [AMOUNT]" | 69 | #~ msgstr "Attempt to create data set owned by another application" |
1878 | 134 | msgstr "" | 70 | |
1879 | 135 | 71 | #~ msgid "Attempt to create data set owned by another user" | |
1880 | 136 | #: src/libusermetricsinput/main.cpp:37 | 72 | #~ msgstr "Attempt to create data set owned by another user" |
1881 | 137 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME <DATA>" | 73 | |
1882 | 138 | msgstr "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME <DATA>" | 74 | #~ msgid "Attempt to increment data owned by another application" |
1883 | 139 | 75 | #~ msgstr "Attempt to increment data owned by another application" | |
1884 | 140 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:198 | 76 | |
1885 | 141 | msgid "No data sources available" | 77 | #~ msgid "Attempt to increment data owned by another user" |
1886 | 142 | msgstr "No data sources available" | 78 | #~ msgstr "Attempt to increment data owned by another user" |
1887 | 143 | 79 | ||
1888 | 144 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:255 | 80 | #~ msgid "Attempt to update data owned by another application" |
1889 | 145 | msgid "Data source not found" | 81 | #~ msgstr "Attempt to update data owned by another application" |
1890 | 146 | msgstr "Data source not found" | 82 | |
1891 | 147 | 83 | #~ msgid "Attempt to update data owned by another user" | |
1892 | 148 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:266 | 84 | #~ msgstr "Attempt to update data owned by another user" |
1893 | 149 | msgid "No data for today" | 85 | |
1894 | 150 | msgstr "No data for today" | 86 | #~ msgid "Could not open database" |
1895 | 151 | 87 | #~ msgstr "Could not open database" | |
1896 | 152 | #: src/libusermetricsoutput/GSettingsColorThemeProvider.cpp:99 | 88 | |
1897 | 153 | #, qt-format | 89 | #~ msgid "Could not register user data object with DBus" |
1898 | 154 | msgid "Cannot open XML file '%1' for reading" | 90 | #~ msgstr "Could not register user data object with DBus" |
1899 | 155 | msgstr "" | 91 | |
1900 | 92 | #~ msgid "Could not save data set" | ||
1901 | 93 | #~ msgstr "Could not save data set" | ||
1902 | 94 | |||
1903 | 95 | #~ msgid "Could not save data source" | ||
1904 | 96 | #~ msgstr "Couldn't save data source" | ||
1905 | 97 | |||
1906 | 98 | #~ msgid "Could not save user data" | ||
1907 | 99 | #~ msgstr "Couldn't save user data" | ||
1908 | 100 | |||
1909 | 101 | #~ msgid "Data set query failed" | ||
1910 | 102 | #~ msgstr "Data set query failed" | ||
1911 | 103 | |||
1912 | 104 | #~ msgid "Data source query failed" | ||
1913 | 105 | #~ msgstr "Data source query failed" | ||
1914 | 106 | |||
1915 | 107 | #~ msgid "New data set could not be found" | ||
1916 | 108 | #~ msgstr "New data set couldn't be found" | ||
1917 | 109 | |||
1918 | 110 | #~ msgid "Unable to register user metrics object on DBus" | ||
1919 | 111 | #~ msgstr "Unable to register user metrics object on DBus" | ||
1920 | 112 | |||
1921 | 113 | #~ msgid "Unable to register user metrics service on DBus" | ||
1922 | 114 | #~ msgstr "Unable to register user metrics service on DBus" | ||
1923 | 115 | |||
1924 | 116 | #~ msgid "Unable to unregister user metrics service on DBus" | ||
1925 | 117 | #~ msgstr "Unable to unregister user metrics service on DBus" | ||
1926 | 118 | |||
1927 | 119 | #~ msgid "Unknown data source" | ||
1928 | 120 | #~ msgstr "Unknown data source" | ||
1929 | 121 | |||
1930 | 122 | #~ msgid "User data query failed" | ||
1931 | 123 | #~ msgstr "User data query failed" | ||
1932 | 156 | 124 | ||
1933 | === modified file 'po/libusermetrics.pot' | |||
1934 | --- po/libusermetrics.pot 2013-10-22 08:53:23 +0000 | |||
1935 | +++ po/libusermetrics.pot 2014-06-25 09:58:07 +0000 | |||
1936 | @@ -8,7 +8,7 @@ | |||
1937 | 8 | msgstr "" | 8 | msgstr "" |
1938 | 9 | "Project-Id-Version: libusermetrics\n" | 9 | "Project-Id-Version: libusermetrics\n" |
1939 | 10 | "Report-Msgid-Bugs-To: \n" | 10 | "Report-Msgid-Bugs-To: \n" |
1941 | 11 | "POT-Creation-Date: 2013-10-22 09:33+0100\n" | 11 | "POT-Creation-Date: 2014-06-23 09:41+0100\n" |
1942 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
1943 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
1944 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
1945 | @@ -17,95 +17,22 @@ | |||
1946 | 17 | "Content-Type: text/plain; charset=CHARSET\n" | 17 | "Content-Type: text/plain; charset=CHARSET\n" |
1947 | 18 | "Content-Transfer-Encoding: 8bit\n" | 18 | "Content-Transfer-Encoding: 8bit\n" |
1948 | 19 | 19 | ||
2038 | 20 | #: src/usermetricsservice/main.cpp:59 | 20 | #: src/libusermetricsinput/main.cpp:35 |
2039 | 21 | msgid "Could not open database" | 21 | #: src/libusermetricsinput/main-increment.cpp:35 |
2040 | 22 | msgstr "" | 22 | msgid "Usage: " |
2041 | 23 | 23 | msgstr "" | |
2042 | 24 | #: src/usermetricsservice/main.cpp:72 | 24 | |
2043 | 25 | msgid "Unable to register user metrics service on DBus" | 25 | #: src/libusermetricsinput/main.cpp:37 |
2044 | 26 | msgstr "" | 26 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME <DATA>" |
2045 | 27 | 27 | msgstr "" | |
2046 | 28 | #: src/usermetricsservice/main.cpp:82 | 28 | |
2047 | 29 | msgid "Unable to unregister user metrics service on DBus" | 29 | #: src/libusermetricsinput/main-increment.cpp:37 |
2048 | 30 | msgstr "" | 30 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME [AMOUNT]" |
2049 | 31 | 31 | msgstr "" | |
2050 | 32 | #: src/usermetricsservice/DBusDataSource.cpp:68 | 32 | |
2051 | 33 | #: src/usermetricsservice/DBusDataSource.cpp:86 | 33 | #: src/libusermetricsinput/MetricImpl.cpp:223 |
2052 | 34 | #: src/usermetricsservice/DBusDataSource.cpp:104 | 34 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:267 |
2053 | 35 | #: src/usermetricsservice/DBusDataSource.cpp:116 | 35 | msgid "No data for today" |
1965 | 36 | #: src/usermetricsservice/DBusDataSource.cpp:134 | ||
1966 | 37 | #: src/usermetricsservice/DBusDataSource.cpp:172 | ||
1967 | 38 | #: src/usermetricsservice/DBusDataSource.cpp:190 | ||
1968 | 39 | #: src/usermetricsservice/DBusDataSource.cpp:216 | ||
1969 | 40 | #: src/usermetricsservice/DBusDataSource.cpp:234 | ||
1970 | 41 | #: src/usermetricsservice/DBusUserMetrics.cpp:187 | ||
1971 | 42 | msgid "Could not save data source" | ||
1972 | 43 | msgstr "" | ||
1973 | 44 | |||
1974 | 45 | #: src/usermetricsservice/DBusUserMetrics.cpp:54 | ||
1975 | 46 | msgid "Unable to register user metrics object on DBus" | ||
1976 | 47 | msgstr "" | ||
1977 | 48 | |||
1978 | 49 | #: src/usermetricsservice/DBusUserMetrics.cpp:141 | ||
1979 | 50 | #: src/usermetricsservice/DBusUserMetrics.cpp:153 | ||
1980 | 51 | msgid "Data source query failed" | ||
1981 | 52 | msgstr "" | ||
1982 | 53 | |||
1983 | 54 | #: src/usermetricsservice/DBusUserMetrics.cpp:249 | ||
1984 | 55 | msgid "Attempt to create user data owned by another user" | ||
1985 | 56 | msgstr "" | ||
1986 | 57 | |||
1987 | 58 | #: src/usermetricsservice/DBusUserMetrics.cpp:258 | ||
1988 | 59 | msgid "User data query failed" | ||
1989 | 60 | msgstr "" | ||
1990 | 61 | |||
1991 | 62 | #: src/usermetricsservice/DBusUserMetrics.cpp:267 | ||
1992 | 63 | msgid "Could not save user data" | ||
1993 | 64 | msgstr "" | ||
1994 | 65 | |||
1995 | 66 | #: src/usermetricsservice/DBusDataSet.cpp:127 | ||
1996 | 67 | #: src/usermetricsservice/DBusUserData.cpp:125 | ||
1997 | 68 | msgid "Could not save data set" | ||
1998 | 69 | msgstr "" | ||
1999 | 70 | |||
2000 | 71 | #: src/usermetricsservice/DBusDataSet.cpp:143 | ||
2001 | 72 | msgid "Attempt to update data owned by another user" | ||
2002 | 73 | msgstr "" | ||
2003 | 74 | |||
2004 | 75 | #: src/usermetricsservice/DBusDataSet.cpp:151 | ||
2005 | 76 | msgid "Attempt to update data owned by another application" | ||
2006 | 77 | msgstr "" | ||
2007 | 78 | |||
2008 | 79 | #: src/usermetricsservice/DBusDataSet.cpp:170 | ||
2009 | 80 | msgid "Attempt to increment data owned by another user" | ||
2010 | 81 | msgstr "" | ||
2011 | 82 | |||
2012 | 83 | #: src/usermetricsservice/DBusDataSet.cpp:178 | ||
2013 | 84 | msgid "Attempt to increment data owned by another application" | ||
2014 | 85 | msgstr "" | ||
2015 | 86 | |||
2016 | 87 | #: src/usermetricsservice/DBusUserData.cpp:51 | ||
2017 | 88 | msgid "Could not register user data object with DBus" | ||
2018 | 89 | msgstr "" | ||
2019 | 90 | |||
2020 | 91 | #: src/usermetricsservice/DBusUserData.cpp:81 | ||
2021 | 92 | msgid "Unknown data source" | ||
2022 | 93 | msgstr "" | ||
2023 | 94 | |||
2024 | 95 | #: src/usermetricsservice/DBusUserData.cpp:90 | ||
2025 | 96 | msgid "Attempt to create data set owned by another user" | ||
2026 | 97 | msgstr "" | ||
2027 | 98 | |||
2028 | 99 | #: src/usermetricsservice/DBusUserData.cpp:101 | ||
2029 | 100 | msgid "Attempt to create data set owned by another application" | ||
2030 | 101 | msgstr "" | ||
2031 | 102 | |||
2032 | 103 | #: src/usermetricsservice/DBusUserData.cpp:112 | ||
2033 | 104 | msgid "Data set query failed" | ||
2034 | 105 | msgstr "" | ||
2035 | 106 | |||
2036 | 107 | #: src/usermetricsservice/DBusUserData.cpp:135 | ||
2037 | 108 | msgid "New data set could not be found" | ||
2054 | 109 | msgstr "" | 36 | msgstr "" |
2055 | 110 | 37 | ||
2056 | 111 | #: src/modules/UserMetrics/Metric.cpp:30 | 38 | #: src/modules/UserMetrics/Metric.cpp:30 |
2057 | @@ -124,19 +51,6 @@ | |||
2058 | 124 | msgid "Failed to update metric:" | 51 | msgid "Failed to update metric:" |
2059 | 125 | msgstr "" | 52 | msgstr "" |
2060 | 126 | 53 | ||
2061 | 127 | #: src/libusermetricsinput/main-increment.cpp:35 | ||
2062 | 128 | #: src/libusermetricsinput/main.cpp:35 | ||
2063 | 129 | msgid "Usage: " | ||
2064 | 130 | msgstr "" | ||
2065 | 131 | |||
2066 | 132 | #: src/libusermetricsinput/main-increment.cpp:37 | ||
2067 | 133 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME [AMOUNT]" | ||
2068 | 134 | msgstr "" | ||
2069 | 135 | |||
2070 | 136 | #: src/libusermetricsinput/main.cpp:37 | ||
2071 | 137 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME <DATA>" | ||
2072 | 138 | msgstr "" | ||
2073 | 139 | |||
2074 | 140 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:198 | 54 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:198 |
2075 | 141 | msgid "No data sources available" | 55 | msgid "No data sources available" |
2076 | 142 | msgstr "" | 56 | msgstr "" |
2077 | @@ -145,11 +59,7 @@ | |||
2078 | 145 | msgid "Data source not found" | 59 | msgid "Data source not found" |
2079 | 146 | msgstr "" | 60 | msgstr "" |
2080 | 147 | 61 | ||
2086 | 148 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:266 | 62 | #: src/libusermetricsoutput/GSettingsColorThemeProvider.cpp:100 |
2082 | 149 | msgid "No data for today" | ||
2083 | 150 | msgstr "" | ||
2084 | 151 | |||
2085 | 152 | #: src/libusermetricsoutput/GSettingsColorThemeProvider.cpp:99 | ||
2087 | 153 | #, qt-format | 63 | #, qt-format |
2088 | 154 | msgid "Cannot open XML file '%1' for reading" | 64 | msgid "Cannot open XML file '%1' for reading" |
2089 | 155 | msgstr "" | 65 | msgstr "" |
2090 | 156 | 66 | ||
2091 | === modified file 'po/pl.po' | |||
2092 | --- po/pl.po 2014-05-18 05:57:04 +0000 | |||
2093 | +++ po/pl.po 2014-06-25 09:58:07 +0000 | |||
2094 | @@ -6,150 +6,121 @@ | |||
2095 | 6 | msgid "" | 6 | msgid "" |
2096 | 7 | msgstr "" | 7 | msgstr "" |
2097 | 8 | "Project-Id-Version: libusermetrics\n" | 8 | "Project-Id-Version: libusermetrics\n" |
2100 | 9 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" | 9 | "Report-Msgid-Bugs-To: \n" |
2101 | 10 | "POT-Creation-Date: 2013-10-22 09:33+0100\n" | 10 | "POT-Creation-Date: 2014-06-23 09:41+0100\n" |
2102 | 11 | "PO-Revision-Date: 2013-10-29 17:11+0000\n" | 11 | "PO-Revision-Date: 2013-10-29 17:11+0000\n" |
2103 | 12 | "Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n" | 12 | "Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n" |
2104 | 13 | "Language-Team: Polish <pl@li.org>\n" | 13 | "Language-Team: Polish <pl@li.org>\n" |
2105 | 14 | "Language: pl\n" | ||
2106 | 14 | "MIME-Version: 1.0\n" | 15 | "MIME-Version: 1.0\n" |
2107 | 15 | "Content-Type: text/plain; charset=UTF-8\n" | 16 | "Content-Type: text/plain; charset=UTF-8\n" |
2108 | 16 | "Content-Transfer-Encoding: 8bit\n" | 17 | "Content-Transfer-Encoding: 8bit\n" |
2109 | 17 | "X-Launchpad-Export-Date: 2014-05-18 05:57+0000\n" | 18 | "X-Launchpad-Export-Date: 2014-05-18 05:57+0000\n" |
2110 | 18 | "X-Generator: Launchpad (build 17007)\n" | 19 | "X-Generator: Launchpad (build 17007)\n" |
2111 | 19 | 20 | ||
2202 | 20 | #: src/usermetricsservice/main.cpp:59 | 21 | #: src/libusermetricsoutput/GSettingsColorThemeProvider.cpp:100 |
2203 | 21 | msgid "Could not open database" | 22 | #, qt-format |
2204 | 22 | msgstr "Błąd otwarcia bazy danych" | 23 | msgid "Cannot open XML file '%1' for reading" |
2205 | 23 | 24 | msgstr "Błąd otwarcia pliku \"%1\" do odczytu." | |
2206 | 24 | #: src/usermetricsservice/main.cpp:72 | 25 | |
2207 | 25 | msgid "Unable to register user metrics service on DBus" | 26 | #: src/libusermetricsinput/main.cpp:37 |
2208 | 26 | msgstr "Błąd rejestracji usługi metryk w DBus" | 27 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME <DATA>" |
2209 | 27 | 28 | msgstr "" | |
2210 | 28 | #: src/usermetricsservice/main.cpp:82 | 29 | |
2211 | 29 | msgid "Unable to unregister user metrics service on DBus" | 30 | #: src/libusermetricsinput/main-increment.cpp:37 |
2212 | 30 | msgstr "Błąd wyrejestrowania usługi metryk z DBus" | 31 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME [AMOUNT]" |
2213 | 31 | 32 | msgstr "" | |
2214 | 32 | #: src/usermetricsservice/DBusDataSource.cpp:68 | 33 | |
2215 | 33 | #: src/usermetricsservice/DBusDataSource.cpp:86 | 34 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:255 |
2216 | 34 | #: src/usermetricsservice/DBusDataSource.cpp:104 | 35 | msgid "Data source not found" |
2217 | 35 | #: src/usermetricsservice/DBusDataSource.cpp:116 | 36 | msgstr "" |
2128 | 36 | #: src/usermetricsservice/DBusDataSource.cpp:134 | ||
2129 | 37 | #: src/usermetricsservice/DBusDataSource.cpp:172 | ||
2130 | 38 | #: src/usermetricsservice/DBusDataSource.cpp:190 | ||
2131 | 39 | #: src/usermetricsservice/DBusDataSource.cpp:216 | ||
2132 | 40 | #: src/usermetricsservice/DBusDataSource.cpp:234 | ||
2133 | 41 | #: src/usermetricsservice/DBusUserMetrics.cpp:187 | ||
2134 | 42 | msgid "Could not save data source" | ||
2135 | 43 | msgstr "Błąd zapisywania źródła danych" | ||
2136 | 44 | |||
2137 | 45 | #: src/usermetricsservice/DBusUserMetrics.cpp:54 | ||
2138 | 46 | msgid "Unable to register user metrics object on DBus" | ||
2139 | 47 | msgstr "Błąd rejestracji obiektu metryk w DBus" | ||
2140 | 48 | |||
2141 | 49 | #: src/usermetricsservice/DBusUserMetrics.cpp:141 | ||
2142 | 50 | #: src/usermetricsservice/DBusUserMetrics.cpp:153 | ||
2143 | 51 | msgid "Data source query failed" | ||
2144 | 52 | msgstr "Błąd zapytania źródła danych" | ||
2145 | 53 | |||
2146 | 54 | #: src/usermetricsservice/DBusUserMetrics.cpp:249 | ||
2147 | 55 | msgid "Attempt to create user data owned by another user" | ||
2148 | 56 | msgstr "Próba zapisania danych dla innego użytkownika" | ||
2149 | 57 | |||
2150 | 58 | #: src/usermetricsservice/DBusUserMetrics.cpp:258 | ||
2151 | 59 | msgid "User data query failed" | ||
2152 | 60 | msgstr "Błąd zapytania danych użytkownika" | ||
2153 | 61 | |||
2154 | 62 | #: src/usermetricsservice/DBusUserMetrics.cpp:267 | ||
2155 | 63 | msgid "Could not save user data" | ||
2156 | 64 | msgstr "Błąd zapisu danych użytkownika" | ||
2157 | 65 | |||
2158 | 66 | #: src/usermetricsservice/DBusDataSet.cpp:127 | ||
2159 | 67 | #: src/usermetricsservice/DBusUserData.cpp:125 | ||
2160 | 68 | msgid "Could not save data set" | ||
2161 | 69 | msgstr "Błąd zapisu zestawu danych" | ||
2162 | 70 | |||
2163 | 71 | #: src/usermetricsservice/DBusDataSet.cpp:143 | ||
2164 | 72 | msgid "Attempt to update data owned by another user" | ||
2165 | 73 | msgstr "Próba aktualizacji danych innego użytkownika" | ||
2166 | 74 | |||
2167 | 75 | #: src/usermetricsservice/DBusDataSet.cpp:151 | ||
2168 | 76 | msgid "Attempt to update data owned by another application" | ||
2169 | 77 | msgstr "Próba aktualizacji danych innej aplikacji" | ||
2170 | 78 | |||
2171 | 79 | #: src/usermetricsservice/DBusDataSet.cpp:170 | ||
2172 | 80 | msgid "Attempt to increment data owned by another user" | ||
2173 | 81 | msgstr "Próba inkrementacji danych innego użytkownika" | ||
2174 | 82 | |||
2175 | 83 | #: src/usermetricsservice/DBusDataSet.cpp:178 | ||
2176 | 84 | msgid "Attempt to increment data owned by another application" | ||
2177 | 85 | msgstr "Próba inkrementacji danych innej aplikacji" | ||
2178 | 86 | |||
2179 | 87 | #: src/usermetricsservice/DBusUserData.cpp:51 | ||
2180 | 88 | msgid "Could not register user data object with DBus" | ||
2181 | 89 | msgstr "Błąd rejestracji obiektu danych użytkownika w DBus" | ||
2182 | 90 | |||
2183 | 91 | #: src/usermetricsservice/DBusUserData.cpp:81 | ||
2184 | 92 | msgid "Unknown data source" | ||
2185 | 93 | msgstr "Nieznane źródło danych" | ||
2186 | 94 | |||
2187 | 95 | #: src/usermetricsservice/DBusUserData.cpp:90 | ||
2188 | 96 | msgid "Attempt to create data set owned by another user" | ||
2189 | 97 | msgstr "Próba utworzenia zestawu danych innego użytkownika" | ||
2190 | 98 | |||
2191 | 99 | #: src/usermetricsservice/DBusUserData.cpp:101 | ||
2192 | 100 | msgid "Attempt to create data set owned by another application" | ||
2193 | 101 | msgstr "Próba utworzenia zestawu danych innej aplikacji" | ||
2194 | 102 | |||
2195 | 103 | #: src/usermetricsservice/DBusUserData.cpp:112 | ||
2196 | 104 | msgid "Data set query failed" | ||
2197 | 105 | msgstr "Błąd zapytania danych" | ||
2198 | 106 | |||
2199 | 107 | #: src/usermetricsservice/DBusUserData.cpp:135 | ||
2200 | 108 | msgid "New data set could not be found" | ||
2201 | 109 | msgstr "Nie znaleziono nowego zestawu danych" | ||
2218 | 110 | 37 | ||
2219 | 111 | #: src/modules/UserMetrics/Metric.cpp:30 | 38 | #: src/modules/UserMetrics/Metric.cpp:30 |
2220 | 112 | msgid "Failed to connect to metrics service:" | 39 | msgid "Failed to connect to metrics service:" |
2221 | 113 | msgstr "" | 40 | msgstr "" |
2222 | 114 | 41 | ||
2223 | 42 | #: src/modules/UserMetrics/Metric.cpp:154 | ||
2224 | 43 | msgid "Failed to increment metric:" | ||
2225 | 44 | msgstr "" | ||
2226 | 45 | |||
2227 | 115 | #: src/modules/UserMetrics/Metric.cpp:141 | 46 | #: src/modules/UserMetrics/Metric.cpp:141 |
2228 | 116 | msgid "Failed to register user metric:" | 47 | msgid "Failed to register user metric:" |
2229 | 117 | msgstr "" | 48 | msgstr "" |
2230 | 118 | 49 | ||
2231 | 119 | #: src/modules/UserMetrics/Metric.cpp:154 | ||
2232 | 120 | msgid "Failed to increment metric:" | ||
2233 | 121 | msgstr "" | ||
2234 | 122 | |||
2235 | 123 | #: src/modules/UserMetrics/Metric.cpp:166 | 50 | #: src/modules/UserMetrics/Metric.cpp:166 |
2236 | 124 | msgid "Failed to update metric:" | 51 | msgid "Failed to update metric:" |
2237 | 125 | msgstr "" | 52 | msgstr "" |
2238 | 126 | 53 | ||
2239 | 54 | #: src/libusermetricsinput/MetricImpl.cpp:223 | ||
2240 | 55 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:267 | ||
2241 | 56 | msgid "No data for today" | ||
2242 | 57 | msgstr "" | ||
2243 | 58 | |||
2244 | 59 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:198 | ||
2245 | 60 | msgid "No data sources available" | ||
2246 | 61 | msgstr "" | ||
2247 | 62 | |||
2248 | 63 | #: src/libusermetricsinput/main.cpp:35 | ||
2249 | 127 | #: src/libusermetricsinput/main-increment.cpp:35 | 64 | #: src/libusermetricsinput/main-increment.cpp:35 |
2250 | 128 | #: src/libusermetricsinput/main.cpp:35 | ||
2251 | 129 | msgid "Usage: " | 65 | msgid "Usage: " |
2252 | 130 | msgstr "" | 66 | msgstr "" |
2253 | 131 | 67 | ||
2278 | 132 | #: src/libusermetricsinput/main-increment.cpp:37 | 68 | #~ msgid "Attempt to create data set owned by another application" |
2279 | 133 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME [AMOUNT]" | 69 | #~ msgstr "Próba utworzenia zestawu danych innej aplikacji" |
2280 | 134 | msgstr "" | 70 | |
2281 | 135 | 71 | #~ msgid "Attempt to create data set owned by another user" | |
2282 | 136 | #: src/libusermetricsinput/main.cpp:37 | 72 | #~ msgstr "Próba utworzenia zestawu danych innego użytkownika" |
2283 | 137 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME <DATA>" | 73 | |
2284 | 138 | msgstr "" | 74 | #~ msgid "Attempt to create user data owned by another user" |
2285 | 139 | 75 | #~ msgstr "Próba zapisania danych dla innego użytkownika" | |
2286 | 140 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:198 | 76 | |
2287 | 141 | msgid "No data sources available" | 77 | #~ msgid "Attempt to increment data owned by another application" |
2288 | 142 | msgstr "" | 78 | #~ msgstr "Próba inkrementacji danych innej aplikacji" |
2289 | 143 | 79 | ||
2290 | 144 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:255 | 80 | #~ msgid "Attempt to increment data owned by another user" |
2291 | 145 | msgid "Data source not found" | 81 | #~ msgstr "Próba inkrementacji danych innego użytkownika" |
2292 | 146 | msgstr "" | 82 | |
2293 | 147 | 83 | #~ msgid "Attempt to update data owned by another application" | |
2294 | 148 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:266 | 84 | #~ msgstr "Próba aktualizacji danych innej aplikacji" |
2295 | 149 | msgid "No data for today" | 85 | |
2296 | 150 | msgstr "" | 86 | #~ msgid "Attempt to update data owned by another user" |
2297 | 151 | 87 | #~ msgstr "Próba aktualizacji danych innego użytkownika" | |
2298 | 152 | #: src/libusermetricsoutput/GSettingsColorThemeProvider.cpp:99 | 88 | |
2299 | 153 | #, qt-format | 89 | #~ msgid "Could not open database" |
2300 | 154 | msgid "Cannot open XML file '%1' for reading" | 90 | #~ msgstr "Błąd otwarcia bazy danych" |
2301 | 155 | msgstr "Błąd otwarcia pliku \"%1\" do odczytu." | 91 | |
2302 | 92 | #~ msgid "Could not register user data object with DBus" | ||
2303 | 93 | #~ msgstr "Błąd rejestracji obiektu danych użytkownika w DBus" | ||
2304 | 94 | |||
2305 | 95 | #~ msgid "Could not save data set" | ||
2306 | 96 | #~ msgstr "Błąd zapisu zestawu danych" | ||
2307 | 97 | |||
2308 | 98 | #~ msgid "Could not save data source" | ||
2309 | 99 | #~ msgstr "Błąd zapisywania źródła danych" | ||
2310 | 100 | |||
2311 | 101 | #~ msgid "Could not save user data" | ||
2312 | 102 | #~ msgstr "Błąd zapisu danych użytkownika" | ||
2313 | 103 | |||
2314 | 104 | #~ msgid "Data set query failed" | ||
2315 | 105 | #~ msgstr "Błąd zapytania danych" | ||
2316 | 106 | |||
2317 | 107 | #~ msgid "Data source query failed" | ||
2318 | 108 | #~ msgstr "Błąd zapytania źródła danych" | ||
2319 | 109 | |||
2320 | 110 | #~ msgid "New data set could not be found" | ||
2321 | 111 | #~ msgstr "Nie znaleziono nowego zestawu danych" | ||
2322 | 112 | |||
2323 | 113 | #~ msgid "Unable to register user metrics object on DBus" | ||
2324 | 114 | #~ msgstr "Błąd rejestracji obiektu metryk w DBus" | ||
2325 | 115 | |||
2326 | 116 | #~ msgid "Unable to register user metrics service on DBus" | ||
2327 | 117 | #~ msgstr "Błąd rejestracji usługi metryk w DBus" | ||
2328 | 118 | |||
2329 | 119 | #~ msgid "Unable to unregister user metrics service on DBus" | ||
2330 | 120 | #~ msgstr "Błąd wyrejestrowania usługi metryk z DBus" | ||
2331 | 121 | |||
2332 | 122 | #~ msgid "Unknown data source" | ||
2333 | 123 | #~ msgstr "Nieznane źródło danych" | ||
2334 | 124 | |||
2335 | 125 | #~ msgid "User data query failed" | ||
2336 | 126 | #~ msgstr "Błąd zapytania danych użytkownika" | ||
2337 | 156 | 127 | ||
2338 | === modified file 'po/zh_CN.po' | |||
2339 | --- po/zh_CN.po 2014-05-29 05:49:13 +0000 | |||
2340 | +++ po/zh_CN.po 2014-06-25 09:58:07 +0000 | |||
2341 | @@ -6,150 +6,61 @@ | |||
2342 | 6 | msgid "" | 6 | msgid "" |
2343 | 7 | msgstr "" | 7 | msgstr "" |
2344 | 8 | "Project-Id-Version: libusermetrics\n" | 8 | "Project-Id-Version: libusermetrics\n" |
2347 | 9 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" | 9 | "Report-Msgid-Bugs-To: \n" |
2348 | 10 | "POT-Creation-Date: 2013-10-22 09:33+0100\n" | 10 | "POT-Creation-Date: 2014-06-23 09:41+0100\n" |
2349 | 11 | "PO-Revision-Date: 2014-05-28 14:44+0000\n" | 11 | "PO-Revision-Date: 2014-05-28 14:44+0000\n" |
2350 | 12 | "Last-Translator: Anthony Wong <anthony.wong@ubuntu.com>\n" | 12 | "Last-Translator: Anthony Wong <anthony.wong@ubuntu.com>\n" |
2351 | 13 | "Language-Team: Chinese (Simplified) <zh_CN@li.org>\n" | 13 | "Language-Team: Chinese (Simplified) <zh_CN@li.org>\n" |
2352 | 14 | "Language: \n" | ||
2353 | 14 | "MIME-Version: 1.0\n" | 15 | "MIME-Version: 1.0\n" |
2354 | 15 | "Content-Type: text/plain; charset=UTF-8\n" | 16 | "Content-Type: text/plain; charset=UTF-8\n" |
2355 | 16 | "Content-Transfer-Encoding: 8bit\n" | 17 | "Content-Transfer-Encoding: 8bit\n" |
2356 | 17 | "X-Launchpad-Export-Date: 2014-05-29 05:49+0000\n" | 18 | "X-Launchpad-Export-Date: 2014-05-29 05:49+0000\n" |
2357 | 18 | "X-Generator: Launchpad (build 17017)\n" | 19 | "X-Generator: Launchpad (build 17017)\n" |
2358 | 19 | 20 | ||
2448 | 20 | #: src/usermetricsservice/main.cpp:59 | 21 | #: src/libusermetricsoutput/GSettingsColorThemeProvider.cpp:100 |
2449 | 21 | msgid "Could not open database" | 22 | #, qt-format |
2450 | 22 | msgstr "" | 23 | msgid "Cannot open XML file '%1' for reading" |
2451 | 23 | 24 | msgstr "" | |
2452 | 24 | #: src/usermetricsservice/main.cpp:72 | 25 | |
2453 | 25 | msgid "Unable to register user metrics service on DBus" | 26 | #: src/libusermetricsinput/main.cpp:37 |
2454 | 26 | msgstr "" | 27 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME <DATA>" |
2455 | 27 | 28 | msgstr "" | |
2456 | 28 | #: src/usermetricsservice/main.cpp:82 | 29 | |
2457 | 29 | msgid "Unable to unregister user metrics service on DBus" | 30 | #: src/libusermetricsinput/main-increment.cpp:37 |
2458 | 30 | msgstr "" | 31 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME [AMOUNT]" |
2459 | 31 | 32 | msgstr "" | |
2460 | 32 | #: src/usermetricsservice/DBusDataSource.cpp:68 | 33 | |
2461 | 33 | #: src/usermetricsservice/DBusDataSource.cpp:86 | 34 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:255 |
2462 | 34 | #: src/usermetricsservice/DBusDataSource.cpp:104 | 35 | msgid "Data source not found" |
2374 | 35 | #: src/usermetricsservice/DBusDataSource.cpp:116 | ||
2375 | 36 | #: src/usermetricsservice/DBusDataSource.cpp:134 | ||
2376 | 37 | #: src/usermetricsservice/DBusDataSource.cpp:172 | ||
2377 | 38 | #: src/usermetricsservice/DBusDataSource.cpp:190 | ||
2378 | 39 | #: src/usermetricsservice/DBusDataSource.cpp:216 | ||
2379 | 40 | #: src/usermetricsservice/DBusDataSource.cpp:234 | ||
2380 | 41 | #: src/usermetricsservice/DBusUserMetrics.cpp:187 | ||
2381 | 42 | msgid "Could not save data source" | ||
2382 | 43 | msgstr "" | ||
2383 | 44 | |||
2384 | 45 | #: src/usermetricsservice/DBusUserMetrics.cpp:54 | ||
2385 | 46 | msgid "Unable to register user metrics object on DBus" | ||
2386 | 47 | msgstr "" | ||
2387 | 48 | |||
2388 | 49 | #: src/usermetricsservice/DBusUserMetrics.cpp:141 | ||
2389 | 50 | #: src/usermetricsservice/DBusUserMetrics.cpp:153 | ||
2390 | 51 | msgid "Data source query failed" | ||
2391 | 52 | msgstr "" | ||
2392 | 53 | |||
2393 | 54 | #: src/usermetricsservice/DBusUserMetrics.cpp:249 | ||
2394 | 55 | msgid "Attempt to create user data owned by another user" | ||
2395 | 56 | msgstr "" | ||
2396 | 57 | |||
2397 | 58 | #: src/usermetricsservice/DBusUserMetrics.cpp:258 | ||
2398 | 59 | msgid "User data query failed" | ||
2399 | 60 | msgstr "" | ||
2400 | 61 | |||
2401 | 62 | #: src/usermetricsservice/DBusUserMetrics.cpp:267 | ||
2402 | 63 | msgid "Could not save user data" | ||
2403 | 64 | msgstr "" | ||
2404 | 65 | |||
2405 | 66 | #: src/usermetricsservice/DBusDataSet.cpp:127 | ||
2406 | 67 | #: src/usermetricsservice/DBusUserData.cpp:125 | ||
2407 | 68 | msgid "Could not save data set" | ||
2408 | 69 | msgstr "" | ||
2409 | 70 | |||
2410 | 71 | #: src/usermetricsservice/DBusDataSet.cpp:143 | ||
2411 | 72 | msgid "Attempt to update data owned by another user" | ||
2412 | 73 | msgstr "" | ||
2413 | 74 | |||
2414 | 75 | #: src/usermetricsservice/DBusDataSet.cpp:151 | ||
2415 | 76 | msgid "Attempt to update data owned by another application" | ||
2416 | 77 | msgstr "" | ||
2417 | 78 | |||
2418 | 79 | #: src/usermetricsservice/DBusDataSet.cpp:170 | ||
2419 | 80 | msgid "Attempt to increment data owned by another user" | ||
2420 | 81 | msgstr "" | ||
2421 | 82 | |||
2422 | 83 | #: src/usermetricsservice/DBusDataSet.cpp:178 | ||
2423 | 84 | msgid "Attempt to increment data owned by another application" | ||
2424 | 85 | msgstr "" | ||
2425 | 86 | |||
2426 | 87 | #: src/usermetricsservice/DBusUserData.cpp:51 | ||
2427 | 88 | msgid "Could not register user data object with DBus" | ||
2428 | 89 | msgstr "" | ||
2429 | 90 | |||
2430 | 91 | #: src/usermetricsservice/DBusUserData.cpp:81 | ||
2431 | 92 | msgid "Unknown data source" | ||
2432 | 93 | msgstr "" | ||
2433 | 94 | |||
2434 | 95 | #: src/usermetricsservice/DBusUserData.cpp:90 | ||
2435 | 96 | msgid "Attempt to create data set owned by another user" | ||
2436 | 97 | msgstr "" | ||
2437 | 98 | |||
2438 | 99 | #: src/usermetricsservice/DBusUserData.cpp:101 | ||
2439 | 100 | msgid "Attempt to create data set owned by another application" | ||
2440 | 101 | msgstr "" | ||
2441 | 102 | |||
2442 | 103 | #: src/usermetricsservice/DBusUserData.cpp:112 | ||
2443 | 104 | msgid "Data set query failed" | ||
2444 | 105 | msgstr "" | ||
2445 | 106 | |||
2446 | 107 | #: src/usermetricsservice/DBusUserData.cpp:135 | ||
2447 | 108 | msgid "New data set could not be found" | ||
2463 | 109 | msgstr "" | 36 | msgstr "" |
2464 | 110 | 37 | ||
2465 | 111 | #: src/modules/UserMetrics/Metric.cpp:30 | 38 | #: src/modules/UserMetrics/Metric.cpp:30 |
2466 | 112 | msgid "Failed to connect to metrics service:" | 39 | msgid "Failed to connect to metrics service:" |
2467 | 113 | msgstr "" | 40 | msgstr "" |
2468 | 114 | 41 | ||
2469 | 42 | #: src/modules/UserMetrics/Metric.cpp:154 | ||
2470 | 43 | msgid "Failed to increment metric:" | ||
2471 | 44 | msgstr "" | ||
2472 | 45 | |||
2473 | 115 | #: src/modules/UserMetrics/Metric.cpp:141 | 46 | #: src/modules/UserMetrics/Metric.cpp:141 |
2474 | 116 | msgid "Failed to register user metric:" | 47 | msgid "Failed to register user metric:" |
2475 | 117 | msgstr "" | 48 | msgstr "" |
2476 | 118 | 49 | ||
2477 | 119 | #: src/modules/UserMetrics/Metric.cpp:154 | ||
2478 | 120 | msgid "Failed to increment metric:" | ||
2479 | 121 | msgstr "" | ||
2480 | 122 | |||
2481 | 123 | #: src/modules/UserMetrics/Metric.cpp:166 | 50 | #: src/modules/UserMetrics/Metric.cpp:166 |
2482 | 124 | msgid "Failed to update metric:" | 51 | msgid "Failed to update metric:" |
2483 | 125 | msgstr "" | 52 | msgstr "" |
2484 | 126 | 53 | ||
2496 | 127 | #: src/libusermetricsinput/main-increment.cpp:35 | 54 | #: src/libusermetricsinput/MetricImpl.cpp:223 |
2497 | 128 | #: src/libusermetricsinput/main.cpp:35 | 55 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:267 |
2498 | 129 | msgid "Usage: " | 56 | msgid "No data for today" |
2488 | 130 | msgstr "" | ||
2489 | 131 | |||
2490 | 132 | #: src/libusermetricsinput/main-increment.cpp:37 | ||
2491 | 133 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME [AMOUNT]" | ||
2492 | 134 | msgstr "" | ||
2493 | 135 | |||
2494 | 136 | #: src/libusermetricsinput/main.cpp:37 | ||
2495 | 137 | msgid "DATA_SOURCE_ID FORMAT_STRING EMPTY_DATA_STRING USERNAME <DATA>" | ||
2499 | 138 | msgstr "" | 57 | msgstr "" |
2500 | 139 | 58 | ||
2501 | 140 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:198 | 59 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:198 |
2502 | 141 | msgid "No data sources available" | 60 | msgid "No data sources available" |
2503 | 142 | msgstr "无可用数据来源" | 61 | msgstr "无可用数据来源" |
2504 | 143 | 62 | ||
2516 | 144 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:255 | 63 | #: src/libusermetricsinput/main.cpp:35 |
2517 | 145 | msgid "Data source not found" | 64 | #: src/libusermetricsinput/main-increment.cpp:35 |
2518 | 146 | msgstr "" | 65 | msgid "Usage: " |
2508 | 147 | |||
2509 | 148 | #: src/libusermetricsoutput/UserMetricsImpl.cpp:266 | ||
2510 | 149 | msgid "No data for today" | ||
2511 | 150 | msgstr "" | ||
2512 | 151 | |||
2513 | 152 | #: src/libusermetricsoutput/GSettingsColorThemeProvider.cpp:99 | ||
2514 | 153 | #, qt-format | ||
2515 | 154 | msgid "Cannot open XML file '%1' for reading" | ||
2519 | 155 | msgstr "" | 66 | msgstr "" |
2520 | 156 | 67 | ||
2521 | === modified file 'src/CMakeLists.txt' | |||
2522 | --- src/CMakeLists.txt 2013-09-17 11:03:34 +0000 | |||
2523 | +++ src/CMakeLists.txt 2014-06-25 09:58:07 +0000 | |||
2524 | @@ -6,6 +6,8 @@ | |||
2525 | 6 | 6 | ||
2526 | 7 | add_compiler_export_flags() | 7 | add_compiler_export_flags() |
2527 | 8 | 8 | ||
2528 | 9 | add_subdirectory("infographic") | ||
2529 | 10 | add_subdirectory("infographicservice") | ||
2530 | 9 | add_subdirectory("libusermetricscommon") | 11 | add_subdirectory("libusermetricscommon") |
2531 | 10 | add_subdirectory("libusermetricsinput") | 12 | add_subdirectory("libusermetricsinput") |
2532 | 11 | add_subdirectory("libusermetricsoutput") | 13 | add_subdirectory("libusermetricsoutput") |
2533 | 12 | 14 | ||
2534 | === added directory 'src/infographic' | |||
2535 | === added file 'src/infographic/CMakeLists.txt' | |||
2536 | --- src/infographic/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
2537 | +++ src/infographic/CMakeLists.txt 2014-06-25 09:58:07 +0000 | |||
2538 | @@ -0,0 +1,20 @@ | |||
2539 | 1 | |||
2540 | 2 | ########################## | ||
2541 | 3 | # Infographic | ||
2542 | 4 | ########################## | ||
2543 | 5 | |||
2544 | 6 | add_executable( | ||
2545 | 7 | infographic | ||
2546 | 8 | Infographic.cpp | ||
2547 | 9 | main.cpp | ||
2548 | 10 | ) | ||
2549 | 11 | |||
2550 | 12 | install( | ||
2551 | 13 | TARGETS infographic | ||
2552 | 14 | RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/libusermetrics" | ||
2553 | 15 | ) | ||
2554 | 16 | |||
2555 | 17 | qt5_use_modules( | ||
2556 | 18 | infographic | ||
2557 | 19 | Core | ||
2558 | 20 | ) | ||
2559 | 0 | 21 | ||
2560 | === added file 'src/infographic/Infographic.cpp' | |||
2561 | --- src/infographic/Infographic.cpp 1970-01-01 00:00:00 +0000 | |||
2562 | +++ src/infographic/Infographic.cpp 2014-06-25 09:58:07 +0000 | |||
2563 | @@ -0,0 +1,292 @@ | |||
2564 | 1 | /* | ||
2565 | 2 | * Copyright (C) 2013 Canonical, Ltd. | ||
2566 | 3 | * | ||
2567 | 4 | * This program is free software; you can redistribute it and/or modify | ||
2568 | 5 | * it under the terms of the GNU General Public License as published by | ||
2569 | 6 | * the Free Software Foundation; version 3. | ||
2570 | 7 | * | ||
2571 | 8 | * This program is distributed in the hope that it will be useful, | ||
2572 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2573 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2574 | 11 | * GNU General Public License for more details. | ||
2575 | 12 | * | ||
2576 | 13 | * You should have received a copy of the GNU General Public License | ||
2577 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2578 | 15 | * | ||
2579 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
2580 | 17 | */ | ||
2581 | 18 | |||
2582 | 19 | #include <infographic/Infographic.h> | ||
2583 | 20 | |||
2584 | 21 | #define _USE_MATH_DEFINES | ||
2585 | 22 | |||
2586 | 23 | #include <cmath> | ||
2587 | 24 | #include <QDate> | ||
2588 | 25 | #include <QDebug> | ||
2589 | 26 | #include <QIODevice> | ||
2590 | 27 | #include <QJsonDocument> | ||
2591 | 28 | #include <QRegularExpression> | ||
2592 | 29 | #include <QStringList> | ||
2593 | 30 | #include <QVariantList> | ||
2594 | 31 | #include <QXmlStreamWriter> | ||
2595 | 32 | |||
2596 | 33 | using namespace UserMetricsInfographic; | ||
2597 | 34 | |||
2598 | 35 | static const double CENTER_CIRCLE_RADIUS = 345.0; | ||
2599 | 36 | static const double DATA_CIRCLE_RADIUS = CENTER_CIRCLE_RADIUS / 1.8; | ||
2600 | 37 | static const double DOT_DISTANCE = 0.8 * CENTER_CIRCLE_RADIUS; | ||
2601 | 38 | static const double SVG_SIZE = 2.0 * CENTER_CIRCLE_RADIUS | ||
2602 | 39 | + 2.0 * DATA_CIRCLE_RADIUS; | ||
2603 | 40 | static const double CENTER_COORD = 0.5 * SVG_SIZE; | ||
2604 | 41 | static const int LINE_WIDTH(20); | ||
2605 | 42 | |||
2606 | 43 | static const QRegularExpression WHITESPACE("\\s"); | ||
2607 | 44 | |||
2608 | 45 | Infographic::Infographic(QIODevice &input, QIODevice &output) { | ||
2609 | 46 | readJson(input); | ||
2610 | 47 | splitDataIntoMonths(); | ||
2611 | 48 | writeSvg(output); | ||
2612 | 49 | } | ||
2613 | 50 | |||
2614 | 51 | Infographic::~Infographic() { | ||
2615 | 52 | } | ||
2616 | 53 | |||
2617 | 54 | static inline double xComponent(double radius, int count, int total) { | ||
2618 | 55 | return CENTER_COORD + radius * sin((2.0 * M_PI * count) / total); | ||
2619 | 56 | } | ||
2620 | 57 | |||
2621 | 58 | static inline double yComponent(double radius, int count, int total) { | ||
2622 | 59 | return CENTER_COORD - radius * cos((2.0 * M_PI * count) / total); | ||
2623 | 60 | } | ||
2624 | 61 | |||
2625 | 62 | void Infographic::splitDataIntoMonth(QVariantList &month, const int dayOfMonth, | ||
2626 | 63 | const int daysInMonth, QVariantList::const_iterator& index, | ||
2627 | 64 | const QVariantList::const_iterator& end) { | ||
2628 | 65 | |||
2629 | 66 | // Copy a number of data entries equal to the day of the month it is | ||
2630 | 67 | for (int i(0); i < dayOfMonth; ++i) { | ||
2631 | 68 | if (index == end) { | ||
2632 | 69 | // when we run out of data, pad the remaining days to the | ||
2633 | 70 | // start of the month | ||
2634 | 71 | month.prepend(QVariant()); | ||
2635 | 72 | } else { | ||
2636 | 73 | // pop data from the from of the source | ||
2637 | 74 | month.prepend(*index); | ||
2638 | 75 | ++index; | ||
2639 | 76 | } | ||
2640 | 77 | } | ||
2641 | 78 | |||
2642 | 79 | // Now fill the end of the month with empty data | ||
2643 | 80 | while (month.size() < daysInMonth) { | ||
2644 | 81 | month.append(QVariant()); | ||
2645 | 82 | } | ||
2646 | 83 | } | ||
2647 | 84 | |||
2648 | 85 | void Infographic::splitDataIntoMonths() { | ||
2649 | 86 | QDate currentDate(QDate::currentDate()); | ||
2650 | 87 | QDate secondMonthDate(currentDate.addMonths(-1)); | ||
2651 | 88 | |||
2652 | 89 | int valuesToCopyForFirstMonth(0); | ||
2653 | 90 | int valuesToCopyForSecondMonth(0); | ||
2654 | 91 | |||
2655 | 92 | if (currentDate.year() == m_lastUpdated.year() | ||
2656 | 93 | && currentDate.month() == m_lastUpdated.month()) { | ||
2657 | 94 | // If the data is for the first month | ||
2658 | 95 | valuesToCopyForFirstMonth = m_lastUpdated.day(); | ||
2659 | 96 | valuesToCopyForSecondMonth = secondMonthDate.daysInMonth(); | ||
2660 | 97 | } else if (secondMonthDate.year() == m_lastUpdated.year() | ||
2661 | 98 | && secondMonthDate.month() == m_lastUpdated.month()) { | ||
2662 | 99 | // If the data is for the second month | ||
2663 | 100 | valuesToCopyForSecondMonth = m_lastUpdated.day(); | ||
2664 | 101 | } else { | ||
2665 | 102 | // the data is out of date | ||
2666 | 103 | } | ||
2667 | 104 | |||
2668 | 105 | QVariantList::const_iterator dataIndex(m_data.begin()); | ||
2669 | 106 | QVariantList::const_iterator end(m_data.end()); | ||
2670 | 107 | |||
2671 | 108 | splitDataIntoMonth(m_firstMonth, valuesToCopyForFirstMonth, | ||
2672 | 109 | currentDate.daysInMonth(), dataIndex, end); | ||
2673 | 110 | |||
2674 | 111 | splitDataIntoMonth(m_secondMonth, valuesToCopyForSecondMonth, | ||
2675 | 112 | secondMonthDate.daysInMonth(), dataIndex, end); | ||
2676 | 113 | |||
2677 | 114 | m_currentDay = valuesToCopyForFirstMonth - 1; | ||
2678 | 115 | } | ||
2679 | 116 | |||
2680 | 117 | void Infographic::readJson(QIODevice &input) { | ||
2681 | 118 | QJsonDocument document(QJsonDocument::fromJson(input.readAll())); | ||
2682 | 119 | QVariantMap map(document.toVariant().toMap()); | ||
2683 | 120 | |||
2684 | 121 | m_label = map["label"].toString(); | ||
2685 | 122 | m_data = map["scaledData"].toList(); | ||
2686 | 123 | m_lastUpdated = map["lastUpdated"].toDate(); | ||
2687 | 124 | } | ||
2688 | 125 | |||
2689 | 126 | void Infographic::writeCircle(double x, double y, double r, | ||
2690 | 127 | const QString &color, double opacity, const QString &id, | ||
2691 | 128 | const QString &clazz, QXmlStreamWriter &stream) { | ||
2692 | 129 | stream.writeStartElement("circle"); | ||
2693 | 130 | stream.writeAttribute("id", id); | ||
2694 | 131 | stream.writeAttribute("class", clazz); | ||
2695 | 132 | stream.writeAttribute("stroke", "none"); | ||
2696 | 133 | stream.writeAttribute("opacity", QString::number(opacity)); | ||
2697 | 134 | stream.writeAttribute("fill", color); | ||
2698 | 135 | stream.writeAttribute("cx", QString::number(x)); | ||
2699 | 136 | stream.writeAttribute("cy", QString::number(y)); | ||
2700 | 137 | stream.writeAttribute("r", QString::number(r)); | ||
2701 | 138 | stream.writeEndElement(); | ||
2702 | 139 | } | ||
2703 | 140 | |||
2704 | 141 | void Infographic::writeRing(double x, double y, double r, const QString &color, | ||
2705 | 142 | double opacity, const QString &id, const QString &clazz, | ||
2706 | 143 | QXmlStreamWriter &stream) { | ||
2707 | 144 | stream.writeStartElement("circle"); | ||
2708 | 145 | stream.writeAttribute("id", id); | ||
2709 | 146 | stream.writeAttribute("class", clazz); | ||
2710 | 147 | stream.writeAttribute("stroke", color); | ||
2711 | 148 | stream.writeAttribute("stroke-width", "1"); | ||
2712 | 149 | stream.writeAttribute("opacity", QString::number(opacity)); | ||
2713 | 150 | stream.writeAttribute("fill", "none"); | ||
2714 | 151 | stream.writeAttribute("cx", QString::number(x)); | ||
2715 | 152 | stream.writeAttribute("cy", QString::number(y)); | ||
2716 | 153 | stream.writeAttribute("r", QString::number(r)); | ||
2717 | 154 | stream.writeEndElement(); | ||
2718 | 155 | } | ||
2719 | 156 | |||
2720 | 157 | void Infographic::writeDots(int currentDay, int days, const QString &color, | ||
2721 | 158 | QXmlStreamWriter &stream) { | ||
2722 | 159 | |||
2723 | 160 | uint dotId(0); | ||
2724 | 161 | |||
2725 | 162 | for (int day(0); day < currentDay; ++day) { | ||
2726 | 163 | writeCircle(xComponent(DOT_DISTANCE, day, days), | ||
2727 | 164 | yComponent(DOT_DISTANCE, day, days), 8.0, color, 0.4, | ||
2728 | 165 | QString("day-alt-%1").arg(++dotId), "day-alt-past", stream); | ||
2729 | 166 | } | ||
2730 | 167 | |||
2731 | 168 | { | ||
2732 | 169 | double x(xComponent(DOT_DISTANCE, currentDay, days)); | ||
2733 | 170 | double y(yComponent(DOT_DISTANCE, currentDay, days)); | ||
2734 | 171 | |||
2735 | 172 | stream.writeStartElement("image"); | ||
2736 | 173 | stream.writeAttribute("id", | ||
2737 | 174 | QString("day-alt-%1").arg(QString("dot-%1").arg(++dotId))); | ||
2738 | 175 | stream.writeAttribute("class", "day-alt-current"); | ||
2739 | 176 | stream.writeAttribute("opacity", "0.4"); | ||
2740 | 177 | stream.writeAttribute("x", QString::number(x - 20.0)); | ||
2741 | 178 | stream.writeAttribute("y", QString::number(y - 20.0)); | ||
2742 | 179 | stream.writeAttribute("width", "40px"); | ||
2743 | 180 | stream.writeAttribute("height", "40px"); | ||
2744 | 181 | stream.writeAttribute("transform", | ||
2745 | 182 | QString("rotate(%1 %2 %3)").arg((360.0 * currentDay) / days).arg( | ||
2746 | 183 | x).arg(y)); | ||
2747 | 184 | stream.writeAttribute("xlink:href", | ||
2748 | 185 | "/usr/share/unity8/Greeter/graphics/dot_pointer.png"); | ||
2749 | 186 | stream.writeEndElement(); | ||
2750 | 187 | } | ||
2751 | 188 | |||
2752 | 189 | for (int day(currentDay + 1); day < days; ++day) { | ||
2753 | 190 | writeRing(xComponent(DOT_DISTANCE, day, days), | ||
2754 | 191 | yComponent(DOT_DISTANCE, day, days), 7.0, color, 0.4, | ||
2755 | 192 | QString("day-alt-%1").arg(++dotId), "day-alt-future", stream); | ||
2756 | 193 | } | ||
2757 | 194 | } | ||
2758 | 195 | |||
2759 | 196 | void Infographic::writeMonth(const QVariantList &month, const QString &color, | ||
2760 | 197 | const QString &id, const QString &clazz, QXmlStreamWriter &stream) { | ||
2761 | 198 | int day(0); | ||
2762 | 199 | int days(month.size()); | ||
2763 | 200 | for (const QVariant &value : month) { | ||
2764 | 201 | if (!value.isNull()) { | ||
2765 | 202 | writeCircle(xComponent(CENTER_CIRCLE_RADIUS, day, days), | ||
2766 | 203 | yComponent(CENTER_CIRCLE_RADIUS, day, days), | ||
2767 | 204 | DATA_CIRCLE_RADIUS * value.toDouble(), color, 0.3, | ||
2768 | 205 | id.arg(day), clazz, stream); | ||
2769 | 206 | } | ||
2770 | 207 | ++day; | ||
2771 | 208 | } | ||
2772 | 209 | } | ||
2773 | 210 | |||
2774 | 211 | void Infographic::writeLabel(QXmlStreamWriter &stream) { | ||
2775 | 212 | m_label.remove("<b>", Qt::CaseInsensitive); | ||
2776 | 213 | m_label.remove("</b>", Qt::CaseInsensitive); | ||
2777 | 214 | |||
2778 | 215 | QStringList label; | ||
2779 | 216 | |||
2780 | 217 | QStringList words(m_label.split(WHITESPACE)); | ||
2781 | 218 | int spaceLeft = LINE_WIDTH; | ||
2782 | 219 | int lineLength(0); | ||
2783 | 220 | int lineStart(0); | ||
2784 | 221 | for (const QString &word : words) { | ||
2785 | 222 | lineLength += word.length() + 1; | ||
2786 | 223 | if (word.length() + 1 > spaceLeft) { | ||
2787 | 224 | label << m_label.mid(lineStart, lineLength); | ||
2788 | 225 | lineStart += lineLength; | ||
2789 | 226 | lineLength = 0; | ||
2790 | 227 | |||
2791 | 228 | spaceLeft = LINE_WIDTH - word.length(); | ||
2792 | 229 | } else { | ||
2793 | 230 | spaceLeft = spaceLeft - (word.length() + 1); | ||
2794 | 231 | } | ||
2795 | 232 | } | ||
2796 | 233 | if (lineLength > 0) { | ||
2797 | 234 | label << m_label.mid(lineStart, lineLength); | ||
2798 | 235 | } | ||
2799 | 236 | |||
2800 | 237 | int lines(label.size()); | ||
2801 | 238 | int yOffset(CENTER_COORD - 15.0 * lines); | ||
2802 | 239 | int lineNumber(0); | ||
2803 | 240 | for (const QString &line : label) { | ||
2804 | 241 | stream.writeStartElement("text"); | ||
2805 | 242 | stream.writeAttribute("id", QString("label-line-%1").arg(lineNumber)); | ||
2806 | 243 | stream.writeAttribute("class", "label"); | ||
2807 | 244 | stream.writeAttribute("opacity", "0.6"); | ||
2808 | 245 | stream.writeAttribute("x", QString::number(CENTER_COORD)); | ||
2809 | 246 | stream.writeAttribute("y", | ||
2810 | 247 | QString::number(yOffset + 50.0 * lineNumber)); | ||
2811 | 248 | stream.writeAttribute("fill", "#ffffff"); | ||
2812 | 249 | stream.writeAttribute("text-anchor", "middle"); | ||
2813 | 250 | stream.writeAttribute("font-family", "Ubuntu"); | ||
2814 | 251 | stream.writeAttribute("font-size", "40"); | ||
2815 | 252 | stream.writeCharacters(line); | ||
2816 | 253 | stream.writeEndElement(); | ||
2817 | 254 | ++lineNumber; | ||
2818 | 255 | } | ||
2819 | 256 | } | ||
2820 | 257 | |||
2821 | 258 | void Infographic::writeSvg(QIODevice &output) { | ||
2822 | 259 | QXmlStreamWriter stream(&output); | ||
2823 | 260 | stream.setAutoFormatting(true); | ||
2824 | 261 | stream.writeStartDocument(); | ||
2825 | 262 | stream.writeStartElement("svg"); | ||
2826 | 263 | stream.writeAttribute("xmlns", "http://www.w3.org/2000/svg"); | ||
2827 | 264 | stream.writeAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"); | ||
2828 | 265 | stream.writeAttribute("width", QString::number(ceil(SVG_SIZE))); | ||
2829 | 266 | stream.writeAttribute("height", QString::number(ceil(SVG_SIZE))); | ||
2830 | 267 | |||
2831 | 268 | writeMonth(m_secondMonth, "#e54c19", "day-past-%1", "day-past", stream); | ||
2832 | 269 | writeMonth(m_firstMonth, "#ff9900", "day-present-%1", "day-present", | ||
2833 | 270 | stream); | ||
2834 | 271 | |||
2835 | 272 | { | ||
2836 | 273 | // 689 x 691 | ||
2837 | 274 | stream.writeStartElement("image"); | ||
2838 | 275 | stream.writeAttribute("x", | ||
2839 | 276 | QString::number(ceil(CENTER_COORD - 689.0 / 2))); | ||
2840 | 277 | stream.writeAttribute("y", | ||
2841 | 278 | QString::number(ceil(CENTER_COORD - 691.0 / 2))); | ||
2842 | 279 | stream.writeAttribute("width", "689px"); | ||
2843 | 280 | stream.writeAttribute("height", "691px"); | ||
2844 | 281 | stream.writeAttribute("xlink:href", | ||
2845 | 282 | "/usr/share/unity8/Greeter/graphics/infographic_circle_back.png"); | ||
2846 | 283 | stream.writeEndElement(); | ||
2847 | 284 | } | ||
2848 | 285 | |||
2849 | 286 | writeLabel(stream); | ||
2850 | 287 | |||
2851 | 288 | writeDots(m_currentDay, m_firstMonth.size(), "#ffffff", stream); | ||
2852 | 289 | |||
2853 | 290 | stream.writeEndElement(); | ||
2854 | 291 | stream.writeEndDocument(); | ||
2855 | 292 | } | ||
2856 | 0 | 293 | ||
2857 | === added file 'src/infographic/Infographic.h' | |||
2858 | --- src/infographic/Infographic.h 1970-01-01 00:00:00 +0000 | |||
2859 | +++ src/infographic/Infographic.h 2014-06-25 09:58:07 +0000 | |||
2860 | @@ -0,0 +1,79 @@ | |||
2861 | 1 | /* | ||
2862 | 2 | * Copyright (C) 2013 Canonical, Ltd. | ||
2863 | 3 | * | ||
2864 | 4 | * This program is free software; you can redistribute it and/or modify | ||
2865 | 5 | * it under the terms of the GNU General Public License as published by | ||
2866 | 6 | * the Free Software Foundation; version 3. | ||
2867 | 7 | * | ||
2868 | 8 | * This program is distributed in the hope that it will be useful, | ||
2869 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2870 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2871 | 11 | * GNU General Public License for more details. | ||
2872 | 12 | * | ||
2873 | 13 | * You should have received a copy of the GNU General Public License | ||
2874 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2875 | 15 | * | ||
2876 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
2877 | 17 | */ | ||
2878 | 18 | |||
2879 | 19 | #ifndef INFOGRAPHIC_H_ | ||
2880 | 20 | #define INFOGRAPHIC_H_ | ||
2881 | 21 | |||
2882 | 22 | #include <QDate> | ||
2883 | 23 | #include <QVariantList> | ||
2884 | 24 | |||
2885 | 25 | class QIODevice; | ||
2886 | 26 | class QString; | ||
2887 | 27 | class QXmlStreamWriter; | ||
2888 | 28 | |||
2889 | 29 | namespace UserMetricsInfographic { | ||
2890 | 30 | |||
2891 | 31 | class Infographic { | ||
2892 | 32 | public: | ||
2893 | 33 | Infographic(QIODevice &input, QIODevice &output); | ||
2894 | 34 | |||
2895 | 35 | virtual ~Infographic(); | ||
2896 | 36 | |||
2897 | 37 | protected: | ||
2898 | 38 | void readJson(QIODevice &input); | ||
2899 | 39 | |||
2900 | 40 | void splitDataIntoMonths(); | ||
2901 | 41 | |||
2902 | 42 | void splitDataIntoMonth(QVariantList &month, const int dayOfMonth, | ||
2903 | 43 | const int daysInMonth, QVariantList::const_iterator& index, | ||
2904 | 44 | const QVariantList::const_iterator& end); | ||
2905 | 45 | |||
2906 | 46 | void writeCircle(double x, double y, double r, const QString &color, | ||
2907 | 47 | double opacity, const QString &id, const QString &clazz, | ||
2908 | 48 | QXmlStreamWriter &stream); | ||
2909 | 49 | |||
2910 | 50 | void writeRing(double x, double y, double r, const QString &color, | ||
2911 | 51 | double opacity, const QString &id, const QString &clazz, | ||
2912 | 52 | QXmlStreamWriter &stream); | ||
2913 | 53 | |||
2914 | 54 | void writeDots(int currentDay, int days, const QString &color, | ||
2915 | 55 | QXmlStreamWriter &stream); | ||
2916 | 56 | |||
2917 | 57 | void writeMonth(const QVariantList &month, const QString &color, | ||
2918 | 58 | const QString &id, const QString &clazz, QXmlStreamWriter &stream); | ||
2919 | 59 | |||
2920 | 60 | void writeLabel(QXmlStreamWriter &stream); | ||
2921 | 61 | |||
2922 | 62 | void writeSvg(QIODevice &output); | ||
2923 | 63 | |||
2924 | 64 | QString m_label; | ||
2925 | 65 | |||
2926 | 66 | int m_currentDay; | ||
2927 | 67 | |||
2928 | 68 | QDate m_lastUpdated; | ||
2929 | 69 | |||
2930 | 70 | QVariantList m_data; | ||
2931 | 71 | |||
2932 | 72 | QVariantList m_firstMonth; | ||
2933 | 73 | |||
2934 | 74 | QVariantList m_secondMonth; | ||
2935 | 75 | }; | ||
2936 | 76 | |||
2937 | 77 | } /* namespace UserMetricsInfographic */ | ||
2938 | 78 | |||
2939 | 79 | #endif /* INFOGRAPHIC_H_ */ | ||
2940 | 0 | 80 | ||
2941 | === added file 'src/infographic/main.cpp' | |||
2942 | --- src/infographic/main.cpp 1970-01-01 00:00:00 +0000 | |||
2943 | +++ src/infographic/main.cpp 2014-06-25 09:58:07 +0000 | |||
2944 | @@ -0,0 +1,53 @@ | |||
2945 | 1 | /* | ||
2946 | 2 | * Copyright (C) 2013 Canonical, Ltd. | ||
2947 | 3 | * | ||
2948 | 4 | * This program is free software; you can redistribute it and/or modify | ||
2949 | 5 | * it under the terms of the GNU General Public License as published by | ||
2950 | 6 | * the Free Software Foundation; version 3. | ||
2951 | 7 | * | ||
2952 | 8 | * This program is distributed in the hope that it will be useful, | ||
2953 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2954 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2955 | 11 | * GNU General Public License for more details. | ||
2956 | 12 | * | ||
2957 | 13 | * You should have received a copy of the GNU General Public License | ||
2958 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2959 | 15 | * | ||
2960 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
2961 | 17 | */ | ||
2962 | 18 | |||
2963 | 19 | #include <infographic/Infographic.h> | ||
2964 | 20 | |||
2965 | 21 | #include <QCoreApplication> | ||
2966 | 22 | #include <QDebug> | ||
2967 | 23 | #include <QFile> | ||
2968 | 24 | |||
2969 | 25 | using namespace std; | ||
2970 | 26 | using namespace UserMetricsInfographic; | ||
2971 | 27 | |||
2972 | 28 | int main(int argc, char *argv[]) { | ||
2973 | 29 | QCoreApplication application(argc, argv); | ||
2974 | 30 | |||
2975 | 31 | if (argc < 2) { | ||
2976 | 32 | qWarning() << "Usage: " << argv[0] << "INPUT_FILE [OUTPUT_FILE]"; | ||
2977 | 33 | return 1; | ||
2978 | 34 | } | ||
2979 | 35 | |||
2980 | 36 | QFile inputFile(QString::fromUtf8(argv[1])); | ||
2981 | 37 | QFile outputFile; | ||
2982 | 38 | if (argc == 3) { | ||
2983 | 39 | outputFile.setFileName(QString::fromUtf8(argv[2])); | ||
2984 | 40 | outputFile.open(QIODevice::WriteOnly); | ||
2985 | 41 | } else { | ||
2986 | 42 | outputFile.open(1, QIODevice::WriteOnly); | ||
2987 | 43 | } | ||
2988 | 44 | |||
2989 | 45 | inputFile.open(QIODevice::ReadOnly); | ||
2990 | 46 | |||
2991 | 47 | Infographic infographic(inputFile, outputFile); | ||
2992 | 48 | |||
2993 | 49 | inputFile.close(); | ||
2994 | 50 | outputFile.close(); | ||
2995 | 51 | |||
2996 | 52 | return 0; | ||
2997 | 53 | } | ||
2998 | 0 | 54 | ||
2999 | === added directory 'src/infographicservice' | |||
3000 | === added file 'src/infographicservice/CMakeLists.txt' | |||
3001 | --- src/infographicservice/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
3002 | +++ src/infographicservice/CMakeLists.txt 2014-06-25 09:58:07 +0000 | |||
3003 | @@ -0,0 +1,58 @@ | |||
3004 | 1 | |||
3005 | 2 | set(INFOGRAPHICSERVICE_SOURCES | ||
3006 | 3 | Service.cpp | ||
3007 | 4 | ) | ||
3008 | 5 | |||
3009 | 6 | qt5_add_dbus_adaptor( | ||
3010 | 7 | INFOGRAPHICSERVICE_SOURCES | ||
3011 | 8 | ${INFOGRAPHIC_SERVICE_XML} | ||
3012 | 9 | infographicservice/Service.h | ||
3013 | 10 | InfographicService::Service | ||
3014 | 11 | InfographicServiceAdaptor | ||
3015 | 12 | ) | ||
3016 | 13 | |||
3017 | 14 | add_library( | ||
3018 | 15 | infographicservice | ||
3019 | 16 | STATIC | ||
3020 | 17 | ${INFOGRAPHICSERVICE_SOURCES} | ||
3021 | 18 | ) | ||
3022 | 19 | |||
3023 | 20 | qt5_use_modules( | ||
3024 | 21 | infographicservice | ||
3025 | 22 | Core | ||
3026 | 23 | DBus | ||
3027 | 24 | ) | ||
3028 | 25 | |||
3029 | 26 | ############################ | ||
3030 | 27 | # Service executable | ||
3031 | 28 | ############################ | ||
3032 | 29 | |||
3033 | 30 | add_executable( | ||
3034 | 31 | infographicservice-bin | ||
3035 | 32 | main.cpp | ||
3036 | 33 | ) | ||
3037 | 34 | |||
3038 | 35 | set_target_properties( | ||
3039 | 36 | infographicservice-bin | ||
3040 | 37 | PROPERTIES | ||
3041 | 38 | OUTPUT_NAME "infographicservice" | ||
3042 | 39 | ) | ||
3043 | 40 | |||
3044 | 41 | target_link_libraries( | ||
3045 | 42 | infographicservice-bin | ||
3046 | 43 | infographicservice | ||
3047 | 44 | ) | ||
3048 | 45 | |||
3049 | 46 | qt5_use_modules( | ||
3050 | 47 | infographicservice-bin | ||
3051 | 48 | Core | ||
3052 | 49 | ) | ||
3053 | 50 | |||
3054 | 51 | ######################### | ||
3055 | 52 | # Installation | ||
3056 | 53 | ######################### | ||
3057 | 54 | |||
3058 | 55 | install( | ||
3059 | 56 | TARGETS infographicservice-bin | ||
3060 | 57 | RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/libusermetrics" | ||
3061 | 58 | ) | ||
3062 | 0 | 59 | ||
3063 | === added file 'src/infographicservice/Service.cpp' | |||
3064 | --- src/infographicservice/Service.cpp 1970-01-01 00:00:00 +0000 | |||
3065 | +++ src/infographicservice/Service.cpp 2014-06-25 09:58:07 +0000 | |||
3066 | @@ -0,0 +1,131 @@ | |||
3067 | 1 | /* | ||
3068 | 2 | * Service.cpp | ||
3069 | 3 | * | ||
3070 | 4 | * Created on: 2 Mar 2014 | ||
3071 | 5 | * Author: pete | ||
3072 | 6 | */ | ||
3073 | 7 | |||
3074 | 8 | #include <infographicservice/InfographicServiceAdaptor.h> | ||
3075 | 9 | #include <infographicservice/Service.h> | ||
3076 | 10 | #include <libusermetricscommon/DBusPaths.h> | ||
3077 | 11 | |||
3078 | 12 | #include <QDateTime> | ||
3079 | 13 | #include <QFile> | ||
3080 | 14 | #include <cstdio> | ||
3081 | 15 | |||
3082 | 16 | using namespace InfographicService; | ||
3083 | 17 | using namespace UserMetricsCommon; | ||
3084 | 18 | |||
3085 | 19 | Service::Service(const QDir &directory, const QDBusConnection &systemConnection) : | ||
3086 | 20 | m_directory(directory), m_connection(systemConnection), m_adaptor( | ||
3087 | 21 | new InfographicsAdaptor(this)), m_hash(QCryptographicHash::Sha1) { | ||
3088 | 22 | |||
3089 | 23 | m_dirtyTimer.setSingleShot(true); | ||
3090 | 24 | m_dirtyTimer.setTimerType(Qt::VeryCoarseTimer); | ||
3091 | 25 | connect(&m_dirtyTimer, &QTimer::timeout, this, &Service::timeout); | ||
3092 | 26 | |||
3093 | 27 | m_directory.mkpath("tmp"); | ||
3094 | 28 | m_tempFile.setFileName( | ||
3095 | 29 | QDir(m_directory.filePath("tmp")).filePath("tmp.svg")); | ||
3096 | 30 | |||
3097 | 31 | if (!m_connection.registerObject(DBusPaths::INFOGRAPHIC_DBUS_PATH, this)) { | ||
3098 | 32 | throw std::logic_error( | ||
3099 | 33 | "Unable to register Infographics object on DBus"); | ||
3100 | 34 | } | ||
3101 | 35 | if (!m_connection.registerService(DBusPaths::INFOGRAPHIC_DBUS_NAME)) { | ||
3102 | 36 | throw std::logic_error( | ||
3103 | 37 | "Unable to register Infographics service on DBus"); | ||
3104 | 38 | } | ||
3105 | 39 | } | ||
3106 | 40 | |||
3107 | 41 | Service::~Service() { | ||
3108 | 42 | m_connection.unregisterService(DBusPaths::INFOGRAPHIC_DBUS_NAME); | ||
3109 | 43 | m_connection.unregisterObject(DBusPaths::INFOGRAPHIC_DBUS_PATH); | ||
3110 | 44 | } | ||
3111 | 45 | |||
3112 | 46 | unsigned int Service::uid() { | ||
3113 | 47 | if (!calledFromDBus()) { | ||
3114 | 48 | return 0; | ||
3115 | 49 | } | ||
3116 | 50 | |||
3117 | 51 | return m_connection.interface()->serviceUid(message().service()); | ||
3118 | 52 | } | ||
3119 | 53 | |||
3120 | 54 | QDir Service::userDirectory() { | ||
3121 | 55 | return m_directory.filePath(QString::number(uid())); | ||
3122 | 56 | } | ||
3123 | 57 | |||
3124 | 58 | void Service::clear() { | ||
3125 | 59 | userDirectory().removeRecursively(); | ||
3126 | 60 | } | ||
3127 | 61 | |||
3128 | 62 | void Service::update(const QString &visualizer, const QStringList &sources, | ||
3129 | 63 | const QString &filePath) { | ||
3130 | 64 | |||
3131 | 65 | m_hash.reset(); | ||
3132 | 66 | m_hash.addData(visualizer.toUtf8()); | ||
3133 | 67 | for (const QString &source : sources) { | ||
3134 | 68 | m_hash.addData(source.toUtf8()); | ||
3135 | 69 | } | ||
3136 | 70 | |||
3137 | 71 | QString sha(m_hash.result().toHex()); | ||
3138 | 72 | |||
3139 | 73 | QDir usersDirectory(userDirectory()); | ||
3140 | 74 | QDir infographicDirectory(usersDirectory.filePath(visualizer)); | ||
3141 | 75 | QString destination(infographicDirectory.filePath(sha)); | ||
3142 | 76 | destination.append("-"); | ||
3143 | 77 | destination.append(QString::number(QDateTime::currentMSecsSinceEpoch())); | ||
3144 | 78 | destination.append(".svg"); | ||
3145 | 79 | |||
3146 | 80 | QFile file(filePath); | ||
3147 | 81 | QByteArray ba; | ||
3148 | 82 | if (file.open(QIODevice::ReadOnly)) { | ||
3149 | 83 | ba = file.readAll(); | ||
3150 | 84 | file.close(); | ||
3151 | 85 | } else { | ||
3152 | 86 | qWarning() << "Failed to open file" << filePath; | ||
3153 | 87 | return; | ||
3154 | 88 | } | ||
3155 | 89 | |||
3156 | 90 | if (ba.isEmpty()) { | ||
3157 | 91 | return; | ||
3158 | 92 | } | ||
3159 | 93 | |||
3160 | 94 | usersDirectory.mkpath(visualizer); | ||
3161 | 95 | if (m_tempFile.open(QIODevice::WriteOnly)) { | ||
3162 | 96 | m_tempFile.write(ba); | ||
3163 | 97 | m_tempFile.close(); | ||
3164 | 98 | } else { | ||
3165 | 99 | qWarning() << "Failed to write file" << m_tempFile.fileName(); | ||
3166 | 100 | } | ||
3167 | 101 | |||
3168 | 102 | int result = std::rename(m_tempFile.fileName().toUtf8().constData(), | ||
3169 | 103 | destination.toUtf8().constData()); | ||
3170 | 104 | if (result == -1) { | ||
3171 | 105 | qWarning() << "Failed to move result" << m_tempFile.fileName() | ||
3172 | 106 | << "to destination" << destination; | ||
3173 | 107 | return; | ||
3174 | 108 | } | ||
3175 | 109 | |||
3176 | 110 | // clean up in one minute | ||
3177 | 111 | m_dirty << qMakePair(infographicDirectory.path(), sha + "-*.svg"); | ||
3178 | 112 | m_dirtyTimer.start(60000); | ||
3179 | 113 | } | ||
3180 | 114 | |||
3181 | 115 | void Service::timeout() { | ||
3182 | 116 | for (const QPair<QString, QString> &result : m_dirty) { | ||
3183 | 117 | QDir infographicDirectory(result.first); | ||
3184 | 118 | |||
3185 | 119 | QStringList entries = infographicDirectory.entryList( | ||
3186 | 120 | QStringList() << result.second, | ||
3187 | 121 | QDir::Files | QDir::NoDotAndDotDot, QDir::Name); | ||
3188 | 122 | |||
3189 | 123 | // We don't want to delete the last entry | ||
3190 | 124 | entries.pop_back(); | ||
3191 | 125 | for (const QString &entry : entries) { | ||
3192 | 126 | QFile::remove(infographicDirectory.filePath(entry)); | ||
3193 | 127 | } | ||
3194 | 128 | } | ||
3195 | 129 | |||
3196 | 130 | m_dirty.clear(); | ||
3197 | 131 | } | ||
3198 | 0 | 132 | ||
3199 | === added file 'src/infographicservice/Service.h' | |||
3200 | --- src/infographicservice/Service.h 1970-01-01 00:00:00 +0000 | |||
3201 | +++ src/infographicservice/Service.h 2014-06-25 09:58:07 +0000 | |||
3202 | @@ -0,0 +1,74 @@ | |||
3203 | 1 | /* | ||
3204 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
3205 | 3 | * | ||
3206 | 4 | * This program is free software; you can redistribute it and/or modify | ||
3207 | 5 | * it under the terms of the GNU General Public License as published by | ||
3208 | 6 | * the Free Software Foundation; version 3. | ||
3209 | 7 | * | ||
3210 | 8 | * This program is distributed in the hope that it will be useful, | ||
3211 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3212 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3213 | 11 | * GNU General Public License for more details. | ||
3214 | 12 | * | ||
3215 | 13 | * You should have received a copy of the GNU General Public License | ||
3216 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3217 | 15 | * | ||
3218 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
3219 | 17 | */ | ||
3220 | 18 | |||
3221 | 19 | #ifndef INFOGRAPHICSERVICE_SERVICE_H_ | ||
3222 | 20 | #define INFOGRAPHICSERVICE_SERVICE_H_ | ||
3223 | 21 | |||
3224 | 22 | #include <QCryptographicHash> | ||
3225 | 23 | #include <QDir> | ||
3226 | 24 | #include <QDBusContext> | ||
3227 | 25 | #include <QDBusConnection> | ||
3228 | 26 | #include <QObject> | ||
3229 | 27 | #include <QSet> | ||
3230 | 28 | #include <QSharedPointer> | ||
3231 | 29 | #include <QTimer> | ||
3232 | 30 | |||
3233 | 31 | class InfographicsAdaptor; | ||
3234 | 32 | |||
3235 | 33 | namespace InfographicService { | ||
3236 | 34 | |||
3237 | 35 | class Service: public QObject, protected QDBusContext { | ||
3238 | 36 | Q_OBJECT | ||
3239 | 37 | |||
3240 | 38 | public: | ||
3241 | 39 | Service(const QDir &directory, const QDBusConnection &systemConnection); | ||
3242 | 40 | |||
3243 | 41 | virtual ~Service(); | ||
3244 | 42 | |||
3245 | 43 | public Q_SLOTS: | ||
3246 | 44 | void clear(); | ||
3247 | 45 | |||
3248 | 46 | void update(const QString &visualizer, const QStringList &sources, | ||
3249 | 47 | const QString &file); | ||
3250 | 48 | |||
3251 | 49 | protected Q_SLOTS: | ||
3252 | 50 | void timeout(); | ||
3253 | 51 | |||
3254 | 52 | protected: | ||
3255 | 53 | virtual unsigned int uid(); | ||
3256 | 54 | |||
3257 | 55 | QDir userDirectory(); | ||
3258 | 56 | |||
3259 | 57 | QDir m_directory; | ||
3260 | 58 | |||
3261 | 59 | QFile m_tempFile; | ||
3262 | 60 | |||
3263 | 61 | QDBusConnection m_connection; | ||
3264 | 62 | |||
3265 | 63 | QSharedPointer<InfographicsAdaptor> m_adaptor; | ||
3266 | 64 | |||
3267 | 65 | QTimer m_dirtyTimer; | ||
3268 | 66 | |||
3269 | 67 | QCryptographicHash m_hash; | ||
3270 | 68 | |||
3271 | 69 | QSet<QPair<QString, QString>> m_dirty; | ||
3272 | 70 | }; | ||
3273 | 71 | |||
3274 | 72 | } | ||
3275 | 73 | |||
3276 | 74 | #endif /* INFOGRAPHICSERVICE_SERVICE_H_ */ | ||
3277 | 0 | 75 | ||
3278 | === added file 'src/infographicservice/main.cpp' | |||
3279 | --- src/infographicservice/main.cpp 1970-01-01 00:00:00 +0000 | |||
3280 | +++ src/infographicservice/main.cpp 2014-06-25 09:58:07 +0000 | |||
3281 | @@ -0,0 +1,46 @@ | |||
3282 | 1 | /* | ||
3283 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
3284 | 3 | * | ||
3285 | 4 | * This program is free software; you can redistribute it and/or modify | ||
3286 | 5 | * it under the terms of the GNU General Public License as published by | ||
3287 | 6 | * the Free Software Foundation; version 3. | ||
3288 | 7 | * | ||
3289 | 8 | * This program is distributed in the hope that it will be useful, | ||
3290 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3291 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3292 | 11 | * GNU General Public License for more details. | ||
3293 | 12 | * | ||
3294 | 13 | * You should have received a copy of the GNU General Public License | ||
3295 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3296 | 15 | * | ||
3297 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
3298 | 17 | */ | ||
3299 | 18 | |||
3300 | 19 | #include <infographicservice/Service.h> | ||
3301 | 20 | |||
3302 | 21 | #include <QCoreApplication> | ||
3303 | 22 | #include <QDebug> | ||
3304 | 23 | #include <csignal> | ||
3305 | 24 | |||
3306 | 25 | using namespace InfographicService; | ||
3307 | 26 | |||
3308 | 27 | static void exitQt(int sig) { | ||
3309 | 28 | Q_UNUSED(sig); | ||
3310 | 29 | QCoreApplication::exit(0); | ||
3311 | 30 | } | ||
3312 | 31 | |||
3313 | 32 | int main(int argc, char *argv[]) { | ||
3314 | 33 | QCoreApplication application(argc, argv); | ||
3315 | 34 | |||
3316 | 35 | signal(SIGINT, &exitQt); | ||
3317 | 36 | signal(SIGTERM, &exitQt); | ||
3318 | 37 | |||
3319 | 38 | try { | ||
3320 | 39 | Service service(QDir("/var/lib/usermetrics"), | ||
3321 | 40 | QDBusConnection::systemBus()); | ||
3322 | 41 | return application.exec(); | ||
3323 | 42 | } catch (std::exception &e) { | ||
3324 | 43 | qWarning() << "Infographic Service:" << e.what(); | ||
3325 | 44 | return 1; | ||
3326 | 45 | } | ||
3327 | 46 | } | ||
3328 | 0 | 47 | ||
3329 | === modified file 'src/libusermetricscommon/CMakeLists.txt' | |||
3330 | --- src/libusermetricscommon/CMakeLists.txt 2013-07-17 10:22:05 +0000 | |||
3331 | +++ src/libusermetricscommon/CMakeLists.txt 2014-06-25 09:58:07 +0000 | |||
3332 | @@ -2,36 +2,14 @@ | |||
3333 | 2 | set(USERMETRICS_COMMON_SOURCES | 2 | set(USERMETRICS_COMMON_SOURCES |
3334 | 3 | DateFactory.cpp | 3 | DateFactory.cpp |
3335 | 4 | DateFactoryImpl.cpp | 4 | DateFactoryImpl.cpp |
3337 | 5 | DBusPaths.cpp | 5 | FileUtils.cpp |
3338 | 6 | Localisation.cpp | 6 | Localisation.cpp |
3339 | 7 | ) | 7 | ) |
3340 | 8 | 8 | ||
3367 | 9 | set(USERMETRICS_COMMON_DEPENDENCIES | 9 | qt5_add_dbus_interface( |
3368 | 10 | Core | 10 | USERMETRICS_COMMON_SOURCES |
3369 | 11 | ) | 11 | ${INFOGRAPHIC_SERVICE_XML} |
3370 | 12 | 12 | InfographicsInterface | |
3345 | 13 | qt5_add_dbus_interface( | ||
3346 | 14 | USERMETRICS_COMMON_SOURCES | ||
3347 | 15 | "${DATA_DIR}/com.canonical.UserMetrics.xml" | ||
3348 | 16 | UserMetricsInterface | ||
3349 | 17 | ) | ||
3350 | 18 | |||
3351 | 19 | qt5_add_dbus_interface( | ||
3352 | 20 | USERMETRICS_COMMON_SOURCES | ||
3353 | 21 | "${DATA_DIR}/com.canonical.usermetrics.DataSource.xml" | ||
3354 | 22 | DataSourceInterface | ||
3355 | 23 | ) | ||
3356 | 24 | |||
3357 | 25 | qt5_add_dbus_interface( | ||
3358 | 26 | USERMETRICS_COMMON_SOURCES | ||
3359 | 27 | "${DATA_DIR}/com.canonical.usermetrics.UserData.xml" | ||
3360 | 28 | UserDataInterface | ||
3361 | 29 | ) | ||
3362 | 30 | |||
3363 | 31 | qt5_add_dbus_interface( | ||
3364 | 32 | USERMETRICS_COMMON_SOURCES | ||
3365 | 33 | "${DATA_DIR}/com.canonical.usermetrics.DataSet.xml" | ||
3366 | 34 | DataSetInterface | ||
3371 | 35 | ) | 13 | ) |
3372 | 36 | 14 | ||
3373 | 37 | add_library( | 15 | add_library( |
3374 | @@ -42,6 +20,6 @@ | |||
3375 | 42 | 20 | ||
3376 | 43 | qt5_use_modules( | 21 | qt5_use_modules( |
3377 | 44 | usermetricscommon | 22 | usermetricscommon |
3379 | 45 | ${USERMETRICS_COMMON_DEPENDENCIES} | 23 | Core |
3380 | 24 | DBus | ||
3381 | 46 | ) | 25 | ) |
3382 | 47 | |||
3383 | 48 | 26 | ||
3384 | === removed file 'src/libusermetricscommon/DBusPaths.cpp' | |||
3385 | --- src/libusermetricscommon/DBusPaths.cpp 2013-06-28 09:44:36 +0000 | |||
3386 | +++ src/libusermetricscommon/DBusPaths.cpp 1970-01-01 00:00:00 +0000 | |||
3387 | @@ -1,41 +0,0 @@ | |||
3388 | 1 | /* | ||
3389 | 2 | * Copyright (C) 2013 Canonical, Ltd. | ||
3390 | 3 | * | ||
3391 | 4 | * This library is free software; you can redistribute it and/or modify it under | ||
3392 | 5 | * the terms of version 3 of the GNU Lesser General Public License as published | ||
3393 | 6 | * by the Free Software Foundation. | ||
3394 | 7 | * | ||
3395 | 8 | * This library is distributed in the hope that it will be useful, but WITHOUT | ||
3396 | 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
3397 | 10 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
3398 | 11 | * details. | ||
3399 | 12 | * | ||
3400 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
3401 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3402 | 15 | * | ||
3403 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
3404 | 17 | */ | ||
3405 | 18 | |||
3406 | 19 | #include <libusermetricscommon/DBusPaths.h> | ||
3407 | 20 | |||
3408 | 21 | using namespace UserMetricsCommon; | ||
3409 | 22 | |||
3410 | 23 | QString DBusPaths::serviceName() { | ||
3411 | 24 | return "com.canonical.UserMetrics"; | ||
3412 | 25 | } | ||
3413 | 26 | |||
3414 | 27 | QString DBusPaths::userMetrics() { | ||
3415 | 28 | return "/com/canonical/UserMetrics"; | ||
3416 | 29 | } | ||
3417 | 30 | |||
3418 | 31 | QString DBusPaths::userData(int id) { | ||
3419 | 32 | return QString("/com/canonical/UserMetrics/UserData/%1").arg(id); | ||
3420 | 33 | } | ||
3421 | 34 | |||
3422 | 35 | QString DBusPaths::dataSource(int id) { | ||
3423 | 36 | return QString("/com/canonical/UserMetrics/DataSource/%1").arg(id); | ||
3424 | 37 | } | ||
3425 | 38 | |||
3426 | 39 | QString DBusPaths::dataSet(int id) { | ||
3427 | 40 | return QString("/com/canonical/UserMetrics/DataSet/%1").arg(id); | ||
3428 | 41 | } | ||
3429 | 42 | 0 | ||
3430 | === added file 'src/libusermetricscommon/DBusPaths.h' | |||
3431 | --- src/libusermetricscommon/DBusPaths.h 1970-01-01 00:00:00 +0000 | |||
3432 | +++ src/libusermetricscommon/DBusPaths.h 2014-06-25 09:58:07 +0000 | |||
3433 | @@ -0,0 +1,37 @@ | |||
3434 | 1 | /* | ||
3435 | 2 | * Copyright (C) 2013 Canonical, Ltd. | ||
3436 | 3 | * | ||
3437 | 4 | * This library is free software; you can redistribute it and/or modify it under | ||
3438 | 5 | * the terms of version 3 of the GNU Lesser General Public License as published | ||
3439 | 6 | * by the Free Software Foundation. | ||
3440 | 7 | * | ||
3441 | 8 | * This library is distributed in the hope that it will be useful, but WITHOUT | ||
3442 | 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
3443 | 10 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
3444 | 11 | * details. | ||
3445 | 12 | * | ||
3446 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
3447 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3448 | 15 | * | ||
3449 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
3450 | 17 | */ | ||
3451 | 18 | |||
3452 | 19 | #ifndef USERMETRICSCOMMON_DBUSPATHS_H_ | ||
3453 | 20 | #define USERMETRICSCOMMON_DBUSPATHS_H_ | ||
3454 | 21 | |||
3455 | 22 | #include <QtCore/QString> | ||
3456 | 23 | |||
3457 | 24 | namespace UserMetricsCommon { | ||
3458 | 25 | |||
3459 | 26 | class DBusPaths { | ||
3460 | 27 | public: | ||
3461 | 28 | constexpr static const char* INFOGRAPHIC_DBUS_NAME = | ||
3462 | 29 | "com.canonical.Infographics"; | ||
3463 | 30 | |||
3464 | 31 | constexpr static const char* INFOGRAPHIC_DBUS_PATH = | ||
3465 | 32 | "/com/canonical/Infographics"; | ||
3466 | 33 | }; | ||
3467 | 34 | |||
3468 | 35 | } | ||
3469 | 36 | |||
3470 | 37 | #endif // USERMETRICSCOMMON_DBUSPATHS_H_ | ||
3471 | 0 | 38 | ||
3472 | === removed file 'src/libusermetricscommon/DBusPaths.h' | |||
3473 | --- src/libusermetricscommon/DBusPaths.h 2013-09-24 16:20:00 +0000 | |||
3474 | +++ src/libusermetricscommon/DBusPaths.h 1970-01-01 00:00:00 +0000 | |||
3475 | @@ -1,41 +0,0 @@ | |||
3476 | 1 | /* | ||
3477 | 2 | * Copyright (C) 2013 Canonical, Ltd. | ||
3478 | 3 | * | ||
3479 | 4 | * This library is free software; you can redistribute it and/or modify it under | ||
3480 | 5 | * the terms of version 3 of the GNU Lesser General Public License as published | ||
3481 | 6 | * by the Free Software Foundation. | ||
3482 | 7 | * | ||
3483 | 8 | * This library is distributed in the hope that it will be useful, but WITHOUT | ||
3484 | 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
3485 | 10 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
3486 | 11 | * details. | ||
3487 | 12 | * | ||
3488 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
3489 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3490 | 15 | * | ||
3491 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
3492 | 17 | */ | ||
3493 | 18 | |||
3494 | 19 | #ifndef USERMETRICSCOMMON_DBUSPATHS_H_ | ||
3495 | 20 | #define USERMETRICSCOMMON_DBUSPATHS_H_ | ||
3496 | 21 | |||
3497 | 22 | #include <QtCore/QString> | ||
3498 | 23 | |||
3499 | 24 | namespace UserMetricsCommon { | ||
3500 | 25 | |||
3501 | 26 | class DBusPaths { | ||
3502 | 27 | public: | ||
3503 | 28 | static QString serviceName(); | ||
3504 | 29 | |||
3505 | 30 | static QString userMetrics(); | ||
3506 | 31 | |||
3507 | 32 | static QString userData(int id); | ||
3508 | 33 | |||
3509 | 34 | static QString dataSource(int id); | ||
3510 | 35 | |||
3511 | 36 | static QString dataSet(int id); | ||
3512 | 37 | }; | ||
3513 | 38 | |||
3514 | 39 | } | ||
3515 | 40 | |||
3516 | 41 | #endif // USERMETRICSCOMMON_DBUSPATHS_H_ | ||
3517 | 42 | 0 | ||
3518 | === added file 'src/libusermetricscommon/FileUtils.cpp' | |||
3519 | --- src/libusermetricscommon/FileUtils.cpp 1970-01-01 00:00:00 +0000 | |||
3520 | +++ src/libusermetricscommon/FileUtils.cpp 2014-06-25 09:58:07 +0000 | |||
3521 | @@ -0,0 +1,52 @@ | |||
3522 | 1 | /* | ||
3523 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
3524 | 3 | * | ||
3525 | 4 | * This program is free software; you can redistribute it and/or modify | ||
3526 | 5 | * it under the terms of the GNU General Public License as published by | ||
3527 | 6 | * the Free Software Foundation; version 3. | ||
3528 | 7 | * | ||
3529 | 8 | * This program is distributed in the hope that it will be useful, | ||
3530 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3531 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3532 | 11 | * GNU General Public License for more details. | ||
3533 | 12 | * | ||
3534 | 13 | * You should have received a copy of the GNU General Public License | ||
3535 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3536 | 15 | * | ||
3537 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
3538 | 17 | */ | ||
3539 | 18 | |||
3540 | 19 | #include <libusermetricscommon/FileUtils.h> | ||
3541 | 20 | |||
3542 | 21 | #include <QRegularExpression> | ||
3543 | 22 | |||
3544 | 23 | using namespace UserMetricsCommon; | ||
3545 | 24 | |||
3546 | 25 | QRegularExpression FileUtils::CLICK_REGEX( | ||
3547 | 26 | "^[a-z0-9][a-z0-9+.-]+_[a-zA-Z0-9+.-]+_[0-9][a-zA-Z0-9.+:~-]*$"); | ||
3548 | 27 | |||
3549 | 28 | FileUtils::FileUtils() { | ||
3550 | 29 | } | ||
3551 | 30 | |||
3552 | 31 | FileUtils::~FileUtils() { | ||
3553 | 32 | } | ||
3554 | 33 | |||
3555 | 34 | QStringList FileUtils::listDirectory(const QDir &directory, | ||
3556 | 35 | QDir::Filters filters, QDir::SortFlags sort) { | ||
3557 | 36 | QStringList names; | ||
3558 | 37 | for (const QString& name : directory.entryList( | ||
3559 | 38 | filters | QDir::NoDotAndDotDot, sort)) { | ||
3560 | 39 | names << directory.filePath(name); | ||
3561 | 40 | } | ||
3562 | 41 | return names; | ||
3563 | 42 | } | ||
3564 | 43 | |||
3565 | 44 | void FileUtils::shortApplicationId(QString &applicationId) { | ||
3566 | 45 | QRegularExpressionMatch match = CLICK_REGEX.match(applicationId); | ||
3567 | 46 | if (match.hasMatch()) { | ||
3568 | 47 | int index = applicationId.indexOf('_'); | ||
3569 | 48 | if (index != -1) { | ||
3570 | 49 | applicationId.remove(index, applicationId.size()); | ||
3571 | 50 | } | ||
3572 | 51 | } | ||
3573 | 52 | } | ||
3574 | 0 | 53 | ||
3575 | === added file 'src/libusermetricscommon/FileUtils.h' | |||
3576 | --- src/libusermetricscommon/FileUtils.h 1970-01-01 00:00:00 +0000 | |||
3577 | +++ src/libusermetricscommon/FileUtils.h 2014-06-25 09:58:07 +0000 | |||
3578 | @@ -0,0 +1,47 @@ | |||
3579 | 1 | /* | ||
3580 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
3581 | 3 | * | ||
3582 | 4 | * This program is free software; you can redistribute it and/or modify | ||
3583 | 5 | * it under the terms of the GNU General Public License as published by | ||
3584 | 6 | * the Free Software Foundation; version 3. | ||
3585 | 7 | * | ||
3586 | 8 | * This program is distributed in the hope that it will be useful, | ||
3587 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3588 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3589 | 11 | * GNU General Public License for more details. | ||
3590 | 12 | * | ||
3591 | 13 | * You should have received a copy of the GNU General Public License | ||
3592 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3593 | 15 | * | ||
3594 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
3595 | 17 | */ | ||
3596 | 18 | |||
3597 | 19 | #ifndef USERMETRICSCOMMON_FILEUTILS_H_ | ||
3598 | 20 | #define USERMETRICSCOMMON_FILEUTILS_H_ | ||
3599 | 21 | |||
3600 | 22 | #include <QDir> | ||
3601 | 23 | #include <QSet> | ||
3602 | 24 | #include <QSharedPointer> | ||
3603 | 25 | #include <QStringList> | ||
3604 | 26 | |||
3605 | 27 | namespace UserMetricsCommon { | ||
3606 | 28 | |||
3607 | 29 | class FileUtils { | ||
3608 | 30 | public: | ||
3609 | 31 | typedef QSharedPointer<FileUtils> Ptr; | ||
3610 | 32 | |||
3611 | 33 | FileUtils(); | ||
3612 | 34 | |||
3613 | 35 | virtual ~FileUtils(); | ||
3614 | 36 | |||
3615 | 37 | static QRegularExpression CLICK_REGEX; | ||
3616 | 38 | |||
3617 | 39 | virtual QStringList listDirectory(const QDir &directory, | ||
3618 | 40 | QDir::Filters filters, QDir::SortFlags sort = QDir::NoSort); | ||
3619 | 41 | |||
3620 | 42 | void shortApplicationId(QString &applicationId); | ||
3621 | 43 | }; | ||
3622 | 44 | |||
3623 | 45 | } | ||
3624 | 46 | |||
3625 | 47 | #endif /* USERMETRICSCOMMON_FILEUTILS_H_ */ | ||
3626 | 0 | 48 | ||
3627 | === modified file 'src/libusermetricsinput/CMakeLists.txt' | |||
3628 | --- src/libusermetricsinput/CMakeLists.txt 2013-09-03 14:59:00 +0000 | |||
3629 | +++ src/libusermetricsinput/CMakeLists.txt 2014-06-25 09:58:07 +0000 | |||
3630 | @@ -13,11 +13,13 @@ | |||
3631 | 13 | ) | 13 | ) |
3632 | 14 | 14 | ||
3633 | 15 | set(USERMETRICSINPUT_SOURCES | 15 | set(USERMETRICSINPUT_SOURCES |
3634 | 16 | Factory.cpp | ||
3635 | 16 | Metric.cpp | 17 | Metric.cpp |
3636 | 17 | MetricImpl.cpp | 18 | MetricImpl.cpp |
3637 | 18 | MetricManager.cpp | 19 | MetricManager.cpp |
3638 | 19 | MetricManagerImpl.cpp | 20 | MetricManagerImpl.cpp |
3639 | 20 | MetricManagerImpl.cpp | 21 | MetricManagerImpl.cpp |
3640 | 22 | MetricParameters.cpp | ||
3641 | 21 | MetricUpdate.cpp | 23 | MetricUpdate.cpp |
3642 | 22 | MetricUpdateImpl.cpp | 24 | MetricUpdateImpl.cpp |
3643 | 23 | usermetricsinput.cpp | 25 | usermetricsinput.cpp |
3644 | 24 | 26 | ||
3645 | === added file 'src/libusermetricsinput/Factory.cpp' | |||
3646 | --- src/libusermetricsinput/Factory.cpp 1970-01-01 00:00:00 +0000 | |||
3647 | +++ src/libusermetricsinput/Factory.cpp 2014-06-25 09:58:07 +0000 | |||
3648 | @@ -0,0 +1,48 @@ | |||
3649 | 1 | /* | ||
3650 | 2 | * Copyright (C) 2013 Canonical, Ltd. | ||
3651 | 3 | * | ||
3652 | 4 | * This library is free software; you can redistribute it and/or modify it under | ||
3653 | 5 | * the terms of version 3 of the GNU Lesser General Public License as published | ||
3654 | 6 | * by the Free Software Foundation. | ||
3655 | 7 | * | ||
3656 | 8 | * This library is distributed in the hope that it will be useful, but WITHOUT | ||
3657 | 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
3658 | 10 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
3659 | 11 | * details. | ||
3660 | 12 | * | ||
3661 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
3662 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3663 | 15 | * | ||
3664 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
3665 | 17 | */ | ||
3666 | 18 | |||
3667 | 19 | #include <libusermetricsinput/Factory.h> | ||
3668 | 20 | #include <libusermetricsinput/MetricImpl.h> | ||
3669 | 21 | #include <libusermetricsinput/MetricUpdateImpl.h> | ||
3670 | 22 | |||
3671 | 23 | namespace UserMetricsInput { | ||
3672 | 24 | |||
3673 | 25 | Factory::Factory() { | ||
3674 | 26 | } | ||
3675 | 27 | |||
3676 | 28 | Factory::~Factory() { | ||
3677 | 29 | } | ||
3678 | 30 | |||
3679 | 31 | MetricPtr Factory::newMetric(const QDir &metricsDirectory, | ||
3680 | 32 | const MetricParameters ¶meters, Factory::Ptr factory) { | ||
3681 | 33 | QSharedPointer<MetricImpl> metric( | ||
3682 | 34 | new MetricImpl(metricsDirectory, parameters, factory)); | ||
3683 | 35 | metric->setSelf(metric); | ||
3684 | 36 | return metric; | ||
3685 | 37 | } | ||
3686 | 38 | |||
3687 | 39 | MetricUpdatePtr Factory::newMetricUpdate(MetricPtr metric) { | ||
3688 | 40 | return MetricUpdatePtr( | ||
3689 | 41 | new MetricUpdateImpl(metric.staticCast<MetricImpl>())); | ||
3690 | 42 | } | ||
3691 | 43 | |||
3692 | 44 | QDate Factory::currentDate() const { | ||
3693 | 45 | return QDate::currentDate(); | ||
3694 | 46 | } | ||
3695 | 47 | |||
3696 | 48 | } | ||
3697 | 0 | 49 | ||
3698 | === added file 'src/libusermetricsinput/Factory.h' | |||
3699 | --- src/libusermetricsinput/Factory.h 1970-01-01 00:00:00 +0000 | |||
3700 | +++ src/libusermetricsinput/Factory.h 2014-06-25 09:58:07 +0000 | |||
3701 | @@ -0,0 +1,47 @@ | |||
3702 | 1 | /* | ||
3703 | 2 | * Copyright (C) 2013 Canonical, Ltd. | ||
3704 | 3 | * | ||
3705 | 4 | * This library is free software; you can redistribute it and/or modify it under | ||
3706 | 5 | * the terms of version 3 of the GNU Lesser General Public License as published | ||
3707 | 6 | * by the Free Software Foundation. | ||
3708 | 7 | * | ||
3709 | 8 | * This library is distributed in the hope that it will be useful, but WITHOUT | ||
3710 | 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
3711 | 10 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
3712 | 11 | * details. | ||
3713 | 12 | * | ||
3714 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
3715 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3716 | 15 | * | ||
3717 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
3718 | 17 | */ | ||
3719 | 18 | |||
3720 | 19 | #ifndef USERMETRICSINPUT_FACTORY_H_ | ||
3721 | 20 | #define USERMETRICSINPUT_FACTORY_H_ | ||
3722 | 21 | |||
3723 | 22 | #include <libusermetricsinput/MetricParameters.h> | ||
3724 | 23 | |||
3725 | 24 | #include <QtCore/QDir> | ||
3726 | 25 | #include <QtCore/QSharedPointer> | ||
3727 | 26 | |||
3728 | 27 | namespace UserMetricsInput { | ||
3729 | 28 | |||
3730 | 29 | class Factory { | ||
3731 | 30 | public: | ||
3732 | 31 | typedef QSharedPointer<Factory> Ptr; | ||
3733 | 32 | |||
3734 | 33 | Factory(); | ||
3735 | 34 | |||
3736 | 35 | virtual ~Factory(); | ||
3737 | 36 | |||
3738 | 37 | virtual MetricPtr newMetric(const QDir &metricsDirectory, | ||
3739 | 38 | const MetricParameters ¶meters, Factory::Ptr factory); | ||
3740 | 39 | |||
3741 | 40 | virtual MetricUpdatePtr newMetricUpdate(MetricPtr metric); | ||
3742 | 41 | |||
3743 | 42 | virtual QDate currentDate() const; | ||
3744 | 43 | }; | ||
3745 | 44 | |||
3746 | 45 | } | ||
3747 | 46 | |||
3748 | 47 | #endif /* USERMETRICSINPUT_FACTORY_H_ */ | ||
3749 | 0 | 48 | ||
3750 | === modified file 'src/libusermetricsinput/Metric.h' | |||
3751 | --- src/libusermetricsinput/Metric.h 2013-09-03 14:59:00 +0000 | |||
3752 | +++ src/libusermetricsinput/Metric.h 2014-06-25 09:58:07 +0000 | |||
3753 | @@ -68,7 +68,7 @@ | |||
3754 | 68 | * The MetricUpdate object must be deleted - this is when the | 68 | * The MetricUpdate object must be deleted - this is when the |
3755 | 69 | * actual update will be sent to the storage service. | 69 | * actual update will be sent to the storage service. |
3756 | 70 | */ | 70 | */ |
3758 | 71 | virtual MetricUpdate * update(const QString &username = "") = 0; | 71 | virtual MetricUpdatePtr update(const QString &username = "") = 0; |
3759 | 72 | 72 | ||
3760 | 73 | /** | 73 | /** |
3761 | 74 | * @brief Update the "today" value for a simple user metric | 74 | * @brief Update the "today" value for a simple user metric |
3762 | 75 | 75 | ||
3763 | === modified file 'src/libusermetricsinput/MetricImpl.cpp' | |||
3764 | --- src/libusermetricsinput/MetricImpl.cpp 2013-09-24 16:20:00 +0000 | |||
3765 | +++ src/libusermetricsinput/MetricImpl.cpp 2014-06-25 09:58:07 +0000 | |||
3766 | @@ -17,99 +17,252 @@ | |||
3767 | 17 | */ | 17 | */ |
3768 | 18 | 18 | ||
3769 | 19 | #include <stdexcept> | 19 | #include <stdexcept> |
3770 | 20 | #include <cstdio> | ||
3771 | 20 | 21 | ||
3772 | 22 | #include <libusermetricscommon/Localisation.h> | ||
3773 | 21 | #include <libusermetricsinput/MetricImpl.h> | 23 | #include <libusermetricsinput/MetricImpl.h> |
3774 | 22 | #include <libusermetricsinput/MetricUpdateImpl.h> | ||
3775 | 23 | #include <libusermetricscommon/DBusPaths.h> | ||
3776 | 24 | #include <libusermetricscommon/UserDataInterface.h> | ||
3777 | 25 | #include <libusermetricscommon/DataSetInterface.h> | ||
3778 | 26 | 24 | ||
3780 | 27 | #include <QtDBus/QtDBus> | 25 | #include <QtCore/QDebug> |
3781 | 26 | #include <QtCore/QVariantList> | ||
3782 | 27 | #include <QtCore/QJsonDocument> | ||
3783 | 28 | #include <QtCore/QJsonParseError> | ||
3784 | 28 | 29 | ||
3785 | 29 | using namespace std; | 30 | using namespace std; |
3786 | 30 | using namespace UserMetricsCommon; | ||
3787 | 31 | using namespace UserMetricsInput; | 31 | using namespace UserMetricsInput; |
3788 | 32 | 32 | ||
3791 | 33 | MetricImpl::MetricImpl(const QString &dataSourceId, const QString &formatString, | 33 | MetricImpl::MetricImpl(const QDir &metricDirectory, |
3792 | 34 | const QString &dataSourcePath, const QDBusConnection &dbusConnection, | 34 | const MetricParameters ¶meters, Factory::Ptr factory, |
3793 | 35 | QObject *parent) : | 35 | QObject *parent) : |
3799 | 36 | Metric(parent), m_dbusConnection(dbusConnection), m_userMetrics( | 36 | Metric(parent), m_metricDirectory(metricDirectory), m_parameters( |
3800 | 37 | DBusPaths::serviceName(), DBusPaths::userMetrics(), | 37 | parameters), m_factory(factory) { |
3796 | 38 | dbusConnection), m_dataSource(DBusPaths::serviceName(), | ||
3797 | 39 | dataSourcePath, dbusConnection), m_dataSourceId(dataSourceId), m_formatString( | ||
3798 | 40 | formatString) { | ||
3801 | 41 | } | 38 | } |
3802 | 42 | 39 | ||
3803 | 43 | MetricImpl::~MetricImpl() { | 40 | MetricImpl::~MetricImpl() { |
3804 | 44 | } | 41 | } |
3805 | 45 | 42 | ||
3847 | 46 | QDBusObjectPath MetricImpl::createDataSet(const QString &usernameIn) { | 43 | void MetricImpl::setSelf(QSharedPointer<MetricImpl> self) { |
3848 | 47 | QString username; | 44 | m_self = self; |
3849 | 48 | if (m_dataSource.metricType() == MetricType::SYSTEM) { | 45 | } |
3850 | 49 | username = ""; | 46 | |
3851 | 50 | } else if (usernameIn.isEmpty()) { | 47 | void MetricImpl::setParameters(const MetricParameters ¶meters) { |
3852 | 51 | username = QString::fromUtf8(qgetenv("USER")); | 48 | m_parameters = parameters; |
3853 | 52 | } else { | 49 | } |
3854 | 53 | username = usernameIn; | 50 | |
3855 | 54 | } | 51 | MetricUpdatePtr MetricImpl::update(const QString &username) { |
3856 | 55 | 52 | Q_UNUSED(username); | |
3857 | 56 | QDBusPendingReply<QDBusObjectPath> userDataReply( | 53 | loadData(); |
3858 | 57 | m_userMetrics.createUserData(username)); | 54 | return m_factory->newMetricUpdate(m_self); |
3818 | 58 | |||
3819 | 59 | userDataReply.waitForFinished(); | ||
3820 | 60 | if (userDataReply.isError()) { | ||
3821 | 61 | throw logic_error(userDataReply.error().message().toStdString()); | ||
3822 | 62 | } | ||
3823 | 63 | |||
3824 | 64 | QDBusObjectPath userDataPath(userDataReply); | ||
3825 | 65 | |||
3826 | 66 | com::canonical::usermetrics::UserData userDataInterface( | ||
3827 | 67 | DBusPaths::serviceName(), userDataPath.path(), m_dbusConnection); | ||
3828 | 68 | if (!userDataInterface.isValid()) { | ||
3829 | 69 | throw logic_error("user data interface invalid"); | ||
3830 | 70 | } | ||
3831 | 71 | |||
3832 | 72 | QDBusPendingReply<QDBusObjectPath> dataSetReply( | ||
3833 | 73 | userDataInterface.createDataSet(m_dataSourceId)); | ||
3834 | 74 | |||
3835 | 75 | dataSetReply.waitForFinished(); | ||
3836 | 76 | if (dataSetReply.isError()) { | ||
3837 | 77 | throw logic_error(dataSetReply.error().message().toStdString()); | ||
3838 | 78 | } | ||
3839 | 79 | |||
3840 | 80 | return dataSetReply; | ||
3841 | 81 | } | ||
3842 | 82 | |||
3843 | 83 | MetricUpdate * MetricImpl::update(const QString &username) { | ||
3844 | 84 | QDBusObjectPath dataSetPath(createDataSet(username)); | ||
3845 | 85 | |||
3846 | 86 | return new MetricUpdateImpl(dataSetPath.path(), m_dbusConnection); | ||
3859 | 87 | } | 55 | } |
3860 | 88 | 56 | ||
3861 | 89 | void MetricImpl::update(double value, const QString &username) { | 57 | void MetricImpl::update(double value, const QString &username) { |
3873 | 90 | QDBusObjectPath dataSetPath(createDataSet(username)); | 58 | Q_UNUSED(username); |
3874 | 91 | 59 | loadData(); | |
3875 | 92 | com::canonical::usermetrics::DataSet dataSetInterface( | 60 | update(QVariantList() << value); |
3865 | 93 | DBusPaths::serviceName(), dataSetPath.path(), m_dbusConnection); | ||
3866 | 94 | |||
3867 | 95 | QDBusPendingReply<> reply(dataSetInterface.update(QVariantList() << value)); | ||
3868 | 96 | |||
3869 | 97 | reply.waitForFinished(); | ||
3870 | 98 | if (reply.isError()) { | ||
3871 | 99 | throw logic_error(reply.error().message().toStdString()); | ||
3872 | 100 | } | ||
3876 | 101 | } | 61 | } |
3877 | 102 | 62 | ||
3878 | 103 | void MetricImpl::increment(double amount, const QString &username) { | 63 | void MetricImpl::increment(double amount, const QString &username) { |
3889 | 104 | QDBusObjectPath dataSetPath(createDataSet(username)); | 64 | Q_UNUSED(username); |
3890 | 105 | 65 | loadData(); | |
3891 | 106 | com::canonical::usermetrics::DataSet dataSetInterface( | 66 | |
3892 | 107 | DBusPaths::serviceName(), dataSetPath.path(), m_dbusConnection); | 67 | QVariantList data; |
3893 | 108 | 68 | ||
3894 | 109 | QDBusPendingReply<> reply(dataSetInterface.increment(amount)); | 69 | QDate currentDate(m_factory->currentDate()); |
3895 | 110 | 70 | if (m_lastUpdated == currentDate && !m_currentData.empty()) { | |
3896 | 111 | reply.waitForFinished(); | 71 | double value(m_currentData.first().toDouble()); |
3897 | 112 | if (reply.isError()) { | 72 | value += amount; |
3898 | 113 | throw logic_error(reply.error().message().toStdString()); | 73 | data << value; |
3899 | 74 | } else { | ||
3900 | 75 | data << amount; | ||
3901 | 76 | } | ||
3902 | 77 | |||
3903 | 78 | update(data); | ||
3904 | 79 | } | ||
3905 | 80 | |||
3906 | 81 | void MetricImpl::update(const QVariantList &data) { | ||
3907 | 82 | QDate currentDate(m_factory->currentDate()); | ||
3908 | 83 | int daysSinceLastUpdate(m_lastUpdated.daysTo(currentDate)); | ||
3909 | 84 | |||
3910 | 85 | QVariantList newData(data); | ||
3911 | 86 | |||
3912 | 87 | // if we are in this situation we do nothing | ||
3913 | 88 | // new: |4|5|6|7|8|9|0| | ||
3914 | 89 | // old: |1|2|3| | ||
3915 | 90 | // res: |4|5|6|7|8|9|0| | ||
3916 | 91 | if (daysSinceLastUpdate + m_currentData.size() > newData.size()) { | ||
3917 | 92 | if (daysSinceLastUpdate < newData.size()) { | ||
3918 | 93 | // if we are in this situation - we need the | ||
3919 | 94 | // protruding data from old | ||
3920 | 95 | // new: |6|7|8|9|0| | ||
3921 | 96 | // old: |1|2|3|4|5| | ||
3922 | 97 | // res: |6|7|8|9|0|4|5| | ||
3923 | 98 | auto oldDataIt(m_currentData.constBegin()); | ||
3924 | 99 | // wind forward until the data we want | ||
3925 | 100 | for (int i(daysSinceLastUpdate); i < newData.size(); ++i) { | ||
3926 | 101 | ++oldDataIt; | ||
3927 | 102 | } | ||
3928 | 103 | // append the rest of the data | ||
3929 | 104 | for (; oldDataIt != m_currentData.constEnd(); ++oldDataIt) { | ||
3930 | 105 | newData.append(*oldDataIt); | ||
3931 | 106 | } | ||
3932 | 107 | } else { | ||
3933 | 108 | // we are in this situation - there is a gap | ||
3934 | 109 | // and we want the whole of the old data appending | ||
3935 | 110 | // new: |6|7|8|9|0| | ||
3936 | 111 | // old: |1|2|3|4|5| | ||
3937 | 112 | // res: |6|7|8|9|0|n|1|2|3|4|5| | ||
3938 | 113 | const int daysToPad(daysSinceLastUpdate - newData.size()); | ||
3939 | 114 | // pad the data will null variants | ||
3940 | 115 | for (int i(0); i < daysToPad; ++i) { | ||
3941 | 116 | newData.append(QVariant()); | ||
3942 | 117 | } | ||
3943 | 118 | // append the whole of the old data | ||
3944 | 119 | newData.append(m_currentData); | ||
3945 | 120 | } | ||
3946 | 121 | } | ||
3947 | 122 | |||
3948 | 123 | while (newData.size() > 62) { | ||
3949 | 124 | newData.pop_back(); | ||
3950 | 125 | } | ||
3951 | 126 | |||
3952 | 127 | m_lastUpdated = currentDate; | ||
3953 | 128 | m_currentData = newData; | ||
3954 | 129 | scaleData(); | ||
3955 | 130 | writeData(); | ||
3956 | 131 | } | ||
3957 | 132 | |||
3958 | 133 | void MetricImpl::scaleData() { | ||
3959 | 134 | m_scaledData = m_currentData; | ||
3960 | 135 | |||
3961 | 136 | const QVariantMap &options(m_parameters.options()); | ||
3962 | 137 | |||
3963 | 138 | bool hasMinimum(options.contains("minimum")); | ||
3964 | 139 | bool hasMaximum(options.contains("maximum")); | ||
3965 | 140 | |||
3966 | 141 | double min(numeric_limits<double>::max()); | ||
3967 | 142 | double max(numeric_limits<double>::min()); | ||
3968 | 143 | |||
3969 | 144 | if (hasMinimum) { | ||
3970 | 145 | min = options["minimum"].toDouble(); | ||
3971 | 146 | } | ||
3972 | 147 | if (hasMaximum) { | ||
3973 | 148 | max = options["maximum"].toDouble(); | ||
3974 | 149 | } | ||
3975 | 150 | |||
3976 | 151 | // if we need to find either the max or the min | ||
3977 | 152 | if (!hasMinimum || !hasMaximum) { | ||
3978 | 153 | for (QVariant &variant : m_scaledData) { | ||
3979 | 154 | if (variant.type() == QVariant::String) { | ||
3980 | 155 | variant = QVariant(); | ||
3981 | 156 | } else if (variant.type() == QVariant::Double) { | ||
3982 | 157 | double value(variant.toDouble()); | ||
3983 | 158 | if (!hasMinimum && value < min) { | ||
3984 | 159 | min = value; | ||
3985 | 160 | } | ||
3986 | 161 | if (!hasMaximum && value > max) { | ||
3987 | 162 | max = value; | ||
3988 | 163 | } | ||
3989 | 164 | } | ||
3990 | 165 | } | ||
3991 | 166 | } | ||
3992 | 167 | |||
3993 | 168 | for (QVariant &variant : m_scaledData) { | ||
3994 | 169 | if (variant.type() == QVariant::Double) { | ||
3995 | 170 | if (min != max) { | ||
3996 | 171 | double value(variant.toDouble()); | ||
3997 | 172 | if (hasMaximum && value > max) { | ||
3998 | 173 | value = max; | ||
3999 | 174 | } | ||
4000 | 175 | if (hasMinimum && value < min) { | ||
4001 | 176 | value = min; | ||
4002 | 177 | } | ||
4003 | 178 | variant = (value - min) / (max - min); | ||
4004 | 179 | } else { | ||
4005 | 180 | variant = 0.5; | ||
4006 | 181 | } | ||
4007 | 182 | } | ||
4008 | 183 | } | ||
4009 | 184 | } | ||
4010 | 185 | |||
4011 | 186 | QString MetricImpl::buildJsonFile() { | ||
4012 | 187 | return m_metricDirectory.filePath( | ||
4013 | 188 | m_parameters.id() + ".libusermetrics.json"); | ||
4014 | 189 | } | ||
4015 | 190 | |||
4016 | 191 | QString MetricImpl::buildTmpFile() { | ||
4017 | 192 | return QDir(m_metricDirectory.filePath(".tmp")).filePath( | ||
4018 | 193 | "." + m_parameters.id() + ".libusermetrics.json"); | ||
4019 | 194 | } | ||
4020 | 195 | |||
4021 | 196 | void MetricImpl::loadData() { | ||
4022 | 197 | if (m_parameters.type() == MetricType::SYSTEM) { | ||
4023 | 198 | // qDebug() << "we'd like to do something different with"; | ||
4024 | 199 | } | ||
4025 | 200 | |||
4026 | 201 | QVariantList existingData; | ||
4027 | 202 | |||
4028 | 203 | QFile jsonFile(buildJsonFile()); | ||
4029 | 204 | if (jsonFile.open(QIODevice::ReadOnly)) { | ||
4030 | 205 | QJsonParseError error; | ||
4031 | 206 | QJsonDocument document( | ||
4032 | 207 | QJsonDocument::fromJson(jsonFile.readAll(), &error)); | ||
4033 | 208 | jsonFile.close(); | ||
4034 | 209 | QVariantMap map(document.toVariant().toMap()); | ||
4035 | 210 | // There's no point reading the rest of the information. | ||
4036 | 211 | // We'll just overwrite it anyway. | ||
4037 | 212 | m_currentData = map["data"].toList(); | ||
4038 | 213 | m_lastUpdated = map["lastUpdated"].toDate(); | ||
4039 | 214 | } | ||
4040 | 215 | } | ||
4041 | 216 | |||
4042 | 217 | QString MetricImpl::label() const { | ||
4043 | 218 | if (m_currentData.isEmpty() || m_currentData.first().isNull() | ||
4044 | 219 | || m_parameters.formatString().isEmpty() | ||
4045 | 220 | || m_factory->currentDate() != m_lastUpdated) { | ||
4046 | 221 | const QString &emptyDataString = m_parameters.emptyDataString(); | ||
4047 | 222 | if (emptyDataString.isEmpty()) { | ||
4048 | 223 | QString empty(_("No data for today")); | ||
4049 | 224 | empty.append(" ("); | ||
4050 | 225 | empty.append(m_parameters.id()); | ||
4051 | 226 | empty.append(")"); | ||
4052 | 227 | return empty; | ||
4053 | 228 | } else { | ||
4054 | 229 | return emptyDataString; | ||
4055 | 230 | } | ||
4056 | 231 | } | ||
4057 | 232 | |||
4058 | 233 | return QString(_(qPrintable(m_parameters.formatString()))).arg( | ||
4059 | 234 | m_currentData.first().toString()); | ||
4060 | 235 | } | ||
4061 | 236 | |||
4062 | 237 | void MetricImpl::writeData() { | ||
4063 | 238 | QVariantMap root; | ||
4064 | 239 | root["lastUpdated"] = m_lastUpdated; | ||
4065 | 240 | root["data"] = m_currentData; | ||
4066 | 241 | root["scaledData"] = m_scaledData; | ||
4067 | 242 | root["id"] = m_parameters.id(); | ||
4068 | 243 | root["label"] = label(); | ||
4069 | 244 | root["formatString"] = m_parameters.formatString(); | ||
4070 | 245 | root["emptyDataString"] = m_parameters.emptyDataString(); | ||
4071 | 246 | root["textDomain"] = m_parameters.textDomain(); | ||
4072 | 247 | root["options"] = m_parameters.options(); | ||
4073 | 248 | |||
4074 | 249 | QJsonDocument document(QJsonDocument::fromVariant(root)); | ||
4075 | 250 | |||
4076 | 251 | m_metricDirectory.mkpath(".tmp"); | ||
4077 | 252 | QFile tmpFile(buildTmpFile()); | ||
4078 | 253 | if (tmpFile.open(QIODevice::WriteOnly)) { | ||
4079 | 254 | tmpFile.write(document.toJson()); | ||
4080 | 255 | tmpFile.close(); | ||
4081 | 256 | } else { | ||
4082 | 257 | qWarning() << "Could not write usermetrics file" << tmpFile.fileName(); | ||
4083 | 258 | return; | ||
4084 | 259 | } | ||
4085 | 260 | |||
4086 | 261 | QString jsonFile(buildJsonFile()); | ||
4087 | 262 | int result = std::rename(tmpFile.fileName().toUtf8().constData(), | ||
4088 | 263 | jsonFile.toUtf8().constData()); | ||
4089 | 264 | if (result == -1) { | ||
4090 | 265 | qWarning() << "Failed to move result" << tmpFile.fileName() | ||
4091 | 266 | << "to destination" << jsonFile; | ||
4092 | 114 | } | 267 | } |
4093 | 115 | } | 268 | } |
4094 | 116 | 269 | ||
4095 | === modified file 'src/libusermetricsinput/MetricImpl.h' | |||
4096 | --- src/libusermetricsinput/MetricImpl.h 2013-09-03 14:59:00 +0000 | |||
4097 | +++ src/libusermetricsinput/MetricImpl.h 2014-06-25 09:58:07 +0000 | |||
4098 | @@ -19,42 +19,65 @@ | |||
4099 | 19 | #ifndef USERMETRICSINPUT_METRICIMPL_H_ | 19 | #ifndef USERMETRICSINPUT_METRICIMPL_H_ |
4100 | 20 | #define USERMETRICSINPUT_METRICIMPL_H_ | 20 | #define USERMETRICSINPUT_METRICIMPL_H_ |
4101 | 21 | 21 | ||
4105 | 22 | #include <libusermetricsinput/Metric.h> | 22 | #include <libusermetricsinput/Factory.h> |
4106 | 23 | #include <libusermetricscommon/UserMetricsInterface.h> | 23 | #include <libusermetricsinput/MetricImpl.h> |
4107 | 24 | #include <libusermetricscommon/DataSourceInterface.h> | 24 | #include <libusermetricsinput/MetricParameters.h> |
4108 | 25 | 25 | ||
4110 | 26 | #include <QtCore/QObject> | 26 | #include <QtCore/QDir> |
4111 | 27 | #include <QtCore/QDate> | ||
4112 | 27 | #include <QtCore/QString> | 28 | #include <QtCore/QString> |
4113 | 28 | #include <QtDBus/QtDBus> | ||
4114 | 29 | 29 | ||
4115 | 30 | namespace UserMetricsInput { | 30 | namespace UserMetricsInput { |
4116 | 31 | 31 | ||
4117 | 32 | class MetricImpl: public Metric { | 32 | class MetricImpl: public Metric { |
4118 | 33 | public: | 33 | public: |
4122 | 34 | explicit MetricImpl(const QString &dataSourceId, | 34 | typedef QSharedPointer<MetricImpl> Ptr; |
4123 | 35 | const QString &formatString, const QString &dataSourcePath, | 35 | |
4124 | 36 | const QDBusConnection &dbusConnection, QObject *parent = 0); | 36 | explicit MetricImpl(const QDir &metriccDirectory, |
4125 | 37 | const MetricParameters ¶meters, | ||
4126 | 38 | Factory::Ptr factory, | ||
4127 | 39 | QObject *parent = 0); | ||
4128 | 37 | 40 | ||
4129 | 38 | virtual ~MetricImpl(); | 41 | virtual ~MetricImpl(); |
4130 | 39 | 42 | ||
4132 | 40 | virtual MetricUpdate * update(const QString &username = ""); | 43 | virtual MetricUpdatePtr update(const QString &username = ""); |
4133 | 41 | 44 | ||
4134 | 42 | virtual void update(double value, const QString &username = ""); | 45 | virtual void update(double value, const QString &username = ""); |
4135 | 43 | 46 | ||
4136 | 44 | virtual void increment(double amount = 1.0f, const QString &username = ""); | 47 | virtual void increment(double amount = 1.0f, const QString &username = ""); |
4137 | 45 | 48 | ||
4138 | 49 | void setParameters(const MetricParameters ¶meters); | ||
4139 | 50 | |||
4140 | 51 | void setSelf(QSharedPointer<MetricImpl> self); | ||
4141 | 52 | |||
4142 | 53 | void update(const QVariantList &data); | ||
4143 | 54 | |||
4144 | 46 | protected: | 55 | protected: |
4156 | 47 | virtual QDBusObjectPath createDataSet(const QString &usernameIn); | 56 | QString label() const; |
4157 | 48 | 57 | ||
4158 | 49 | QDBusConnection m_dbusConnection; | 58 | void scaleData(); |
4159 | 50 | 59 | ||
4160 | 51 | com::canonical::UserMetrics m_userMetrics; | 60 | void loadData(); |
4161 | 52 | 61 | ||
4162 | 53 | com::canonical::usermetrics::DataSource m_dataSource; | 62 | void writeData(); |
4163 | 54 | 63 | ||
4164 | 55 | QString m_dataSourceId; | 64 | QString buildJsonFile(); |
4165 | 56 | 65 | ||
4166 | 57 | QString m_formatString; | 66 | QString buildTmpFile(); |
4167 | 67 | |||
4168 | 68 | QDir m_metricDirectory; | ||
4169 | 69 | |||
4170 | 70 | MetricParameters m_parameters; | ||
4171 | 71 | |||
4172 | 72 | Factory::Ptr m_factory; | ||
4173 | 73 | |||
4174 | 74 | QWeakPointer<MetricImpl> m_self; | ||
4175 | 75 | |||
4176 | 76 | QVariantList m_currentData; | ||
4177 | 77 | |||
4178 | 78 | QVariantList m_scaledData; | ||
4179 | 79 | |||
4180 | 80 | QDate m_lastUpdated; | ||
4181 | 58 | }; | 81 | }; |
4182 | 59 | 82 | ||
4183 | 60 | } | 83 | } |
4184 | 61 | 84 | ||
4185 | === modified file 'src/libusermetricsinput/MetricManager.cpp' | |||
4186 | --- src/libusermetricsinput/MetricManager.cpp 2013-07-02 14:26:11 +0000 | |||
4187 | +++ src/libusermetricsinput/MetricManager.cpp 2014-06-25 09:58:07 +0000 | |||
4188 | @@ -17,28 +17,22 @@ | |||
4189 | 17 | */ | 17 | */ |
4190 | 18 | 18 | ||
4191 | 19 | #include <libusermetricsinput/MetricManagerImpl.h> | 19 | #include <libusermetricsinput/MetricManagerImpl.h> |
4192 | 20 | #include <libusermetricscommon/DBusPaths.h> | ||
4193 | 21 | #include <QtDBus/QtDBus> | ||
4194 | 22 | 20 | ||
4195 | 23 | using namespace UserMetricsCommon; | ||
4196 | 24 | using namespace UserMetricsInput; | 21 | using namespace UserMetricsInput; |
4197 | 25 | 22 | ||
4198 | 26 | MetricManager::MetricManager(QObject *parent) : | 23 | MetricManager::MetricManager(QObject *parent) : |
4199 | 27 | QObject(parent) { | 24 | QObject(parent) { |
4200 | 28 | |||
4201 | 29 | } | 25 | } |
4202 | 30 | 26 | ||
4203 | 31 | MetricManager::~MetricManager() { | 27 | MetricManager::~MetricManager() { |
4204 | 32 | } | 28 | } |
4205 | 33 | 29 | ||
4206 | 34 | MetricManager * MetricManager::getInstance() { | 30 | MetricManager * MetricManager::getInstance() { |
4216 | 35 | QDBusConnection dbusConnection(QDBusConnection::systemBus()); | 31 | return getInstance(qgetenv("APP_ID")); |
4217 | 36 | 32 | } | |
4218 | 37 | QDBusConnectionInterface* interface = dbusConnection.interface(); | 33 | |
4219 | 38 | if (!interface->isServiceRegistered(DBusPaths::serviceName())) { | 34 | MetricManager * MetricManager::getInstance(const QString &appId) { |
4220 | 39 | QDBusReply<void> reply( | 35 | Factory::Ptr factory(new Factory()); |
4221 | 40 | interface->startService(DBusPaths::serviceName())); | 36 | return new MetricManagerImpl(factory, QDir::home().filePath(".cache"), |
4222 | 41 | } | 37 | appId); |
4214 | 42 | |||
4215 | 43 | return new MetricManagerImpl(dbusConnection); | ||
4223 | 44 | } | 38 | } |
4224 | 45 | 39 | ||
4225 | === modified file 'src/libusermetricsinput/MetricManager.h' | |||
4226 | --- src/libusermetricsinput/MetricManager.h 2013-09-03 14:59:00 +0000 | |||
4227 | +++ src/libusermetricsinput/MetricManager.h 2014-06-25 09:58:07 +0000 | |||
4228 | @@ -20,6 +20,7 @@ | |||
4229 | 20 | #define USERMETRICSINPUT_METRICMANAGER_H_ | 20 | #define USERMETRICSINPUT_METRICMANAGER_H_ |
4230 | 21 | 21 | ||
4231 | 22 | #include <libusermetricsinput/Metric.h> | 22 | #include <libusermetricsinput/Metric.h> |
4232 | 23 | #include <libusermetricsinput/MetricParameters.h> | ||
4233 | 23 | 24 | ||
4234 | 24 | /** | 25 | /** |
4235 | 25 | * @{ | 26 | * @{ |
4236 | @@ -31,35 +32,12 @@ | |||
4237 | 31 | namespace UserMetricsInput { | 32 | namespace UserMetricsInput { |
4238 | 32 | 33 | ||
4239 | 33 | class MetricManager; | 34 | class MetricManager; |
4240 | 34 | class MetricParametersPrivate; | ||
4241 | 35 | 35 | ||
4242 | 36 | /** | 36 | /** |
4243 | 37 | * @brief Shared pointer for the MetricManager | 37 | * @brief Shared pointer for the MetricManager |
4244 | 38 | **/ | 38 | **/ |
4245 | 39 | typedef QScopedPointer<MetricManager> MetricManagerPtr; | 39 | typedef QScopedPointer<MetricManager> MetricManagerPtr; |
4246 | 40 | 40 | ||
4247 | 41 | class Q_DECL_EXPORT MetricParameters { | ||
4248 | 42 | public: | ||
4249 | 43 | |||
4250 | 44 | explicit MetricParameters(const QString &dataSourceId); | ||
4251 | 45 | |||
4252 | 46 | MetricParameters & formatString(const QString &formatString); | ||
4253 | 47 | |||
4254 | 48 | MetricParameters & emptyDataString(const QString &emptyDataString); | ||
4255 | 49 | |||
4256 | 50 | MetricParameters & textDomain(const QString &textDomain); | ||
4257 | 51 | |||
4258 | 52 | MetricParameters & minimum(double minimum); | ||
4259 | 53 | |||
4260 | 54 | MetricParameters & maximum(double maximum); | ||
4261 | 55 | |||
4262 | 56 | MetricParameters & type(MetricType type); | ||
4263 | 57 | |||
4264 | 58 | virtual ~MetricParameters(); | ||
4265 | 59 | |||
4266 | 60 | QScopedPointer<MetricParametersPrivate> p; | ||
4267 | 61 | }; | ||
4268 | 62 | |||
4269 | 63 | /** | 41 | /** |
4270 | 64 | * @brief Central place for registering and updating user metrics. | 42 | * @brief Central place for registering and updating user metrics. |
4271 | 65 | * | 43 | * |
4272 | @@ -86,6 +64,13 @@ | |||
4273 | 86 | static MetricManager * getInstance(); | 64 | static MetricManager * getInstance(); |
4274 | 87 | 65 | ||
4275 | 88 | /** | 66 | /** |
4276 | 67 | * @brief Gets a new instance of the MetricManager with a specified APP_ID. | ||
4277 | 68 | * | ||
4278 | 69 | * If you want a singleton instance then hold onto this. | ||
4279 | 70 | */ | ||
4280 | 71 | static MetricManager * getInstance(const QString &appId); | ||
4281 | 72 | |||
4282 | 73 | /** | ||
4283 | 89 | * @brief Register a new Metric. | 74 | * @brief Register a new Metric. |
4284 | 90 | * | 75 | * |
4285 | 91 | * @param dataSourceId The unique ID of the data source, e.g. "facebook" | 76 | * @param dataSourceId The unique ID of the data source, e.g. "facebook" |
4286 | @@ -97,6 +82,7 @@ | |||
4287 | 97 | * acceptable to call this method more than once. The same Metric instance | 82 | * acceptable to call this method more than once. The same Metric instance |
4288 | 98 | * will be returned. | 83 | * will be returned. |
4289 | 99 | */ | 84 | */ |
4290 | 85 | Q_DECL_DEPRECATED | ||
4291 | 100 | virtual MetricPtr add(const QString &dataSourceId, | 86 | virtual MetricPtr add(const QString &dataSourceId, |
4292 | 101 | const QString &formatString, const QString &emptyDataString = "", | 87 | const QString &formatString, const QString &emptyDataString = "", |
4293 | 102 | const QString &textDomain = "") = 0; | 88 | const QString &textDomain = "") = 0; |
4294 | 103 | 89 | ||
4295 | === modified file 'src/libusermetricsinput/MetricManagerImpl.cpp' | |||
4296 | --- src/libusermetricsinput/MetricManagerImpl.cpp 2013-09-03 14:59:00 +0000 | |||
4297 | +++ src/libusermetricsinput/MetricManagerImpl.cpp 2014-06-25 09:58:07 +0000 | |||
4298 | @@ -16,88 +16,45 @@ | |||
4299 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | 16 | * Author: Pete Woods <pete.woods@canonical.com> |
4300 | 17 | */ | 17 | */ |
4301 | 18 | 18 | ||
4302 | 19 | #include <libusermetricscommon/FileUtils.h> | ||
4303 | 19 | #include <libusermetricsinput/MetricImpl.h> | 20 | #include <libusermetricsinput/MetricImpl.h> |
4304 | 20 | #include <libusermetricsinput/MetricManagerImpl.h> | 21 | #include <libusermetricsinput/MetricManagerImpl.h> |
4305 | 21 | #include <libusermetricscommon/DBusPaths.h> | ||
4306 | 22 | |||
4307 | 23 | #include <QtDBus/QtDBus> | ||
4308 | 24 | #include <QtCore/QDebug> | ||
4309 | 25 | 22 | ||
4310 | 26 | #include <stdexcept> | 23 | #include <stdexcept> |
4311 | 24 | #include <QDebug> | ||
4312 | 25 | #include <QRegularExpression> | ||
4313 | 26 | |||
4314 | 27 | 27 | ||
4315 | 28 | using namespace std; | 28 | using namespace std; |
4316 | 29 | using namespace UserMetricsInput; | ||
4317 | 29 | using namespace UserMetricsCommon; | 30 | using namespace UserMetricsCommon; |
4385 | 30 | using namespace UserMetricsInput; | 31 | |
4386 | 31 | 32 | static void shortApplicationId(QString &applicationId) { | |
4387 | 32 | class UserMetricsInput::MetricParametersPrivate { | 33 | QRegularExpressionMatch match = FileUtils::CLICK_REGEX.match(applicationId); |
4388 | 33 | friend class MetricManagerImpl; | 34 | if (match.hasMatch()) { |
4389 | 34 | friend class MetricParameters; | 35 | int index = applicationId.indexOf('_'); |
4390 | 35 | 36 | if (index != -1) { | |
4391 | 36 | public: | 37 | applicationId.remove(index, applicationId.size()); |
4392 | 37 | explicit MetricParametersPrivate(const QString &dataSourceId) : | 38 | } |
4393 | 38 | m_dataSourceId(dataSourceId), m_type(MetricType::USER) { | 39 | } |
4394 | 39 | } | 40 | } |
4395 | 40 | 41 | ||
4396 | 41 | ~MetricParametersPrivate() { | 42 | MetricManagerImpl::MetricManagerImpl(Factory::Ptr factory, |
4397 | 42 | } | 43 | const QDir &cacheDirectory, const QString &applicationId, |
4331 | 43 | |||
4332 | 44 | protected: | ||
4333 | 45 | QString m_dataSourceId; | ||
4334 | 46 | |||
4335 | 47 | QString m_formatString; | ||
4336 | 48 | |||
4337 | 49 | QString m_emptyDataString; | ||
4338 | 50 | |||
4339 | 51 | QString m_textDomain; | ||
4340 | 52 | |||
4341 | 53 | MetricType m_type; | ||
4342 | 54 | |||
4343 | 55 | QVariantMap m_options; | ||
4344 | 56 | }; | ||
4345 | 57 | |||
4346 | 58 | MetricParameters::MetricParameters(const QString &dataSourceId) : | ||
4347 | 59 | p(new MetricParametersPrivate(dataSourceId)) { | ||
4348 | 60 | } | ||
4349 | 61 | |||
4350 | 62 | MetricParameters::~MetricParameters() { | ||
4351 | 63 | } | ||
4352 | 64 | |||
4353 | 65 | MetricParameters & MetricParameters::formatString(const QString &formatString) { | ||
4354 | 66 | p->m_formatString = formatString; | ||
4355 | 67 | return *this; | ||
4356 | 68 | } | ||
4357 | 69 | |||
4358 | 70 | MetricParameters & MetricParameters::emptyDataString( | ||
4359 | 71 | const QString &emptyDataString) { | ||
4360 | 72 | p->m_emptyDataString = emptyDataString; | ||
4361 | 73 | return *this; | ||
4362 | 74 | } | ||
4363 | 75 | |||
4364 | 76 | MetricParameters & MetricParameters::textDomain(const QString &textDomain) { | ||
4365 | 77 | p->m_textDomain = textDomain; | ||
4366 | 78 | return *this; | ||
4367 | 79 | } | ||
4368 | 80 | |||
4369 | 81 | MetricParameters & MetricParameters::minimum(double minimum) { | ||
4370 | 82 | p->m_options["minimum"] = minimum; | ||
4371 | 83 | return *this; | ||
4372 | 84 | } | ||
4373 | 85 | |||
4374 | 86 | MetricParameters & MetricParameters::maximum(double maximum) { | ||
4375 | 87 | p->m_options["maximum"] = maximum; | ||
4376 | 88 | return *this; | ||
4377 | 89 | } | ||
4378 | 90 | |||
4379 | 91 | MetricParameters & MetricParameters::type(MetricType type) { | ||
4380 | 92 | p->m_type = type; | ||
4381 | 93 | return *this; | ||
4382 | 94 | } | ||
4383 | 95 | |||
4384 | 96 | MetricManagerImpl::MetricManagerImpl(const QDBusConnection &dbusConnection, | ||
4398 | 97 | QObject *parent) : | 44 | QObject *parent) : |
4402 | 98 | MetricManager(parent), m_dbusConnection(dbusConnection), m_interface( | 45 | MetricManager(parent), m_factory(factory) { |
4403 | 99 | DBusPaths::serviceName(), DBusPaths::userMetrics(), | 46 | if (applicationId.isEmpty()) { |
4404 | 100 | dbusConnection) { | 47 | throw logic_error("Invalid application ID"); |
4405 | 48 | } | ||
4406 | 49 | |||
4407 | 50 | QString shortId(applicationId); | ||
4408 | 51 | shortApplicationId(shortId); | ||
4409 | 52 | |||
4410 | 53 | QDir applicationDirectory(cacheDirectory.filePath(shortId)); | ||
4411 | 54 | if (!applicationDirectory.mkpath("usermetrics")) { | ||
4412 | 55 | throw logic_error("Cannot write to cache directory"); | ||
4413 | 56 | } | ||
4414 | 57 | m_metricDirectory = applicationDirectory.filePath("usermetrics"); | ||
4415 | 101 | } | 58 | } |
4416 | 102 | 59 | ||
4417 | 103 | MetricManagerImpl::~MetricManagerImpl() { | 60 | MetricManagerImpl::~MetricManagerImpl() { |
4418 | @@ -112,27 +69,17 @@ | |||
4419 | 112 | } | 69 | } |
4420 | 113 | 70 | ||
4421 | 114 | MetricPtr MetricManagerImpl::add(const MetricParameters ¶meters) { | 71 | MetricPtr MetricManagerImpl::add(const MetricParameters ¶meters) { |
4437 | 115 | QDBusPendingReply<QDBusObjectPath> reply( | 72 | const QString &dataSourceId(parameters.id()); |
4438 | 116 | m_interface.createDataSource(parameters.p->m_dataSourceId, | 73 | auto metric(m_metrics.find(dataSourceId)); |
4424 | 117 | parameters.p->m_formatString, | ||
4425 | 118 | parameters.p->m_emptyDataString, parameters.p->m_textDomain, | ||
4426 | 119 | parameters.p->m_type, parameters.p->m_options)); | ||
4427 | 120 | |||
4428 | 121 | reply.waitForFinished(); | ||
4429 | 122 | |||
4430 | 123 | if (reply.isError()) { | ||
4431 | 124 | throw logic_error(reply.error().message().toStdString()); | ||
4432 | 125 | } | ||
4433 | 126 | |||
4434 | 127 | QDBusObjectPath path(reply.value()); | ||
4435 | 128 | |||
4436 | 129 | auto metric(m_metrics.find(parameters.p->m_dataSourceId)); | ||
4439 | 130 | if (metric == m_metrics.end()) { | 74 | if (metric == m_metrics.end()) { |
4440 | 131 | MetricPtr newMetric( | 75 | MetricPtr newMetric( |
4445 | 132 | new MetricImpl(parameters.p->m_dataSourceId, | 76 | m_factory->newMetric(m_metricDirectory, parameters, m_factory)); |
4446 | 133 | parameters.p->m_formatString, path.path(), | 77 | metric = m_metrics.insert(dataSourceId, newMetric); |
4447 | 134 | m_dbusConnection)); | 78 | } else { |
4448 | 135 | metric = m_metrics.insert(parameters.p->m_dataSourceId, newMetric); | 79 | MetricImpl::Ptr existingMetric(metric->dynamicCast<MetricImpl>()); |
4449 | 80 | if(existingMetric) { | ||
4450 | 81 | existingMetric->setParameters(parameters); | ||
4451 | 82 | } | ||
4452 | 136 | } | 83 | } |
4453 | 137 | return *metric; | 84 | return *metric; |
4454 | 138 | } | 85 | } |
4455 | 139 | 86 | ||
4456 | === modified file 'src/libusermetricsinput/MetricManagerImpl.h' | |||
4457 | --- src/libusermetricsinput/MetricManagerImpl.h 2013-09-03 14:59:00 +0000 | |||
4458 | +++ src/libusermetricsinput/MetricManagerImpl.h 2014-06-25 09:58:07 +0000 | |||
4459 | @@ -19,8 +19,8 @@ | |||
4460 | 19 | #ifndef USERMETRICSINPUT_METRICMANAGERIMPL_H_ | 19 | #ifndef USERMETRICSINPUT_METRICMANAGERIMPL_H_ |
4461 | 20 | #define USERMETRICSINPUT_METRICMANAGERIMPL_H_ | 20 | #define USERMETRICSINPUT_METRICMANAGERIMPL_H_ |
4462 | 21 | 21 | ||
4463 | 22 | #include <libusermetricsinput/Factory.h> | ||
4464 | 22 | #include <libusermetricsinput/MetricManager.h> | 23 | #include <libusermetricsinput/MetricManager.h> |
4465 | 23 | #include <libusermetricscommon/UserMetricsInterface.h> | ||
4466 | 24 | 24 | ||
4467 | 25 | #include <QtCore/QMap> | 25 | #include <QtCore/QMap> |
4468 | 26 | 26 | ||
4469 | @@ -28,11 +28,13 @@ | |||
4470 | 28 | 28 | ||
4471 | 29 | class MetricManagerImpl: public MetricManager { | 29 | class MetricManagerImpl: public MetricManager { |
4472 | 30 | public: | 30 | public: |
4474 | 31 | explicit MetricManagerImpl(const QDBusConnection &dbusConnection, | 31 | explicit MetricManagerImpl(Factory::Ptr factory, |
4475 | 32 | const QDir &cacheDirectory, const QString &applicationId, | ||
4476 | 32 | QObject *parent = 0); | 33 | QObject *parent = 0); |
4477 | 33 | 34 | ||
4478 | 34 | virtual ~MetricManagerImpl(); | 35 | virtual ~MetricManagerImpl(); |
4479 | 35 | 36 | ||
4480 | 37 | Q_DECL_DEPRECATED | ||
4481 | 36 | virtual MetricPtr add(const QString &dataSourceId, | 38 | virtual MetricPtr add(const QString &dataSourceId, |
4482 | 37 | const QString &formatString, const QString &emptyDataString = "", | 39 | const QString &formatString, const QString &emptyDataString = "", |
4483 | 38 | const QString &textDomain = ""); | 40 | const QString &textDomain = ""); |
4484 | @@ -40,9 +42,9 @@ | |||
4485 | 40 | virtual MetricPtr add(const MetricParameters ¶meters); | 42 | virtual MetricPtr add(const MetricParameters ¶meters); |
4486 | 41 | 43 | ||
4487 | 42 | protected: | 44 | protected: |
4489 | 43 | QDBusConnection m_dbusConnection; | 45 | Factory::Ptr m_factory; |
4490 | 44 | 46 | ||
4492 | 45 | com::canonical::UserMetrics m_interface; | 47 | QDir m_metricDirectory; |
4493 | 46 | 48 | ||
4494 | 47 | QMap<QString, MetricPtr> m_metrics; | 49 | QMap<QString, MetricPtr> m_metrics; |
4495 | 48 | }; | 50 | }; |
4496 | 49 | 51 | ||
4497 | === added file 'src/libusermetricsinput/MetricParameters.cpp' | |||
4498 | --- src/libusermetricsinput/MetricParameters.cpp 1970-01-01 00:00:00 +0000 | |||
4499 | +++ src/libusermetricsinput/MetricParameters.cpp 2014-06-25 09:58:07 +0000 | |||
4500 | @@ -0,0 +1,132 @@ | |||
4501 | 1 | /* | ||
4502 | 2 | * MetricParametersy.cpp | ||
4503 | 3 | * | ||
4504 | 4 | * Created on: 11 Dec 2013 | ||
4505 | 5 | * Author: pete | ||
4506 | 6 | */ | ||
4507 | 7 | |||
4508 | 8 | #include <libusermetricsinput/MetricParameters.h> | ||
4509 | 9 | |||
4510 | 10 | #include <QVariantMap> | ||
4511 | 11 | |||
4512 | 12 | namespace UserMetricsInput { | ||
4513 | 13 | |||
4514 | 14 | class MetricParametersPrivate { | ||
4515 | 15 | friend class MetricManagerImpl; | ||
4516 | 16 | friend class MetricParameters; | ||
4517 | 17 | |||
4518 | 18 | public: | ||
4519 | 19 | explicit MetricParametersPrivate(const QString &dataSourceId) : | ||
4520 | 20 | m_dataSourceId(dataSourceId), m_type(MetricType::USER) { | ||
4521 | 21 | } | ||
4522 | 22 | |||
4523 | 23 | explicit MetricParametersPrivate(const MetricParametersPrivate &other) : | ||
4524 | 24 | m_dataSourceId(other.m_dataSourceId), m_formatString( | ||
4525 | 25 | other.m_formatString), m_emptyDataString( | ||
4526 | 26 | other.m_emptyDataString), m_textDomain(other.m_textDomain), m_type( | ||
4527 | 27 | other.m_type), m_options(other.m_options) { | ||
4528 | 28 | } | ||
4529 | 29 | |||
4530 | 30 | ~MetricParametersPrivate() { | ||
4531 | 31 | } | ||
4532 | 32 | |||
4533 | 33 | protected: | ||
4534 | 34 | QString m_dataSourceId; | ||
4535 | 35 | |||
4536 | 36 | QString m_formatString; | ||
4537 | 37 | |||
4538 | 38 | QString m_emptyDataString; | ||
4539 | 39 | |||
4540 | 40 | QString m_textDomain; | ||
4541 | 41 | |||
4542 | 42 | MetricType m_type; | ||
4543 | 43 | |||
4544 | 44 | QVariantMap m_options; | ||
4545 | 45 | }; | ||
4546 | 46 | |||
4547 | 47 | MetricParameters::MetricParameters(const QString &dataSourceId) : | ||
4548 | 48 | p(new MetricParametersPrivate(dataSourceId)) { | ||
4549 | 49 | } | ||
4550 | 50 | |||
4551 | 51 | MetricParameters::MetricParameters(const MetricParameters &other) : | ||
4552 | 52 | p(new MetricParametersPrivate(*other.p)) { | ||
4553 | 53 | } | ||
4554 | 54 | |||
4555 | 55 | MetricParameters::~MetricParameters() { | ||
4556 | 56 | } | ||
4557 | 57 | |||
4558 | 58 | MetricParameters & MetricParameters::operator=(const MetricParameters &other) { | ||
4559 | 59 | p->m_dataSourceId = other.p->m_dataSourceId; | ||
4560 | 60 | p->m_formatString = other.p->m_formatString; | ||
4561 | 61 | p->m_emptyDataString = other.p->m_emptyDataString; | ||
4562 | 62 | p->m_textDomain = other.p->m_textDomain; | ||
4563 | 63 | p->m_type = other.p->m_type; | ||
4564 | 64 | p->m_options = other.p->m_options; | ||
4565 | 65 | return *this; | ||
4566 | 66 | } | ||
4567 | 67 | |||
4568 | 68 | bool MetricParameters::operator==(const MetricParameters &other) const { | ||
4569 | 69 | return p->m_dataSourceId == other.p->m_dataSourceId | ||
4570 | 70 | && p->m_formatString == other.p->m_formatString | ||
4571 | 71 | && p->m_emptyDataString == other.p->m_emptyDataString | ||
4572 | 72 | && p->m_textDomain == other.p->m_textDomain | ||
4573 | 73 | && p->m_type == other.p->m_type | ||
4574 | 74 | && p->m_options == other.p->m_options; | ||
4575 | 75 | } | ||
4576 | 76 | |||
4577 | 77 | MetricParameters & MetricParameters::formatString(const QString &formatString) { | ||
4578 | 78 | p->m_formatString = formatString; | ||
4579 | 79 | return *this; | ||
4580 | 80 | } | ||
4581 | 81 | |||
4582 | 82 | MetricParameters & MetricParameters::emptyDataString( | ||
4583 | 83 | const QString &emptyDataString) { | ||
4584 | 84 | p->m_emptyDataString = emptyDataString; | ||
4585 | 85 | return *this; | ||
4586 | 86 | } | ||
4587 | 87 | |||
4588 | 88 | MetricParameters & MetricParameters::textDomain(const QString &textDomain) { | ||
4589 | 89 | p->m_textDomain = textDomain; | ||
4590 | 90 | return *this; | ||
4591 | 91 | } | ||
4592 | 92 | |||
4593 | 93 | MetricParameters & MetricParameters::minimum(double minimum) { | ||
4594 | 94 | p->m_options["minimum"] = minimum; | ||
4595 | 95 | return *this; | ||
4596 | 96 | } | ||
4597 | 97 | |||
4598 | 98 | MetricParameters & MetricParameters::maximum(double maximum) { | ||
4599 | 99 | p->m_options["maximum"] = maximum; | ||
4600 | 100 | return *this; | ||
4601 | 101 | } | ||
4602 | 102 | |||
4603 | 103 | MetricParameters & MetricParameters::type(MetricType type) { | ||
4604 | 104 | p->m_type = type; | ||
4605 | 105 | return *this; | ||
4606 | 106 | } | ||
4607 | 107 | |||
4608 | 108 | const QString & MetricParameters::id() const { | ||
4609 | 109 | return p->m_dataSourceId; | ||
4610 | 110 | } | ||
4611 | 111 | |||
4612 | 112 | const QString & MetricParameters::formatString() const { | ||
4613 | 113 | return p->m_formatString; | ||
4614 | 114 | } | ||
4615 | 115 | |||
4616 | 116 | const QString & MetricParameters::emptyDataString() const { | ||
4617 | 117 | return p->m_emptyDataString; | ||
4618 | 118 | } | ||
4619 | 119 | |||
4620 | 120 | const QString & MetricParameters::textDomain() const { | ||
4621 | 121 | return p->m_textDomain; | ||
4622 | 122 | } | ||
4623 | 123 | |||
4624 | 124 | MetricType MetricParameters::type() const { | ||
4625 | 125 | return p->m_type; | ||
4626 | 126 | } | ||
4627 | 127 | |||
4628 | 128 | const QVariantMap & MetricParameters::options() const { | ||
4629 | 129 | return p->m_options; | ||
4630 | 130 | } | ||
4631 | 131 | |||
4632 | 132 | } | ||
4633 | 0 | 133 | ||
4634 | === added file 'src/libusermetricsinput/MetricParameters.h' | |||
4635 | --- src/libusermetricsinput/MetricParameters.h 1970-01-01 00:00:00 +0000 | |||
4636 | +++ src/libusermetricsinput/MetricParameters.h 2014-06-25 09:58:07 +0000 | |||
4637 | @@ -0,0 +1,74 @@ | |||
4638 | 1 | /* | ||
4639 | 2 | * Copyright (C) 2013 Canonical, Ltd. | ||
4640 | 3 | * | ||
4641 | 4 | * This library is free software; you can redistribute it and/or modify it under | ||
4642 | 5 | * the terms of version 3 of the GNU Lesser General Public License as published | ||
4643 | 6 | * by the Free Software Foundation. | ||
4644 | 7 | * | ||
4645 | 8 | * This library is distributed in the hope that it will be useful, but WITHOUT | ||
4646 | 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
4647 | 10 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
4648 | 11 | * details. | ||
4649 | 12 | * | ||
4650 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
4651 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4652 | 15 | * | ||
4653 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
4654 | 17 | */ | ||
4655 | 18 | |||
4656 | 19 | #ifndef USERMETRICSINPUT_METRICPARAMETERS_H_ | ||
4657 | 20 | #define USERMETRICSINPUT_METRICPARAMETERS_H_ | ||
4658 | 21 | |||
4659 | 22 | #include <libusermetricsinput/Metric.h> | ||
4660 | 23 | |||
4661 | 24 | #include <QtCore/QScopedPointer> | ||
4662 | 25 | #include <QtCore/QString> | ||
4663 | 26 | |||
4664 | 27 | namespace UserMetricsInput { | ||
4665 | 28 | |||
4666 | 29 | class MetricParametersPrivate; | ||
4667 | 30 | |||
4668 | 31 | class Q_DECL_EXPORT MetricParameters { | ||
4669 | 32 | public: | ||
4670 | 33 | |||
4671 | 34 | explicit MetricParameters(const QString &dataSourceId); | ||
4672 | 35 | |||
4673 | 36 | MetricParameters(const MetricParameters &other); | ||
4674 | 37 | |||
4675 | 38 | virtual ~MetricParameters(); | ||
4676 | 39 | |||
4677 | 40 | MetricParameters & operator=(const MetricParameters &other); | ||
4678 | 41 | |||
4679 | 42 | bool operator==(const MetricParameters &other) const; | ||
4680 | 43 | |||
4681 | 44 | MetricParameters & formatString(const QString &formatString); | ||
4682 | 45 | |||
4683 | 46 | MetricParameters & emptyDataString(const QString &emptyDataString); | ||
4684 | 47 | |||
4685 | 48 | MetricParameters & textDomain(const QString &textDomain); | ||
4686 | 49 | |||
4687 | 50 | MetricParameters & minimum(double minimum); | ||
4688 | 51 | |||
4689 | 52 | MetricParameters & maximum(double maximum); | ||
4690 | 53 | |||
4691 | 54 | MetricParameters & type(MetricType type); | ||
4692 | 55 | |||
4693 | 56 | const QString & id() const; | ||
4694 | 57 | |||
4695 | 58 | const QString & formatString() const; | ||
4696 | 59 | |||
4697 | 60 | const QString & emptyDataString() const; | ||
4698 | 61 | |||
4699 | 62 | const QString & textDomain() const; | ||
4700 | 63 | |||
4701 | 64 | MetricType type() const; | ||
4702 | 65 | |||
4703 | 66 | const QVariantMap & options() const; | ||
4704 | 67 | |||
4705 | 68 | protected: | ||
4706 | 69 | QScopedPointer<MetricParametersPrivate> p; | ||
4707 | 70 | }; | ||
4708 | 71 | |||
4709 | 72 | } | ||
4710 | 73 | |||
4711 | 74 | #endif // USERMETRICSINPUT_METRICPARAMETERS_H_ | ||
4712 | 0 | 75 | ||
4713 | === modified file 'src/libusermetricsinput/MetricUpdate.h' | |||
4714 | --- src/libusermetricsinput/MetricUpdate.h 2013-07-09 16:51:58 +0000 | |||
4715 | +++ src/libusermetricsinput/MetricUpdate.h 2014-06-25 09:58:07 +0000 | |||
4716 | @@ -33,7 +33,7 @@ | |||
4717 | 33 | /** | 33 | /** |
4718 | 34 | * @brief Useful to store your instance of MetricUpdate in. | 34 | * @brief Useful to store your instance of MetricUpdate in. |
4719 | 35 | **/ | 35 | **/ |
4721 | 36 | typedef QScopedPointer<MetricUpdate> MetricUpdatePtr; | 36 | typedef QSharedPointer<MetricUpdate> MetricUpdatePtr; |
4722 | 37 | 37 | ||
4723 | 38 | /** | 38 | /** |
4724 | 39 | * @brief An update to a Metric | 39 | * @brief An update to a Metric |
4725 | 40 | 40 | ||
4726 | === modified file 'src/libusermetricsinput/MetricUpdateImpl.cpp' | |||
4727 | --- src/libusermetricsinput/MetricUpdateImpl.cpp 2013-09-24 16:20:00 +0000 | |||
4728 | +++ src/libusermetricsinput/MetricUpdateImpl.cpp 2014-06-25 09:58:07 +0000 | |||
4729 | @@ -16,28 +16,21 @@ | |||
4730 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | 16 | * Author: Pete Woods <pete.woods@canonical.com> |
4731 | 17 | */ | 17 | */ |
4732 | 18 | 18 | ||
4733 | 19 | #include <libusermetricsinput/MetricImpl.h> | ||
4734 | 19 | #include <libusermetricsinput/MetricUpdateImpl.h> | 20 | #include <libusermetricsinput/MetricUpdateImpl.h> |
4735 | 20 | #include <libusermetricscommon/DBusPaths.h> | ||
4736 | 21 | 21 | ||
4737 | 22 | #include <stdexcept> | 22 | #include <stdexcept> |
4738 | 23 | 23 | ||
4739 | 24 | using namespace std; | 24 | using namespace std; |
4740 | 25 | using namespace UserMetricsCommon; | ||
4741 | 26 | using namespace UserMetricsInput; | 25 | using namespace UserMetricsInput; |
4742 | 27 | 26 | ||
4747 | 28 | MetricUpdateImpl::MetricUpdateImpl(const QString &path, | 27 | MetricUpdateImpl::MetricUpdateImpl(QSharedPointer<MetricImpl> metric, |
4748 | 29 | const QDBusConnection &dbusConnection, QObject *parent) : | 28 | QObject *parent) : |
4749 | 30 | MetricUpdate(parent), m_dbusConnection(dbusConnection), m_interface( | 29 | MetricUpdate(parent), m_metric(metric) { |
4746 | 31 | DBusPaths::serviceName(), path, dbusConnection) { | ||
4750 | 32 | } | 30 | } |
4751 | 33 | 31 | ||
4752 | 34 | MetricUpdateImpl::~MetricUpdateImpl() { | 32 | MetricUpdateImpl::~MetricUpdateImpl() { |
4759 | 35 | QDBusPendingReply<void> reply(m_interface.update(m_data)); | 33 | m_metric->update(m_data); |
4754 | 36 | reply.waitForFinished(); | ||
4755 | 37 | |||
4756 | 38 | if (reply.isError()) { | ||
4757 | 39 | throw logic_error(reply.error().message().toStdString()); | ||
4758 | 40 | } | ||
4760 | 41 | } | 34 | } |
4761 | 42 | 35 | ||
4762 | 43 | void MetricUpdateImpl::addData(double data) { | 36 | void MetricUpdateImpl::addData(double data) { |
4763 | @@ -45,5 +38,5 @@ | |||
4764 | 45 | } | 38 | } |
4765 | 46 | 39 | ||
4766 | 47 | void MetricUpdateImpl::addNull() { | 40 | void MetricUpdateImpl::addNull() { |
4768 | 48 | m_data << ""; | 41 | m_data << QVariant(); |
4769 | 49 | } | 42 | } |
4770 | 50 | 43 | ||
4771 | === modified file 'src/libusermetricsinput/MetricUpdateImpl.h' | |||
4772 | --- src/libusermetricsinput/MetricUpdateImpl.h 2013-07-02 14:26:11 +0000 | |||
4773 | +++ src/libusermetricsinput/MetricUpdateImpl.h 2014-06-25 09:58:07 +0000 | |||
4774 | @@ -20,20 +20,19 @@ | |||
4775 | 20 | #define USERMETRICSINPUT_METRICUPDATEIMPL_H_ | 20 | #define USERMETRICSINPUT_METRICUPDATEIMPL_H_ |
4776 | 21 | 21 | ||
4777 | 22 | #include <QtCore/QObject> | 22 | #include <QtCore/QObject> |
4778 | 23 | #include <QtCore/QSharedPointer> | ||
4779 | 23 | #include <QtCore/QVariantList> | 24 | #include <QtCore/QVariantList> |
4780 | 24 | #include <QtDBus/QtDBus> | ||
4781 | 25 | 25 | ||
4782 | 26 | #include <libusermetricsinput/MetricUpdate.h> | 26 | #include <libusermetricsinput/MetricUpdate.h> |
4783 | 27 | #include <libusermetricscommon/DataSetInterface.h> | ||
4784 | 28 | 27 | ||
4785 | 29 | namespace UserMetricsInput { | 28 | namespace UserMetricsInput { |
4786 | 30 | 29 | ||
4788 | 31 | class Metric; | 30 | class MetricImpl; |
4789 | 32 | 31 | ||
4790 | 33 | class MetricUpdateImpl: public MetricUpdate { | 32 | class MetricUpdateImpl: public MetricUpdate { |
4791 | 34 | public: | 33 | public: |
4794 | 35 | explicit MetricUpdateImpl(const QString &path, | 34 | explicit MetricUpdateImpl(QSharedPointer<MetricImpl> metric, |
4795 | 36 | const QDBusConnection &dbusConnection, QObject *parent = 0); | 35 | QObject *parent = 0); |
4796 | 37 | 36 | ||
4797 | 38 | virtual ~MetricUpdateImpl(); | 37 | virtual ~MetricUpdateImpl(); |
4798 | 39 | 38 | ||
4799 | @@ -42,9 +41,7 @@ | |||
4800 | 42 | virtual void addNull(); | 41 | virtual void addNull(); |
4801 | 43 | 42 | ||
4802 | 44 | protected: | 43 | protected: |
4806 | 45 | QDBusConnection m_dbusConnection; | 44 | QSharedPointer<MetricImpl> m_metric; |
4804 | 46 | |||
4805 | 47 | com::canonical::usermetrics::DataSet m_interface; | ||
4807 | 48 | 45 | ||
4808 | 49 | QVariantList m_data; | 46 | QVariantList m_data; |
4809 | 50 | }; | 47 | }; |
4810 | 51 | 48 | ||
4811 | === modified file 'src/libusermetricsinput/usermetricsinput.cpp' | |||
4812 | --- src/libusermetricsinput/usermetricsinput.cpp 2013-09-03 14:59:00 +0000 | |||
4813 | +++ src/libusermetricsinput/usermetricsinput.cpp 2014-06-25 09:58:07 +0000 | |||
4814 | @@ -176,9 +176,10 @@ | |||
4815 | 176 | UserMetricsInputMetric m, const char *username) { | 176 | UserMetricsInputMetric m, const char *username) { |
4816 | 177 | try { | 177 | try { |
4817 | 178 | Metric *metric(reinterpret_cast<Metric*>(m)); | 178 | Metric *metric(reinterpret_cast<Metric*>(m)); |
4821 | 179 | MetricUpdatePtr metricUpdate( | 179 | MetricUpdatePtr* metricUpdate( |
4822 | 180 | metric->update(QString::fromUtf8(username))); | 180 | new MetricUpdatePtr( |
4823 | 181 | return reinterpret_cast<UserMetricsInputMetric>(metricUpdate.take()); | 181 | metric->update(QString::fromUtf8(username)))); |
4824 | 182 | return reinterpret_cast<UserMetricsInputMetric>(metricUpdate); | ||
4825 | 182 | } catch (exception &e) { | 183 | } catch (exception &e) { |
4826 | 183 | fprintf(stderr, "Error creating MetricUpdate: %s\n", e.what()); | 184 | fprintf(stderr, "Error creating MetricUpdate: %s\n", e.what()); |
4827 | 184 | } | 185 | } |
4828 | @@ -188,7 +189,7 @@ | |||
4829 | 188 | void usermetricsinput_metricupdate_delete( | 189 | void usermetricsinput_metricupdate_delete( |
4830 | 189 | UserMetricsInputMetricUpdate metricUpdate) { | 190 | UserMetricsInputMetricUpdate metricUpdate) { |
4831 | 190 | try { | 191 | try { |
4833 | 191 | delete reinterpret_cast<MetricUpdate*>(metricUpdate); | 192 | delete reinterpret_cast<MetricUpdatePtr*>(metricUpdate); |
4834 | 192 | } catch (exception &e) { | 193 | } catch (exception &e) { |
4835 | 193 | fprintf(stderr, "Error deleting MetricUpdate: %s\n", e.what()); | 194 | fprintf(stderr, "Error deleting MetricUpdate: %s\n", e.what()); |
4836 | 194 | } | 195 | } |
4837 | @@ -197,8 +198,8 @@ | |||
4838 | 197 | void usermetricsinput_metricupdate_add_data(UserMetricsInputMetricUpdate u, | 198 | void usermetricsinput_metricupdate_add_data(UserMetricsInputMetricUpdate u, |
4839 | 198 | double data) { | 199 | double data) { |
4840 | 199 | try { | 200 | try { |
4843 | 200 | MetricUpdate *metricUpdate = reinterpret_cast<MetricUpdate*>(u); | 201 | MetricUpdatePtr *metricUpdate = reinterpret_cast<MetricUpdatePtr*>(u); |
4844 | 201 | metricUpdate->addData(data); | 202 | (*metricUpdate)->addData(data); |
4845 | 202 | } catch (exception &e) { | 203 | } catch (exception &e) { |
4846 | 203 | fprintf(stderr, "Error adding data: %s\n", e.what()); | 204 | fprintf(stderr, "Error adding data: %s\n", e.what()); |
4847 | 204 | } | 205 | } |
4848 | @@ -206,8 +207,8 @@ | |||
4849 | 206 | 207 | ||
4850 | 207 | void usermetricsinput_metricupdate_add_null(UserMetricsInputMetricUpdate u) { | 208 | void usermetricsinput_metricupdate_add_null(UserMetricsInputMetricUpdate u) { |
4851 | 208 | try { | 209 | try { |
4854 | 209 | MetricUpdate *metricUpdate = reinterpret_cast<MetricUpdate*>(u); | 210 | MetricUpdatePtr *metricUpdate = reinterpret_cast<MetricUpdatePtr*>(u); |
4855 | 210 | metricUpdate->addNull(); | 211 | (*metricUpdate)->addNull(); |
4856 | 211 | } catch (exception &e) { | 212 | } catch (exception &e) { |
4857 | 212 | fprintf(stderr, "Error adding null: %s\n", e.what()); | 213 | fprintf(stderr, "Error adding null: %s\n", e.what()); |
4858 | 213 | } | 214 | } |
4859 | 214 | 215 | ||
4860 | === modified file 'src/libusermetricsoutput/CMakeLists.txt' | |||
4861 | --- src/libusermetricsoutput/CMakeLists.txt 2013-09-26 09:12:58 +0000 | |||
4862 | +++ src/libusermetricsoutput/CMakeLists.txt 2014-06-25 09:58:07 +0000 | |||
4863 | @@ -12,10 +12,9 @@ | |||
4864 | 12 | GSettingsColorThemeProvider.cpp | 12 | GSettingsColorThemeProvider.cpp |
4865 | 13 | DataSet.cpp | 13 | DataSet.cpp |
4866 | 14 | DataSource.cpp | 14 | DataSource.cpp |
4871 | 15 | SyncedDataSet.cpp | 15 | DirectoryWatcher.cpp |
4872 | 16 | SyncedDataSource.cpp | 16 | InfographicList.cpp |
4873 | 17 | SyncedUserMetricsStore.cpp | 17 | InfographicListImpl.cpp |
4870 | 18 | SyncedUserData.cpp | ||
4874 | 19 | UserData.cpp | 18 | UserData.cpp |
4875 | 20 | UserMetrics.cpp | 19 | UserMetrics.cpp |
4876 | 21 | UserMetricsImpl.cpp | 20 | UserMetricsImpl.cpp |
4877 | 22 | 21 | ||
4878 | === modified file 'src/libusermetricsoutput/ColorThemeProvider.h' | |||
4879 | --- src/libusermetricsoutput/ColorThemeProvider.h 2013-09-20 16:33:35 +0000 | |||
4880 | +++ src/libusermetricsoutput/ColorThemeProvider.h 2014-06-25 09:58:07 +0000 | |||
4881 | @@ -36,6 +36,7 @@ | |||
4882 | 36 | ColorThemeProvider(QObject *parent = 0); | 36 | ColorThemeProvider(QObject *parent = 0); |
4883 | 37 | 37 | ||
4884 | 38 | public: | 38 | public: |
4885 | 39 | typedef QSharedPointer<ColorThemeProvider> Ptr; | ||
4886 | 39 | 40 | ||
4887 | 40 | virtual ~ColorThemeProvider(); | 41 | virtual ~ColorThemeProvider(); |
4888 | 41 | 42 | ||
4889 | 42 | 43 | ||
4890 | === added file 'src/libusermetricsoutput/DirectoryWatcher.cpp' | |||
4891 | --- src/libusermetricsoutput/DirectoryWatcher.cpp 1970-01-01 00:00:00 +0000 | |||
4892 | +++ src/libusermetricsoutput/DirectoryWatcher.cpp 2014-06-25 09:58:07 +0000 | |||
4893 | @@ -0,0 +1,118 @@ | |||
4894 | 1 | /* | ||
4895 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
4896 | 3 | * | ||
4897 | 4 | * This library is free software; you can redistribute it and/or modify it under | ||
4898 | 5 | * the terms of version 3 of the GNU Lesser General Public License as published | ||
4899 | 6 | * by the Free Software Foundation. | ||
4900 | 7 | * | ||
4901 | 8 | * This library is distributed in the hope that it will be useful, but WITHOUT | ||
4902 | 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
4903 | 10 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
4904 | 11 | * details. | ||
4905 | 12 | * | ||
4906 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
4907 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4908 | 15 | * | ||
4909 | 16 | * Author: Pete Woods <pete.woods@canonical.com> | ||
4910 | 17 | */ | ||
4911 | 18 | |||
4912 | 19 | #include <libusermetricsoutput/DirectoryWatcher.h> | ||
4913 | 20 | |||
4914 | 21 | #include <QDebug> | ||
4915 | 22 | |||
4916 | 23 | using namespace UserMetricsCommon; | ||
4917 | 24 | using namespace UserMetricsOutput; | ||
4918 | 25 | |||
4919 | 26 | namespace { | ||
4920 | 27 | |||
4921 | 28 | static bool nameCompare(const QString &a, const QString &b) { | ||
4922 | 29 | int indexA = a.lastIndexOf('-'); | ||
4923 | 30 | int indexB = b.lastIndexOf('-'); | ||
4924 | 31 | |||
4925 | 32 | if (indexA == -1 || indexB == -1) { | ||
4926 | 33 | return false; | ||
4927 | 34 | } | ||
4928 | 35 | |||
4929 | 36 | QStringRef startA = a.leftRef(indexA); | ||
4930 | 37 | QStringRef startB = b.leftRef(indexB); | ||
4931 | 38 | |||
4932 | 39 | return !!startA.compare(startB); | ||
4933 | 40 | } | ||
4934 | 41 | |||
4935 | 42 | } | ||
4936 | 43 | |||
4937 | 44 | DirectoryWatcher::DirectoryWatcher(const QDir &path, unsigned int maxDepth, | ||
4938 | 45 | FileUtils::Ptr fileUtils) : | ||
4939 | 46 | m_path(path), m_maxDepth(maxDepth), m_fileUtils(fileUtils) { | ||
4940 | 47 | |||
4941 | 48 | m_watcher.addPath(path.path()); | ||
4942 | 49 | |||
4943 | 50 | connect(&m_watcher, SIGNAL(directoryChanged(const QString &)), this, | ||
4944 | 51 | SLOT(internalDirectoryChanged())); | ||
4945 | 52 | } | ||
4946 | 53 | |||
4947 | 54 | DirectoryWatcher::~DirectoryWatcher() { | ||
4948 | 55 | } | ||
4949 | 56 | |||
4950 | 57 | void DirectoryWatcher::start() { | ||
4951 | 58 | internalDirectoryChanged(); | ||
4952 | 59 | } | ||
4953 | 60 | |||
4954 | 61 | void DirectoryWatcher::internalDirectoryChanged() { | ||
4955 | 62 | QStringList files( | ||
4956 | 63 | m_fileUtils->listDirectory(m_path, QDir::Files, QDir::Name)); | ||
4957 | 64 | |||
4958 | 65 | QStringList newestFiles; | ||
4959 | 66 | |||
4960 | 67 | const QString *previous(nullptr); | ||
4961 | 68 | for (const QString &file : files) { | ||
4962 | 69 | if (!previous) { | ||
4963 | 70 | previous = &file; | ||
4964 | 71 | } else if (nameCompare(*previous, file)) { | ||
4965 | 72 | newestFiles << *previous; | ||
4966 | 73 | } | ||
4967 | 74 | previous = &file; | ||
4968 | 75 | } | ||
4969 | 76 | |||
4970 | 77 | if (previous) { | ||
4971 | 78 | newestFiles << *previous; | ||
4972 | 79 | } | ||
4973 | 80 | |||
4974 | 81 | directoryChanged(m_path.path(), newestFiles); | ||
4975 | 82 | |||
4976 | 83 | if (m_maxDepth == 0) { | ||
4977 | 84 | return; | ||
4978 | 85 | } | ||
4979 | 86 | |||
4980 | 87 | QSet<QString> directories( | ||
4981 | 88 | m_fileUtils->listDirectory(m_path, QDir::Dirs).toSet()); | ||
4982 | 89 | |||
4983 | 90 | // Remove deleted files | ||
4984 | 91 | QSet<QString> directoriesToRemove( | ||
4985 | 92 | m_directories.keys().toSet().subtract(directories)); | ||
4986 | 93 | for (const QString &name : directoriesToRemove) { | ||
4987 | 94 | m_directories.remove(name); | ||
4988 | 95 | directoryRemoved(name); | ||
4989 | 96 | } | ||
4990 | 97 | |||
4991 | 98 | // Work out the names we need to add | ||
4992 | 99 | directories.subtract(m_directories.keys().toSet()); | ||
4993 | 100 | for (const QString &name : directories) { | ||
4994 | 101 | DirectoryWatcher::Ptr watcher( | ||
4995 | 102 | new DirectoryWatcher(name, m_maxDepth - 1, m_fileUtils)); | ||
4996 | 103 | m_directories.insert(name, watcher); | ||
4997 | 104 | connect(watcher.data(), | ||
4998 | 105 | SIGNAL(directoryChanged(const QString &, const QStringList &)), | ||
4999 | 106 | this, | ||
5000 | 107 | SIGNAL(directoryChanged(const QString &, const QStringList &))); |
FAILED: Continuous integration, rev:151 jenkins. qa.ubuntu. com/job/ libusermetrics- ci/75/ jenkins. qa.ubuntu. com/job/ libusermetrics- trusty- amd64-ci/ 23/console jenkins. qa.ubuntu. com/job/ libusermetrics- trusty- armhf-ci/ 22/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/libusermetr ics-ci/ 75/rebuild
http://