Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QSoftMenuBar Class Reference
[QtBaseModule]

The QSoftMenuBar class allows the labels in the phone soft menu bar to be set. More...

    #include <QSoftMenuBar>

Public Types

Static Public Members


Detailed Description

The QSoftMenuBar class allows the labels in the phone soft menu bar to be set.

QSoftMenuBar 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 Qt Extended 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. The user can choose whether the text or pixmap labels are shown.

QSoftMenuBar is only available in the Qt Extended Phone Edition.


Member Type Documentation

enum QSoftMenuBar::FocusState

ConstantValueDescription
QSoftMenuBar::EditFocus1apply the label setting when the widget has edit focus.
QSoftMenuBar::NavigationFocus2apply the label setting when the widget does not have edit focus.
QSoftMenuBar::AnyFocus3apply the label setting regardless of focus state.

enum QSoftMenuBar::LabelType

ConstantValue
QSoftMenuBar::IconLabel0
QSoftMenuBar::TextLabel1

enum QSoftMenuBar::StandardLabel

ConstantValue
QSoftMenuBar::NoLabel0
QSoftMenuBar::Options1
QSoftMenuBar::Ok2
QSoftMenuBar::Edit3
QSoftMenuBar::Select4
QSoftMenuBar::View5
QSoftMenuBar::Cancel6
QSoftMenuBar::Back7
QSoftMenuBar::BackSpace8
QSoftMenuBar::Next9
QSoftMenuBar::Previous10
QSoftMenuBar::EndEdit11
QSoftMenuBar::RevertEdit12
QSoftMenuBar::Deselect13
QSoftMenuBar::Finish14


Member Function Documentation

void QSoftMenuBar::addMenuTo ( QWidget * widget, QMenu * menu, FocusState state = AnyFocus )   [static]

Adds menu to widget for focus state.

See also removeMenuFrom().

void QSoftMenuBar::clearLabel ( QWidget * widget, int key, FocusState state = AnyFocus )   [static]

Clears any label set for widget and key in focus state.

See also setLabel().

QMenu * QSoftMenuBar::createEditMenu ()   [static]

Creates and returns a standard "Edit" menu used for QLineEdit and QTextEdit.

Returns 0 if the clipboard functionality has been disabled in Qt for Embedded Linux.

bool QSoftMenuBar::hasMenu ( QWidget * widget, FocusState state = AnyFocus )   [static]

Returns true if the widget has a menu assigned to it in focus state.

See also menuFor().

const QList<int> & QSoftMenuBar::keys ()   [static]

Returns the list of soft keys (i.e. keys with a corresponding label in the soft menu bar).

QMenu * QSoftMenuBar::menuFor ( QWidget * widget, FocusState state = AnyFocus )   [static]

Returns the QMenu assigned to widget in focus 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().

int QSoftMenuBar::menuKey ()   [static]

Returns the key that activates menus managed by the soft menu bar.

void QSoftMenuBar::removeMenuFrom ( QWidget * widget, QMenu * menu, FocusState state = AnyFocus )   [static]

Removes the menu from widget for focus state.

See also addMenuTo().

void QSoftMenuBar::setCancelEnabled ( QWidget * widget, bool enable )   [static]

Sets whether Cancel is available for widget when a menu associated with it is shown. The Cancel option is only shown if the widget's top level window is a QDialog. If enable is true a Cancel menu action will be displayed for a dialog.

The default is true.

void QSoftMenuBar::setHelpEnabled ( QWidget * widget, bool enable )   [static]

Sets whether the Help menu option is available for widget when a menu associated with it is shown. The Help option will only be shown if there is a help file available. If enable is true the help menu option may be displayed for the widget.

The default is true.

void QSoftMenuBar::setInputMethodEnabled ( QWidget * widget, bool enable )   [static]

Sets whether the Input Method menu option is available for widget when a menu associated with it is shown. If enable is true an Input Method menu action may be displayed for the widget.

The default is true.

void QSoftMenuBar::setLabel ( QWidget * widget, int key, const QString & pixmap, const QString & text, FocusState state = AnyFocus )   [static]

When widget gains the specified focus state, the label for key is set to text and pixmap.

void QSoftMenuBar::setLabel ( QWidget * widget, int key, StandardLabel label, FocusState state = AnyFocus )   [static]

This is an overloaded member function, provided for convenience.

When widget gains the specified focus state, the label for key is set to the standard label.

QWidgetList QSoftMenuBar::widgetsFor ( const QMenu * menu, FocusState state = AnyFocus )   [static]

Returns all widgets that have added menu to the menu bar for focus state.

See also addMenuTo(), removeMenuFrom(), menuFor(), and hasMenu().


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3