Mantid
Loading...
Searching...
No Matches
AlternateCSPythonLexer.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include <Qsci/qscilexerpython.h>
10
15class AlternateCSPythonLexer : public QsciLexerPython {
16public:
17 AlternateCSPythonLexer(const QFont &font);
18
19 QColor defaultColor(int style) const override;
20 QFont defaultFont(int style) const override;
21 QColor defaultPaper(int style) const override;
22 const char *keywords(int set) const override;
23
24private:
25 QColor defaultColorLight(int style) const;
26 QColor defaultColorDark(int style) const;
27 QFont m_font;
28 static constexpr const char *customKeywords = "True False";
29 bool m_isDarkMode{false};
30};
Defines a Python lexer with a alternative colour scheme to the standard one provided by QsciLexerPyth...
QColor defaultColor(int style) const override
Returns the foreground colour of the text for a style.
QColor defaultColorDark(int style) const
Returns the foreground colour of the text for a dark theme style.
QColor defaultPaper(int style) const override
QFont defaultFont(int style) const override
Returns the font of the text.
QColor defaultColorLight(int style) const
Returns the foreground colour of the text for a light theme style.
const char * keywords(int set) const override
‍**
static constexpr const char * customKeywords