Merge lp:~kalikiana/u1db-qt/gallery2 into lp:u1db-qt

Proposed by Cris Dywan
Status: Merged
Approved by: Cris Dywan
Approved revision: 79
Merged at revision: 73
Proposed branch: lp:~kalikiana/u1db-qt/gallery2
Merge into: lp:u1db-qt
Diff against target: 255 lines (+169/-7)
9 files modified
CMakeLists.txt (+32/-6)
debian/control (+12/-0)
debian/libu1db-qt5-doc.install (+2/-0)
debian/libu1db-qt5-examples.install (+2/-0)
debian/rules (+1/-1)
gallery/CMakeLists.txt (+8/-0)
gallery/SplitView.qml (+59/-0)
gallery/gallery.qml (+44/-0)
gallery/u1db-qt-gallery.desktop (+9/-0)
To merge this branch: bzr merge lp:~kalikiana/u1db-qt/gallery2
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Cris Dywan Approve
Review via email: mp+160052@code.launchpad.net

This proposal supersedes a proposal from 2013-04-18.

Commit message

Implement tabbed example gallery and install to example package

Description of the change

Implement tabbed example gallery and install to example package

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) :
review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-04-12 13:36:54 +0000
+++ CMakeLists.txt 2013-04-22 09:55:31 +0000
@@ -70,16 +70,24 @@
7070
71# Unit-Test71# Unit-Test
72enable_testing()72enable_testing()
73
74add_custom_target(check COMMAND "env" "CTEST_OUTPUT_ON_FAILURE=1" "${CMAKE_CTEST_COMMAND}")73add_custom_target(check COMMAND "env" "CTEST_OUTPUT_ON_FAILURE=1" "${CMAKE_CTEST_COMMAND}")
75add_custom_target(doc "qdoc" "u1db.qdocconf"74
76 COMMAND "sed" "-r" "-i" "'s@(</head>)@<link rel=\"stylesheet\" type=\"text/css\" href=\"style/base.css\" />\\1@'" "./output/html/*.html"75option(BUILD_DOCS "Build documentation" OFF)
77 COMMAND "qhelpgenerator" "./output/html/u1dbqt.qhp"76if (BUILD_DOCS)
78 COMMAND "assistant" "-register" "./output/html/u1dbqt.qch"77 set(ALL "ALL")
79 WORKING_DIRECTORY "documentation")78endif ()
79set(U1DB_DOCS "${PROJECT_BINARY_DIR}/documentation/output")
80add_custom_target(doc ${ALL} "mkdir" "-p" "${U1DB_DOCS}"
81 COMMAND "qdoc" "-outputdir" "${U1DB_DOCS}" "${CMAKE_SOURCE_DIR}/documentation/u1db.qdocconf" "1>/dev/null" "2>/dev/null"
82 COMMAND "sed" "-r" "-i" "'s@(</head>)@<link rel=\"stylesheet\" type=\"text/css\" href=\"style/base.css\" />\\1@'" "${U1DB_DOCS}/*.html"
83 COMMAND "qhelpgenerator" "${U1DB_DOCS}/u1dbqt.qhp"
84 COMMAND "assistant" "-register" "${U1DB_DOCS}/u1dbqt.qch"
85 SOURCES "${CMAKE_SOURCE_DIR}/documentation/u1db.qdocconf"
86 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/documentation")
80add_subdirectory(modules)87add_subdirectory(modules)
81add_subdirectory(tests)88add_subdirectory(tests)
82add_subdirectory(examples)89add_subdirectory(examples)
90add_subdirectory(gallery)
8391
84# Install92# Install
85set(INCLUDE_INSTALL_DIR include/lib${U1DB_QT_LIBNAME})93set(INCLUDE_INSTALL_DIR include/lib${U1DB_QT_LIBNAME})
@@ -88,6 +96,24 @@
88 LIBRARY DESTINATION lib${LIB_SUFFIX}96 LIBRARY DESTINATION lib${LIB_SUFFIX}
89 )97 )
9098
99if (BUILD_DOCS)
100 install(FILES "${U1DB_DOCS}/u1dbqt.qch"
101 DESTINATION "${CMAKE_INSTALL_PREFIX}/share/qt5/phrasebooks/"
102 )
103 file(GLOB ALL_HTML ${U1DB_DOCS}/*.html)
104 install(FILES ${ALL_HTML}
105 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/u1db-qt/doc/html
106 )
107 install(DIRECTORY "${U1DB_DOCS}/style"
108 DESTINATION "${CMAKE_INSTALL_PREFIX}/share/u1db-qt/doc/html"
109 )
110 file(GLOB ALL_EXAMPLES ${U1DB_DOCS}/*example-*.html)
111 install(FILES ${ALL_EXAMPLES}
112 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/u1db-qt/examples
113 )
114endif ()
115
116
91install(FILES src/global.h src/database.h src/document.h src/index.h src/query.h117install(FILES src/global.h src/database.h src/document.h src/index.h src/query.h
92 DESTINATION ${INCLUDE_INSTALL_DIR}118 DESTINATION ${INCLUDE_INSTALL_DIR}
93 )119 )
94120
=== modified file 'debian/control'
--- debian/control 2013-04-12 13:52:00 +0000
+++ debian/control 2013-04-22 09:55:31 +0000
@@ -11,6 +11,7 @@
11 qtdeclarative5-test-plugin,11 qtdeclarative5-test-plugin,
12 qtdeclarative5-qtquick2-plugin,12 qtdeclarative5-qtquick2-plugin,
13 libqt5sql5-sqlite,13 libqt5sql5-sqlite,
14 qttools5-dev-tools,
14 qtdeclarative5-dev-tools15 qtdeclarative5-dev-tools
15Standards-Version: 3.9.316Standards-Version: 3.9.3
16Vcs-Bzr: https://launchpad.net/u1db-qt/trunk17Vcs-Bzr: https://launchpad.net/u1db-qt/trunk
@@ -46,3 +47,14 @@
46 .47 .
47 This package contains the examples demonstrating the use of the Qt binding for U1DB48 This package contains the examples demonstrating the use of the Qt binding for U1DB
4849
50Package: libu1db-qt5-doc
51Section: doc
52Architecture: all
53Depends: ${misc:Depends},
54 libu1db-qt5-1 (= ${binary:Version}),
55 qttools5-dev-tools
56Description: Qt5 binding and QtQuick2 plugin for U1DB - offline documentation
57 Simple Qt5 binding and QtQuick2 plugin for U1DB (https://launchpad.net/u1db).
58 .
59 This package contains the offline documentation for the Qt binding for U1DB
60
4961
=== added file 'debian/libu1db-qt5-doc.install'
--- debian/libu1db-qt5-doc.install 1970-01-01 00:00:00 +0000
+++ debian/libu1db-qt5-doc.install 2013-04-22 09:55:31 +0000
@@ -0,0 +1,2 @@
1usr/share/qt5/phrasebooks/*
2usr/share/u1db-qt/doc/html/*
03
=== modified file 'debian/libu1db-qt5-examples.install'
--- debian/libu1db-qt5-examples.install 2013-04-12 13:52:00 +0000
+++ debian/libu1db-qt5-examples.install 2013-04-22 09:55:31 +0000
@@ -1,1 +1,3 @@
1usr/share/u1db-qt/examples/*.qml1usr/share/u1db-qt/examples/*.qml
2usr/share/u1db-qt/gallery/*.qml
3usr/share/applications/u1db-qt-gallery.desktop
24
=== modified file 'debian/rules'
--- debian/rules 2013-04-09 11:32:11 +0000
+++ debian/rules 2013-04-22 09:55:31 +0000
@@ -12,7 +12,7 @@
12override_dh_auto_configure:12override_dh_auto_configure:
13 PATH=/opt/qt5/bin:$(PATH) \13 PATH=/opt/qt5/bin:$(PATH) \
14 dh_auto_configure -- -DCMAKE_MODULE_PATH=/opt/qt5/lib/cmake \14 dh_auto_configure -- -DCMAKE_MODULE_PATH=/opt/qt5/lib/cmake \
15 -DLD_LIBRARY_PATH=/opt/qt5/lib:$(LD_LIBRARY_PATH)15 -DLD_LIBRARY_PATH=/opt/qt5/lib:$(LD_LIBRARY_PATH) -DBUILD_DOCS=ON
1616
17override_dh_auto_build:17override_dh_auto_build:
18 dh_auto_build18 dh_auto_build
1919
=== added directory 'gallery'
=== added file 'gallery/CMakeLists.txt'
--- gallery/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ gallery/CMakeLists.txt 2013-04-22 09:55:31 +0000
@@ -0,0 +1,8 @@
1install(FILES gallery.qml SplitView.qml
2 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/u1db-qt/gallery
3 )
4
5install(FILES u1db-qt-gallery.desktop
6 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications
7 )
8
09
=== added file 'gallery/SplitView.qml'
--- gallery/SplitView.qml 1970-01-01 00:00:00 +0000
+++ gallery/SplitView.qml 2013-04-22 09:55:31 +0000
@@ -0,0 +1,59 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * Authors:
5 * Christian Dywan <christian.dywan@canonical.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; version 3.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20import QtQuick 2.0
21import U1db 1.0 as U1db
22import Ubuntu.Components 0.1
23import QtWebKit 3.0
24import QtWebKit.experimental 1.0
25
26Tab {
27 id: exampleView
28 property string example
29 title: "Example %1".arg(example)
30 Row {
31 id: splitView
32 property string qml: Qt.resolvedUrl('../examples/u1db-qt-example-%1.qml'.arg(example))
33 property string html: 'file:////usr/share/u1db-qt/examples/u1db-qt-example-%1.html'.arg(example)
34 anchors.fill: parent
35 Loader {
36 width: parent.width / 3
37 source: splitView.qml
38 asynchronous: true
39 }
40 // TODO: syntax highlighting
41 // FIXME: switching tabs with web views may crash lp#1124065
42 WebView {
43 width: parent.width / 3
44 height: parent.height
45 url: splitView.qml
46 // FIXME: default font size is extremely small lp#1169989
47 experimental.preferences.minimumFontSize: units.dp(24)
48 }
49 WebView {
50 width: parent.width / 3
51 height: parent.height
52 url: splitView.html
53 experimental.preferences.minimumFontSize: units.dp(24)
54 // TODO: open help browser onNavigationRequested: { url }
55 }
56 }
57}
58
59
060
=== added file 'gallery/gallery.qml'
--- gallery/gallery.qml 1970-01-01 00:00:00 +0000
+++ gallery/gallery.qml 2013-04-22 09:55:31 +0000
@@ -0,0 +1,44 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * Authors:
5 * Christian Dywan <christian.dywan@canonical.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; version 3.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20import QtQuick 2.0
21import Ubuntu.Components 0.1
22
23MainView {
24 width: units.gu(60)
25 height: units.gu(80)
26
27 Page {
28 Tabs {
29 /* FIXME: lp#1167568 Repeater {
30 model: ["1", "2", "2b", "3", "4", "5"]
31 SplitView {
32 example: modelData
33 }
34 } */
35 SplitView { example: "1" }
36 SplitView { example: "2" }
37 SplitView { example: "2b" }
38 SplitView { example: "3" }
39 SplitView { example: "4" }
40 SplitView { example: "5" }
41 }
42 }
43}
44
045
=== added file 'gallery/u1db-qt-gallery.desktop'
--- gallery/u1db-qt-gallery.desktop 1970-01-01 00:00:00 +0000
+++ gallery/u1db-qt-gallery.desktop 2013-04-22 09:55:31 +0000
@@ -0,0 +1,9 @@
1[Desktop Entry]
2Encoding=UTF-8
3Type=Application
4Exec=qmlscene /usr/share/u1db-qt/gallery/gallery.qml
5Path=/usr/share/u1db-qt/gallery
6Name=U1Db QML Example Gallery
7Icon=/usr/share/icons/unity-icon-theme/places/svg/service-u1.svg
8Terminal=false
9

Subscribers

People subscribed via source and target branches

to all changes: