krita

KisPalette Class Reference

#include <kis_palette.h>

Inheritance diagram for KisPalette:

KisResource List of all members.

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.


Public Member Functions

 KisPalette (const QImage *img, Q_INT32 nColors, const QString &name)
 KisPalette (const KisPaintDeviceSP device, Q_INT32 nColors, const QString &name)
 KisPalette (const KisGradient *gradient, Q_INT32 nColors, const QString &name)
 KisPalette (const QString &filename)
 KisPalette ()
 KisPalette (const KisPalette &rhs)
virtual ~KisPalette ()
virtual bool load ()
virtual bool save ()
virtual QImage img ()
void add (const KisPaletteEntry &)
void remove (const KisPaletteEntry &)
KisPaletteEntry getColor (Q_UINT32 index)
Q_INT32 nColors ()

Constructor & Destructor Documentation

KisPalette::KisPalette ( const QImage *  img,
Q_INT32  nColors,
const QString &  name 
)

Create a palette from the colours in an image.

Definition at line 57 of file kis_palette.cc.

KisPalette::KisPalette ( const KisPaintDeviceSP  device,
Q_INT32  nColors,
const QString &  name 
)

Create a palette from the colours in a paint device.

Definition at line 69 of file kis_palette.cc.

KisPalette::KisPalette ( const KisGradient gradient,
Q_INT32  nColors,
const QString &  name 
)

Create a palette from the colours in a gradient.

Definition at line 82 of file kis_palette.cc.

KisPalette::KisPalette ( const QString &  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.cc.

KisPalette::KisPalette (  ) 

Create an empty palette.

Definition at line 112 of file kis_palette.cc.

KisPalette::KisPalette ( const KisPalette rhs  ) 

Explicit copy constructor (KisResource copy constructor is private).

Definition at line 119 of file kis_palette.cc.


Member Function Documentation

QImage KisPalette::img (  )  [virtual]

Returns a QImage representing this resource.

This image could be null.

Implements KisResource.

Definition at line 172 of file kis_palette.cc.

bool KisPalette::load (  )  [virtual]

Load this resource.

Implements KisResource.

Definition at line 136 of file kis_palette.cc.

bool KisPalette::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.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys