ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ColorScheme Class Referencefinal

ColorScheme to be used by the PythonHighlighter & Editor. More...

#include <ColorScheme.h>

Public Types

using Vector = std::vector< ColorScheme >
 

Public Member Functions

const QString & name () const
 The name of the color scheme. More...
 
QColor backgroundColor () const
 Color to be used as the background for the displayed text. More...
 
QColor foregroundColor () const
 Color to be used for regular text. More...
 
QColor currentLineHighlightColor () const
 Color to be used if a highlight of the current line is shown. More...
 
const QTextCharFormat & operator[] (PythonHighlighter::CodeElement e) const
 Returns the format to be used for the given code element. More...
 

Static Public Member Functions

static const Vector & AvailableColorSchemes ()
 Returns the vector of available color schemes. More...
 
static const ColorScheme * ColorSchemeByName (const QString &name)
 
static ColorScheme Default ()
 Default color scheme. More...
 
static ColorScheme Dracula ()
 

Detailed Description

ColorScheme to be used by the PythonHighlighter & Editor.

Member Typedef Documentation

◆ Vector

using ColorScheme::Vector = std::vector<ColorScheme>

Member Function Documentation

◆ AvailableColorSchemes()

const ColorScheme::Vector & ColorScheme::AvailableColorSchemes ( )
static

Returns the vector of available color schemes.

References Default(), Dracula(), and s_AvailableColorSchemes.

Referenced by EditorSettings::setupUi().

◆ backgroundColor()

QColor ColorScheme::backgroundColor ( ) const

Color to be used as the background for the displayed text.

◆ ColorSchemeByName()

const ColorScheme * ColorScheme::ColorSchemeByName ( const QString &  name)
static

Returns a ColorScheme that matches the given name. returns nullptr if the color scheme does not exists;

References name(), and s_AvailableColorSchemes.

Referenced by EditorSettings::loadFromSettings(), and EditorSettings::saveChanges().

◆ currentLineHighlightColor()

QColor ColorScheme::currentLineHighlightColor ( ) const

Color to be used if a highlight of the current line is shown.

◆ Default()

ColorScheme ColorScheme::Default ( )
static

◆ Dracula()

ColorScheme ColorScheme::Dracula ( )
static

Dracula color scheme https://draculatheme.com/

References FormatHelper(), and ecvColor::red().

Referenced by AvailableColorSchemes().

◆ foregroundColor()

QColor ColorScheme::foregroundColor ( ) const

Color to be used for regular text.

◆ name()

const QString & ColorScheme::name ( ) const

◆ operator[]()

const QTextCharFormat & ColorScheme::operator[] ( PythonHighlighter::CodeElement  e) const

Returns the format to be used for the given code element.

References e.


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