edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
edbee::TmThemeParser Class Reference

#include <tmthemeparser.h>

+ Inheritance diagram for edbee::TmThemeParser:
+ Collaboration diagram for edbee::TmThemeParser:

Public Member Functions

 TmThemeParser ()
 
QColor parseThemeColor (const QString &color) const
 parses theme color
 
TextThemereadContent (QIODevice *device)
 reads the content of a single file
 
- Public Member Functions inherited from edbee::BasePListParser
 BasePListParser ()
 The constructor for the parser.
 
virtual ~BasePListParser ()
 the default desctructor
 
QString lastErrorMessage () const
 Returns the last error message of the parsed file.
 
void setLastErrorMessage (const QString &str)
 Sets the last error message. To correctly set the last error message while parsing please use raiseError.
 
bool beginParsing (QIODevice *device)
 Start the parsing of the plist. If it isn't a valid plist this method return false. (it only checks and reads the existence of <plist>)
 
bool endParsing ()
 Closes the parsers.
 
void raiseError (const QString &str)
 Call this method to raise an error and stop the xml parsing.
 
QList< QVariant > readList ()
 reads a list of qvariants
 
QHash< QString, QVariant > readDict ()
 reads a dictionary
 
QVariant readNextPlistType (int level=-1)
 reads the next plist type
 
bool readNextElement (const QString &name, int level=-1)
 Reads the next element and optionally expects it to be the given name.
 
QString readElementText ()
 Reads the element text contents.
 
int currentStackLevel ()
 returns the current stack-level
 

Protected Member Functions

void fillRuleSettings (TextTheme *theme, const QHash< QString, QVariant > &settings)
 fetches the settings from the hashmap and puts them in the theme file
 
void parseRules (TextTheme *theme, const QList< QVariant > &settings)
 parses all rules
 
TextThemecreateTheme (QVariant &data)
 Reads and parsers the theme.
 

Constructor & Destructor Documentation

◆ TmThemeParser()

edbee::TmThemeParser::TmThemeParser ( )

Member Function Documentation

◆ createTheme()

TextTheme * edbee::TmThemeParser::createTheme ( QVariant & data)
protected

Reads and parsers the theme.

◆ fillRuleSettings()

void edbee::TmThemeParser::fillRuleSettings ( TextTheme * theme,
const QHash< QString, QVariant > & settings )
protected

fetches the settings from the hashmap and puts them in the theme file

◆ parseRules()

void edbee::TmThemeParser::parseRules ( TextTheme * theme,
const QList< QVariant > & settings )
protected

parses all rules

◆ parseThemeColor()

QColor edbee::TmThemeParser::parseThemeColor ( const QString & color) const

parses theme color

◆ readContent()

TextTheme * edbee::TmThemeParser::readContent ( QIODevice * device)

reads the content of a single file

Parameters
devicethe device to read from. The device NEEDS to be open!!
Returns
the language grammar or 0 on error

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