Home · All Classes · Main Classes · Deprecated |
View class for standard push buttons. More...
Inherits MWidgetView.
Inherited by MButtonIconView, MButtonSwitchView, MButtonTabView, and MCheckboxView.
Public Member Functions | |
MButtonView (MButton *controller) | |
virtual | ~MButtonView () |
Protected Member Functions | |
virtual void | drawIcon (QPainter *painter, const QRectF &iconRect) const |
View class for standard push buttons.
![]() | ![]() |
MButtonView is used to visualize push buttons and toggle buttons. The view draws a fixed background and an icon, text or both on top of it. If the view is for a checkable button, it uses a different background and different text color for the checked state.
The outlook of button can be changed using the styling attributes defined in MButtonStyle and MWidgetStyle. MWidgetStyle::backgroundImage, MWidgetStyle::backgroundColor and MWidgetStyle::backgroundOpacity can be used to change appearance of the button itself. If background image is not defined then the background is drawn with solid color. The icon and text position and outlook can be changed through MButtonStyle. Following rules apply:
A button can be in one of the following functional states:
The Push Button does not support long press functionality, so it makes no difference how long the button is held down. If user presses a button and drags while it is in a pannable area, then button follows the finger and tactile feedback is cancel. When releasing the finger after panning, the button interaction is not activated.
MButtonView::MButtonView | ( | MButton * | controller | ) |
Constructs the view.
Pointer | to the controller. |
MButtonView::~MButtonView | ( | ) | [virtual] |
Destructs the view.
Copyright © 2010 Nokia Corporation | MeeGo Touch |