labplot  2.8.2
About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.
  Fossies Dox: labplot-2.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

EquationHighlighter.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : EquationHighlighter.h
3  Project : LabPlot
4  --------------------------------------------------------------------
5  Copyright : (C) 2014 Alexander Semke (alexander.semke@web.de)
6  Description : syntax highligher for mathematical equations
7 
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  * This program is distributed in the hope that it will be useful, *
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
20  * GNU General Public License for more details. *
21  * *
22  * You should have received a copy of the GNU General Public License *
23  * along with this program; if not, write to the Free Software *
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
25  * Boston, MA 02110-1301 USA *
26  * *
27  ***************************************************************************/
28 #ifndef EQUATIONHIGHLIGHTER_H
29 #define EQUATIONHIGHLIGHTER_H
30 
31 #include <QSyntaxHighlighter>
32 
33 class QStringList;
34 class KTextEdit;
35 
36 class EquationHighlighter : public QSyntaxHighlighter {
37  Q_OBJECT
38 public:
39  explicit EquationHighlighter(KTextEdit* parent);
40  void setVariables(const QStringList&);
41 // void setErrorPosition(int position);
42 
43 public slots:
44  void rehighlight();
45 
46 protected:
47  void highlightBlock(const QString& text) override;
48 
49 // int m_errorPosition;
50  KTextEdit* m_parent;
51  QStringList m_variables;
52 };
53 
54 #endif
void highlightBlock(const QString &text) override
void setVariables(const QStringList &)
EquationHighlighter(KTextEdit *parent)