UNIVERS
15.3
UNIVERS base processing software API
|
#include <zqb_palette.hpp>
Public Member Functions | |
ZqbPalette (const QColor &c=Qt::black) | |
ZqbPalette (int n, const QColor &c1, const QColor &c2) | |
ZqbPalette (int n, const QColor &c1, const QColor &c2, const QColor &c3) | |
ZqbPalette (const ZqbPalette &zpal) | |
virtual | ~ZqbPalette () |
ZqbPalette & | operator= (const ZqbPalette &zpal) |
virtual void | revertColorsOrder () |
virtual int | numberOfColors () const |
virtual const QColor & | color (int index) const |
const QColor & | operator[] (int index) const |
virtual QColor & | color (int index) |
QColor & | operator[] (int index) |
virtual int | colorIndex (const QColor &c) const |
const int | operator[] (const QColor &c) const |
virtual void | drawPalette (QPixmap &pixmap, Qt::Orientation eOrient) const |
virtual int | addColor (const QColor &c) |
ZqbPalette & | operator+= (const QColor &c) |
virtual int | addPalette (const ZqbPalette &pal) |
ZqbPalette & | operator+= (const ZqbPalette &pal) |
void | expandToColor (int n, const QColor &c) |
int | addColors (int n, const QColor &c1, const QColor &c2) |
int | addColors (int n, const QColor &c1, const QColor &c2, const QColor &c3) |
ZqbPalette (const QColor &c=Qt::black) | |
ZqbPalette (int n, const QColor &c1, const QColor &c2) | |
ZqbPalette (int n, const QColor &c1, const QColor &c2, const QColor &c3) | |
ZqbPalette (const ZqbPalette &zpal) | |
virtual | ~ZqbPalette () |
ZqbPalette & | operator= (const ZqbPalette &zpal) |
virtual void | revertColorsOrder () |
virtual int | numberOfColors () const |
virtual const QColor & | color (int index) const |
const QColor & | operator[] (int index) const |
virtual QColor & | color (int index) |
QColor & | operator[] (int index) |
virtual int | colorIndex (const QColor &c) const |
int | operator[] (const QColor &c) const |
virtual void | drawPalette (QPixmap &pixmap, Qt::Orientation eOrient) const |
virtual int | addColor (const QColor &c) |
ZqbPalette & | operator+= (const QColor &c) |
virtual int | addPalette (const ZqbPalette &pal) |
ZqbPalette & | operator+= (const ZqbPalette &pal) |
void | expandToColor (int n, const QColor &c) |
int | addColors (int n, const QColor &c1, const QColor &c2) |
int | addColors (int n, const QColor &c1, const QColor &c2, const QColor &c3) |
Color palette is simple array of colors.
ZqbPalette::ZqbPalette | ( | const QColor & | c = Qt::black | ) |
Create palette of one given color (black by default).
ZqbPalette::ZqbPalette | ( | int | n, |
const QColor & | c1, | ||
const QColor & | c2 | ||
) |
Create palette as vector of n colors distributed smoothly from first color to the second.
ZqbPalette::ZqbPalette | ( | int | n, |
const QColor & | c1, | ||
const QColor & | c2, | ||
const QColor & | c3 | ||
) |
Create palette as vector of n colors distributed smoothly from first color to the third via the second. White color (Qt::white()) is advised as the second color.
ZqbPalette::ZqbPalette | ( | const ZqbPalette & | zpal | ) |
Create copy of the palette.
|
virtual |
Free all colors.
ZqbPalette::ZqbPalette | ( | const QColor & | c = Qt::black | ) |
Create palette of one given color (black by default).
ZqbPalette::ZqbPalette | ( | int | n, |
const QColor & | c1, | ||
const QColor & | c2 | ||
) |
Create palette as vector of n colors distributed smoothly from first color to the second.
ZqbPalette::ZqbPalette | ( | int | n, |
const QColor & | c1, | ||
const QColor & | c2, | ||
const QColor & | c3 | ||
) |
Create palette as vector of n colors distributed smoothly from first color to the third via the second. White color (Qt::white()) is advised as the second color.
ZqbPalette::ZqbPalette | ( | const ZqbPalette & | zpal | ) |
Create copy of the palette.
|
virtual |
Free all colors.
|
virtual |
Append one more color at the end of array and return its index.
|
virtual |
Append one more color at the end of array and return its index.
|
inline |
Append n colors distributed smoothly from first color to the second and return start index of appended palette.
|
inline |
Append n colors distributed smoothly from first color to the second and return start index of appended palette.
|
inline |
Append n colors distributed smoothly from first color to the third via the second and return start index of appended palette.
|
inline |
Append n colors distributed smoothly from first color to the third via the second and return start index of appended palette.
|
virtual |
Append the whole palette at the end of color array and return start index of appended palette.
|
virtual |
Append the whole palette at the end of color array and return start index of appended palette.
|
virtual |
Get color by its index (counted from 0). If index is out of bounds then let's use the closest correct index or return Qt::black().
|
virtual |
Get color by its index (counted from 0). If index is out of bounds then let's use the closest correct index or return Qt::black().
|
virtual |
Access color by its index (counted from 0). If index is out of bounds then let's use the closest correct index or return Qt::black().
|
virtual |
Access color by its index (counted from 0). If index is out of bounds then let's use the closest correct index or return Qt::black().
|
virtual |
Get index of given color. The color is searched from the low end of color array and the first matched color is solved as found. Returns -1 if the color is not found.
|
virtual |
Get index of given color. The color is searched from the low end of color array and the first matched color is solved as found. Returns -1 if the color is not found.
|
virtual |
Fill pixmap with image of the palette with Qt::Horizontal or Qt::Vertical orientation.
|
virtual |
Fill pixmap with image of the palette with Qt::Horizontal or Qt::Vertical orientation.
void ZqbPalette::expandToColor | ( | int | n, |
const QColor & | c | ||
) |
Append n colors distributed smoothly from the last color in the palette to the given color.
void ZqbPalette::expandToColor | ( | int | n, |
const QColor & | c | ||
) |
Append n colors distributed smoothly from the last color in the palette to the given color.
|
virtual |
Return number of colors in the palette.
|
virtual |
Return number of colors in the palette.
|
inline |
Append one more color at the end of array. Almost synonymous for addColor().
|
inline |
Append one more color at the end of array. Almost synonymous for addColor().
|
inline |
Append the whole palette at the end of color array. Almost synonymous for addPalette().
|
inline |
Append the whole palette at the end of color array. Almost synonymous for addPalette().
ZqbPalette& ZqbPalette::operator= | ( | const ZqbPalette & | zpal | ) |
Assign the palette.
ZqbPalette& ZqbPalette::operator= | ( | const ZqbPalette & | zpal | ) |
Assign the palette.
|
inline |
Get color by its index (counted from 0). Synonymous for color().
|
inline |
Get color by its index (counted from 0). Synonymous for color().
|
inline |
Access color by its index (counted from 0). Synonymous for color().
|
inline |
Access color by its index (counted from 0). Synonymous for color().
|
inline |
Get index of given color. Returns -1 if the color is not found. Synonymous for colorIndex().
|
inline |
Get index of given color. Returns -1 if the color is not found. Synonymous for colorIndex().
|
virtual |
Revert order of colors in the palette.
|
virtual |
Revert order of colors in the palette.