RetroShare/retroshare-gui/src/util/RsSyntaxHighlighter.h

32 lines
622 B
C
Raw Normal View History

2015-12-06 15:11:47 -05:00
#ifndef RSSYNTAXHIGHLIGHTER_H
#define RSSYNTAXHIGHLIGHTER_H
#include <QObject>
#include <QSyntaxHighlighter>
#include <QTextEdit>
class RsSyntaxHighlighter : public QSyntaxHighlighter
{
Q_OBJECT
Q_PROPERTY(QColor textColorQuote READ textColorQuote WRITE setTextColorQuote)
2015-12-06 15:11:47 -05:00
public:
RsSyntaxHighlighter(QTextEdit *parent = 0);
QColor textColorQuote() const { return quotationFormat.foreground().color(); };
2015-12-06 15:11:47 -05:00
protected:
void highlightBlock(const QString &text);
2015-12-06 15:11:47 -05:00
private:
QTextCharFormat quotationFormat;
signals:
public slots:
void setTextColorQuote(QColor textColorQuote);
2015-12-06 15:11:47 -05:00
};
#endif // RSSYNTAXHIGHLIGHTER_H