Release_Notes.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. QtWebKit: Cartoon Reader Example v1.2
  2. =====================================
  3. Cartoon Reader is a QtWebKit application that demonstrates software
  4. development using web technologies and Qt native code. This example
  5. demonstrates how an HTML5 CSS3 application can be built on top of QtWebKit.
  6. HTML5 supports the Web Database, which is used as the back end for this
  7. application.
  8. This application has been tested on Symbian^3, Symbian S60 5th Edition, Maemo™ 5, and
  9. Windows XP.
  10. The project is being hosted and developed at
  11. https://projects.forum.nokia.com/CartoonReader, where you can read additional
  12. documentation, look at possible newer revisions, and also contribute to the
  13. project.
  14. -------------------------------------------------------------------------------
  15. PREREQUISITES
  16. C++ basics, SQL basics, and web development basics
  17. -------------------------------------------------------------------------------
  18. DESIGN CONSIDERATIONS
  19. A hybrid approach was the starting point for this application because it
  20. demonstrates how you can target multiple platforms by designing the UI layer
  21. using web technologies such as JavaScript™, CSS3, and HTML5, and still expand
  22. the capabilities of JavaScript using native code.
  23. The JavaScript code written for this example uses prototype-based object-
  24. oriented programming. The Model-View-Control approach was taken when writing
  25. this application, as well as using pipes and filters.
  26. The application was initially designed to be scalable. However, a decision was
  27. made to lock the view into the landscape orientation for mobile devices
  28. because of the form factor of most comics tested.
  29. -------------------------------------------------------------------------------
  30. IMPORTANT FILES & CLASSES
  31. - CartoonReader/src/cartoonreader.cpp:
  32. CartoonReader class displays the UI using QWebView.
  33. - CartoonReader/cartoonreader.qrc:
  34. References all the resources used in the application and includes them in the
  35. binary during the building. They can then be referred to with qrc:/ URLs.
  36. - CartoonReader/html/cartoon-view.html:
  37. Contains the skeleton HTML as the basis for the UI. The styles and JavaScript
  38. are included from here.
  39. - CartoonReader/js/FeedUpdateBroker.js:
  40. FeedUpdateBroker uses XMLHttpRequest to fetch the URL and then parses the
  41. relevant data from it.
  42. - CartoonReader/js/cartoonreader-libs.js:
  43. cartoonreader-libs contains jQueryEventProxy, CartoonParser, CartoonSource,
  44. CartoonResultAdapter, and CartoonManagerBackend. They are all used from
  45. single-cartoon-view.js.
  46. - CartoonReader/js/single-cartoon-view.js:
  47. Contains the single cartoon view logic.
  48. - CartoonReader/js/cartoonmanager.js:
  49. Contains the cartoon manager view logic.
  50. - CartoonReader/js/single-cartoon-first.js
  51. Contains the logic needed for the splash animation hiding and insertion
  52. of the other JavaScript files needed for the single cartoon view.
  53. Important classes:
  54. QWebView
  55. -------------------------------------------------------------------------------
  56. KNOWN ISSUES
  57. - Finger panning of the screen is currently not fully supported in Qt 4.6.2
  58. or Qt 4.6.3. This is why the cartoon is put inside an iFrame element, which can
  59. be scrolled on Maemo and Windows. On Symbian devices, the scrollbars need to be used.
  60. - QWebKit uses databases that are currently created in a folder specified by
  61. the QWebSettings::setOfflineStoragePath method. This means that you must
  62. not run the application in Maemo manually (with 'run-standalone.sh
  63. cartoonreader') for the first time as a root, otherwise the application cannot
  64. be started by the regular user, since the read access is only for the
  65. root user.
  66. - With Qt Creator 2.0.1: For Symbian, the version must be of a form x.y.z so
  67. that the package creation succeeds, where x, y, and z are digits.
  68. When building for Maemo, the debian/changelog file version numbers are set to
  69. 0.0.1 and a debian package with a version number 0.0.1 is created.
  70. - Sometimes the application icon does not show in the Maemo application list
  71. right after the installation. Rebooting the device will make it appear.
  72. -------------------------------------------------------------------------------
  73. RUNNING THE EXAMPLE
  74. Cartoon Reader has a splash screen and two views, mainly operated on the touch
  75. UI.
  76. Cartoon view
  77. - Shows the selected cartoon of the day.
  78. - Lets you navigate to previous strips of the cartoon by using the < and >
  79. buttons.
  80. - Tapping the i button provides metadata of the cartoon as well as a related
  81. joke (if available).
  82. ---------
  83. Cartoon management view
  84. To add new cartoons:
  85. - Tap the 'Add cartoon' button and type a known web cartoon URL.
  86. - Type the URL of a document that contains cartoons in Atom or RSS
  87. feed format or of a site that provides a reference to the feed.
  88. - The application then tries to find a feed from the HTML.
  89. - If a valid feed is found, the application parses the cartoon information
  90. from it and adds it to your selection.
  91. To change the default cartoon that is loaded at application startup:
  92. - Tap the cartoon name you wish to be the default cartoon. The green asterisk
  93. indicates the default one. After you have selected the default cartoon, it
  94. will be loaded.
  95. To remove cartoons:
  96. - Tap the trash bin of the cartoon you want to remove.
  97. ---------
  98. Other controls:
  99. - Tapping the Exit/Back button in the upper right-hand corner exits the
  100. application or returns to the Cartoon view, respectively.
  101. - Tapping the Task switcher button sends the application to the background
  102. (implemented in Maemo only).
  103. -------------------------------------------------------------------------------
  104. REQUIRED CAPABILITIES
  105. NetworkServices
  106. -------------------------------------------------------------------------------
  107. BUILD & INSTALLATION INSTRUCTIONS
  108. PREPARATIONS
  109. ~~~~~~~~~~~~
  110. 1. Extract the files from CartoonReader.zip.
  111. 2. Install the Nokia Qt SDK.
  112. The steps for building and installing the application depend on the platform.
  113. Build & installation instructions for Maemo 5 Fremantle
  114. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  115. The assumed Maemo version is PR1.2.
  116. Note that you could also make the Debian packages and run the application in the Scratchbox environment, but you would need to make changes to the
  117. debian files (for instance, in a debian/compat file, 5 instead of 7).
  118. Running Cartoon Reader with Qt Creator
  119. """"""""""""""""""""""""""""""""""""""""
  120. To run the application on a Maemo device, set up
  121. Qt Creator and the device as instructed in the Nokia Qt SDK's readme
  122. files.
  123. 1. Open cartoonreader.pro with Qt Creator.
  124. 2. Add a Maemo target into the cartoonreader project. Make sure that the
  125. connection is set up.
  126. 3. Build and run the the project by clicking the Run button.
  127. Creating a full deb package
  128. """""""""""""""""""""""""""""
  129. 1. Launch MADDE, which is installed with the Nokia Qt SDK.
  130. 3. Run qmake in the folder where cartoonreader.pro is located:
  131. mad qmake
  132. 4. Create the .deb package:
  133. mad dpkg-buildpackage
  134. 5. cartoonreader_0.0.1_armel.deb is created in the parent folder.
  135. Installing the deb package on the device
  136. """"""""""""""""""""""""""""""""""""""""""
  137. 1. Copy cartoonreader_0.0.1_armel.deb to the device.
  138. 2. Open the File manager on the Maemo device.
  139. 3. Click cartoonreader_0.0.1_armel.deb, and the Application manager is started.
  140. 4. Click OK to install Cartoon Reader.
  141. Setting up root acces on the Nokia N900 device (optional)
  142. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  143. 1. Open the Application manager from the Application menu > App manager.
  144. 2. Install 'rootsh' from the Application manager's menu > Search > Type rootsh
  145. > Search > rootsh, and wait for the Application manager to install the
  146. application.
  147. See more information at http://wiki.maemo.org/Root_access.
  148. Installing the deb package on the device manually (optional)
  149. """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  150. You need to enable root access for the device first, if dpkg is used.
  151. Another option would be to use MADDE to send the Debian package and install it
  152. from the command line. Sending only the executable file and running it is also
  153. possible, thus saving time in creating a package.
  154. See http://wiki.maemo.org/MADDE/Device_runtime for more details.
  155. 1. Copy the Debian package to the device.
  156. Using the PC Suite mode is less complicated, because in Mass Storage mode,
  157. the /home/user/MyDocs/ folder is not accessible from inside the device,
  158. and thus you might need to unplug the USB cable before continuing.
  159. 2. Open X Terminal by clicking Application menu > X Terminal, and typing the
  160. following commands:
  161. sudo gainroot
  162. dpkg -i /path/to/cartoonreader_0.1_armel.deb
  163. For instance, if the file is copied into the Nokia N900 device folder, the path is
  164. /home/user/MyDocs/.
  165. 3. Start the application from the Cartoon Reader icon shown in the application
  166. menu.
  167. Build & installation instructions for Symbian platform
  168. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  169. Prerequisites
  170. """""""""""""""
  171. To run the application on a Symbian device, set up
  172. Qt Creator and the device as instructed in the Nokia Qt SDK's readme files.
  173. Running Cartoon Reader with Qt Creator
  174. """"""""""""""""""""""""""""""""""""""""
  175. 1. Open cartoonreader.pro with Qt Creator.
  176. 2. Add a Symbian target into the cartoonreader project. Also make sure that
  177. TRK is running on the device and that the TRK connection is set up. If there are
  178. problems with the connection, you can install the created SIS package
  179. manually.
  180. 3. Build and run the the project by clicking the Run button. A SIS package is
  181. created and then installed on the device if the TRK connection is working.
  182. If the connection is not working, the SIS file can be installed manually
  183. with Nokia PC Suite or Ovi Suite by double-clicking it, after which it
  184. is installed on the device.
  185. If you get a Certificate error during the installation of a self-signed
  186. package, check that App.Manager > Settings > Software Installation is set
  187. to All.
  188. Precreated package installation
  189. """""""""""""""""""""""""""""""""
  190. 1. Check that you have Nokia PC Suite or Ovi Suite installed.
  191. 2. Navigate to the folder CartoonReader/install/sis/.
  192. 3. Double-click cartoonreader_S60_5_0.sis to install it.
  193. 4. Follow the instructions.
  194. If you get a Certificate error during the installation of a self-signed
  195. package, enable the installation of unsigned packages:
  196. Set App.Manager > Settings > Software Installation to All.
  197. Build & running instructions for Windows
  198. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  199. Prerequisites
  200. """""""""""""""
  201. - Qt 4.6.2 or newer must be installed with MinGW. It is available with the Qt
  202. SDK for Windows from http://get.qt.nokia.com/qtsdk/.
  203. Running Cartoon Reader with Qt Creator
  204. """"""""""""""""""""""""""""""""""""""""
  205. 1. Open cartoonreader.pro with Qt Creator.
  206. 2. Add a Desktop target into the cartoonreader project.
  207. 3. Build and run the the project by clicking the Run button.
  208. Building & running Cartoon Reader manually
  209. """"""""""""""""""""""""""""""""""""""""""""
  210. 1. Open the Qt Command Prompt from the start menu.
  211. 2. Run the following commands:
  212. qmake
  213. mingw32-make release
  214. 3. Check that cartoonreader.exe was created.
  215. 4. Run cartoonreader.exe found in the release folder of the project folder.
  216. -------------------------------------------------------------------------------
  217. COMPATIBILITY
  218. Maemo
  219. ~~~~~~
  220. Maemo 5
  221. Qt 4.6.2
  222. Tested on:
  223. - Nokia N900 device
  224. Developed and tested using:
  225. - Nokia Qt SDK
  226. - Maemo SDK has also been used previously
  227. Symbian
  228. ~~~~~~~~
  229. Symbian^3
  230. Symbian S60 5th Edition
  231. Qt 4.6.3
  232. Tested on:
  233. - Nokia N97
  234. - Nokia N8
  235. Developed and tested using:
  236. - Nokia Qt SDK
  237. Windows
  238. ~~~~~~~~
  239. Windows XP
  240. Qt SDK for Windows (Qt 4.6.2)
  241. MinGW 3.15.2
  242. Developed and tested using:
  243. - Nokia Qt SDK, with Qt 4.6.2 binaries of the Qt SDK for Windows
  244. -------------------------------------------------------------------------------
  245. CHANGE HISTORY
  246. 1.2 Button presses are now indicated better. Bug with the onscreen keyboard has been fixed.
  247. 1.1 Proxy support added. Textfield focusing improved for Symbian^3.
  248. 1.0 Initial version.
  249. -------------------------------------------------------------------------------
  250. ADDITIONAL DOCUMENTATION
  251. https://projects.forum.nokia.com/CartoonReader