Switching to linux for development of pglab.

Switched from qmake to cmake. Code changes to make it compile.
This commit is contained in:
Eelke Klein 2017-08-23 08:10:01 +02:00
parent dd9906dbd8
commit 04723a289b
142 changed files with 124 additions and 83 deletions

42
pglab/sqlhighlighter.h Normal file
View file

@ -0,0 +1,42 @@
#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) 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;
};