GridItemTemplate

Search for usage in LXR

GridItemTemplate Class Reference
Inheritance diagram for GridItemTemplate:

Properties

int alignment
 
bool autoTransform
 
alias content
 
int fillMode
 
bool highlighted
 
bool hovered
 
Component iconComponent
 
alias iconContainer
 
alias iconItem
 
int iconSizeHint
 
string iconSource
 
alias iconVisible
 
int imageHeight
 
int imageSizeHint
 
string imageSource
 
int imageWidth
 
bool isCurrentItem
 
bool isMask
 
alias label1
 
alias label2
 
alias labelSizeHint
 
bool labelsVisible
 
int maskRadius
 
alias spacing
 
alias text1
 
alias text2
 

Additional Inherited Members

- Public Member Functions inherited from QtQuick.Item
 childAt (real x, real y)
 
bool contains (point point)
 
 dumpItemTree ()
 
 forceActiveFocus ()
 
 forceActiveFocus (Qt::FocusReason reason)
 
bool grabToImage (callback, targetSize)
 
point mapFromGlobal (real x, real y)
 
point mapFromItem (Item item, point p)
 
point mapFromItem (Item item, real x, real y)
 
rect mapFromItem (Item item, real x, real y, real width, real height)
 
rect mapFromItem (Item item, rect r)
 
point mapToGlobal (real x, real y)
 
point mapToItem (Item item, point p)
 
point mapToItem (Item item, real x, real y)
 
rect mapToItem (Item item, real x, real y, real width, real height)
 
rect mapToItem (Item item, rect r)
 
 nextItemInFocusChain (bool forward)
 

Detailed Description

A template with a icon or image and a two bottom labels.

This controls inherits from QQC2 Item, to checkout its inherited properties refer to the Qt Docs.

The structure of this control is divided into a top header for the image/icon and a two labels for the title and message, at the bottom. The top section can be modified and assigned to any custom control.

See also
iconComponent

For extra information checkout the GridBrowserDelegate documentation, since this template elementis used as its base.

Definition at line 35 of file GridItemTemplate.qml.

Property Documentation

◆ alignment

int GridItemTemplate::alignment
read

The horizontal alignment of the control elements.

If the text in the labels should be aligned to the left, right or be centered. This can also affect the icon. By default this is set to Qt.AlignHCenter. Possible values are:

Definition at line 176 of file GridItemTemplate.qml.

◆ autoTransform

bool GridItemTemplate::autoTransform
read

Whether the image should be auto transformed, that means auto rotated.

Note
See the QQC2 Image documentation for further information on this property. By default this is set to false.

Definition at line 162 of file GridItemTemplate.qml.

◆ content

list< QtObject > GridItemTemplate::content
read

By default all children will be positioned at the bottom end of the column.

Remarks
This is the default property

The positioning of the elements is handled by a ColumnLayout, so use the attached properties accordingly.

Definition at line 51 of file GridItemTemplate.qml.

◆ fillMode

int GridItemTemplate::fillMode
read
See also
IconItem::fillMode By default this is set to Image.PreserveAspectCrop.
Note
For more options and information review the QQC2 Image documentation.

Definition at line 134 of file GridItemTemplate.qml.

◆ highlighted

bool GridItemTemplate::highlighted
read

Whether the control should be styled as being highlighted by some external event.

By default this is set to false.

Definition at line 167 of file GridItemTemplate.qml.

◆ hovered

bool GridItemTemplate::hovered
read

Whether the control should be styled as being hovered by a cursor.

By default his is set to false.

Definition at line 156 of file GridItemTemplate.qml.

◆ iconComponent

Component GridItemTemplate::iconComponent
read

The header section can be modified by changing its component to a custom one.

By default the component used for the iconComponent is a MauiKit IconItem element.

Note
When using a custom component for the header section, pay attention that it has an implicitHeight and implicitWidth set.

Definition at line 181 of file GridItemTemplate.qml.

◆ iconContainer

Loader GridItemTemplate::iconContainer
read

The container for the icon header section.

Remarks
This property is read-only

This is handled by a QQC2 Loader. By default the source component will be loaded asynchronous.

Definition at line 91 of file GridItemTemplate.qml.

◆ iconItem

Item GridItemTemplate::iconItem
read

The Item loaded as the icon header section.

Remarks
This property is read-only

The component used as the icon header is loaded with a QQC2 Loader - this property exposes that element that was loaded. By default the loaded item will be a MauiKit IconItem, but if another component is used for iconComponent, that will be the resulting Item.

See also
structure

Definition at line 84 of file GridItemTemplate.qml.

◆ iconSizeHint

int GridItemTemplate::iconSizeHint
read

A size hint for the icon to be used in the header.

A size hint for the bottom labels.

The final size will depend on the available space.

Definition at line 105 of file GridItemTemplate.qml.

◆ iconSource

string GridItemTemplate::iconSource
read
See also
IconItem::iconSource

Definition at line 118 of file GridItemTemplate.qml.

◆ iconVisible

bool GridItemTemplate::iconVisible
read

Whether the icon/image header section should be visible.

Definition at line 96 of file GridItemTemplate.qml.

◆ imageHeight

int GridItemTemplate::imageHeight
read
See also
IconItem::imageHeight

Definition at line 146 of file GridItemTemplate.qml.

◆ imageSizeHint

int GridItemTemplate::imageSizeHint
read

A size hint for the image to be used in the header.

The final size will depend on the available space. By default this is set to -1 which means that the image header will take the rest of the available space.

Definition at line 110 of file GridItemTemplate.qml.

◆ imageSource

string GridItemTemplate::imageSource
read
See also
IconItem::imageSource

Definition at line 114 of file GridItemTemplate.qml.

◆ imageWidth

int GridItemTemplate::imageWidth
read
See also
IconItem::imageWidth

Definition at line 142 of file GridItemTemplate.qml.

◆ isCurrentItem

bool GridItemTemplate::isCurrentItem
read

Whether this element is currently on a selected or checked state.

This is used to highlight the component accordingly. By default this is set to false.

Definition at line 123 of file GridItemTemplate.qml.

◆ isMask

bool GridItemTemplate::isMask
read
See also
IconItem::isMask By default this is set to evaluate true for icons equal or smaller in size then 16 pixels.

Definition at line 151 of file GridItemTemplate.qml.

◆ label1

Label GridItemTemplate::label1
read

An alias for the QQC2 Label handling the title text.

Remarks
This property is read-only

Exposed for fine tuning the label font properties.

Note
See the QQC2 Label documentation for more information.

Definition at line 68 of file GridItemTemplate.qml.

◆ label2

Label GridItemTemplate::label2
read

An alias for the QQC2 Label handling the message text.

Remarks
This property is read-only

Exposed for fine tuning the label font properties.

Note
See the QQC2 Label documentation for more information.

Definition at line 75 of file GridItemTemplate.qml.

◆ labelSizeHint

alias GridItemTemplate::labelSizeHint
read

Definition at line 101 of file GridItemTemplate.qml.

◆ labelsVisible

bool GridItemTemplate::labelsVisible
read

Whether the two bottom labels, for title and message, should be displayed.

By default this is set to true.

Definition at line 128 of file GridItemTemplate.qml.

◆ maskRadius

int GridItemTemplate::maskRadius
read
See also
IconItem::maskRadius

Definition at line 138 of file GridItemTemplate.qml.

◆ spacing

int GridItemTemplate::spacing
read

The spacing size between the image/icon header and the label title and message.

Definition at line 44 of file GridItemTemplate.qml.

◆ text1

string GridItemTemplate::text1
read

The text use for the title text.

Definition at line 56 of file GridItemTemplate.qml.

◆ text2

string GridItemTemplate::text2
read

The text use for the message text.

Definition at line 61 of file GridItemTemplate.qml.


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 May 17 2024 11:56:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.