#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.
◆ value_type
◆ ColorPalette() [1/5]
| color_widgets::ColorPalette::ColorPalette |
( |
const QVector< QColor > & |
colors, |
|
|
const QString & |
name = QString(), |
|
|
int |
columns = 0 |
|
) |
| |
◆ ColorPalette() [2/5]
| color_widgets::ColorPalette::ColorPalette |
( |
const QVector< QPair< QColor, QString > > & |
colors, |
|
|
const QString & |
name = QString(), |
|
|
int |
columns = 0 |
|
) |
| |
◆ ColorPalette() [3/5]
| color_widgets::ColorPalette::ColorPalette |
( |
const QString & |
name = QString() | ) |
|
|
explicit |
◆ ColorPalette() [4/5]
| color_widgets::ColorPalette::ColorPalette |
( |
const ColorPalette & |
other | ) |
|
◆ ~ColorPalette()
| color_widgets::ColorPalette::~ColorPalette |
( |
| ) |
|
◆ ColorPalette() [5/5]
| color_widgets::ColorPalette::ColorPalette |
( |
ColorPalette && |
other | ) |
|
◆ appendColor
| void color_widgets::ColorPalette::appendColor |
( |
const QColor & |
color, |
|
|
const QString & |
name = QString() |
|
) |
| |
|
slot |
◆ colorAdded
| void color_widgets::ColorPalette::colorAdded |
( |
int |
index | ) |
|
|
signal |
Emitted when a single color has been added.
◆ colorAt()
| QColor color_widgets::ColorPalette::colorAt |
( |
int |
index | ) |
const |
◆ colorChanged
| void color_widgets::ColorPalette::colorChanged |
( |
int |
index | ) |
|
|
signal |
Emitted when the color or the name at the given index has been modified.
◆ colorRemoved
| void color_widgets::ColorPalette::colorRemoved |
( |
int |
index | ) |
|
|
signal |
Emitted when the color at the given index has been removed.
◆ colors()
| QVector<QPair<QColor,QString> > color_widgets::ColorPalette::colors |
( |
| ) |
const |
◆ colorsChanged
| void color_widgets::ColorPalette::colorsChanged |
( |
const QVector< QPair< QColor, QString > > & |
| ) |
|
|
signal |
Emitted when all the colors have changed.
◆ colorsUpdated
| 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.)
◆ colorTable()
| QVector< QRgb > color_widgets::ColorPalette::colorTable |
( |
| ) |
const |
◆ columns()
| int color_widgets::ColorPalette::columns |
( |
| ) |
|
◆ columnsChanged
| void color_widgets::ColorPalette::columnsChanged |
( |
int |
| ) |
|
|
signal |
◆ count()
| int color_widgets::ColorPalette::count |
( |
| ) |
const |
◆ dirty()
| bool color_widgets::ColorPalette::dirty |
( |
| ) |
const |
◆ dirtyChanged
| void color_widgets::ColorPalette::dirtyChanged |
( |
bool |
| ) |
|
|
signal |
◆ emitUpdate()
| 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.
◆ eraseColor
| void color_widgets::ColorPalette::eraseColor |
( |
int |
index | ) |
|
|
slot |
◆ fileName()
| QString color_widgets::ColorPalette::fileName |
( |
| ) |
const |
◆ fileNameChanged
| void color_widgets::ColorPalette::fileNameChanged |
( |
const QString & |
| ) |
|
|
signal |
◆ fromColorTable()
◆ fromFile()
| ColorPalette color_widgets::ColorPalette::fromFile |
( |
const QString & |
name | ) |
|
|
static |
◆ fromImage()
| ColorPalette color_widgets::ColorPalette::fromImage |
( |
const QImage & |
image | ) |
|
|
static |
◆ insertColor
| void color_widgets::ColorPalette::insertColor |
( |
int |
index, |
|
|
const QColor & |
color, |
|
|
const QString & |
name = QString() |
|
) |
| |
|
slot |
◆ load()
| 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.
◆ loadColorTable()
| void color_widgets::ColorPalette::loadColorTable |
( |
const QVector< QRgb > & |
color_table | ) |
|
◆ loadImage()
| 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.
◆ name()
| QString color_widgets::ColorPalette::name |
( |
| ) |
const |
◆ nameAt()
| QString color_widgets::ColorPalette::nameAt |
( |
int |
index | ) |
const |
◆ nameChanged
| void color_widgets::ColorPalette::nameChanged |
( |
const QString & |
| ) |
|
|
signal |
◆ onlyColors()
| QVector< QColor > color_widgets::ColorPalette::onlyColors |
( |
| ) |
const |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ preview()
| 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.
◆ save [1/2]
| 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.
◆ save [2/2]
| bool color_widgets::ColorPalette::save |
( |
const QString & |
filename | ) |
|
|
slot |
◆ setColorAt [1/2]
| void color_widgets::ColorPalette::setColorAt |
( |
int |
index, |
|
|
const QColor & |
color |
|
) |
| |
|
slot |
◆ setColorAt [2/2]
| void color_widgets::ColorPalette::setColorAt |
( |
int |
index, |
|
|
const QColor & |
color, |
|
|
const QString & |
name |
|
) |
| |
|
slot |
◆ setColors [1/2]
| void color_widgets::ColorPalette::setColors |
( |
const QVector< QColor > & |
colors | ) |
|
|
slot |
◆ setColors [2/2]
| void color_widgets::ColorPalette::setColors |
( |
const QVector< QPair< QColor, QString > > & |
colors | ) |
|
|
slot |
◆ setColumns
| void color_widgets::ColorPalette::setColumns |
( |
int |
columns | ) |
|
|
slot |
◆ setDirty
| void color_widgets::ColorPalette::setDirty |
( |
bool |
dirty | ) |
|
|
slot |
◆ setFileName
| void color_widgets::ColorPalette::setFileName |
( |
const QString & |
name | ) |
|
|
slot |
◆ setName
| void color_widgets::ColorPalette::setName |
( |
const QString & |
name | ) |
|
|
slot |
◆ setNameAt
| void color_widgets::ColorPalette::setNameAt |
( |
int |
index, |
|
|
const QString & |
name = QString() |
|
) |
| |
|
slot |
◆ unnamed()
| 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 |
◆ colors
| QVector< QPair< QColor, QString > > color_widgets::ColorPalette::colors |
|
readwrite |
◆ columns
| 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.
◆ count
| int color_widgets::ColorPalette::count |
|
read |
◆ dirty
| 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.
◆ fileName
| 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.
◆ name
| QString color_widgets::ColorPalette::name |
|
readwrite |
The documentation for this class was generated from the following files: