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 VectorAvailableColorSchemes ()
 Returns the vector of available color schemes. More...
 
static const ColorSchemeColorSchemeByName (const QString &name)
 
static ColorScheme Default ()
 Default color scheme. More...
 
static ColorScheme Dracula ()
 

Detailed Description

ColorScheme to be used by the PythonHighlighter & Editor.

Definition at line 13 of file ColorScheme.h.

Member Typedef Documentation

◆ Vector

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

Definition at line 16 of file ColorScheme.h.

Member Function Documentation

◆ AvailableColorSchemes()

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

Returns the vector of available color schemes.

Definition at line 113 of file ColorScheme.cpp.

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.

Definition at line 52 of file ColorScheme.cpp.

◆ 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;

Definition at line 123 of file ColorScheme.cpp.

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.

Definition at line 57 of file ColorScheme.cpp.

◆ Default()

ColorScheme ColorScheme::Default ( )
static

◆ Dracula()

ColorScheme ColorScheme::Dracula ( )
static

Dracula color scheme https://draculatheme.com/

Definition at line 88 of file ColorScheme.cpp.

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

Referenced by AvailableColorSchemes().

◆ foregroundColor()

QColor ColorScheme::foregroundColor ( ) const

Color to be used for regular text.

Definition at line 47 of file ColorScheme.cpp.

◆ 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.

Definition at line 62 of file ColorScheme.cpp.


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