edbee - Qt Editor Library
Public Member Functions | List of all members
edbee::TextThemeStyler Class Reference

This class is used to return the style formats for rendering the texts. More...

#include <texttheme.h>

+ Inheritance diagram for edbee::TextThemeStyler:
+ Collaboration diagram for edbee::TextThemeStyler:

Public Member Functions

 TextThemeStyler (TextEditorController *controller)
 Constructs the theme styler. More...
 
virtual ~TextThemeStyler ()
 The current destructor. More...
 
QList< QTextLayout::FormatRange > getLineFormatRanges (int lineIdx)
 This method returns a reference to the given line format. WARNING this reference is ONLY valid very shortly.. Another call to this method can invalidates the previous result!!! More...
 
TextEditorControllercontroller ()
 
void setThemeByName (const QString &themeName)
 Sets the active theme name. More...
 
QString themeName () const
 returns the current active theme name This method returns "" for the fallback theme It returns a NullString if the theme is specified manually (without the thememanager) More...
 
void setTheme (TextTheme *theme)
 Sets the active theme When supplying 0 this theme applies the fallback theme. More...
 
TextThemetheme () const
 returns the active theme More...
 

Detailed Description

This class is used to return the style formats for rendering the texts.

Constructor & Destructor Documentation

◆ TextThemeStyler()

edbee::TextThemeStyler::TextThemeStyler ( TextEditorController controller)

Constructs the theme styler.

Parameters
controllerthe controller to use this styler for

◆ ~TextThemeStyler()

edbee::TextThemeStyler::~TextThemeStyler ( )
virtual

The current destructor.

Member Function Documentation

◆ controller()

TextEditorController* edbee::TextThemeStyler::controller ( )
inline

◆ getLineFormatRanges()

QList< QTextLayout::FormatRange > edbee::TextThemeStyler::getLineFormatRanges ( int  lineIdx)

This method returns a reference to the given line format. WARNING this reference is ONLY valid very shortly.. Another call to this method can invalidates the previous result!!!

Parameters
lineIdxthe line index
Returns
the array of ranges

◆ setTheme()

void edbee::TextThemeStyler::setTheme ( TextTheme theme)

Sets the active theme When supplying 0 this theme applies the fallback theme.

◆ setThemeByName()

void edbee::TextThemeStyler::setThemeByName ( const QString &  themeName)

Sets the active theme name.

Parameters
themeName

◆ theme()

TextTheme * edbee::TextThemeStyler::theme ( ) const

returns the active theme

◆ themeName()

QString edbee::TextThemeStyler::themeName ( ) const

returns the current active theme name This method returns "" for the fallback theme It returns a NullString if the theme is specified manually (without the thememanager)


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