Marbellous
Marbellous, a WebApp to generate paper marbling patterns.
Public Member Functions | Static Public Member Functions | List of all members
Options Class Reference

Global option state. More...

#include <Options.hpp>

Collaboration diagram for Options:
Collaboration graph

Public Member Functions

 Options (Options const &)=delete
 
void operator= (Options const &)=delete
 
Optionsoperator= (Options &&)=delete
 
 Options (Options &&)=delete
 
size_t addPalette (Palette const &newPalette)
 
PalettegetActivePalette ()
 
const PalettegetActivePalette () const
 const version of getActivePalette() More...
 
int setActivePalette (size_t id)
 
void setState (bool dropState)
 
bool getState () const
 
void setBGColor (Color const &col)
 
const ColorgetBGColor () const
 
void setFilter (bool filter)
 
bool getFilter () const
 Get the filter option. More...
 

Static Public Member Functions

static Options *const getInstance ()
 

Detailed Description

Global option state.

A singleton representing general options and data of the backend.

Constructor & Destructor Documentation

◆ Options() [1/2]

Options::Options ( Options const &  )
delete

◆ Options() [2/2]

Options::Options ( Options &&  )
delete

Member Function Documentation

◆ addPalette()

size_t Options::addPalette ( Palette const &  newPalette)

Add a new palette.

Parameters
newPalettePalette to add.
Returns
ID of the new palette. May be used to set it active.
Here is the caller graph for this function:

◆ getActivePalette() [1/2]

Palette * Options::getActivePalette ( )

Get the active palette.

Returns
Active palette.
Here is the caller graph for this function:

◆ getActivePalette() [2/2]

const Palette * Options::getActivePalette ( ) const

const version of getActivePalette()

◆ getBGColor()

const Color * Options::getBGColor ( ) const

Get the Background color.

Returns
Pointer to the background color.
Here is the caller graph for this function:

◆ getFilter()

bool Options::getFilter ( ) const

Get the filter option.

Returns
true Filter will be applied.
false No filter will be applied.

◆ getInstance()

Options *const Options::getInstance ( )
static

Return single options instance. If there is no existing instance it will be constructed.

Returns
Options
Here is the caller graph for this function:

◆ getState()

bool Options::getState ( ) const

Get the backend's state. This influences which API functions are active.

Returns
TRUE for drop state, FALSE for rake state.
Here is the caller graph for this function:

◆ operator=() [1/2]

Options& Options::operator= ( Options &&  )
delete

◆ operator=() [2/2]

void Options::operator= ( Options const &  )
delete

◆ setActivePalette()

int Options::setActivePalette ( size_t  id)

Set the active palette.

Parameters
idID of the palette to set active. Return value of addPalette().
Here is the caller graph for this function:

◆ setBGColor()

void Options::setBGColor ( Color const &  col)

Set the background color.

Parameters
colColor to use for the background.
Here is the caller graph for this function:

◆ setFilter()

void Options::setFilter ( bool  filter)

Set the option wether to filter or not.

Parameters
filterTRUE for filter application, FALSE for no filter application.
Here is the caller graph for this function:

◆ setState()

void Options::setState ( bool  dropState)

Set the state of the backend. This influences which API functions are active.

Parameters
dropStateTRUE for drop state and FALSE for rake state.
Here is the caller graph for this function:

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