Search for usage in LXR

org::kde::kirigami::Card Class Reference
Inheritance diagram for org::kde::kirigami::Card:


list< QtObject > actions
alias banner
alias hiddenActions
- Properties inherited from org::kde::kirigami::templates::AbstractCard
Item footer
Item header
int headerOrientation
bool showClickFeedback

Detailed Description

This component implements a standard layout of a card.

It is recommended to use this class when the concept of Cards is needed in the application.

This Card has default items as AbstractCard::header and AbstractCard::footer. The header is an image that can contain an optional title and icon, accessible via the ::banner grouped property.

The footer will show a series of toolbuttons (and eventual overflow menu) representing the actions list accessible with the list property actions. It is possible even tough is discouraged to override the footer: in this case the actions property shouldn't be used.

See also
KDE Human Interface Guidelines on Cards
org.kde.kirigami 2.4

Definition at line 30 of file Card.qml.

Property Documentation

◆ actions

list< kirigami::Action > org::kde::kirigami::Card::actions

This property holds visible actions that will be available in the footer of the card.

The actions will be represented by a list of ToolButtons with an optional overflow menu, when not all of them will fit in the available Card width.

Definition at line 41 of file Card.qml.

◆ banner

Image org::kde::kirigami::Card::banner

This grouped property controls the banner image present in the header.

This property is read-only

This grouped property has the following sub-properties:

  • source: url: The source for the image. It understands any URL valid for an Image component.
  • titleIcon: string: The optional icon to put in the banner, either a freedesktop-compatible icon name (recommended) or any URL supported by QtQuick.Image.
  • title: string: The title for the banner, shown as contrasting text over the image.
  • titleAlignment: Qt::Alignment: The alignment of the title inside the image. default: Qt.AlignTop | Qt.AlignLeft
  • titleLevel: int: The Kirigami.Heading level for the title, which controls the font size. default: 1, which is the largest size.
  • titleWrapMode: QtQuick.Text.wrapMode: Whether the header text should be able to wrap. default: Text.NoWrap

It also has the full set of properties that QtQuick.Image has, such as sourceSize and fillMode.

See also

Definition at line 74 of file Card.qml.

◆ hiddenActions

list< kirigami::Action > org::kde::kirigami::Card::hiddenActions

This property holds hidden actions that will be available in the footer.

These actions will only be shown in the overflow menu, even when there is enough space.

Use actions with a Kirigami.DisplayHint.AlwaysHide as displayHint.
See also
org.kde.kirigami 2.6

Definition at line 52 of file Card.qml.

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 22 2023 04:08:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.