TrustIconWidget

Widget displaying a trust level icon.

Declared in src/libs/libpair/pair/ui/TrustIconWidget.hpp
Inherits SvgWidget
Group ui

Detailed description

TrustIconWidget displays an SVG icon representing the current trust level (IGNORED, TRUST, or BLOCK) for an associate node.

The widget can be made interactive: a click then emits clicked(), and the owner decides what it means. It does not change its own level. TrustSelectorWidget shows one icon per level and picks the level of the icon that was clicked.

TrustIconWidget

See also TrustSelectorWidget.

Property documentation

interactive property

interactive : bool

This property holds whether the widget responds to a click.

When the value is true, the cursor is a pointing hand, and a left mouse press emits clicked(). The default is false.

Access functions:

  • bool isInteractive() const
  • void setInteractive(bool interactive)

keyStatus property

keyStatus : KeyStatus

This property holds the status of the public key of the associate.

Before the key is received, the widget shows a key icon in place of the trust icon: a gray "no key" icon for KeyStatus::Unknown, and a gold key icon for KeyStatus::Pending. A change updates the icon and emits keyStatusChanged(). The setter has no effect before configure(). The default is KeyStatus::Received, so the trust icon shows.

Access functions:

  • KeyStatus keyStatus() const
  • void setKeyStatus(KeyStatus status)

Notifier signal:

  • void keyStatusChanged(KeyStatus status)

trustLevel property

trustLevel : TrustLevel

This property holds the trust level that the icon shows.

The widget shows the icon for TRUST, IGNORE or BLOCK when keyStatus is KeyStatus::Received. A change updates the icon and emits trustLevelChanged(). The setter has no effect before configure(). The default is IGNORE.

Access functions:

  • TrustLevel trustLevel() const
  • void setTrustLevel(TrustLevel level)

Notifier signal:

  • void trustLevelChanged(TrustLevel level)
In this section