[Reprinted] Learning routes for meego Development

Source: Internet
Author: User
Tags gstreamer

The underlying and intermediate architecture of meego systems of different versions are basically the same and can be customized and cropped. The difference lies mainly in the top user experience layer, such as the meego of handset and notebook versions. The UI is very different (the development environment of the UI is also different). In this document, it is a summary of the learning route of the handset meego version. The meego mentioned later, unless explicitly stated, refers to the meego System of handset.
I. Basics
1. Programming Language
1.1 The GUI of meego is developed based on QT. Needless to say, C ++ is definitely the preferred development language.
1.2 use of STL. Qt implements a set of STL-like interfaces by itself, which is only slightly different from standard STL, and there are also API documentation. STL is mentioned separately because it is too important. Its core content is containers and algorithms. This is the most basic data operation in C ++ programs and must be mastered. (For Beginners, you can learn through the STL Chinese tutorial, and then easily go to the QT class STL interface to write code ).
1.3 meego is the middle layer, not all developed by QT, some of which are written in C language. In fact, many middle-layer service programs on meego are open-source projects in the GNOME desktop environment that are directly used. The basis of gnome is the gobject System Based on C language. Therefore, C language is also an important development language.
However, C is not necessary. If you understand C, it is equivalent to icing on the cake. I will explain it in detail in the second part.

2. clarify some concepts
2.1 First of all, it is clear that QT is not only used for drawing, but also a well-developed underlying library. In addition to drawing, QT also integrates many UI-independent functions, for example, network, XML, SQL, and so on, QT has related classes and frameworks.
2.2 meego is based on QT and can be accurately described as follows: meego inherits QT and develops a GUI library called libmeegotouch and meego, which is developed using libmeegotouch, functional code hidden behind the interface is developed using QT.
2.3 QT has a very good document system and many example codes, which must be fully utilized.
2.4 Although libmeegotouch also has documentation and example code, because libmeegotouch is only responsible for drawing the GUI, its example code has limitations and a small number, so for developers, you must also use QT example code for further study.

3. QT/meego basic learning
3.1 qmake usage. The QT program uses the qmake and pro files for project management. See the document qmake tutorial -- http://doc.qt.nokia.com/4.7/qmake-tutorial.html
3.2 QT object system. See Document Object Model -- http://doc.qt.nokia.com/4.7/object.html
And the property system -- http://doc.qt.nokia.com/4.7/properties.html#qt-s-property-system
The signal and slot functions in 3.3 QT are one of the features of QT and a new concept after C ++ expansion. See Signals & slots -- http://doc.qt.nokia.com/4.7/signalsandslots.html
The Event System -- http://doc.qt.nokia.com/4.7/eventsandfilters.html and another look at events -- aggregate (select/poll/epoll function ), this can be further realized with the development.
3.5 Qt in the container class, this is the class STL interface mentioned above in QT, please refer to the documentation container classes -- http://doc.qt.nokia.com/4.7/containers.html

4. widgets in meego/QT
4.1 any GUI Library has the concept of a widget, which is equivalent to a control in Windows programming. Buttons, text edit boxes, and drop-down menus are Widgets. The introduction of widgets makes GUI programming more convenient and convenient.
In 4.2 QT, there are two plotting systems, one is qwidget + qlayoutitem, which is a widget used in desktop environment programming and the other is graphics view framework, this system is more flexible than xserver. It can rotate basic graphic elements and initially implement the parent class qgraphicswidget of widgets, but it is not further instantiated.
For graphics view framework, see graphics view framework -- http://doc.qt.nokia.com/4.7/graphicsview.html
4.3 meego is a system used on a small screen device. As mentioned above, qwidget is designed for a desktop environment and is not suitable for handheld devices. Although qgraphicswidget is not complete, however, graphics view framework is highly flexible. Therefore, meego chooses to inherit from qgraphicswidget, and implements a set of widget library-mwidget for small screen devices. Although qwidget and mwidget are two different widgets, the design concept and design mode are basically the same. In particular, the layout system uses similar methods. Therefore, if you are familiar with qwidget, mwidget can be quickly used. If you are a newbie, you can use qwidget + qlayoutitem-related technical documents to learn the basic idea of layout in QT, and then read the mwidget example code. The following are some reference documents,
Layout management -- http://doc.qt.nokia.com/4.7/layout.html
Widgets and layouts -- http://doc.qt.nokia.com/4.7/widgets-and-layouts.html
Mwidget layout -- http://apidocs.meego.com/1.1/platform/html/libmeegotouch/layouts.html
Common components -- http://apidocs.meego.com/1.1/platform/html/index.html
4.4 after familiarizing yourself with the basic concepts and usage of widget + layout, you can start to read meego's example code and read the code in the example subdirectory in the libmeegotouch source code directory, this is the best way to learn about meego development. First of all, it is recommended to read the subdirectory tutorial_music_catalogue In the example directory. For this code, you can refer to the introduction in the document http://apidocs.meego.com/mtf/tutorial.html. The number of widgets in 4.5 QT is huge, which can easily lead to fear. But in meego, because it is designed for handheld devices, the screen is small, and the number of widgets is also much smaller. Currently, there are only more than 10 commonly used widgets, widgets such as buttons and text edit boxes are easy to use. The only widget with some difficulty is MList, which is a common widget on mobile phones and a long list. MList uses model/view framework in QT. For more information, see http://doc.qt.nokia.com/4.7/model-view-programming.html. The sub-directory in the libmeegotouch source code directory example, Apsara, is an example using the model/view framework. You need to use this code to learn how to use MList.

5. Frameworks and Technologies commonly used in meego/QT
5.1 animation framework, QT provides an animation framework that allows widgets to move (in fact, qobject), please refer to the documentation the animation framework -- http://doc.qt.nokia.com/4.7/animation-overview.html
5.2 QT multithreading, see the documentation thread support in QT -- http://doc.qt.nokia.com/4.7/threads.html
5.3 meego is designed for handheld devices, and currently popular mobile terminals all have touch screens and QT support for touch screen gestures. Please refer to the documentation.
Gestures programming -- http://doc.qt.nokia.com/4.7/gestures-overview.html
Gestures and multitouch -- http://apidocs.meego.com/1.1/platform/html/index.html
5.4 meego, introduced the concept of CSS for widgets, you can use CSS files to control many properties of mwidget, please refer to the document CSS in meego -- http://apidocs.meego.com/1.1/platform/html/libmeegotouch/styling.html5.5 meego internationalization processing, is based on the qt international solution, please refer to the document
Internationalization with QT -- http://doc.qt.nokia.com/4.7/internationalization.html
Internationalisation Guidelines -- http://apidocs.meego.com/1.1/platform/html/libmeegotouch/i18n.html 、

The previous Introduction focuses on the basic skills of meego development, especially the use of widgets. Developed functional code hidden behind the GUI, meego also provides many excellent programming frameworks.
1. inter-process communication. The most common communication method in Linux desktop environments is Tranquility, which has become a standard. meego is also a natural use of tranquility.
1.1 slave native is developed with C language, at the same time can be bound to a lot of object-oriented programming languages, detailed introduction, can refer to the http://www.freedesktop.org/wiki/Software/dbus
1.2 GNOME Desktop development, using the objective-glib library, this is based on gobject Object System C library, detailed introduction, can refer to the http://library.gnome.org/devel/dbus-glib/unstable/index.html
1.3 QT is also bound to the license, detailed introduction, you can refer to the http://doc.qt.nokia.com/4.7/intro-to-dbus.html

2. Databases
2.1 meego platform uses a central database, tracker, this is also developed in GNOME desktop project technology, detailed introduction, can refer to the http://projects.gnome.org/tracker/
2.2 GNOME Desktop development, using the tracker Library (based on the tracking), is based on gobject object Object System C library, can be downloaded from the http://ftp.gnome.org/pub/GNOME/sources/tracker/0.9/
2.3 QT also made a binding to tracker, there is a libqttracker library, can be downloaded from the http://maemo.gitorious.org/maemo-af/libqttracker/trees/master 3. multimedia programming
3.1 QT has a set of multimedia programming framework phonon, but this is not the ultimate goal of QT. You can ignore this framework.
3.2 QT now has a separate project, QT-mobility, with a new multimedia programming framework multimedia -- plugin.
3.3 If you only develop an audio/video player, multimedia is enough. It hides many coding/decoding details and allows developers to focus on developing user experience. Multimedia backend, using gstreamer, gstreamer is a multimedia codec framework developed in the GNOME desktop project, is based on the C library of gobject object system, can refer to the http://www.gstreamer.net /, if you need flexible development of multimedia programs with more complex functions, you can use the gstreamer framework.

4. Instant messaging program
4.1 GNOME desktop project, developed a library of instant messaging, telepathy (based on Ghost), this is a framework that can include different instant messaging program protocols, can refer to the http://telepathy.freedesktop.org/wiki/
4.2 native telepathy, is a C library developed based on gobject, can refer to http://telepathy.freedesktop.org/doc/telepathy-glib/ and http://telepathy.freedesktop.org/doc/book/
4.3 QT is also bound to telepathy, provides a C ++ interface, you can refer to the http://telepathy.freedesktop.org/doc/telepathy-qt4/

5. c language in meego Development
From the four frameworks described above, the native systems are developed in C language and all have C Interfaces Based on the gobject system. QT is mainly used to encapsulate the underlying libraries or bind programming languages. When learning these frameworks, developers can learn about the gobject system more conveniently. In addition, many documents that can be referenced are based on the native interfaces of C language, including a large number of example codes, which are also written in C. Therefore, in the development process, C Programming Based on the gobject Object System is the second powerful tool for developers.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.