Qucs-GUI
0.0.18
Main Page
Related Pages
Data Structures
Files
File List
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
qucs
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
27
enum
language_type
{
28
LANG_NONE
= 0,
29
LANG_VHDL
,
30
LANG_VERILOG
,
31
LANG_VERILOGA
,
32
LANG_OCTAVE
,
33
};
34
35
enum
textstate_type
{
36
STATE_NONE
= 0,
37
STATE_COMMENT
= 100,
38
};
39
40
class
SyntaxHighlighter
:
public
QSyntaxHighlighter {
41
public
:
42
SyntaxHighlighter
(
TextDoc
*);
43
virtual
~SyntaxHighlighter
();
44
45
void
setLanguage
(
int
);
46
void
highlightBlock
(
const
QString&);
47
48
private
:
49
int
language
;
50
TextDoc
*
Doc
;
51
52
struct
HighlightingRule
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
language_type
Definition:
syntax.h:27
SyntaxHighlighter::language
int language
Definition:
syntax.h:49
textdoc.h
Definition of the TextDoc class.
LANG_VERILOG
Definition:
syntax.h:30
SyntaxHighlighter::unitFormat
QTextCharFormat unitFormat
Definition:
syntax.h:61
SyntaxHighlighter::HighlightingRule::format
QTextCharFormat format
Definition:
syntax.h:55
STATE_COMMENT
Definition:
syntax.h:37
LANG_VHDL
Definition:
syntax.h:29
SyntaxHighlighter::HighlightingRule::pattern
QRegExp pattern
Definition:
syntax.h:54
SyntaxHighlighter::Doc
TextDoc * Doc
Definition:
syntax.h:50
SyntaxHighlighter::HighlightingRule
Definition:
syntax.h:52
SyntaxHighlighter::functionFormat
QTextCharFormat functionFormat
Definition:
syntax.h:64
SyntaxHighlighter::highlightingRules
QVector< HighlightingRule > highlightingRules
Definition:
syntax.h:58
SyntaxHighlighter::setLanguage
void setLanguage(int)
Definition:
syntax.cpp:59
LANG_NONE
Definition:
syntax.h:28
LANG_VERILOGA
Definition:
syntax.h:31
SyntaxHighlighter::commentFormat
QTextCharFormat commentFormat
Definition:
syntax.h:65
TextDoc
The TextDoc class definition.
Definition:
textdoc.h:49
SyntaxHighlighter::highlightBlock
void highlightBlock(const QString &)
Definition:
syntax.cpp:249
SyntaxHighlighter::reservedWordFormat
QTextCharFormat reservedWordFormat
Definition:
syntax.h:60
STATE_NONE
Definition:
syntax.h:36
SyntaxHighlighter::directiveFormat
QTextCharFormat directiveFormat
Definition:
syntax.h:63
SyntaxHighlighter
Definition:
syntax.h:40
SyntaxHighlighter::SyntaxHighlighter
SyntaxHighlighter(TextDoc *)
Definition:
syntax.cpp:29
textstate_type
textstate_type
Definition:
syntax.h:35
LANG_OCTAVE
Definition:
syntax.h:32
SyntaxHighlighter::~SyntaxHighlighter
virtual ~SyntaxHighlighter()
Definition:
syntax.cpp:54
SyntaxHighlighter::datatypeFormat
QTextCharFormat datatypeFormat
Definition:
syntax.h:62
Generated on Mon Sep 1 2014 20:05:21 for Qucs-GUI by
1.8.6