Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::PaletteServer Class Reference

Server for color palettes used in images for coloring on basis of index. More...

#include <PaletteServer.h>

Inheritance diagram for sf::PaletteServer:
Collaboration diagram for sf::PaletteServer:

Public Member Functions

 PaletteServer (QObject *parent=nullptr)
 Constructor.
 
 ~PaletteServer () override
 Destructor.
 
void addPropertyPages (PropertySheetDialog *sheet)
 Adds property pages of the select palette.
 
ColorTable getColorTable () const
 Gets the generated color table of the selected.
 
void setColorCount (int colorsUsed, int colorsSize=-1)
 
void paint (QPainter &painter, const QRect &bounds) const
 Paints the palette using the passed painter instance.
 
QList< QPair< QString, QString > > getImplementationNames () const
 Gets the names of all available implementations names and descriptions in pairs.
 
const QString & getImplementationName () const
 Gets the name of the desired implementation.
 
bool isAvailable () const
 Returns true when an implementation is available.
 
void setImplementationName (const QString &name)
 Sets the name of the desired implementation.
 
const QStringList & getImplementationProperties ()
 Gets the name of the desired implementation.
 
void setImplementationProperties (const QStringList &props)
 Sets the name of the desired implementation.
 
Q_SIGNAL void changed (PaletteServer *sender)
 Signal for when the palette changes.
 

Protected Member Functions

bool createImplementation (const std::string &name)
 Creates implementation by registered name.
 

Friends

class PaletteServerPropertyPage
 

Detailed Description

Server for color palettes used in images for coloring on basis of index.

Constructor & Destructor Documentation

◆ PaletteServer()

sf::PaletteServer::PaletteServer ( QObject *  parent = nullptr)
explicit

Constructor.

◆ ~PaletteServer()

sf::PaletteServer::~PaletteServer ( )
override

Destructor.

Member Function Documentation

◆ addPropertyPages()

void sf::PaletteServer::addPropertyPages ( PropertySheetDialog sheet)

Adds property pages of the select palette.

◆ changed()

Q_SIGNAL void sf::PaletteServer::changed ( PaletteServer sender)

Signal for when the palette changes.

◆ createImplementation()

bool sf::PaletteServer::createImplementation ( const std::string &  name)
protected

Creates implementation by registered name.

Returns
True on success.

◆ getColorTable()

ColorTable sf::PaletteServer::getColorTable ( ) const

Gets the generated color table of the selected.

◆ getImplementationName()

const QString & sf::PaletteServer::getImplementationName ( ) const

Gets the name of the desired implementation.

◆ getImplementationNames()

QList< QPair< QString, QString > > sf::PaletteServer::getImplementationNames ( ) const

Gets the names of all available implementations names and descriptions in pairs.

◆ getImplementationProperties()

const QStringList & sf::PaletteServer::getImplementationProperties ( )

Gets the name of the desired implementation.

◆ isAvailable()

bool sf::PaletteServer::isAvailable ( ) const

Returns true when an implementation is available.

◆ paint()

void sf::PaletteServer::paint ( QPainter &  painter,
const QRect &  bounds 
) const

Paints the palette using the passed painter instance.

◆ setColorCount()

void sf::PaletteServer::setColorCount ( int  colorsUsed,
int  colorsSize = -1 
)

Sets the amount of colors and the amount really used in the pallet.

Parameters
colorsUsedAmount of colors used.
colorsSizeTotal amount of colors (value of -1) defaults to 256.

◆ setImplementationName()

void sf::PaletteServer::setImplementationName ( const QString &  name)

Sets the name of the desired implementation.

◆ setImplementationProperties()

void sf::PaletteServer::setImplementationProperties ( const QStringList &  props)

Sets the name of the desired implementation.

Friends And Related Symbol Documentation

◆ PaletteServerPropertyPage

friend class PaletteServerPropertyPage
friend

The documentation for this class was generated from the following file: