TitleSubtitle

Search for usage in LXR

TitleSubtitle Class Reference

Properties

color color
 
int elide
 
font font
 
bool reserveSpaceForSubtitle
 
bool selected
 
string subtitle
 
color subtitleColor
 
font subtitleFont
 
bool subtitleVisible
 
string title
 
bool truncated
 
int wrapMode
 

Signals

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

Detailed Description

A simple item containing a title and subtitle label.

This is mainly intended as a replacement for a list delegate content item, but can be used as a replacement for other content items as well.

When using it as a contentItem, make sure to bind the appropriate properties to those of the Control. Prefer binding to the Control's properties over setting the properties directly, as the Control's properties may affect other things like setting accessible names.

Example usage as contentItem of an ItemDelegate:

id: delegate
text: "Example"
contentItem: Kirigami.TitleSubtitle {
title: delegate.text
subtitle: "This is an example."
font: delegate.font
selected: delegate.highlighted || delegate.down
}
}
bool selected
Should this item be displayed in a selected style?
string subtitle
The subtitle to display.
string title
The title to display.
font font
The font used to display the title.
See also
Kirigami::Delegates::IconTitleSubtitle
Kirigami::Delegates::ItemDelegate

Definition at line 41 of file TitleSubtitle.qml.

Property Documentation

◆ color

color TitleSubtitle::color
read

The color to use for the title.

By default this is Kirigami.Theme.textColor unless selected is true in which case this is Kirigami.Theme.highlightedTextColor.

Definition at line 57 of file TitleSubtitle.qml.

◆ elide

int TitleSubtitle::elide
read

The text elision mode used for both the title and subtitle.

Definition at line 75 of file TitleSubtitle.qml.

◆ font

font TitleSubtitle::font
read

The font used to display the title.

Definition at line 67 of file TitleSubtitle.qml.

◆ reserveSpaceForSubtitle

bool TitleSubtitle::reserveSpaceForSubtitle
read

Make the implicit height use the subtitle's height even if no subtitle is set.

Definition at line 83 of file TitleSubtitle.qml.

◆ selected

bool TitleSubtitle::selected
read

Should this item be displayed in a selected style?

Definition at line 87 of file TitleSubtitle.qml.

◆ subtitle

string TitleSubtitle::subtitle
read

The subtitle to display.

Definition at line 50 of file TitleSubtitle.qml.

◆ subtitleColor

color TitleSubtitle::subtitleColor
read

The color to use for the subtitle.

By default this is color mixed with the background color.

Definition at line 63 of file TitleSubtitle.qml.

◆ subtitleFont

font TitleSubtitle::subtitleFont
read

The font used to display the subtitle.

Definition at line 71 of file TitleSubtitle.qml.

◆ subtitleVisible

bool TitleSubtitle::subtitleVisible
read

Is the subtitle visible?

Remarks
This property is read-only

Definition at line 95 of file TitleSubtitle.qml.

◆ title

string TitleSubtitle::title
read

The title to display.

Definition at line 46 of file TitleSubtitle.qml.

◆ truncated

bool TitleSubtitle::truncated
read

Is the title or subtitle truncated?

Remarks
This property is read-only

Definition at line 100 of file TitleSubtitle.qml.

◆ wrapMode

int TitleSubtitle::wrapMode
read

The text wrap mode used for both the title and subtitle.

Definition at line 79 of file TitleSubtitle.qml.

Member Function Documentation

◆ linkActivated

void TitleSubtitle::linkActivated ( string link)
signal

Emitted when the user clicks on a link embedded in the text of the title or subtitle.

◆ linkHovered

void TitleSubtitle::linkHovered ( string link)
signal

Emitted when the user hovers on a link embedded in the text of the title or subtitle.


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 Sat Dec 21 2024 16:56:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.