mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-25 01:51:49 +08:00
Merge branch 'master' of https://github.com/jkriege2/JKQtPlotter
# Conflicts: # lib/jkqtmathtext/jkqtmathtext.cpp # lib/jkqtmathtext/jkqtmathtext.h
This commit is contained in:
commit
b5459a90d9
@ -2262,14 +2262,14 @@ JKQTMathTextNode *JKQTMathText::getParsedNode() const {
|
||||
|
||||
|
||||
bool JKQTMathText::parse(const QString& text, ParseOptions options){
|
||||
QString ntext=text;
|
||||
if (options.testFlag(StartWithMathMode)) ntext=QString("$")+ntext+QString("$");
|
||||
if (options.testFlag(AddSpaceBeforeAndAfter)) ntext=QString("\\;")+ntext+QString("\\;");
|
||||
QString ntext;
|
||||
if (options.testFlag(StartWithMathMode)) ntext=QString("$")+text+QString("$");
|
||||
if (options.testFlag(AddSpaceBeforeAndAfter)) ntext=QString("\\;")+text+QString("\\;");
|
||||
else ntext=text;
|
||||
if (parsedNode && parseString==ntext) return true;
|
||||
|
||||
|
||||
if (parsedNode!=nullptr) delete parsedNode;
|
||||
//std::cout<<"JKQTMathText::parse('"<<ntext.toStdString()<<"', options="<<std::hex<<static_cast<int>(options)<<")\n";
|
||||
parseString=ntext;
|
||||
|
||||
currentTokenID=-1;
|
||||
|
@ -233,7 +233,7 @@ class JKQTMATHTEXT_LIB_EXPORT JKQTMathText : public QObject {
|
||||
*/
|
||||
bool parse(const QString &text, ParseOptions options=DefaultParseOptions);
|
||||
|
||||
/** \brief get the size of the drawn representation. returns \c QSizeF(0,0) if no text has been parsed. */
|
||||
/** \brief get the size of the drawn representation. returns an invalid size if no text has been parsed. */
|
||||
QSizeF getSize(QPainter& painter);
|
||||
/** \brief get the rounded (using ceil) to an integer size of the drawn representation. returns \c QSize(0,0) if no text has been parsed. */
|
||||
QSize getIntSize(QPainter& painter);
|
||||
|
Loading…
Reference in New Issue
Block a user