Home · All Classes · Main Classes · Deprecated |
Abstract base class for label highlighter objects. More...
Inherited by MCommonLabelHighlighter.
Public Member Functions | |
virtual | ~MLabelHighlighter () |
virtual QRegExp | highlightExpression () const =0 |
virtual bool | validate (QString &item) const |
virtual void | click (const QString &item)=0 |
virtual void | longPress (const QString &item)=0 |
bool | ignoreClickAndLongPressEvents () const |
void | setIgnoreClickAndLongPressEvents (bool ignore) |
Abstract base class for label highlighter objects.
Class is used to highlight text fragments from MLabel with the color specified in the label style. Information about the click and long press events happening to the highlighted parts of the label can be received through the callback methods if wanted.
MLabelHighlighter::~MLabelHighlighter | ( | ) | [virtual] |
Destructs MLabelHighlighter.
virtual void MLabelHighlighter::click | ( | const QString & | item | ) | [pure virtual] |
Callback method when user clicks a highlighted item.
Implemented in MCommonLabelHighlighter.
virtual QRegExp MLabelHighlighter::highlightExpression | ( | ) | const [pure virtual] |
Returns regular expression for highlighting text fragments.
Implemented in MCommonLabelHighlighter.
bool MLabelHighlighter::ignoreClickAndLongPressEvents | ( | ) | const |
Returns the value that was previously set with a call to setIgnoreClickAndLongPressEvents() method.
Method will return false by default.
virtual void MLabelHighlighter::longPress | ( | const QString & | item | ) | [pure virtual] |
Callback method when user long presses a highlighted item.
Implemented in MCommonLabelHighlighter.
void MLabelHighlighter::setIgnoreClickAndLongPressEvents | ( | bool | ignore | ) |
Enable/disable processing of click and long press events.
If enabled, the click and long press events are received through the click() and longPress() callback methods.
bool MLabelHighlighter::validate | ( | QString & | item | ) | const [virtual] |
Method for validating highlighted items.
Return true if the item is really valid, return false it the item is invalid. The validated item can be changed if wanted. The outputted item will be the same that is given to the click() and longPress() methods. Default implementation just returns true.
Copyright © 2010 Nokia Corporation | MeeGo Touch |