#include <kis_palette.h>
Public Member Functions | |
| KisPalette (const TQImage *img, TQ_INT32 nColors, const TQString &name) | |
| KisPalette (const KisPaintDeviceSP device, TQ_INT32 nColors, const TQString &name) | |
| KisPalette (const KisGradient *gradient, TQ_INT32 nColors, const TQString &name) | |
| KisPalette (const TQString &filename) | |
| KisPalette () | |
| KisPalette (const KisPalette &rhs) | |
| virtual bool | load () |
| virtual bool | save () |
| virtual TQImage | img () |
| void | add (const KisPaletteEntry &) |
| void | remove (const KisPaletteEntry &) |
| KisPaletteEntry | getColor (TQ_UINT32 index) |
| TQ_INT32 | nColors () |
Public Member Functions inherited from KisResource | |
| KisResource (const TQString &filename) | |
| TQString | filename () const |
| void | setFilename (const TQString &filename) |
| TQString | name () const |
| void | setName (const TQString &name) |
| bool | valid () const |
| void | setValid (bool valid) |
Detailed Description
Open Gimp, Photoshop or RIFF palette files.
This is a straight port from the Gimp.
Definition at line 50 of file kis_palette.h.
Constructor & Destructor Documentation
◆ KisPalette() [1/6]
| KisPalette::KisPalette | ( | const TQImage * | img, |
| TQ_INT32 | nColors, | ||
| const TQString & | name | ||
| ) |
Create a palette from the colours in an image.
Definition at line 57 of file kis_palette.cpp.
◆ KisPalette() [2/6]
| KisPalette::KisPalette | ( | const KisPaintDeviceSP | device, |
| TQ_INT32 | nColors, | ||
| const TQString & | name | ||
| ) |
Create a palette from the colours in a paint device.
Definition at line 69 of file kis_palette.cpp.
◆ KisPalette() [3/6]
| KisPalette::KisPalette | ( | const KisGradient * | gradient, |
| TQ_INT32 | nColors, | ||
| const TQString & | name | ||
| ) |
Create a palette from the colours in a gradient.
Definition at line 82 of file kis_palette.cpp.
◆ KisPalette() [4/6]
| KisPalette::KisPalette | ( | const TQString & | filename | ) |
Load a palette from a file.
This can be a Gimp palette, a RIFF palette or a Photoshop palette.
Definition at line 105 of file kis_palette.cpp.
◆ KisPalette() [5/6]
| KisPalette::KisPalette | ( | ) |
Create an empty palette.
Definition at line 112 of file kis_palette.cpp.
◆ KisPalette() [6/6]
| KisPalette::KisPalette | ( | const KisPalette & | rhs | ) |
Explicit copy constructor (KisResource copy constructor is private)
Create an copied palette.
Definition at line 119 of file kis_palette.cpp.
◆ ~KisPalette()
|
virtual |
Definition at line 132 of file kis_palette.cpp.
Member Function Documentation
◆ add()
| void KisPalette::add | ( | const KisPaletteEntry & | c | ) |
Definition at line 282 of file kis_palette.cpp.
◆ getColor()
| KisPaletteEntry KisPalette::getColor | ( | TQ_UINT32 | index | ) |
Definition at line 301 of file kis_palette.cpp.
◆ img()
|
virtual |
Returns a TQImage representing this resource.
This image could be null.
Implements KisResource.
Definition at line 172 of file kis_palette.cpp.
◆ load()
|
virtual |
◆ nColors()
| TQ_INT32 KisPalette::nColors | ( | ) |
Definition at line 177 of file kis_palette.cpp.
◆ remove()
| void KisPalette::remove | ( | const KisPaletteEntry & | c | ) |
Definition at line 287 of file kis_palette.cpp.
◆ save()
|
virtual |
Save this resource asynchronously.
The signal saveComplete is emitted when the resource has been saved.
Implements KisResource.
Definition at line 146 of file kis_palette.cpp.
The documentation for this class was generated from the following files:

Public Member Functions inherited from