Home ยท API Reference

MToolbarItem Class Reference

MToolbarItem represents a named item in a customized toolbar for virtual keyboard. More...

List of all members.

Public Slots

void setText (const QString &text)
 Sets new text for item.
void setTextId (const QString &textId)
 Sets text id for item.
void setPressed (bool pressed)
 Sets presseed state for item.
void setHighlighted (bool highlighted)
 Set highlighted state for item.
void setEnabled (bool enabled)
 If enabled is true, the item is enabled; otherwise, it is disabled.
void setVisible (bool newVisible)
 Explictly set the visiblity for the item.

Signals

void propertyChanged (const QString &propertyName)
 Emitted when some property is changed.

Public Member Functions

 MToolbarItem (const QString &name, MInputMethod::ItemType type)
 Constructor.
 MToolbarItem (const MToolbarItem &)
 Copy constructor.
virtual ~MToolbarItem ()
 Destructor.
const MToolbarItemoperator= (const MToolbarItem &other)
MInputMethod::ItemType type () const
 Returns the ItemType of the item.
QString name () const
 Returns the name of the item.
bool isVisible () const
 Returns visibility of the item.
void setVisible (bool newVisible, bool explicitly)
 Sets the visibility of the item.
QString text () const
 Returns text from item.
QString textId () const
 Returns text id.
bool toggle () const
 Returns true if item could be toggled.
void setToggle (bool toggle)
 Defines whether item could be toggled or not.
bool pressed () const
 Returns true if item is pressed.
QString icon () const
 Returns icon name.
void setIcon (const QString &icon)
 Sets icon name.
QString iconId () const
 Returns icon id.
void setIconId (const QString &iconId)
 Sets icon id.
Qt::Alignment alignment () const
QList< QSharedPointer< const
MToolbarItemAction > > 
actions () const
QList< QSharedPointer
< MToolbarItemAction > > 
actions ()
MInputMethod::VisibleType showOn () const
void setShowOn (MInputMethod::VisibleType showOn)
MInputMethod::VisibleType hideOn () const
void setHideOn (MInputMethod::VisibleType hideOn)
QString group () const
void setGroup (const QString &group)
int size () const
void setSize (int size)
bool highlighted () const
 Return highlighted state for the item.
bool isCustom () const
void setCustom (bool custom)
bool enabled () const
 Return true if item is enabled; otherwise return false.

Protected Member Functions

void clearActions ()
 Remove all actions from this item.
void setAlignment (Qt::Alignment alignment)
 Set alignment for item.
void append (const QSharedPointer< MToolbarItemAction > &action)
 Add action to action list for this item.

Properties

QString text
QString textId
bool visible
bool toggle
bool pressed
QString icon
int size
QString iconId
bool enabled


Detailed Description

MToolbarItem represents a named item in a customized toolbar for virtual keyboard.

Constructor & Destructor Documentation

MToolbarItem::MToolbarItem ( const QString &  name,
MInputMethod::ItemType  type 
)

Constructor.

MToolbarItem::MToolbarItem ( const MToolbarItem other  ) 

Copy constructor.

MToolbarItem::~MToolbarItem (  )  [virtual]

Destructor.


Member Function Documentation

const MToolbarItem & MToolbarItem::operator= ( const MToolbarItem other  ) 

MInputMethod::ItemType MToolbarItem::type (  )  const

Returns the ItemType of the item.

See also:
ItemType.

QString MToolbarItem::name (  )  const

Returns the name of the item.

bool MToolbarItem::isVisible (  )  const

Returns visibility of the item.

void MToolbarItem::setVisible ( bool  newVisible,
bool  explicitly 
)

Sets the visibility of the item.

QString MToolbarItem::text (  )  const

Returns text from item.

QString MToolbarItem::textId (  )  const

Returns text id.

bool MToolbarItem::toggle (  )  const

Returns true if item could be toggled.

This attribute is applicable for buttons only.

void MToolbarItem::setToggle ( bool  toggle  ) 

Defines whether item could be toggled or not.

This attribute is applicable for buttons only.

bool MToolbarItem::pressed (  )  const

Returns true if item is pressed.

This attribute is applicable for toggle buttons only.

QString MToolbarItem::icon (  )  const

Returns icon name.

void MToolbarItem::setIcon ( const QString &  icon  ) 

Sets icon name.

QString MToolbarItem::iconId (  )  const

Returns icon id.

void MToolbarItem::setIconId ( const QString &  iconId  ) 

Sets icon id.

Qt::Alignment MToolbarItem::alignment (  )  const

QList< QSharedPointer< const MToolbarItemAction > > MToolbarItem::actions (  )  const

QList< QSharedPointer< MToolbarItemAction > > MToolbarItem::actions (  ) 

MInputMethod::VisibleType MToolbarItem::showOn (  )  const

void MToolbarItem::setShowOn ( MInputMethod::VisibleType  showOn  ) 

MInputMethod::VisibleType MToolbarItem::hideOn (  )  const

void MToolbarItem::setHideOn ( MInputMethod::VisibleType  hideOn  ) 

QString MToolbarItem::group (  )  const

void MToolbarItem::setGroup ( const QString &  group  ) 

int MToolbarItem::size (  )  const

void MToolbarItem::setSize ( int  size  ) 

bool MToolbarItem::highlighted (  )  const

Return highlighted state for the item.

bool MToolbarItem::isCustom (  )  const

void MToolbarItem::setCustom ( bool  custom  ) 

bool MToolbarItem::enabled (  )  const

Return true if item is enabled; otherwise return false.

void MToolbarItem::setText ( const QString &  text  )  [slot]

Sets new text for item.

void MToolbarItem::setTextId ( const QString &  textId  )  [slot]

Sets text id for item.

void MToolbarItem::setPressed ( bool  pressed  )  [slot]

Sets presseed state for item.

This attribute is applicable for toggle buttons only.

void MToolbarItem::setHighlighted ( bool  highlighted  )  [slot]

Set highlighted state for item.

This attribute is applicable for buttons only.

void MToolbarItem::setEnabled ( bool  enabled  )  [slot]

If enabled is true, the item is enabled; otherwise, it is disabled.

This attribute is applicable for buttons only.

void MToolbarItem::setVisible ( bool  newVisible  )  [slot]

Explictly set the visiblity for the item.

void MToolbarItem::propertyChanged ( const QString &  propertyName  )  [signal]

Emitted when some property is changed.

Parameters:
propertyName Specifies name of changed property

void MToolbarItem::clearActions (  )  [protected]

Remove all actions from this item.

void MToolbarItem::setAlignment ( Qt::Alignment  alignment  )  [protected]

Set alignment for item.

Alignment could not be changed after toolbar loading.

void MToolbarItem::append ( const QSharedPointer< MToolbarItemAction > &  action  )  [protected]

Add action to action list for this item.


Property Documentation

QString MToolbarItem::text [read, write]

QString MToolbarItem::textId [read, write]

bool MToolbarItem::visible [read, write]

bool MToolbarItem::toggle [read, write]

bool MToolbarItem::pressed [read, write]

QString MToolbarItem::icon [read, write]

int MToolbarItem::size [read, write]

QString MToolbarItem::iconId [read, write]

bool MToolbarItem::enabled [read, write]


Copyright © 2010 Nokia Corporation
MeeGo Touch