"Fossies" - the Fresh Open Source Software Archive

Member "cb2bib-2.0.1/src/c2bHighlighter.h" (12 Feb 2021, 1030 Bytes) of package /linux/privat/cb2bib-2.0.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "c2bHighlighter.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.0.0_vs_2.0.1.

    1 /***************************************************************************
    2  *   Copyright (C) 2004-2021 by Pere Constans
    3  *   constans@molspaces.com
    4  *   cb2Bib version 2.0.1. Licensed under the GNU GPL version 3.
    5  *   See the LICENSE file that comes with this distribution.
    6  ***************************************************************************/
    7 #ifndef C2BHIGHLIGHTER_H
    8 #define C2BHIGHLIGHTER_H
    9 
   10 #include <QSyntaxHighlighter>
   11 
   12 
   13 /**
   14     clipboard SyntaxHighLighter
   15 
   16     @author Pere Constans
   17 */
   18 
   19 class c2bColors;
   20 
   21 class c2bHighlighter : public QSyntaxHighlighter
   22 {
   23 
   24 public:
   25     explicit c2bHighlighter(QTextDocument* doc);
   26     ~c2bHighlighter();
   27 
   28 
   29 protected:
   30     virtual void highlightBlock(const QString& text);
   31 
   32 
   33 private:
   34     QColor text_color;
   35     QRegExp rx0;
   36     QRegExp rx1;
   37     QRegExp rx2;
   38     QRegExp rx3;
   39     QRegExp rx4;
   40     QRegExp rx5;
   41     QRegExp rx6;
   42     QRegExp rx_extracted_ends;
   43     QRegExp rx_extracted_starts;
   44     QRegExp rx_metadata_ends;
   45     QRegExp rx_metadata_starts;
   46     c2bColors* c;
   47 };
   48 
   49 #endif