/***************************************************************************
 *   Copyright (C) 2004-2006 by Pere Constans
 *   constans@molspaces.com
 *   cb2Bib version 0.6.1
 *   See LICENSE file that comes with this distribution
 ***************************************************************************/
#ifndef BIBSYNTAXHIGHLIGHTER_H
#define BIBSYNTAXHIGHLIGHTER_H

#include "c2bcolors.h"

#include <qregexp.h>
#include <qsyntaxhighlighter.h>
#include <qstring.h>
#include <qtextedit.h>

/**
BibTeX SyntaxHighLighter
 
@author Pere Constans
*/

class bibSyntaxHighlighter : public QSyntaxHighlighter
{

public:
    bibSyntaxHighlighter( QTextEdit *textEdit );
    ~bibSyntaxHighlighter();

    int highlightParagraph( const QString &, int );
    void blockSyntaxHighlighting( bool );
    void reloadColors();


private:
    bool isBlocked;
    c2bColors c;
    QColor text_color;

};

#endif
