Maemo Qt Extra Libraries

Contents

Maemo Qt Extra Libraries?

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. Qt 4.6 for Fremantle includes the same functionality, without the need for additional libraries.

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.


Installation to scratchbox

Install libraries and development headers by running

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


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.


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


Example application

Not yet available.


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