#include <QSyntaxHighlighter>
class QTextDocument;
+class PyEditor_Keywords;
class PyEditor_PyHighlighter : public QSyntaxHighlighter
{
};
public:
- PyEditor_PyHighlighter( QTextDocument* = 0 );
+ PyEditor_PyHighlighter( QTextDocument*,
+ PyEditor_Keywords*, PyEditor_Keywords* );
- void initialize();
- QStringList keywords();
- QStringList specialKeywords();
+private Q_SLOTS:
+ void onKeywordsChanged();
+
+protected:
+ void updateHighlight();
protected:
struct HighlightingRule
QTextCharFormat classFormat;
QTextCharFormat referenceClassFormat;
QTextCharFormat functionFormat;
- QTextCharFormat keywordFormat;
- QTextCharFormat specialFromat;
QTextCharFormat numberFormat;
QTextCharFormat singleLineCommentFormat;
QTextCharFormat multiLineCommentFormat;
void highlightBlock( const QString& );
void insertBracketsData( char, char, TextBlockData*, const QString& );
void insertBracketsData( Brackets, TextBlockData*, const QString& );
+
+private:
+ PyEditor_Keywords* myStdKeywords;
+ PyEditor_Keywords* myUserKeywords;
};
#endif // PYEDITOR_PYHIGHLIGHTER_H