Chatterino
Public Member Functions | Static Public Member Functions | List of all members
chatterino::ColorProvider Class Reference

#include <ColorProvider.hpp>

Public Member Functions

const std::shared_ptr< QColor > color (ColorType type) const
 Return a std::shared_ptr to the color of the requested ColorType. More...
 
void updateColor (ColorType type, QColor color)
 
QSet< QColor > recentColors () const
 Return a set of recently used colors used anywhere in Chatterino. More...
 
const std::vector< QColor > & defaultColors () const
 Return a vector of colors that are good defaults for use throughout the program. More...
 

Static Public Member Functions

static const ColorProviderinstance ()
 

Member Function Documentation

◆ color()

const std::shared_ptr< QColor > chatterino::ColorProvider::color ( ColorType  type) const

Return a std::shared_ptr to the color of the requested ColorType.

If a custom color has been set for the requested ColorType, it is returned. If no custom color exists for the type, a default color is returned.

We need to do this in order to be able to dynamically update the colors of already parsed predefined (self highlights, subscriptions, and whispers) highlights.

Here is the caller graph for this function:

◆ defaultColors()

const std::vector< QColor > & chatterino::ColorProvider::defaultColors ( ) const

Return a vector of colors that are good defaults for use throughout the program.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ instance()

const ColorProvider & chatterino::ColorProvider::instance ( )
static
Here is the caller graph for this function:

◆ recentColors()

QSet< QColor > chatterino::ColorProvider::recentColors ( ) const

Return a set of recently used colors used anywhere in Chatterino.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateColor()

void chatterino::ColorProvider::updateColor ( ColorType  type,
QColor  color 
)

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