Initial commit. Contains a simple query tool.

This commit is contained in:
Eelke Klein 2016-12-26 16:06:55 +01:00
commit edc6df25da
19 changed files with 1245 additions and 0 deletions

40
sqlhighlighter.h Normal file
View file

@ -0,0 +1,40 @@
#pragma once
#include <QSyntaxHighlighter>
#include <QRegularExpression>
#include <vector>
class SqlHighlighter : public QSyntaxHighlighter
{
Q_OBJECT
public:
SqlHighlighter(QTextDocument *parent = 0);
protected:
void highlightBlock(const QString &text) Q_DECL_OVERRIDE;
private:
// struct HighlightingRule
// {
// QRegExp pattern;
// QTextCharFormat format;
// HighlightingRule(const QRegExp &regex, const QTextCharFormat &f)
// : pattern(regex), format(f)
// {}
// };
//QVector<HighlightingRule> highlightingRules;
// std::vector<HighlightingRule> highlightingRules;
// QRegExp commentStartExpression;
// QRegExp commentEndExpression;
// QTextCharFormat keywordFormat;
// QTextCharFormat classFormat;
// QTextCharFormat singleLineCommentFormat;
// QTextCharFormat multiLineCommentFormat;
// QTextCharFormat quotationFormat;
// QTextCharFormat functionFormat;
};