Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
syntax.h
Go to the documentation of this file.
1 /***************************************************************************
2  syntax.h
3  ----------
4  begin : Sat Mar 11 2006
5  copyright : (C) 2006 by Michael Margraf
6  email : michael.margraf@alumni.tu-berlin.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef SYNTAX_H
19 #define SYNTAX_H
20 
21 #include <QtCore>
22 #include <QtGui>
23 
24 #include "textdoc.h"
25 //#include "main.h"
26 
28  LANG_NONE = 0,
33 };
34 
38 };
39 
40 class SyntaxHighlighter : public QSyntaxHighlighter {
41 public:
43  virtual ~SyntaxHighlighter();
44 
45  void setLanguage(int);
46  void highlightBlock(const QString&);
47 
48 private:
49  int language;
51 
53  {
54  QRegExp pattern;
55  QTextCharFormat format;
56  };
57 
58  QVector<HighlightingRule> highlightingRules;
59 
60  QTextCharFormat reservedWordFormat;
61  QTextCharFormat unitFormat;
62  QTextCharFormat datatypeFormat;
63  QTextCharFormat directiveFormat;
64  QTextCharFormat functionFormat;
65  QTextCharFormat commentFormat;
66 
67 };
68 
69 #endif
language_type
Definition: syntax.h:27
Definition of the TextDoc class.
QTextCharFormat unitFormat
Definition: syntax.h:61
TextDoc * Doc
Definition: syntax.h:50
QTextCharFormat functionFormat
Definition: syntax.h:64
QVector< HighlightingRule > highlightingRules
Definition: syntax.h:58
void setLanguage(int)
Definition: syntax.cpp:59
QTextCharFormat commentFormat
Definition: syntax.h:65
The TextDoc class definition.
Definition: textdoc.h:49
void highlightBlock(const QString &)
Definition: syntax.cpp:249
QTextCharFormat reservedWordFormat
Definition: syntax.h:60
QTextCharFormat directiveFormat
Definition: syntax.h:63
SyntaxHighlighter(TextDoc *)
Definition: syntax.cpp:29
textstate_type
Definition: syntax.h:35
virtual ~SyntaxHighlighter()
Definition: syntax.cpp:54
QTextCharFormat datatypeFormat
Definition: syntax.h:62