Maemo Qt Extra Libraries

Image:Ambox_notice.png
Qt 4.6 for Fremantle, included in PR1.2, includes the same functionality without the need for additional libraries. The extra libraries described below are obsolete.

Maemo Qt Extra Libraries are extensions to the community supported Qt (version 4.5) available for Maemo5 aka Fremantle. The libraries provide easier access to Fremantle specific functionality for Maemo Qt application developers. The libraries functionality include for example screen orientation changing and displaying Hildon notifications.

Contents

[edit] Installing Qt Extra Libs

The libraries are currently available from extras-devel. Libraries can be installed using apt-get. Note that on the device you have to have root shell enabled.

[edit] Installation to Scratchbox

Install libraries and development headers by running

fakeroot apt-get install qhildon-notifications qhildon-widgetcapabilities qhildon-systemcapabilities qmaemo-ext-libs-dev

[edit] Installation to N900

To install the libraries you have to have root shell enabled in the device. Access root shell and run

apt-get install qhildon-notifications qhildon-systemcapabilities qhildon-widgetcapabilities

Metapackages for installing all the libraries with single install will be available soon.

[edit] Minimal API documentation

Please note that all the classes are inside Maemo namespace.

QHildon-WidgetCapabilities

QOrientationCapability

QOrientationCapability(QWidget* parent, bool automaticOrientationUpdate = false)
set application window as the parent. Usually derived from QMainWindow
set the second parameter to true, if you want the orientation change
when you physically turn the device. Otherwise you can leave out the
second parameter. 

void setOrientation(QOrientation orientation);
Set screen orientation to QOrientation
Use value Maemo::Landscape or Maemo::Portrait

void setListeningForOrientationChanges(bool enabled)
Set automatic orientation changing on/off

void orientationChanged(QOrientation orientation) 
This signal is emitted when orientation changes.

QHildon-Notifications

QOrientationCapability

QNotifications(QObject *parent = 0)
Constructor

void showBanner(const QString &text)
Shows Hildon banner with text

void showSystemNote(const QString &text)
Shows system note with text.


QHildon-SystemCapabilities

QOrientationInfo

static QOrientationInfo *instance()
Get pointer to the QOrientation object
Usage: QOrientationInfo::instance()

void startListening()
void stopListening()
Start/Stop listening to device orientation

void orientationChanged(qreal pitch, qreal roll)
Connect to this signal to get the devices pitch and roll

[edit] Example application

Not yet available.

[edit] Sources

The libaries are released under GNU LGPL and the source code is available from gitorious.org [1]

git clone git://gitorious.org/qt-maemo/qmaemo-ext-libs.git