edbee - Qt Editor Library
Signals | Public Member Functions | Protected Member Functions | Friends | List of all members
edbee::TextThemeManager Class Reference

This class is used to manage load 'themes'. This method loads only loads a theme if requested. It will list all available theme when. More...

#include <texttheme.h>

+ Inheritance diagram for edbee::TextThemeManager:
+ Collaboration diagram for edbee::TextThemeManager:

Signals

void themePointerChanged (const QString &name, TextTheme *oldTheme, TextTheme *newTheme)
 

Public Member Functions

void clear ()
 clears all items More...
 
TextThemereadThemeFile (const QString &fileName, const QString &name=QString())
 This method loads the given theme file. The theme manager stays owner of the given theme. More...
 
void listAllThemes (const QString &themePath=QString())
 This method loads all theme names from the given theme path (*.tmTheme files) More...
 
int themeCount ()
 
QString themeName (int idx)
 Returns the theme name at the given index. More...
 
TextThemetheme (const QString &name)
 This method gets or loads the theme. (The auto loading feature only works if the themepath is supplied) More...
 
TextThemefallbackTheme () const
 
QString lastErrorMessage () const
 this method returns the last error message More...
 
void setTheme (const QString &name, TextTheme *theme)
 

Protected Member Functions

 TextThemeManager ()
 Constructs the theme manager And intialises a fallback theme. More...
 
virtual ~TextThemeManager ()
 destructs the theme maanger More...
 

Friends

class Edbee
 

Detailed Description

This class is used to manage load 'themes'. This method loads only loads a theme if requested. It will list all available theme when.

Constructor & Destructor Documentation

◆ TextThemeManager()

edbee::TextThemeManager::TextThemeManager ( )
protected

Constructs the theme manager And intialises a fallback theme.

◆ ~TextThemeManager()

edbee::TextThemeManager::~TextThemeManager ( )
protectedvirtual

destructs the theme maanger

Member Function Documentation

◆ clear()

void edbee::TextThemeManager::clear ( )

clears all items

◆ fallbackTheme()

TextTheme* edbee::TextThemeManager::fallbackTheme ( ) const
inline

◆ lastErrorMessage()

QString edbee::TextThemeManager::lastErrorMessage ( ) const

this method returns the last error message

◆ listAllThemes()

void edbee::TextThemeManager::listAllThemes ( const QString &  themePath = QString())

This method loads all theme names from the given theme path (*.tmTheme files)

Parameters
thenew themePath. if the themepath is blank, the themes of the current path are reloaded

◆ readThemeFile()

TextTheme * edbee::TextThemeManager::readThemeFile ( const QString &  fileName,
const QString &  nameIn = QString() 
)

This method loads the given theme file. The theme manager stays owner of the given theme.

Parameters
filenamethe filename of the theme to load
namethe name of the theme (if the name isn't given the basenaem of the fileName is used (excluding the .tmTheme extension)
Returns
the loaded theme or 0 if the theme couldn' be loaded

◆ setTheme()

void edbee::TextThemeManager::setTheme ( const QString &  name,
TextTheme theme 
)

◆ theme()

TextTheme * edbee::TextThemeManager::theme ( const QString &  name)

This method gets or loads the theme. (The auto loading feature only works if the themepath is supplied)

Parameters
thename of the theme to load
Returns
the theme with the given name

◆ themeCount()

int edbee::TextThemeManager::themeCount ( )
inline

◆ themeName()

QString edbee::TextThemeManager::themeName ( int  idx)

Returns the theme name at the given index.

Parameters
idxthe index of the theme to retrieve

◆ themePointerChanged

void edbee::TextThemeManager::themePointerChanged ( const QString &  name,
TextTheme oldTheme,
TextTheme newTheme 
)
signal

Friends And Related Function Documentation

◆ Edbee

friend class Edbee
friend

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