Beginning Nokia Apps development: QT and HTML5 for ... - GBV

7 downloads 1406 Views 378KB Size Report
HTML5. 7. Hybrid Applications. 8. Distributing Your Application. 8. Wrapping Up. 9. Chapter 2: Designing Your Application. 11. Designing for Mobile. 11.
Beginning

Nokia

Apps Development

Qt and HTIVIL5 for Symbian and MeeGo

Ray Rischpater Daniel Zucker

Apress

Contents

Contents at

a

Glance.....

I Foreword

iv ix

About the Authors About the Technical Reviewers

Acknowledgments Introduction

x

xi

xii xiii

Part I:

Design Chapter 1: Introducing Nokia's Software Platform

1

Why Nokia?

3

Introducing Nokia's Hardware Platforms

4

3

Series 40

4

Symbian

4

MeeGo

Choosing

5

a

Development

Platform

5

Qt

6

HTML5

7

Hybrid Applications

Distributing

Your

Application

2:

8

9

Wrapping Up

Chapter

8

Designing Your Application

Designing for Mobile

11 11

User Context

12

Mobile Interaction Considerations

12

Technical Considerations

13

Cultural Considerations

14

The

Design

Process

Getting Started

Design

Research

15 15 16

II

CONTENTS

17

Conceptual Design Interaction Design and Prototyping

17

Documentation

18

Flowella

20

Visual and Information

27

Design

Testing and Evaluation

30

Additional Topics: Gestalt and Unity

31

Usability Guidelines Navigation

32

32

Entering Information

33

Information Presentation

34

Connectivity

34

Usability for Enterprise Applications

34

Usability and Security

34

Advertising

35

Platform Components

35

Checklists

35

Summary

36

Part II:

Develop Chapter 3: Working with the Nokia Qt SDK Choosing

an IDE

39 39

Introducing the Nokia Qt SDK Getting Started with the Nokia Qt SDK

39 41

Installing the Nokia Qt SDK

41

Finding Your Way around the Nokia Qt SDK

44

Creating

45

a Qt

Application

Compiling and Running Your Code

on a

Device

52

Debugging Your Application

54

Wrapping Up

57

Chapter 4: Beginning Qt Development Understanding the Qt Object Model

59 59

Understanding Signals and Slots

60

Making the Most of Hierarchical Ownership

61

Defining Object Properties

62

Casting

at Run Time

63

Managing Understanding Qt's Collection Classes Resources and Localization

63

65

Using Signals and Slots

66

Performing Input and Output Managing Multiple Threads

68

Using

69

Item Views with the Model-View-Controller

Understanding

Qt's Model Classes

Using Qt's View Classes Implementing

the

Parsing the USGS Data Feed

71 72

76

Application User Interface

Using the Network to Obtain

Paradigm

75

Putting It All Together

vi

37

Data

77 80

81

M CONTENTS

85

Displaying the Results

86

Wrapping Up II

87

Chapter 5: Doing More with Qt

87

Using Application Resources Including Resources

in Your

Accessing Application

88

Applications

Resources

89 89

Incorporating User Actions

90

Introducing the Qt Main Window

92

Actions to the Main Window

Attaching

Implementing

a

Custom

92

Widget

93

Subclassing QWidget Size Hints and Policies

Specifying Your Widget's

94

Handling Incoming

Events

95

Handling Incoming

Gestures

97 99

Painting Your Widget's Contents

101

Integrating Qt Objects with Web Content

Linking Your Application with QtWebKit Displaying Web Content with QtWebKit Embedding C++ Objects

in QtWebKit's

102 102

JavaScript Runtime

104

Embedding Qt Widgets into QtWebKit Pages Extending Application Functionality

with Qt

106 107

Mobility

Using the Qt Mobility APIs Managing

109

112

Bearer Networks

Obtaining and Working with Device Location Information

113

Sending and Receiving Messages

115

Playing and Recording Multimedia

118

Obtaining System Information

121 122

Putting It All Together

124

Looking inside the Application Controller Changes

to the Network

128

Request

Determining the Device Position

129 131

the Map

Drawing Wrapping Up

137

Chapter 6: Introducing Qt Quick

139

Declaring Your User Interface

139 141

Introducing QML Handling Signals

143

in QML

Performing Animations in QML

145

Reviewing the Available Qt Quick Elements

146

Programming for the Web with QML Creating

149

151

the User Interface

Downloading the Data

154

Integrating C++ with QML

154

Displaying QML within a C++ Application Mingling QObjects with QML Wrapping Up

155 155 ,

158

vii

il CONTENTS

Chapter 7: Developing with HTML5 HTML5 Is

an

159

Industry Standard

160 160

Hello World in HTML5 Hello World on a Handset

Using the Hybrid Apps

HTML5

162

Application

Cache

163 165

Accessing Your HTML5 Content from the Local Storing

the HTML5 Content as an

Application

File

System

Resource

More HTML5 Features

166 167

Canvas

167

Transitions and Transformations

172 174

Local Storage

Putting It All Together: Implementing Shake Adding Ul Components to the Views Fetching and Parsing the Data Packaging the App

in HTML5

176

180 182 183

Links for further information

183

Wrapping Up

184

Part III: Distribute

185

Chapter 8: Testing Your Application Preparing to

Test

187 187

Using Qt's Test Framework

189

Introducing the QTestTest Framework

190

Unit Testing the Qua keEvent Class

192

Testing Signals and Slots Using

195

QTest

Testing User Interface Code Using QTestEventList

Chapter 9: Deploying Your Application.. Preparing a Deployment Checklist Including Other Files

200

within Your

Application on Symbian Devices

Including Other Files within Your Application on MeeGo Devices Including an Application Icon with Symbian Applications Application Icon with MeeGo Applications

Including

an

Providing Providing

a

UID for Qt

a

Desktop

Signing Publishing

It All

Your Qt

Applications

on

Symbian

File for MeeGo

Together Application

199 199

Packaging Your Application

Putting

196 198

Wrapping Up

200 201 202

202 203 204 204

for

Symbian Devices

with the Ovi Store

205 207

Registering with the Ovi Store

207

Publishing Your Application

208

QA in the Ovi Store

210

Marketing Your Application through the Ovi Store

211

Wrapping Up

213

II Index

will

165

215

Suggest Documents