NavigationItem Class

NavigationItem is a base class for all item in the application navigation. Contains icon, text and action. It is used as an ancestor for classes NavigationToolButton, NavigationMenuItem. More...

Header: #include <NavigationItem>
Inherits: NavigationButton
Inherited By:

NavigationMenuItem and NavigationToolButton

Public Functions

NavigationItem(QWidget *parent, const QIcon &icon, const QString &text)
QAction *defaultAction() const
const QString &description() const
void setDefaultAction(QAction *action)
void setDescription(const QString &brief, const QString &description)
void setSymbolIcon(SegoeMDL2Font::IconSymbol symbol)
void setSymbolIconCode(ushort code)
ushort symbolIconCode() const

Reimplemented Protected Functions

virtual void enterEvent(QEnterEvent *event) override
virtual void leaveEvent(QEvent *event) override
virtual void mouseReleaseEvent(QMouseEvent *event) override
virtual void showEvent(QShowEvent *event) override

Detailed Description

Member Function Documentation

Constructor of the class NavigationItem. Requires the parent widget, icon and text.

QAction *NavigationItem::defaultAction() const

Returns the default action for the item.

See also setDefaultAction().

const QString &NavigationItem::description() const

Returns a description for the item.

See also setDescription().

[override virtual protected] void NavigationItem::enterEvent(QEnterEvent *event)

Reimplements: QWidget::enterEvent(QEnterEvent *event).

[override virtual protected] void NavigationItem::leaveEvent(QEvent *event)

Reimplements: QWidget::leaveEvent(QEvent *event).

[override virtual protected] void NavigationItem::mouseReleaseEvent(QMouseEvent *event)

Reimplements: QAbstractButton::mouseReleaseEvent(QMouseEvent *e).

void NavigationItem::setDefaultAction(QAction *action)

Sets the default action to the item.

See also defaultAction().

void NavigationItem::setDescription(const QString &brief, const QString &description)

Sets brief description and full description to the item.

See also description() and setSymbolIcon.

void NavigationItem::setSymbolIcon(SegoeMDL2Font::IconSymbol symbol)

Sets "Segoe MDL2 Assets" icon symbol for the item. This call equals NavigationItem::setSymbolIconCode(SegoeMDL2Font::code(symbol))

void NavigationItem::setSymbolIconCode(ushort code)

Sets "Segoe MDL2 Assets" icons for the item. Parameter symbol is a font glyph code. To find the list of all icon codes follow this URL - https://docs.microsoft.com/en-us/windows/uwp/design/style/segoe-ui-symbol-font

See also symbolIconCode(), setIcon, and setText.

[override virtual protected] void NavigationItem::showEvent(QShowEvent *event)

Reimplements: QWidget::showEvent(QShowEvent *event).

ushort NavigationItem::symbolIconCode() const

Returns the font glyph code for symbol icon.

See also setSymbolIconCode().