| Home · All Classes · Annotated · Functions |
The QSoftMenuBar class allows the label in the phone soft menu bar to be set. More...
#include <QSoftMenuBar>
The QSoftMenuBar class allows the label in the phone soft menu bar to be set.
QSoftMenuBar is only available in the Qtopia phone edition. It is used to set the icon/text in the soft menu bar to describe the action performed when pressing the associated soft button. Keep in mind that not all phones have soft keys and therefore may not have a visible soft menu bar. The application should be useable without soft key shortcuts.
The labels are updated whenever a widget gains or loses focus or their navigation focus state changes. Therefore, the labels should be set for each widget that may gain focus, and will respond to a soft key. The standard Qt and Qtopia widgets set the labels appropriately, so this is usually only necessary for custom widgets.
The rule for determining what label is displayed on the soft menu bar and where the key events are delivered is:
QSoftMenuBar labels specify both a pixmap and a text label. Currently, Qtopia Phone Edition will always use the pixmap rather than text. The text label must still be provided because future versions of Qtopia Phone Edition may allow the user to choose to view text labels.
QSoftMenuBar is only available in the Qtopia Phone Edition.
See also QWidget::hasEditFocus().
| Constant | Value | Description |
|---|---|---|
| QSoftMenuBar::EditFocus | 1 | apply the label setting when the widget has edit focus. |
| QSoftMenuBar::NavigationFocus | 2 | apply the label setting when the widget does not have edit focus. |
| QSoftMenuBar::AnyFocus | 3 | apply the label setting regardless of focus state. |
| Constant | Value |
|---|---|
| QSoftMenuBar::NoLabel | 0 |
| QSoftMenuBar::Options | 1 |
| QSoftMenuBar::Ok | 2 |
| QSoftMenuBar::Edit | 3 |
| QSoftMenuBar::Select | 4 |
| QSoftMenuBar::View | 5 |
| QSoftMenuBar::Cancel | 6 |
| QSoftMenuBar::Back | 7 |
| QSoftMenuBar::BackSpace | 8 |
| QSoftMenuBar::Next | 9 |
| QSoftMenuBar::Previous | 10 |
Adds QMenu menu to widget widget for focus state state.
See also removeMenuFrom().
Clears any label set for widget w, key key in state state.
See also setLabel().
Creates and returns a standard "Edit" menu used for QLineEdit and QTextEdit.
Returns true if the widget widget has a menu assigned to it in focus state state.
See also menuFor().
Returns the list of soft keys (i.e. keys with a corresponding label in the soft menu bar).
Returns the QMenu assigned to widget widget in focus state state. If a QMenu does not yet exist for the widget, an empty menu will be created with widget as its parent.
See also addMenuTo().
Returns the key that activates menus managed by the soft menu bar.
Removes this QMenu menu from widget widget for focus state state.
See also addMenuTo().
Sets whether cancel is available for widget widget when a menu attached to it is shown and the widget's top level window is a QDialog. If enable is true cancel will be available for the dialog.
Sets whether help is available for widget widget when a menu attached to it is shown. If enable is true help will be available for the widget.
When widget w gains focus, sets the label in the soft menu bar for key key to text t and pixmap pm when in state state.
The pixmaps used in the soft menu bar may be no larger than 22x16 pixels.
This is an overloaded member function, provided for convenience.
When widget w gains focus, sets the label in the soft menu bar for key key to the standard label label when in state state.
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |