JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches
jkqtmathtextnoopnode.h
1/*
2 Copyright (c) 2008-2024 Jan W. Krieger (<jan@jkrieger.de>)
3 with contributions from: Razi Alavizadeh
4
5
6
7 This software is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License (LGPL) as published by
9 the Free Software Foundation, either version 2.1 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License (LGPL) for more details.
16
17 You should have received a copy of the GNU Lesser General Public License (LGPL)
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21
22
23
24#ifndef JKQTMATHTEXTNOOPNODE_H
25#define JKQTMATHTEXTNOOPNODE_H
26#include "jkqtmathtext/jkqtmathtext_imexport.h"
27#include "jkqtmathtext/jkqtmathtexttools.h"
28#include "jkqtmathtext/nodes/jkqtmathtextnode.h"
29#include <QPainter>
30
31class JKQTMathText; // forward
32
33
34/** \brief subclass representing a node that outputs nothing
35 * \ingroup jkqtmathtext_items
36 *
37 */
39 public:
41 virtual ~JKQTMathTextNoopNode() override;
42 /** \copydoc JKQTMathTextNode::getTypeName() */
43 virtual QString getTypeName() const override;
44 protected:
45
46};
47
48
49/** \brief subclass representing a \c {...} block
50 * \ingroup jkqtmathtext_items
51 *
52 * This is necessray becaus JKQTMathtextHorizontalListNode
53 * implements JKQTMathTextModifyEnvironmentNodeMixIn, but a
54 * \c {...} block does not hand on its modified JKQTMathTextEnvironment.
55 *
56 * This node simply hands on all calls to its child.
57 */
59 public:
61 virtual ~JKQTMathTextBlockNode() override;
62 /** \copydoc JKQTMathTextNode::getTypeName() */
63 virtual QString getTypeName() const override;
64 /** \copydoc JKQTMathTextNode::draw() */
65 virtual double draw(QPainter& painter, double x, double y, JKQTMathTextEnvironment currentEv) const override;
66 /** \copydoc JKQTMathTextNode::toHtml() */
67 virtual bool toHtml(QString& html, JKQTMathTextEnvironment currentEv, JKQTMathTextEnvironment defaultEv) const override;
68 protected:
69 /** \copydoc JKQTMathTextNode::getSizeInternal() */
70 virtual JKQTMathTextNodeSize getSizeInternal(QPainter& painter, JKQTMathTextEnvironment currentEv) const override;
71
72};
73#endif // JKQTMATHTEXTNOOPNODE_H
74
75
76
77
78
79
80
81
82
subclass representing a {...} block
Definition jkqtmathtextnoopnode.h:58
virtual double draw(QPainter &painter, double x, double y, JKQTMathTextEnvironment currentEv) const override
draw the contents at the designated position
virtual JKQTMathTextNodeSize getSizeInternal(QPainter &painter, JKQTMathTextEnvironment currentEv) const override
determine the size of the node, overwrite this function in derived classes
virtual ~JKQTMathTextBlockNode() override
JKQTMathTextBlockNode(JKQTMathTextNode *_child, JKQTMathText *parent)
virtual QString getTypeName() const override
return the name of this class as a string
virtual bool toHtml(QString &html, JKQTMathTextEnvironment currentEv, JKQTMathTextEnvironment defaultEv) const override
convert node to HTML and returns true on success
this class parses a mathematical markup string and can then draw the contained text/equation onto a Q...
Definition jkqtmathtext.h:192
subclass representing one node in the syntax tree
Definition jkqtmathtextnode.h:37
base class for all derived classes that do not draw anything
Definition jkqtmathtextnode.h:296
subclass representing a node that outputs nothing
Definition jkqtmathtextnoopnode.h:38
JKQTMathTextNoopNode(JKQTMathText *parent)
virtual QString getTypeName() const override
return the name of this class as a string
virtual ~JKQTMathTextNoopNode() override
subclass representing a node in the syntax tree, that has one child
Definition jkqtmathtextnode.h:174
#define JKQTMATHTEXT_LIB_EXPORT
Definition jkqtmathtext_imexport.h:108
describes the current drawing environment (base fontname ...)
Definition jkqtmathtexttools.h:304
beschreibt die Größe(n) eines Knotens
Definition jkqtmathtexttools.h:393