mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-11-15 18:15:52 +08:00
bugfixed parantheses for JKQTPCALTintslashfrac labels + some Codiga-Violations
This commit is contained in:
parent
ce3f25e044
commit
7b715541e7
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.3 KiB |
@ -574,7 +574,6 @@ QColor jkqtp_lookupQColorName(const QString &color) {
|
||||
if (col=="text") return QGuiApplication::palette().color(QPalette::Text);
|
||||
if (col=="brightttext") return QGuiApplication::palette().color(QPalette::BrightText);
|
||||
if (col=="base") return QGuiApplication::palette().color(QPalette::Base);
|
||||
if (col=="window") return QGuiApplication::palette().color(QPalette::Window);
|
||||
if (col=="shadow") return QGuiApplication::palette().color(QPalette::Shadow);
|
||||
if (col=="highlight") return QGuiApplication::palette().color(QPalette::Highlight);
|
||||
if (col=="highlightedtext") return QGuiApplication::palette().color(QPalette::HighlightedText);
|
||||
|
@ -91,7 +91,7 @@
|
||||
* \param mode if \c =='f' the mode \c std::fixed is used for output, otherwise \c std::scientific is used
|
||||
*/
|
||||
template <class T>
|
||||
inline void jkqtplinalgPrintMatrix(T* matrix, long L, long C, int width=9, int precision=3, char mode='f') {
|
||||
inline void jkqtplinalgPrintMatrix(const T* matrix, long L, long C, int width=9, int precision=3, char mode='f') {
|
||||
for (long l=0; l<L; l++) {
|
||||
for (long c=0; c<C; c++) {
|
||||
if (c>0) std::cout<<", ";
|
||||
|
@ -386,10 +386,9 @@ JKQTMathTextNode *JKQTMathTextLatexParser::parse(const QString &text, JKQTMathTe
|
||||
{
|
||||
initStaticStructures();
|
||||
JKQTMathTextNode* parsedNode=nullptr;
|
||||
QString ntext;
|
||||
if (options.testFlag(JKQTMathText::StartWithMathMode)) ntext=QString("$")+text+QString("$");
|
||||
if (options.testFlag(JKQTMathText::AddSpaceBeforeAndAfter)) ntext=QString("\\;")+text+QString("\\;");
|
||||
else ntext=text;
|
||||
QString ntext=text;
|
||||
if (options.testFlag(JKQTMathText::StartWithMathMode)) ntext=QString("$")+ntext+QString("$");
|
||||
if (options.testFlag(JKQTMathText::AddSpaceBeforeAndAfter)) ntext=QString("\\;")+ntext+QString("\\;");
|
||||
|
||||
|
||||
parseString=ntext;
|
||||
|
@ -471,8 +471,10 @@ QString JKQTPCoordinateAxis::floattolabel(double data, int past_comma) const {
|
||||
if (sign<0) res+="-";
|
||||
else res+="+";
|
||||
}
|
||||
if (axisStyle.tickLabelType==JKQTPCALTintslashfrac)
|
||||
res=addTickUnit("("+res+QString("%1/%2").arg(num).arg(denom)+")");
|
||||
if (axisStyle.tickLabelType==JKQTPCALTintslashfrac) {
|
||||
res+=QString("%1/%2").arg(num).arg(denom);
|
||||
if (intpart!=0 && !tickUnitName.isEmpty()) res="("+res+")";
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user