• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • GUI - Design & Widgets
  • ColorListEditor

ColorListEditor Class

The ColorListEditor is a dialog for managing and editing a list of colors. More...

Header: #include <ColorListEditor>
  • List of all members, including inherited members

Public Functions

ColorListEditor(QWidget *parent = nullptr)
QList<QColor> colorList() const
QString colorListAsString()
void setColorList(const QList<QColor> &colors)
void setColorListFromString(const QString &colorString)

Static Public Members

QString convertColorListToString(const QList<QColor> &colors)
QList<QColor> convertStringToColorList(const QString &colorString)

Detailed Description

The ColorListEditor is a dialog for managing and editing a list of colors.

The ColorListEditor class provides a user interface for managing color lists. Users can add, remove, edit, and reorder colors through a graphical color picker. The selected colors are displayed as text with the color value as the text color.

Key features:

  • Add new colors using a color picker dialog.
  • Edit existing colors via double-click or using an "Edit" button.
  • Reorder colors with "Up" and "Down" buttons.
  • Remove selected colors from the list.
  • Supports setting and getting the color list using QList<QColor> or a QString of semicolon-separated color names.

Member Function Documentation

ColorListEditor::ColorListEditor(QWidget *parent = nullptr)

Default constructs an instance of ColorListEditor.

QList<QColor> ColorListEditor::colorList() const

Returns the current color list as a QList<QColor>.

This function provides access to the current list of colors managed by the editor.

See also setColorList().

QString ColorListEditor::colorListAsString()

Returns the current color list as a QString of semicolon-separated color names.

This function converts the current list of colors into a semicolon-separated string of color names.

[static] QString ColorListEditor::convertColorListToString(const QList<QColor> &colors)

Converts a colors list into a semicolon-separated QString of color names.

This static function takes a list of colors and returns a QString of color names, separated by semicolons.

[static] QList<QColor> ColorListEditor::convertStringToColorList(const QString &colorString)

Converts a colorString of semicolon-separated color names into a QList<QColor>.

This static function parses a colorString of color names, separated by semicolons, and returns a QList<QColor>.

void ColorListEditor::setColorList(const QList<QColor> &colors)

Sets the internal color list from the provided QList<QColor>.

This function replaces the current color list with the given list of colors.

See also colorList().

void ColorListEditor::setColorListFromString(const QString &colorString)

Sets the color list from a colorString of semicolon-separated color names.

This function parses a colorString of semicolon-separated color names and updates the color list accordingly.

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top