KD Chart API Documentation 3.1
|
A Palette is a set of brushes (or colors) to be used for painting data sets. More...
#include <KDChartPalette.h>
Signals | |
void | changed () |
Additional Inherited Members | |
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) |
Properties inherited from QObject | |
objectName | |
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 37 of file KDChartPalette.h.
Definition at line 119 of file KDChartPalette.cpp.
Definition at line 131 of file KDChartPalette.cpp.
|
override |
Definition at line 125 of file KDChartPalette.cpp.
Adds brush to the palette. If no position is specified, the brush is appended.
Definition at line 156 of file KDChartPalette.cpp.
References changed(), d, QObject::Q_EMIT(), QObject::qobject_cast(), and size().
|
signal |
Emitted whenever the palette changes. Views listen to this and repaing.
Referenced by addBrush(), and removeBrush().
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 101 of file KDChartPalette.cpp.
References QObject::qobject_cast().
Referenced by KDChart::Legend::setDefaultColors(), and KDChart::AttributesModel::setPaletteType().
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 166 of file KDChartPalette.cpp.
bool Palette::isValid | ( | ) | const |
Definition at line 146 of file KDChartPalette.cpp.
Referenced by getBrush().
Palette & Palette::operator= | ( | const Palette & | r | ) |
Definition at line 137 of file KDChartPalette.cpp.
Definition at line 113 of file KDChartPalette.cpp.
References QObject::qobject_cast().
Referenced by KDChart::AttributesModel::setPaletteType(), and KDChart::Legend::setRainbowColors().
Remove the brush at position position, if there is one.
Definition at line 173 of file KDChartPalette.cpp.
References changed(), d, QObject::Q_EMIT(), QObject::qobject_cast(), and size().
int Palette::size | ( | ) | const |
Definition at line 151 of file KDChartPalette.cpp.
References d.
Referenced by addBrush(), getBrush(), isValid(), and removeBrush().
Definition at line 107 of file KDChartPalette.cpp.
References QObject::qobject_cast().
Referenced by KDChart::AttributesModel::setPaletteType(), and KDChart::Legend::setSubduedColors().