Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::PaletteInterface Class Referenceabstract

Base class for the interface. More...

#include <PaletteInterface.h>

Inheritance diagram for sf::PaletteInterface:
[legend]
Collaboration diagram for sf::PaletteInterface:
[legend]

Classes

struct  Parameters
 Structure passed as a constructor argument. More...

Public Member Functions

 PaletteInterface (const Parameters &)
 Constructor for passing general structure for derived classes.
 ~PaletteInterface () override=default
 Virtual destructor for derived classes.
virtual void addPropertyPages (PropertySheetDialog *sheet)
virtual void setSizes (qsizetype colorsUsed, qsizetype colorsSize)
 Sets the size of the color table of the implementation.
virtual ColorTable getColorTable () const =0
 Gets the color table of the implementation.
virtual qreal getCurveLevel (qreal x) const =0
 Gets calculated level for color shifts.
Public Member Functions inherited from sf::Persistent
 Persistent (QObject *obj)
 Constructor.
void setSourceObject (QObject *obj)
QStringList getProperties () const
 Gets the properties from the object as a string list to store as settings.
void setProperties (const QStringList &) const
 Sets the properties of the object as a string list settings.

Protected Attributes

Parameters::Callback _callback
qsizetype _colorsSize {256}
qsizetype _colorsUsed {_colorsSize}

Additional Inherited Members

Protected Member Functions inherited from sf::Persistent
QMap< int, const char * > getObjectProperties (const QObject *obj) const
 Gets a mapped property list af all properties of the object.

Detailed Description

Base class for the interface.

Constructor & Destructor Documentation

◆ PaletteInterface()

sf::PaletteInterface::PaletteInterface ( const Parameters & )
explicit

Constructor for passing general structure for derived classes.

◆ ~PaletteInterface()

sf::PaletteInterface::~PaletteInterface ( )
overridedefault

Virtual destructor for derived classes.

Member Function Documentation

◆ addPropertyPages()

virtual void sf::PaletteInterface::addPropertyPages ( PropertySheetDialog * sheet)
virtual

Adds controller specific property pages to the passed sheet.

Parameters
sheet

Reimplemented in sf::AmplitudePalette, and sf::SimplePalette.

◆ getColorTable()

virtual ColorTable sf::PaletteInterface::getColorTable ( ) const
nodiscardpure virtual

Gets the color table of the implementation.

Implemented in sf::AmplitudePalette, and sf::SimplePalette.

◆ getCurveLevel()

virtual qreal sf::PaletteInterface::getCurveLevel ( qreal x) const
nodiscardpure virtual

Gets calculated level for color shifts.

Used in calculation of colors and drawing a curve when configuring.

Parameters
xValue between 0.0 and 1.0.
Returns
Value between 0.0 and 1.0.

Implemented in sf::AmplitudePalette, and sf::SimplePalette.

◆ setSizes()

virtual void sf::PaletteInterface::setSizes ( qsizetype colorsUsed,
qsizetype colorsSize )
virtual

Sets the size of the color table of the implementation.

Parameters
colorsUsedAmount of colors actually used.
colorsSizeAmount of colors needed.

Member Data Documentation

◆ _callback

Parameters::Callback sf::PaletteInterface::_callback
protected

◆ _colorsSize

qsizetype sf::PaletteInterface::_colorsSize {256}
protected

◆ _colorsUsed

qsizetype sf::PaletteInterface::_colorsUsed {_colorsSize}
protected

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