Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QSoftMenuBarProvider class provides the backend for the QSoftMenuBar API. More...
#include <QSoftMenuBarProvider>
Inherits QObject.
The QSoftMenuBarProvider class provides the backend for the QSoftMenuBar API.
The QSoftMenuBar class allows applications to control a context specific soft key bar. The QSoftMenuBarProvider manages the state of the soft bar on behalf of a specific UI implementation.
Internally the QSoftMenuBar class sends QCop messages to communicate with the QSoftMenuBarProvider instance. The "context specific" aspects of the bar are managed in the QSoftMenuBar instance and messages are only sent when the bar UI needs to update. Three QCop messages are used on the QPE/QSoftMenuBar channel.
Message | Description |
---|---|
setLabelText(int,int,QString) | setLabelText(int winId, int key, QString text) Sets the button bound to key to text. winId is the integer identifier of the active window from the application's perspective. This is to resolve the race condition where application A sends an update, application B becomes active and sends its update but the provider receives application A's update after application B's incorrectly applying it. The label will only be updated if winId is equal to the currently active windows id. |
setLabelPixmap(int,int,QString) | setLabelPixmap(int winId, int key, QString pixmapName) Sets the button for key to display the given pixmapName. winId is used to resolve the race condition outlined above. The pixmap returned from MenuButton::pixmap() will be resolved as ":icon/" + pixmapName. |
clearLabel(int,int) | clearLabel(int winId, int key) Clears the button for key. The button text will be set to a null string, and the image a null image. winId is used to resolve the race condition outlined above. |
The soft keys available on a device are configured in the SoftKeys group of the defaultbuttons.conf configuration file. For example, the following snippet configures three softkeys - Context1, Select and Back.
[SoftKeys] Count=3 Key0=Context1 Key1=Select Key2=Back
Valid key entries are those understood by the QKeySequence class. The QSoftMenuBarProvider class will only respond to keys configured in this way.
This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.
Create a new QSoftMenuBarProvider instance, with the specified parent.
Destroys the QSoftMenuBarProvider instance.
Returns a key description for the index 'th key. index must be less than keyCount().
Emitted whenever the text or image for button has changed.
This is an overloaded member function, provided for convenience.
Emitted when the text or image mapped to the Qt::Key key has changed.
Returns the number of configured keys.
Returns a list of key descriptions for all configured keys.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |