#include <color_palette.hpp>
|
void | emitUpdate () |
| Emit all the necessary signals when the palette has been completely overwritten. More...
|
|
QString | unnamed (const QString &name=QString()) const |
| Returns name if it isn't null, otherwise a default value. More...
|
|
Definition at line 34 of file color_palette.hpp.
color_widgets::ColorPalette::ColorPalette |
( |
const QVector< QColor > & |
colors, |
|
|
const QString & |
name = QString() , |
|
|
int |
columns = 0 |
|
) |
| |
color_widgets::ColorPalette::ColorPalette |
( |
const QVector< QPair< QColor, QString > > & |
colors, |
|
|
const QString & |
name = QString() , |
|
|
int |
columns = 0 |
|
) |
| |
color_widgets::ColorPalette::ColorPalette |
( |
const QString & |
name = QString() | ) |
|
|
explicit |
color_widgets::ColorPalette::ColorPalette |
( |
const ColorPalette & |
other | ) |
|
color_widgets::ColorPalette::~ColorPalette |
( |
| ) |
|
color_widgets::ColorPalette::ColorPalette |
( |
ColorPalette && |
other | ) |
|
void color_widgets::ColorPalette::appendColor |
( |
const QColor & |
color, |
|
|
const QString & |
name = QString() |
|
) |
| |
|
slot |
void color_widgets::ColorPalette::colorAdded |
( |
int |
index | ) |
|
|
signal |
Emitted when a single color has been added.
QColor color_widgets::ColorPalette::colorAt |
( |
int |
index | ) |
const |
void color_widgets::ColorPalette::colorChanged |
( |
int |
index | ) |
|
|
signal |
Emitted when the color or the name at the given index has been modified.
void color_widgets::ColorPalette::colorRemoved |
( |
int |
index | ) |
|
|
signal |
Emitted when the color at the given index has been removed.
QVector<QPair<QColor,QString> > color_widgets::ColorPalette::colors |
( |
| ) |
const |
void color_widgets::ColorPalette::colorsChanged |
( |
const QVector< QPair< QColor, QString > > & |
| ) |
|
|
signal |
Emitted when all the colors have changed.
void color_widgets::ColorPalette::colorsUpdated |
( |
const QVector< QPair< QColor, QString >> & |
| ) |
|
|
signal |
Emitted when the colors have been modified with a simple operation (set, append etc.)
QVector< QRgb > color_widgets::ColorPalette::colorTable |
( |
| ) |
const |
int color_widgets::ColorPalette::columns |
( |
| ) |
|
void color_widgets::ColorPalette::columnsChanged |
( |
int |
| ) |
|
|
signal |
int color_widgets::ColorPalette::count |
( |
| ) |
const |
bool color_widgets::ColorPalette::dirty |
( |
| ) |
const |
void color_widgets::ColorPalette::dirtyChanged |
( |
bool |
| ) |
|
|
signal |
void color_widgets::ColorPalette::emitUpdate |
( |
| ) |
|
|
private |
Emit all the necessary signals when the palette has been completely overwritten.
Definition at line 104 of file color_palette.cpp.
void color_widgets::ColorPalette::eraseColor |
( |
int |
index | ) |
|
|
slot |
QString color_widgets::ColorPalette::fileName |
( |
| ) |
const |
void color_widgets::ColorPalette::fileNameChanged |
( |
const QString & |
| ) |
|
|
signal |
ColorPalette color_widgets::ColorPalette::fromColorTable |
( |
const QVector< QRgb > & |
table | ) |
|
|
static |
ColorPalette color_widgets::ColorPalette::fromFile |
( |
const QString & |
name | ) |
|
|
static |
ColorPalette color_widgets::ColorPalette::fromImage |
( |
const QImage & |
image | ) |
|
|
static |
void color_widgets::ColorPalette::insertColor |
( |
int |
index, |
|
|
const QColor & |
color, |
|
|
const QString & |
name = QString() |
|
) |
| |
|
slot |
bool color_widgets::ColorPalette::load |
( |
const QString & |
name | ) |
|
Load contents from a Gimp palette (gpl) file.
- Returns
- true On Success
- Note
- If this function returns false, the palette will become empty
- Todo:
- Store extra properties in the palette object
Definition at line 186 of file color_palette.cpp.
void color_widgets::ColorPalette::loadColorTable |
( |
const QVector< QRgb > & |
color_table | ) |
|
bool color_widgets::ColorPalette::loadImage |
( |
const QImage & |
image | ) |
|
Use the pixels on an image to set the palette colors.
Definition at line 157 of file color_palette.cpp.
QString color_widgets::ColorPalette::name |
( |
| ) |
const |
QString color_widgets::ColorPalette::nameAt |
( |
int |
index | ) |
const |
void color_widgets::ColorPalette::nameChanged |
( |
const QString & |
| ) |
|
|
signal |
QVector< QColor > color_widgets::ColorPalette::onlyColors |
( |
| ) |
const |
QPixmap color_widgets::ColorPalette::preview |
( |
const QSize & |
size, |
|
|
const QColor & |
background = Qt::transparent |
|
) |
| const |
Returns a preview image of the colors in the palette.
Definition at line 432 of file color_palette.cpp.
bool color_widgets::ColorPalette::save |
( |
const QString & |
filename | ) |
|
|
slot |
bool color_widgets::ColorPalette::save |
( |
| ) |
|
|
slot |
save to file, the filename is fileName
or determined automatically
- Returns
- true on success
- Todo:
- Options to add comments
Definition at line 271 of file color_palette.cpp.
void color_widgets::ColorPalette::setColorAt |
( |
int |
index, |
|
|
const QColor & |
color |
|
) |
| |
|
slot |
void color_widgets::ColorPalette::setColorAt |
( |
int |
index, |
|
|
const QColor & |
color, |
|
|
const QString & |
name |
|
) |
| |
|
slot |
void color_widgets::ColorPalette::setColors |
( |
const QVector< QColor > & |
colors | ) |
|
|
slot |
void color_widgets::ColorPalette::setColors |
( |
const QVector< QPair< QColor, QString > > & |
colors | ) |
|
|
slot |
void color_widgets::ColorPalette::setColumns |
( |
int |
columns | ) |
|
|
slot |
void color_widgets::ColorPalette::setDirty |
( |
bool |
dirty | ) |
|
|
slot |
void color_widgets::ColorPalette::setFileName |
( |
const QString & |
name | ) |
|
|
slot |
void color_widgets::ColorPalette::setName |
( |
const QString & |
name | ) |
|
|
slot |
void color_widgets::ColorPalette::setNameAt |
( |
int |
index, |
|
|
const QString & |
name = QString() |
|
) |
| |
|
slot |
QString color_widgets::ColorPalette::unnamed |
( |
const QString & |
name = QString() | ) |
const |
|
private |
Returns name
if it isn't null, otherwise a default value.
Definition at line 426 of file color_palette.cpp.
Private* color_widgets::ColorPalette::p |
|
private |
QVector< QPair< QColor, QString > > color_widgets::ColorPalette::colors |
|
readwrite |
int color_widgets::ColorPalette::columns |
|
readwrite |
Number of colors to display in a row, if 0 unspecified.
Definition at line 49 of file color_palette.hpp.
int color_widgets::ColorPalette::count |
|
read |
bool color_widgets::ColorPalette::dirty |
|
readwrite |
Whether it has been modified and it might be advisable to save it.
Definition at line 61 of file color_palette.hpp.
QString color_widgets::ColorPalette::fileName |
|
readwrite |
Name of the file the palette has been read from.
Definition at line 57 of file color_palette.hpp.
QString color_widgets::ColorPalette::name |
|
readwrite |
The documentation for this class was generated from the following files: