ColorsRow

Search for usage in LXR

ColorsRow Class Reference
Inheritance diagram for ColorsRow:

Properties

var colors
 
string currentColor
 
string defaultColor
 
int size
 

Signals

void colorPicked (string color)
 

Additional Inherited Members

- Public Member Functions inherited from QtQuick.Flow
 forceLayout ()
 
 positioningComplete ()
 

Detailed Description

A row of color buttons.

Demo
Column
{
width: 400
anchors.centerIn: parent
spacing: Maui.Style.space.big
Maui.ColorsRow
{
id: _colorsRow
width: parent.width
currentColor: "#CBFF8C"
defaultColor : "#CBFF8C"
colors: ["#E3E36A", "#CBFF8C", "#C16200", "#881600", "#6A3937", "#706563", "#748386", "#157A6E", "#77B28C", "#36311F"]
onColorPicked: (color) =>
{
currentColor = color
}
}
Rectangle
{
radius: 10
height: 400
width: parent.width
color: _colorsRow.currentColor
}
}
string defaultColor
The default color.
Definition ColorsRow.qml:56
string currentColor
The current color.
Definition ColorsRow.qml:60
var colors
The list of colors to be used.
Definition ColorsRow.qml:52

You can find a more complete example at this link.

Definition at line 45 of file ColorsRow.qml.

Property Documentation

◆ colors

var ColorsRow::colors
read

The list of colors to be used.

Remarks
This is the default property

Definition at line 52 of file ColorsRow.qml.

◆ currentColor

string ColorsRow::currentColor
read

The current color.

This is useful to be set at startup, it is binded to the defaultColor as default.

Definition at line 60 of file ColorsRow.qml.

◆ defaultColor

string ColorsRow::defaultColor
read

The default color.

This is used as the color when the reset/clear button is clicked. The color to reset back to.

Definition at line 56 of file ColorsRow.qml.

◆ size

int ColorsRow::size
read

The size of the elements in the row.

Definition at line 64 of file ColorsRow.qml.

Member Function Documentation

◆ colorPicked

void ColorsRow::colorPicked ( string color)
signal

Emitted when one of the color buttons has been clicked.

The argument is the color picked.

Parameters
colorthe color picked.
onColorPicked: (color) =>
{
currentColor = color
}

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.