QColormap Class
Die Klasse „QColormap“ ordnet geräteunabhängige QColors geräteabhängigen Pixelwerten zu. Mehr...
| Header: | #include <QColormap> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
| qmake: | QT += widgets |
| Status: | Seit 6.11 veraltet |
Diese Klasse ist seit Version 6.11 veraltet. Wir raten dringend davon ab, sie in neuem Code zu verwenden.
- Liste aller Mitglieder, einschließlich geerbter Mitglieder
- QColormap ist Teil der Mal-Klassen.
Öffentliche Typen
| enum | Mode { Direct, Indexed, Gray } |
Öffentliche Funktionen
| QColormap(const QColormap &colormap) | |
| ~QColormap() | |
| const QColor | colorAt(uint pixel) const |
| const QList<QColor> | colormap() const |
| int | depth() const |
| QColormap::Mode | mode() const |
| uint | pixel(const QColor &color) const |
| int | size() const |
| QColormap & | operator=(const QColormap &colormap) |
Statische öffentliche Mitglieder
| QColormap | instance(int screen = -1) |
Dokumentation zu Mitgliedstypen
enum QColormap::Mode
Diese Enumeration beschreibt, wie „ QColormap “ geräteunabhängige RGB-Werte auf geräteabhängige Pixelwerte abbildet.
| Konstante | Wert | Beschreibung |
|---|---|---|
QColormap::Direct | 0 | Pixelwerte werden direkt aus den RGB-Werten abgeleitet, was auch als „True Color“ bezeichnet wird. |
QColormap::Indexed | 1 | Pixelwerte stellen Indizes in einer Liste verfügbarer Farben dar, d. h., „ QColormap “ verwendet den Index der Farbe, die einem RGB-Wert am ehesten entspricht. |
QColormap::Gray | 2 | Ähnlich wie bei „ Indexed “ stellen Pixelwerte eine Liste verfügbarer Graustufen dar. „ QColormap “ verwendet den Index der Graustufe, die dem berechneten Grauwert eines RGB-Werts am ehesten entspricht. |
Dokumentation der Member-Funktionen
QColormap::QColormap(const QColormap &colormap)
Erstellt eine Kopie eines anderen „ colormap “.
[noexcept] QColormap::~QColormap()
Löscht die Farbpalette.
const QColor QColormap::colorAt(uint pixel) const
Gibt ein ` QColor ` für die ` pixel` zurück.
Siehe auch pixel().
const QList<QColor> QColormap::colormap() const
Gibt eine Liste von Farben zurück, die die Farbpalette des Geräts für die Modi „ Indexed “ und „ Gray “ darstellt. Diese Funktion gibt für den Modus „ Direct “ eine leere Liste zurück.
Siehe auch size().
int QColormap::depth() const
Gibt die Tiefe des Geräts zurück.
Siehe auch „ size()“.
[static] QColormap QColormap::instance(int screen = -1)
Gibt die Farbpalette für den angegebenen Bildschirm „ screen “ zurück. Ist „ screen “ gleich -1, gibt diese Funktion die Farbpalette für den Standardbildschirm zurück.
QColormap::Mode QColormap::mode() const
Gibt den Modus dieser Farbpalette zurück.
Siehe auch „ QColormap::Mode “.
uint QColormap::pixel(const QColor &color) const
Gibt einen geräteabhängigen Pixelwert für die „ color “ zurück.
Siehe auch ` colorAt()`.
int QColormap::size() const
Gibt die Größe der Farbpalette für die Modi „ Indexed “ und „ Gray “ zurück; gibt im Modus „ Direct “ den Wert -1 zurück.
Siehe auch colormap().
QColormap &QColormap::operator=(const QColormap &colormap)
Weist der angegebenen „ colormap “ diese Farbkarte zu und gibt eine Referenz auf diese Farbkarte zurück.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.