Banner

Search for usage in LXR

Banner Class Reference
Inheritance diagram for Banner:

Properties

listKirigamiAction actions
 
alias hoveredLink
 
bool showCloseButton
 
string text
 
string title
 
int type
 

Signals

void linkActivated (string link)
 
void linkHovered (string link)
 

Detailed Description

An banner Item with support for informational, positive, warning and error types, and with support for associated actions.

Banner can be used to inform or interact with the user without requiring the use of a dialog and are positionned in the footer or header of a page. For inline content, see org::kde::kirigami::InlineMessage.

The Banner is hidden by default.

Optionally, actions can be added which are shown alongside an optional close button on the right side of the Item. If more actions are set than can fit, an overflow menu is provided.

Example usage:

type: Kirigami.MessageType.Error
text: "My error message"
Kirigami.Action {
icon.name: "edit"
text: "Action text"
onTriggered: {
// do stuff
}
},
Kirigami.Action {
icon.name: "edit"
text: "Action text"
onTriggered: {
// do stuff
}
}
]
}
An banner Item with support for informational, positive, warning and error types, and with support fo...
Definition Banner.qml:51
int type
This property holds the message type.
Definition Banner.qml:81
string text
This property holds the message text.
Definition Banner.qml:89
listKirigamiAction actions
This property holds the list of Kirigami Actions to show in the banner's internal kirigami::ActionToo...
Definition Banner.qml:103
Since
KirigamiAddons 0.10.0

@deprecatde Since 1.5.0, use Kirigami.InlineMessage with the appropriate position property.

Definition at line 51 of file Banner.qml.

Property Documentation

◆ actions

listKirigamiAction Banner::actions
read

This property holds the list of Kirigami Actions to show in the banner's internal kirigami::ActionToolBar.

Actions are added from left to right. If more actions are set than can fit, an overflow menu is provided.

Definition at line 103 of file Banner.qml.

◆ hoveredLink

alias Banner::hoveredLink
read

This property holds the link embedded in the message text that the user is hovering over.

Remarks
This property is read-only

Definition at line 67 of file Banner.qml.

◆ showCloseButton

bool Banner::showCloseButton
read

This property holds whether the close button is displayed.

default: false

Definition at line 95 of file Banner.qml.

◆ text

string Banner::text
read

This property holds the message text.

Definition at line 89 of file Banner.qml.

◆ title

string Banner::title
read

This property holds the message title.

Definition at line 85 of file Banner.qml.

◆ type

int Banner::type
read

This property holds the message type.

The following values are allowed:

  • Kirigami.MessageType.Information
  • Kirigami.MessageType.Positive
  • Kirigami.MessageType.Warning
  • Kirigami.MessageType.Error

default: Kirigami.MessageType.Information

Definition at line 81 of file Banner.qml.

Member Function Documentation

◆ linkActivated

void Banner::linkActivated ( string link)
signal

This signal is emitted when a link is clicked or tapped in the message text.

Parameters
Theclicked or tapped link.

◆ linkHovered

void Banner::linkHovered ( string link)
signal

This signal is emitted when a link is hovered in the message text.

Parameters
Thehovered link.

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:05:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.