File: c2bHighlighter.h

package info (click to toggle)
cb2bib 1.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,368 kB
  • sloc: cpp: 24,179; sh: 481; makefile: 16
file content (50 lines) | stat: -rw-r--r-- 1,031 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/***************************************************************************
 *   Copyright (C) 2004-2015 by Pere Constans
 *   constans@molspaces.com
 *   cb2Bib version 1.9.2. Licensed under the GNU GPL version 3.
 *   See the LICENSE file that comes with this distribution.
 ***************************************************************************/
#ifndef C2BHIGHLIGHTER_H
#define C2BHIGHLIGHTER_H

#include <QSyntaxHighlighter>


/**
    clipboard SyntaxHighLighter

    @author Pere Constans
*/

class c2bColors;

class c2bHighlighter : public QSyntaxHighlighter
{

public:
    explicit c2bHighlighter(QTextDocument* doc);
    ~c2bHighlighter();


protected:
    virtual void highlightBlock(const QString& text);


private:
    QColor text_color;
    QRegExp rx0;
    QRegExp rx1;
    QRegExp rx2;
    QRegExp rx3;
    QRegExp rx4;
    QRegExp rx5;
    QRegExp rx6;
    QRegExp rx_extracted_ends;
    QRegExp rx_extracted_starts;
    QRegExp rx_metadata_ends;
    QRegExp rx_metadata_starts;
    c2bColors* c;

};

#endif