Project reorganization
This commit is contained in:
parent
d0439c2d70
commit
2ad5fa5e4e
18 changed files with 31 additions and 37 deletions
34
pglab/util/SqlSyntaxHighlighter.h
Normal file
34
pglab/util/SqlSyntaxHighlighter.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#ifndef SQLSYNTAXHIGHLIGHTER_H
|
||||
#define SQLSYNTAXHIGHLIGHTER_H
|
||||
|
||||
#include <QSyntaxHighlighter>
|
||||
#include <QTextFormat>
|
||||
#include "catalog/PgKeywordList.h"
|
||||
#include "util.h"
|
||||
|
||||
class PgTypeContainer;
|
||||
|
||||
class SqlSyntaxHighlighter : public QSyntaxHighlighter
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SqlSyntaxHighlighter(QTextDocument *parent = nullptr);
|
||||
~SqlSyntaxHighlighter() override;
|
||||
|
||||
void setTypes(const PgTypeContainer& types);
|
||||
protected:
|
||||
void highlightBlock(const QString &text) override;
|
||||
|
||||
private:
|
||||
QTextCharFormat m_keywordFormat;
|
||||
QTextCharFormat m_commentFormat;
|
||||
QTextCharFormat m_quotedStringFormat;
|
||||
QTextCharFormat m_typeFormat;
|
||||
QTextCharFormat m_quotedIdentifierFormat;
|
||||
QTextCharFormat m_parameterFormat;
|
||||
|
||||
t_SymbolSet m_typeNames;
|
||||
};
|
||||
|
||||
#endif // SQLSYNTAXHIGHLIGHTER_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue