KChart::Palette
#include <KChartPalette.h>
Signals | |
void | changed () |
Additional Inherited Members | |
Properties inherited from QObject | |
objectName | |
Public Attributes inherited from QObject | |
typedef | QObjectList |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
A Palette is a set of brushes (or colors) to be used for painting data sets.
The palette class encapsulates a collection of brushes, which in the simplest case are colors, to be used for painting a series of data sets. When asked for the m-th color, a palette of size n will wrap around and thus cycle through the available colors.
Three builtin palettes are provided for convenience, one with a default set of colors, one with a subdued color selection, one with rainbow colors.
When a palette changes, it emits a changed() signal. Hook up to it, if you want to repaint when the color selection changes.
Definition at line 35 of file KChartPalette.h.
Constructor & Destructor Documentation
◆ Palette()
Definition at line 112 of file KChartPalette.cpp.
◆ ~Palette()
|
override |
Definition at line 118 of file KChartPalette.cpp.
Member Function Documentation
◆ addBrush()
Adds brush to the palette.
If no position is specified, the brush is appended.
Definition at line 149 of file KChartPalette.cpp.
◆ changed
|
signal |
Emitted whenever the palette changes.
Views listen to this and repaints.
◆ defaultPalette()
Provide access to the three builtin palettes, one with standard bright colors, one with more subdued colors, and one with rainbow colors.
Definition at line 94 of file KChartPalette.cpp.
◆ getBrush()
QBrush Palette::getBrush | ( | int | position | ) | const |
Query the palette for a brush at the specified position.
If the position exceeds the size of the palette, it wraps around.
Definition at line 159 of file KChartPalette.cpp.
◆ isValid()
bool Palette::isValid | ( | ) | const |
- Returns
- whether this represents a valid palette. For a palette to be valid it needs to have at least one brush associated.
Definition at line 139 of file KChartPalette.cpp.
◆ operator=()
Palette & Palette::operator= | ( | const Palette & | r | ) |
Definition at line 130 of file KChartPalette.cpp.
◆ rainbowPalette()
Definition at line 106 of file KChartPalette.cpp.
◆ removeBrush()
void Palette::removeBrush | ( | int | position | ) |
Remove the brush at position position, if there is one.
Definition at line 165 of file KChartPalette.cpp.
◆ size()
int Palette::size | ( | ) | const |
- Returns
- the number of brushed in the palette.
Definition at line 144 of file KChartPalette.cpp.
◆ subduedPalette()
Definition at line 100 of file KChartPalette.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:40:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.