HighlightBlock Class Reference

Class representing highlighting block with its name/description and formating Class holds generic info for all available highlight block, its name and description, used to store values in ini files and to build UI, and formatting aplied if block of code is detected. More...

#include <HighlightBlock.h>

Inheritance diagram for HighlightBlock:

MultiLinesHighlightBlock SingleLineHighlightBlock

List of all members.

Public Member Functions

virtual HighlighType type ()=0
virtual ~HighlightBlock ()
QTextCharFormat getFormat () const
 Formatting getter, used for caching purposes.
QFont getFont () const
 Formatting font getter provided for convenience, used for configuration purposes.
void setFont (const QFont &__font)
 Formatting font setter provided for convenience, used for configuration purposes.
const QColor & getForegroundColor () const
 Formatting foreground color getter provided for convenience, used for configuration purposes.
void setForegroundColor (const QColor &color)
 Formatting foreground color setter provided for convenience, used for configuration purposes.
const QColor & getBackgroundColor () const
 Formatting background color getter provided for convenience, used for configuration purposes.
void setBackgroundColor (const QColor &color)
 Formatting background color setter provided for convenience, used for configuration purposes.
QString getName () const
void setName (QString _name)
QString getDescription () const
void setDescription (QString _description)

Private Attributes

QTextCharFormat format
 Formatting applied to matched block.
QString name
 User-friendly name of this block.
QString description
 Description of this block.


Detailed Description

Class representing highlighting block with its name/description and formating Class holds generic info for all available highlight block, its name and description, used to store values in ini files and to build UI, and formatting aplied if block of code is detected.

Definition at line 29 of file HighlightBlock.h.


Constructor & Destructor Documentation

virtual HighlightBlock::~HighlightBlock (  )  [inline, virtual]

Empty destructor because class doesn't allocate memory.

Definition at line 45 of file HighlightBlock.h.


Member Function Documentation

const QColor& HighlightBlock::getBackgroundColor (  )  const [inline]

Formatting background color getter provided for convenience, used for configuration purposes.

Returns:
currently used background color

Definition at line 103 of file HighlightBlock.h.

References format.

Referenced by HSyntaxHighlighterSettings::saveConfig(), HBFormatPanel::showBColorDialog(), and HBFormatPanel::updateSample().

QString HighlightBlock::getDescription (  )  const [inline]

HighlightBlock description getter

Returns:
user-friendly description of this block

Definition at line 140 of file HighlightBlock.h.

References description.

Referenced by HSyntaxHighlighterDialog::constructBlockList().

QFont HighlightBlock::getFont (  )  const [inline]

Formatting font getter provided for convenience, used for configuration purposes.

Returns:
currently used font

Definition at line 62 of file HighlightBlock.h.

References format.

Referenced by HSyntaxHighlighterSettings::saveConfig(), HBFormatPanel::showFontDialog(), and HBFormatPanel::updateSample().

const QColor& HighlightBlock::getForegroundColor (  )  const [inline]

Formatting foreground color getter provided for convenience, used for configuration purposes.

Returns:
currently used foreground color

Definition at line 83 of file HighlightBlock.h.

References format.

Referenced by HSyntaxHighlighterSettings::saveConfig(), HBFormatPanel::showFColorDialog(), and HBFormatPanel::updateSample().

QTextCharFormat HighlightBlock::getFormat (  )  const [inline]

Formatting getter, used for caching purposes.

Returns:
Formatting used by this HighlightBlock

Definition at line 52 of file HighlightBlock.h.

References format.

Referenced by HSyntaxHighlighterSettings::getMultiLinesRules(), and HSyntaxHighlighterSettings::getSingleLineRules().

QString HighlightBlock::getName (  )  const [inline]

void HighlightBlock::setBackgroundColor ( const QColor &  color  )  [inline]

Formatting background color setter provided for convenience, used for configuration purposes.

Parameters:
color background color to be used

Definition at line 113 of file HighlightBlock.h.

References format.

Referenced by HSyntaxHighlighterSettings::loadConfig(), and HBFormatPanel::showBColorDialog().

void HighlightBlock::setDescription ( QString  _description  )  [inline]

HighlightBlock description setter

Parameters:
_description new user-friendly description to be used

Definition at line 149 of file HighlightBlock.h.

References description.

void HighlightBlock::setFont ( const QFont &  __font  )  [inline]

Formatting font setter provided for convenience, used for configuration purposes.

Parameters:
__font Font to be used in current format
Returns:
currently used font

Definition at line 73 of file HighlightBlock.h.

References format.

Referenced by HSyntaxHighlighterSettings::loadConfig(), and HBFormatPanel::showFontDialog().

void HighlightBlock::setForegroundColor ( const QColor &  color  )  [inline]

Formatting foreground color setter provided for convenience, used for configuration purposes.

Parameters:
color foreground color to be used

Definition at line 93 of file HighlightBlock.h.

References format.

Referenced by HSyntaxHighlighterSettings::loadConfig(), and HBFormatPanel::showFColorDialog().

void HighlightBlock::setName ( QString  _name  )  [inline]

HighlightBlock name setter

Parameters:
_name new user-friendly name to be used

Definition at line 131 of file HighlightBlock.h.

References name.

virtual HighlighType HighlightBlock::type (  )  [pure virtual]

Function for indicating a sub-type of HighlighBlock

Returns:
Indicator from enum HighlighType

Implemented in SingleLineHighlightBlock, and MultiLinesHighlightBlock.

Referenced by HBSettingsPanel::createUI().


Member Data Documentation

QString HighlightBlock::description [private]

Description of this block.

Definition at line 34 of file HighlightBlock.h.

Referenced by getDescription(), and setDescription().

QTextCharFormat HighlightBlock::format [private]

Formatting applied to matched block.

Definition at line 32 of file HighlightBlock.h.

Referenced by getBackgroundColor(), getFont(), getForegroundColor(), getFormat(), setBackgroundColor(), setFont(), and setForegroundColor().

QString HighlightBlock::name [private]

User-friendly name of this block.

Definition at line 33 of file HighlightBlock.h.

Referenced by getName(), and setName().


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

Generated on Fri Jan 9 00:51:00 2009 for HSyntaxHighlighter by  doxygen 1.5.8