Gui::SyntaxHighlighter Class Reference

Abstract Syntax highlighter. More...

#include <SyntaxHighlighter.h>

Public Member Functions

QColor color (const QString &type)
 
int maximumUserState () const
 
void setColor (const QString &type, const QColor &col)
 Sets the color col to the paragraph type type. More...
 
 SyntaxHighlighter (QObject *parent)
 Constructs a syntax highlighter. More...
 
virtual ~SyntaxHighlighter ()
 Destroys this object. More...
 

Protected Types

enum  TColor {
  Text = 0 , Comment = 1 , BlockComment = 2 , Number = 3 ,
  String = 4 , Keyword = 5 , Classname = 6 , Defname = 7 ,
  Operator = 8 , Output = 9 , Error = 10
}
 

Protected Member Functions

QColor colorByType (TColor type)
 
virtual void colorChanged (const QString &type, const QColor &col)
 

Detailed Description

Abstract Syntax highlighter.

Author
Werner Mayer

Member Enumeration Documentation

◆ TColor

Enumerator
Text 
Comment 
BlockComment 
Number 
String 
Keyword 
Classname 
Defname 
Operator 
Output 
Error 

Constructor & Destructor Documentation

◆ SyntaxHighlighter()

SyntaxHighlighter::SyntaxHighlighter ( QObject parent)

Constructs a syntax highlighter.

◆ ~SyntaxHighlighter()

SyntaxHighlighter::~SyntaxHighlighter ( )
virtual

Destroys this object.

Member Function Documentation

◆ color()

QColor SyntaxHighlighter::color ( const QString &  type)

References Gui::SyntaxHighlighterP::cBlockcomment, Gui::SyntaxHighlighterP::cClassName, Gui::SyntaxHighlighterP::cComment, Gui::SyntaxHighlighterP::cDefineName, Gui::SyntaxHighlighterP::cError, Gui::SyntaxHighlighterP::cKeyword, Gui::SyntaxHighlighterP::cLiteral, Gui::SyntaxHighlighterP::cNormalText, Gui::SyntaxHighlighterP::cNumber, Gui::SyntaxHighlighterP::cOperator, and Gui::SyntaxHighlighterP::cOutput.

Referenced by ArchSite.Compass::buildCoordinates(), draftviewproviders.view_dimension.ViewProviderLinearDimension::draw_dim_arrows(), draftviewproviders.view_dimension.ViewProviderAngularDimension::draw_dim_arrows(), draftviewproviders.view_dimension.ViewProviderLinearDimension::draw_dim_overshoot(), draftviewproviders.view_dimension.ViewProviderLinearDimension::draw_ext_overshoot(), draftguitools.gui_trimex.Trimex::finish(), importSVG.svgHandler::format(), DraftGui.DraftToolBar::getcol(), DraftGui.DraftToolBar::getDefaultColor(), PathScripts.PathDressupDogbone.Marker::highlight(), Gui::PythonConsoleHighlighter::highlightBlock(), PathScripts.PathDressupDogbone.Marker::lowlight(), ArchPanel.ViewProviderPanelCut::onChanged(), ArchPanel.ViewProviderPanelSheet::onChanged(), draftviewproviders.view_dimension.ViewProviderLinearDimension::onChanged(), draftviewproviders.view_dimension.ViewProviderAngularDimension::onChanged(), FeaturePython.ViewProviderOctahedron::onChanged(), Mod.Test.unittestgui.ProgressBar::paint(), setColor(), draftguitools.gui_trackers.editTracker::setColor(), PathScripts.PathDressupTagGui.HoldingTagMarker::setEnabled(), and DraftGui.DraftToolBar::setStyleButton().

◆ colorByType()

◆ colorChanged()

void SyntaxHighlighter::colorChanged ( const QString &  type,
const QColor &  col 
)
protectedvirtual

Reimplemented in Gui::PythonConsoleHighlighter.

Referenced by setColor().

◆ maximumUserState()

int SyntaxHighlighter::maximumUserState ( ) const

◆ setColor()


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