Qt for S60

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites & 1 Event

    Qt for S60 - Presentation Transcript

    1. Qt for S60 Mark Wilcox
    2. What I’m Talking About
      • What is Qt?
      • Qt Modules
      • Qt for S60
      • Technology Previews
      • Porting Qt applications to S60
        • Example: CuteMaze
      • Porting other applications to Qt on S60
        • Example: GDAL Viewer
    3. What is Qt?
      • A cross-platform (soon to be free) application framework
      • Developed by Trolltech (bought by Nokia -> Qt Software)
      • Aims to look native on every platform via GUI emulation
      • C++ code, highly modular
    4. Qt Modules Phonon QtXml & QtXmlPatterns QtWebKit QtSvg QtSql QtScript QtOpenGL QtNetwork QtGui QtCore
    5. QtCore
      • A base object class with built-in event driven programming support and a seamless object communication mechanism via signals and slots
      • Strings, arrays, characters, linked lists, stacks and queues
      • Atomic operations on integers and pointers
      • Guarded pointers (automatically zeroed when the object is destroyed)
      • Date & time access and timers
      • Files, streams and file system management
      • Containers – pairs, vectors, maps, hashes and sets
      • Threads, processes, mutexes, semaphores and shared memory
      • Exceptions that can be transferred between threads
      • Text handling and internationalization support
      • Platform independent application settings
      • Pattern matching using regular expressions
      • Convenience functions for handling URLs and XML
      • Support for loading libraries, plug-ins and resources
      • Basic geometry via points, lines, sizes and rectangles
    6. Signals & Slots
      • Extension to C++ via code generated by the Qt Meta-Object Compiler (moc)
      • As part of class definition, declare signals that object will emit and slots that are targets for signals
      • A signal can also be connected to another signal so that emission of the first automatically causes the second to be emitted
      • Code examples…
      #include <QObject> class Cell : public QObject { Q_OBJECT // This macro is required for all classes // that implement signals and slots public: Cell() { iValue = 0; } int value() const { return iValue; } public slots : void setValue(int value); signals : void valueChanged(int newValue); private: int iValue; }; void Cell::setValue(int value) { if (value != iValue) { iValue = value; emit valueChanged(value); } } Sender sender; Receiver receiver; QObject::connect(&sender, SIGNAL(send(int)), &receiver, SLOT(receive(int)));
    7. QtGui
      • QPainter class (graphics context style interface, implementation in QPaintEngine subclasses) used to draw on any QPaintDevice instance
      • This includes QWidget – the base class for all widgets
      • There are lots of useful widgets:
        • Buttons, sliders and combo-boxes
        • Windows, dialogs, forms and frames
        • Scroll areas with scroll bars
        • Menus, tabs, toolbars and status bars
        • Splash screens and progress bars
        • Help search query and result
        • Single and multi-line text editors
        • List, table and tree views
        • Calendar
    8. Qt UI Examples
    9. QtNetwork
      • Portable and simple network programming classes for:
        • UDP, TCP, SSL and local sockets
        • Key and certificate handling for secure communications
        • HTTP and FTP protocol implementations
        • Host address lookup by name
        • A managed request and response mechanism
        • Proxies, authentication and cookie management
        • Local and remotely accessible (TCP) servers
    10. QtOpenGL
      • Allows developers to combine a Qt UI with 3D graphics rendered using OpenGL
      • OpenGL ES used on embedded platforms
      • Module not yet available for Qt for S60
    11. QtScript
      • Make your applications scriptable with Qt Script
      • Based on ECMAScript (JavaScript/JScript)
      • QScriptEngine class used to evaluate scripts that are:
        • Typed by the user
        • Loaded from disk
        • Downloaded from network
      • Can mix signals & slots between C++ and script and create dynamic connections from script (moc at work again!)
    12. QtSql
      • Database integration module
      • 3-layered architecture
        • Driver layer
        • SQL API layer
        • UI layer
      • Provides model classes for use in a model/view architecture in combination with data-aware widgets from the QtGui module
      • Not yet available for Qt for S60 but will integrate with sqlite
    13. QtSvg
      • For displaying Scalable Vector Graphics
      • Currently only the static features of SVG Tiny version 1.2 are supported
      • Simply create a QSvgWidget and load an SVG file with it
    14. QtWebKit
      • WebKit integration module
      • New in Qt 4.4
      • Download and display a web page in just 3 lines of code with QWebView widget:
      QWebView *view = new QWebView(parent); view->load(QUrl(&quot;http://www.trolltech.com/&quot;)); view->show();
      • Provides bridge between JavaScript in the WebKit engine and QObject instances in Qt C++ code, very much like the QScript module
      • Not yet available for Qt for S60 (although WebKit already used in S60)
    15. QtXml & QtXmlPatterns
      • Utility classes for reading and writing XML
      • SAX & DOM based parsers
      • XQuery/XPath language support
      • Not yet available in Qt for S60
    16. Phonon
      • Cross-platform multimedia framework
      • Started as part of KDE and was then adopted into Qt
      • Actually just a common interface to various backends for different platforms
      • Helix backend being developed for Qt for S60 – not yet available
    17. Qt for S60
      • Port of Qt to S60
      • Currently in a “technology preview” state
      • No commercial use allowed, GPL use and evaluation only until it’s officially released
      • Incomplete feature set and plenty of bugs still to be fixed
      • Actually fairly stable and usable already (with a few major issues where things aren’t implemented yet!)
    18. Qt for S60 Architecture
    19. Qt for S60 Builds
      • Qt uses a platform independent project file with a .pro extension
      • A Qt tool called qmake generates build files for each platform from the .pro files
      • So, on S60 the MMP, bld.inf and PKG files are generated by qmake – they should not be edited
      • An extension makefile is also generated by qmake to support Qt extensions to C++ (e.g. moc, uic – Qt Designer support, rcc – resources)
    20. Implicit Sharing
      • Symbian/S60 developers likely to be concerned by apparently high levels of stack usage in Qt applications
      • It is higher than standard Symbian code but…
        • Many objects, including QString, are implicitly shared with copy-on-write semantics – only one copy of the data exists (allocated on the heap) with shallow copy performed and a reference count incremented until a change is made
        • This allows passing of such objects as arguments and returning them from functions without a significant performance penalty
    21. Technology Previews
      • Qt Software open source philosophy of release early and often – get developer/customer feedback
      • Qt for S60 following this process
        • “ Pyramid” release in October – “just” QtCore, QtGui and QtNetwork
        • “ Temple” release in December – added new modules, bugfixes and toolchain improvements
        • “ Garden” release scheduled for Q109 – more modules and S60 UI integration planned (Qt apps to look like native apps)
      • Final release scheduled for Q309
    22. Porting Qt Applications to S60
      • Even though Qt is cross-platform, a new layout is probably required for the smaller screen size of mobile platforms
      • Some UI design may need changing to work with keypad only input on many devices
      • We need to wait for the “Garden” release to know exactly how things are going to work (although we can get plenty of clues from the Windows CE port of Qt)
      • Known factors:
        • Applications will run “maximized” by default – you’ll still be able to see the status bar and softkey area
        • QMenuBar for an application’s main window will map onto the left softkey options menu (you can control which menu item also goes on the right (& centre?) softkey
    23. Example: CuteMaze
      • Applications that are already scalable may port extremely easily
    24. Porting Other Apps to Qt for S60
      • If you’re porting any application not developed with Qt to S60 then it would be crazy not to consider Qt as a target:
        • Simpler and easier to code for than native S60 UI framework (Avkon)
        • Much more portable than other alternatives – almost free porting after that to Windows Mobile and embedded Linux devices
        • Slight performance penalty compared to native Symbian code
    25. Example: GDAL Viewer
      • Simple viewer application for multiple map formats (learn about GDAL later)
      • 2-stage porting effort:
        • First from Win32 to Qt on a Linux desktop
        • Second to Qt for S60
      • Stage one took an experienced Qt developer with zero knowledge of Win32 ~5 hours
      • Stage two took me 20 minutes
    26. Questions?
    27. Cool Qt Demo - WolfenQt
      • http:// labs.trolltech.com/blogs/category/labs/internet/webkit /
    SlideShare Zeitgeist 2009

    + mwilcoxmwilcox Nominate

    custom

    2439 views, 2 favs, 2 embeds more stats

    Qt for S60 & Porting
    Presentation from Qt for S60 c more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2439
      • 2428 on SlideShare
      • 11 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 60
    Most viewed embeds
    • 7 views on http://www.linux.rk.edu.pl
    • 4 views on http://bantora.com

    more

    All embeds
    • 7 views on http://www.linux.rk.edu.pl
    • 4 views on http://bantora.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Tags