forked from qt-creator/qt-creator
Add common interface for text formats inside syntax highlighter
Change-Id: I87f64446161a57aea0896f68e4eafacef791969b Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -44,23 +44,22 @@ namespace TextEditor { class FontSettingsPage; }
|
||||
|
||||
namespace VcsBase {
|
||||
|
||||
namespace Internal { class DiffHighlighterPrivate; }
|
||||
class DiffHighlighterPrivate;
|
||||
|
||||
class VCSBASE_EXPORT DiffHighlighter : public TextEditor::SyntaxHighlighter
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_DECLARE_PRIVATE(DiffHighlighter)
|
||||
public:
|
||||
explicit DiffHighlighter(const QRegExp &filePattern);
|
||||
~DiffHighlighter();
|
||||
|
||||
void highlightBlock(const QString &text);
|
||||
|
||||
// Set formats from a sequence of type QTextCharFormat
|
||||
void setFormats(const QVector<QTextCharFormat> &s);
|
||||
virtual void setFontSettings(const TextEditor::FontSettings &fontSettings);
|
||||
|
||||
private:
|
||||
Internal::DiffHighlighterPrivate *const d;
|
||||
QScopedPointer<DiffHighlighterPrivate> d_ptr;
|
||||
};
|
||||
|
||||
} // namespace VcsBase
|
||||
|
||||
Reference in New Issue
Block a user