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

QDeviceButton Class Reference
[QtBaseModule]

The QDeviceButton class represents a user-programmable button on a Qt Extended device. More...

    #include <QDeviceButton>

Public Functions


Detailed Description

The QDeviceButton class represents a user-programmable button on a Qt Extended device.

This class represents a physical special-function button on a Qt Extended device. The location and number of buttons will vary from device to device and the button is described in the help documentation by userText() and pixmap().

QDeviceButton objects are only usefully obtained from QDeviceButtonManager::buttonForKeycode().


Member Function Documentation

QDeviceButton::QDeviceButton ()

Constructs QDeviceButton.

QDeviceButton::~QDeviceButton ()   [virtual]

Destructs QDeviceButton.

QString QDeviceButton::context () const

Returns the button context. If the context is empty, then the button applies in all contexts. The semantics of non-empty contexts is device specific, but in general the meaning of a context is a certain device state. The Qt Extended server defines the context "HomeScreen" such that device button mappings can be made that only apply on the device home screen.

See also setContext().

QtopiaServiceRequest QDeviceButton::heldAction () const

Returns the user-assigned action for when this button is pressed and held.

See also setHeldAction().

bool QDeviceButton::heldActionMappable () const

Returns the mappability set for the pressed action.

See also setHeldActionMappable().

int QDeviceButton::keycode () const

Returns the button keycode. See the Qt::Key enum for the values.

See also setKeycode().

QPixmap QDeviceButton::pixmap () const

Returns the pixmap for this button, or an empty (null) pixmap if none is defined.

See also setPixmap().

QtopiaServiceRequest QDeviceButton::pressedAction () const

Returns the user-assigned action for when this button is pressed.

See also setPressedAction().

bool QDeviceButton::pressedActionMappable () const

Returns the mappability set for the pressed action.

See also setPressedActionMappable().

QtopiaServiceRequest QDeviceButton::releasedAction () const

Returns the user-assigned action for when this button is released.

See also setReleasedAction().

bool QDeviceButton::releasedActionMappable () const

Returns the mappability set for the released action.

See also setReleasedActionMappable().

void QDeviceButton::setContext ( const QString & context )

Sets the context where the keycode applies.

See also context().

void QDeviceButton::setHeldAction ( const QtopiaServiceRequest & action )

Set the action to be performed when this button is pressed and held to action.

See also heldAction().

void QDeviceButton::setHeldActionMappable ( bool mappable )

Set the mappability of the held action to mappable.

See also heldActionMappable().

void QDeviceButton::setKeycode ( int keycode )

Sets the keycode that is sent when the button is pressed.

See also keycode().

void QDeviceButton::setPixmap ( const QString & pmn )

Set the pixmap for this button to the resource named pmn. This will ideally match the label on the physical button.

See also pixmap().

void QDeviceButton::setPressedAction ( const QtopiaServiceRequest & action )

Set the action to be performed when this button is pressed to action.

See also pressedAction().

void QDeviceButton::setPressedActionMappable ( bool mappable )

Set the mappability of the pressed action to mappable.

See also pressedActionMappable().

void QDeviceButton::setReleasedAction ( const QtopiaServiceRequest & action )

Set the action to be performed when this button is released action.

See also releasedAction().

void QDeviceButton::setReleasedActionMappable ( bool mappable )

Set the mappability of the released action to mappable.

See also releasedActionMappable().

void QDeviceButton::setUserText ( const QString & text )

Sets the human-readable, translated description of the button to text.

See also userText().

QString QDeviceButton::userText () const

Returns a human-readable, translated description of the button.

See also setUserText().

bool QDeviceButton::operator== ( const QDeviceButton & e ) const

Returns true if this QDeviceButton is equal to e.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3