org::kde::kirigami::templates::InlineMessage

Search for usage in LXR

org::kde::kirigami::templates::InlineMessage Class Reference
Inheritance diagram for org::kde::kirigami::templates::InlineMessage:

Properties

bool _animating
 
list< QtObject > actions
 
bool animating
 
string hoveredLink
 
IconPropertiesGroup icon
 
bool showCloseButton
 
string text
 
int type
 

Signals

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

Detailed Description

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

InlineMessage can be used to inform or interact with the user without requiring the use of a dialog.

The InlineMessage is hidden by default. It also manages its height (and implicitHeight) during an animated reveal when shown. You should avoid setting height on an InlineMessage unless it is already visible.

Optionally an icon can be set, defaulting to an icon appropriate to the message type otherwise.

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:

InlineMessage {
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
}
}
]
}
See also
Inline Messages in Kirigami
KDE Human Interface Guidelines on Inline Messages
Since
KDE Frameworks 5.45

Definition at line 62 of file controls/templates/InlineMessage.qml.

Property Documentation

◆ _animating

bool org::kde::kirigami::templates::InlineMessage::_animating
read

Definition at line 125 of file controls/templates/InlineMessage.qml.

◆ actions

list<QtObject> org::kde::kirigami::templates::InlineMessage::actions
read

This property holds the list of Kirigami Actions to show in the inline message'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 118 of file controls/templates/InlineMessage.qml.

◆ animating

bool org::kde::kirigami::templates::InlineMessage::animating
read

This property holds whether the current message item is animating.

Remarks
This property is read-only

Definition at line 123 of file controls/templates/InlineMessage.qml.

◆ hoveredLink

string org::kde::kirigami::templates::InlineMessage::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 79 of file controls/templates/InlineMessage.qml.

◆ icon

IconPropertiesGroup org::kde::kirigami::templates::InlineMessage::icon
read

This grouped property holds the description of an optional icon.

If no custom icon is set, an icon appropriate to the message type is shown.

Definition at line 100 of file controls/templates/InlineMessage.qml.

◆ showCloseButton

bool org::kde::kirigami::templates::InlineMessage::showCloseButton
read

This property holds whether the close button is displayed.

default: false

Definition at line 110 of file controls/templates/InlineMessage.qml.

◆ text

string org::kde::kirigami::templates::InlineMessage::text
read

This property holds the message text.

Definition at line 104 of file controls/templates/InlineMessage.qml.

◆ type

Kirigami MessageType InlineMessage::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 93 of file controls/templates/InlineMessage.qml.

Member Function Documentation

◆ linkActivated

void org::kde::kirigami::templates::InlineMessage::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 org::kde::kirigami::templates::InlineMessage::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:
list< QtObject > actions
This property holds the list of Kirigami Actions to show in the inline message's internal kirigami::A...
string name
This property holds a Freedesktop standard icon name.
string text
This property holds the message text.
IconPropertiesGroup icon
This grouped property holds the description of an optional icon.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 04:07:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.