Home · API Reference · Modules

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)
void setTextId (const QString &textId)
void setPressed (bool pressed)
void setHighlighted (bool highlighted)
void setEnabled (bool enabled)
void setVisible (bool newVisible)

Signals

void propertyChanged (const QString &propertyName)

Public Member Functions

 MToolbarItem (const QString &name, MInputMethod::ItemType type)
 MToolbarItem (const MToolbarItem &)
virtual ~MToolbarItem ()
const MToolbarItemoperator= (const MToolbarItem &other)
MInputMethod::ItemType type () const
QString name () const
bool isVisible () const
void setVisible (bool newVisible, bool explicitly)
QString text () const
QString textId () const
bool toggle () const
void setToggle (bool toggle)
bool pressed () const
QString icon () const
void setIcon (const QString &icon)
QString iconId () const
void setIconId (const QString &iconId)
Qt::Alignment contentAlignment () const
void setContentAlignment (Qt::Alignment alignment)
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
bool isCustom () const
void setCustom (bool custom)
bool enabled () const

Protected Member Functions

void clearActions ()
void setAlignment (Qt::Alignment alignment)
void append (const QSharedPointer< MToolbarItemAction > &action)

Properties

QString text
QString textId
bool visible
bool toggle
bool pressed
QString icon
int size
QString iconId
bool enabled
Qt::Alignment contentAlignment


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::contentAlignment (  )  const

Return alignment of content inside item.

void MToolbarItem::setContentAlignment ( Qt::Alignment  alignment  ) 

Set alignment of content inside item.

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]

Qt::Alignment MToolbarItem::contentAlignment [read, write]


Copyright © 2011 Nokia Corporation
Maliit