mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-11-15 10:05:47 +08:00
removed some compiler warnings and fixed construction problems
This commit is contained in:
parent
25feb0b5fd
commit
671e25b33b
1
.gitignore
vendored
1
.gitignore
vendored
@ -100,3 +100,4 @@ Sicherungskopie_*
|
||||
/CMakeSettings.json
|
||||
/out
|
||||
*.synctex.gz
|
||||
*.bak
|
||||
|
@ -15,6 +15,9 @@ SUBDIRS += jkqtplotterlib \
|
||||
jkqtfastplotter_test
|
||||
|
||||
|
||||
OUTBASEDIR=$$OUT_PWD
|
||||
|
||||
|
||||
jkqtplotterlib.file = qmake/staticlib/jkqtplotterlib/jkqtplotterlib.pro
|
||||
jkqtplotterlib_sharedlib.file = qmake/sharedlib/jkqtplotterlib/jkqtplotterlib.pro
|
||||
|
||||
@ -28,18 +31,18 @@ jkqtfastplotterlib.file = qmake/staticlib/jkqtfastplotterlib/jkqtfastplotterlib.
|
||||
jkqtfastplotterlib_sharedlib.file = qmake/sharedlib/jkqtfastplotterlib/jkqtfastplotterlib.pro
|
||||
|
||||
jkqtmathtext_simpletest.subdir = examples/jkqtmathtext_simpletest
|
||||
jkqtmathtext_simpletest.depends = jkqtmathtextlib
|
||||
jkqtmathtext_simpletest.depends = jkqtmathtextlib jkqtpcommonlib
|
||||
|
||||
jkqtmathtext_test.subdir = examples/jkqtmathtext_test
|
||||
jkqtmathtext_test.depends = jkqtplotterlib
|
||||
jkqtmathtext_test.depends = jkqtplotterlib jkqtpcommonlib
|
||||
|
||||
jkqtplotter_simpletest.file = examples/simpletest/simpletest.pro
|
||||
jkqtplotter_simpletest.depends = jkqtplotterlib
|
||||
jkqtplotter_simpletest.depends = jkqtplotterlib jkqtpcommonlib
|
||||
|
||||
jkqtplot_test.file = examples/jkqtplot_test/jkqtplot_test.pro
|
||||
jkqtplot_test.depends = jkqtplotterlib
|
||||
|
||||
jkqtfastplotter_test.file = $$PWD/examples/jkqtfastplotter_test/jkqtfastplotter_test.pro
|
||||
jkqtfastplotter_test.file = examples/jkqtfastplotter_test/jkqtfastplotter_test.pro
|
||||
jkqtfastplotter_test.depends = jkqtfastplotterlib
|
||||
|
||||
defineTest(addSimpleTest) {
|
||||
|
@ -26,7 +26,7 @@ int main(int argc, char* argv[])
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
const qreal dpr = lab.devicePixelRatioF();
|
||||
#else
|
||||
const dpr=1.0;
|
||||
const qreal dpr=1.0;
|
||||
#endif
|
||||
QPixmap pix(600*dpr,400*dpr);
|
||||
pix.setDevicePixelRatio(dpr);
|
||||
|
@ -12,10 +12,10 @@ DEPENDPATH += ../../lib ../../qmake/staticlib/jkqtmathtextlib
|
||||
INCLUDEPATH += ../../lib
|
||||
CONFIG (debug, debug|release) {
|
||||
DEPENDPATH += ../../qmake/staticlib/jkqtmathtextlib/debug
|
||||
LIBS += -L../../qmake/staticlib/jkqtmathtextlib/debug -ljkqtmathtextlib_debug
|
||||
LIBS += -L../../qmake/staticlib/jkqtmathtextlib/debug -L../../../qmake/staticlib/jkqtmathtextlib/debug -ljkqtmathtextlib_debug
|
||||
} else {
|
||||
DEPENDPATH += ../../qmake/staticlib/jkqtmathtextlib/release
|
||||
LIBS += -L../../qmake/staticlib/jkqtmathtextlib/release -ljkqtmathtextlib
|
||||
LIBS += -L../../qmake/staticlib/jkqtmathtextlib/release -L../../../qmake/staticlib/jkqtmathtextlib/release -ljkqtmathtextlib
|
||||
}
|
||||
message("LIBS = $$LIBS")
|
||||
|
||||
|
@ -508,7 +508,7 @@ void TestUserInteraction::userEllipseFinished(double x, double y, double radiusX
|
||||
labMouseAction->setText(QString("userEllipseFinished(x=%1, y=%2, radiusX=%3, radiusY=%4, modifiers=%5)").arg(x).arg(y).arg(radiusX).arg(radiusY).arg(KeyboradMod2String(modifiers)));
|
||||
}
|
||||
|
||||
void TestUserInteraction::tooltipDisplayed(double x, double y, const QStringList& entries, const QList<JKQTPPlotElement*>& graphs)
|
||||
void TestUserInteraction::tooltipDisplayed(double x, double y, const QStringList& entries, const QList<JKQTPPlotElement*>& /*graphs*/)
|
||||
{
|
||||
labMouseAction->setText(QString("tooltipDisplayed(x=%1, y=%2, entries=%3)").arg(x).arg(y).arg(entries.join(";;")));
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "jkqtcommon/jkqtpgeometrytools.h"
|
||||
#include <QDebug>
|
||||
#include <algorithm>
|
||||
#include <QTransform>
|
||||
|
||||
|
||||
|
||||
|
@ -352,8 +352,10 @@ QString JKQTMathTextBraceType2String(JKQTMathTextBraceType type) {
|
||||
return "any";
|
||||
case MTBTNone:
|
||||
return "none";
|
||||
case MTBTUnknown:
|
||||
return "unknow";
|
||||
}
|
||||
return "unknown";
|
||||
return "???";
|
||||
}
|
||||
|
||||
JKQTMathTextBraceType TokenName2JKQTMathTextBraceType(const QString &tokenName)
|
||||
|
@ -226,7 +226,7 @@ double JKQTMathTextDecoratedNode::draw(QPainter& painter, double x, double y, JK
|
||||
const double decotop_xend=decotop_xcenter+deco_width/2.0-linewidth/2.0;
|
||||
const double decobot_xstart=x+linewidth/2.0;
|
||||
const double decobot_xend=x+cwidth-italic_xcorrection-linewidth/2.0;
|
||||
const double decobot_xcenter=(decobot_xstart+decobot_xend)/2.0;
|
||||
//const double decobot_xcenter=(decobot_xstart+decobot_xend)/2.0;
|
||||
const double deco_ytopbot=y-cbaselineHeight-decoSeparation-linewidth/2.0;
|
||||
const double deco_ytoptop=y-cbaselineHeight-decoSeparation-deco_height+linewidth/2.0;
|
||||
const double deco_ytopcenter=y-cbaselineHeight-decoSeparation-deco_height/2.0;
|
||||
|
@ -131,7 +131,7 @@ void JKQTMathTextFracNode::getSizeInternal(QPainter& painter, JKQTMathTextEnviro
|
||||
|
||||
const double xheight=fm.xHeight(); //tightBoundingRect("x").height();
|
||||
const double line_ascent=xheight/2.0;
|
||||
const double Mheight=JKQTMathTextGetTightBoundingRect(f, "M", painter.device()).height();//fm.ascent();
|
||||
//const double Mheight=JKQTMathTextGetTightBoundingRect(f, "M", painter.device()).height();//fm.ascent();
|
||||
const double xwidth=JKQTMathTextGetTightBoundingRect(f, "x", painter.device()).width();
|
||||
const double qheight=JKQTMathTextGetTightBoundingRect(f, "q", painter.device()).height();//fm.ascent();
|
||||
const double braceheight=fm.xHeight()*parentMathText->getUnderbraceBraceSizeXFactor();
|
||||
@ -205,7 +205,7 @@ void JKQTMathTextFracNode::getSizeInternal(QPainter& painter, JKQTMathTextEnviro
|
||||
}
|
||||
}
|
||||
|
||||
int JKQTMathTextFracNode::getNestingLevel(bool sameType) const
|
||||
int JKQTMathTextFracNode::getNestingLevel(bool /*sameType*/) const
|
||||
{
|
||||
QList<const JKQTMathTextFracNode*> parents=getParents<JKQTMathTextFracNode>();
|
||||
int cnt=0;
|
||||
|
@ -133,17 +133,17 @@ void JKQTMathTextModifiedTextPropsInstructionNode::fillInstructions()
|
||||
{
|
||||
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) {ev.bold=true; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) {ev.bold=true; }, 0);
|
||||
instructions["bf"] = i;
|
||||
instructions["textbf"] = i;
|
||||
instructions["mathbf"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) {ev.italic=!ev.italic; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) {ev.italic=!ev.italic; }, 0);
|
||||
instructions["em"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) {ev.italic=true; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) {ev.italic=true; }, 0);
|
||||
instructions["it"] = i;
|
||||
instructions["textit"] = i;
|
||||
instructions["mathit"]= i;
|
||||
@ -155,109 +155,109 @@ void JKQTMathTextModifiedTextPropsInstructionNode::fillInstructions()
|
||||
instructions["color"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.italic=true; ev.insideMath=true; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.italic=true; ev.insideMath=true; }, 0);
|
||||
instructions["ensuremath"] = i;
|
||||
instructions["equation"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) {ev.smallCaps=true; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) {ev.smallCaps=true; }, 0);
|
||||
instructions["sc"] = i;
|
||||
instructions["textsc"] = i;
|
||||
instructions["mathsc"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) {ev.underlined=true; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) {ev.underlined=true; }, 0);
|
||||
instructions["ul"] = i;
|
||||
instructions["underline"] = i;
|
||||
instructions["underlined"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) {ev.overline=true; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) {ev.overline=true; }, 0);
|
||||
instructions["ol"] = i;
|
||||
instructions["overline"] = i;
|
||||
instructions["overlined"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) {ev.strike=true; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) {ev.strike=true; }, 0);
|
||||
instructions["strike"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.font=JKQTMathTextEnvironmentFont::MTEroman; ev.italic=false; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.font=JKQTMathTextEnvironmentFont::MTEroman; ev.italic=false; }, 0);
|
||||
instructions["rm"] = i;
|
||||
instructions["textrm"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.font=JKQTMathTextEnvironmentFont::MTEroman; ev.italic=false; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.font=JKQTMathTextEnvironmentFont::MTEroman; ev.italic=false; }, 0);
|
||||
instructions["mathrm"] = i;
|
||||
instructions["unit"] = i;
|
||||
instructions["operatorname"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.bold=true; ev.italic=true; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.bold=true; ev.italic=true; }, 0);
|
||||
instructions["mathbfit"] = i;
|
||||
instructions["bfit"] = i;
|
||||
instructions["textbfit"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.insideMath=false; ev.font=JKQTMathTextEnvironmentFont::MTEroman; ev.italic=false; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.insideMath=false; ev.font=JKQTMathTextEnvironmentFont::MTEroman; ev.italic=false; }, 0);
|
||||
instructions["text"] = i;
|
||||
instructions["mbox"] = i;
|
||||
instructions["ensuretext"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.font=JKQTMathTextEnvironmentFont::MTEroman; ev.italic=false; ev.bold=true; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.font=JKQTMathTextEnvironmentFont::MTEroman; ev.italic=false; ev.bold=true; }, 0);
|
||||
instructions["mat"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.font=JKQTMathTextEnvironmentFont::MTEcaligraphic; ev.italic=false; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.font=JKQTMathTextEnvironmentFont::MTEcaligraphic; ev.italic=false; }, 0);
|
||||
instructions["cal"] = i;
|
||||
instructions["textcal"] = i;
|
||||
instructions["mathcal"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.font=JKQTMathTextEnvironmentFont::MTEcaligraphic; ev.bold=true; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.font=JKQTMathTextEnvironmentFont::MTEcaligraphic; ev.bold=true; }, 0);
|
||||
instructions["fcal"] = i;
|
||||
instructions["textfcal"] = i;
|
||||
instructions["mathfcal"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.font=JKQTMathTextEnvironmentFont::MTEfraktur; ev.italic=false; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.font=JKQTMathTextEnvironmentFont::MTEfraktur; ev.italic=false; }, 0);
|
||||
instructions["frak"] = i;
|
||||
instructions["textfrak"] = i;
|
||||
instructions["mathfrak"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.font=JKQTMathTextEnvironmentFont::MTEfraktur; ev.bold=true; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.font=JKQTMathTextEnvironmentFont::MTEfraktur; ev.bold=true; }, 0);
|
||||
instructions["ffrak"] = i;
|
||||
instructions["textffrak"] = i;
|
||||
instructions["mathffrak"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.font=JKQTMathTextEnvironmentFont::MTEblackboard; ev.italic=false; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.font=JKQTMathTextEnvironmentFont::MTEblackboard; ev.italic=false; }, 0);
|
||||
instructions["bb"] = i;
|
||||
instructions["textbb"] = i;
|
||||
instructions["mathbb"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.font=JKQTMathTextEnvironmentFont::MTEtypewriter; ev.italic=false; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.font=JKQTMathTextEnvironmentFont::MTEtypewriter; ev.italic=false; }, 0);
|
||||
instructions["tt"] = i;
|
||||
instructions["texttt"] = i;
|
||||
instructions["mathtt"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.font=JKQTMathTextEnvironmentFont::MTEsans; ev.italic=false; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.font=JKQTMathTextEnvironmentFont::MTEsans; ev.italic=false; }, 0);
|
||||
instructions["sf"] = i;
|
||||
instructions["textsf"] = i;
|
||||
instructions["mathsf"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.font=JKQTMathTextEnvironmentFont::MTEsans; ev.italic=true; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.font=JKQTMathTextEnvironmentFont::MTEsans; ev.italic=true; }, 0);
|
||||
instructions["sfit"] = i;
|
||||
instructions["textsfit"] = i;
|
||||
instructions["mathsfit"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.font=JKQTMathTextEnvironmentFont::MTEscript; ev.italic=false; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.font=JKQTMathTextEnvironmentFont::MTEscript; ev.italic=false; }, 0);
|
||||
instructions["script"] = i;
|
||||
instructions["scr"] = i;
|
||||
instructions["textscript"] = i;
|
||||
@ -266,7 +266,7 @@ void JKQTMathTextModifiedTextPropsInstructionNode::fillInstructions()
|
||||
instructions["mathscr"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.font=JKQTMathTextEnvironmentFont::MTEscript; ev.bold=true; ev.italic=false; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.font=JKQTMathTextEnvironmentFont::MTEscript; ev.bold=true; ev.italic=false; }, 0);
|
||||
instructions["fscript"] = i;
|
||||
instructions["fscr"] = i;
|
||||
instructions["textfscript"] = i;
|
||||
@ -275,15 +275,15 @@ void JKQTMathTextModifiedTextPropsInstructionNode::fillInstructions()
|
||||
instructions["mathfscr"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.fontSize=ev.fontSize/0.8; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.fontSize=ev.fontSize/0.8; }, 0);
|
||||
instructions["displaystyle"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.fontSize=ev.fontSize*0.8; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.fontSize=ev.fontSize*0.8; }, 0);
|
||||
instructions["scriptstyle"]= i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& parameters) { ev.fontSize=ev.fontSize*0.8*0.8; }, 0);
|
||||
InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { ev.fontSize=ev.fontSize*0.8*0.8; }, 0);
|
||||
instructions["scriptscriptstyle"]= i;
|
||||
}
|
||||
}
|
||||
@ -296,8 +296,8 @@ JKQTMathTextModifiedTextPropsInstructionNode::InstructionProperties::Instruction
|
||||
}
|
||||
|
||||
JKQTMathTextModifiedTextPropsInstructionNode::InstructionProperties::InstructionProperties(const ModifyEnvironmentFunctor &_modifier, size_t _NParams):
|
||||
modifier(_modifier),
|
||||
NParams(_NParams)
|
||||
NParams(_NParams),
|
||||
modifier(_modifier)
|
||||
{
|
||||
|
||||
}
|
||||
@ -391,9 +391,9 @@ bool JKQTMathTextBoxInstructionNode::toHtml(QString &html, JKQTMathTextEnvironme
|
||||
const QPen p=inst.pen(ev, getParameters(), parentMathText);
|
||||
const QBrush b=inst.brush(ev, getParameters(), parentMathText);
|
||||
const QFontMetricsF fmNonItalic(JKQTMathTextGetNonItalic(currentEv.getFont(parentMathText)));
|
||||
const double lw=p.widthF();
|
||||
//const double lw=p.widthF();
|
||||
const double padding=inst.paddingFactor*fmNonItalic.tightBoundingRect("x").width();
|
||||
const double rr=inst.roundingFactor*fmNonItalic.tightBoundingRect("x").width();
|
||||
//const double rr=inst.roundingFactor*fmNonItalic.tightBoundingRect("x").width();
|
||||
QString s=QString("padding: %1px").arg(padding);
|
||||
if (p!=Qt::NoPen) {
|
||||
if (s.size()>0 && s.right(2)!="; ") s=s+"; ";
|
||||
@ -509,7 +509,7 @@ void JKQTMathTextBoxInstructionNode::fillInstructions()
|
||||
{
|
||||
InstructionProperties i(InstructionProperties::NoModification,
|
||||
InstructionProperties::NoPen,
|
||||
[](JKQTMathTextEnvironment& ev, const QStringList& parameters, JKQTMathText* parent){
|
||||
[](JKQTMathTextEnvironment& /*ev*/, const QStringList& parameters, JKQTMathText* /*parent*/){
|
||||
return QBrush(jkqtp_String2QColor(parameters.value(0, QColor(Qt::transparent).name())), Qt::SolidPattern);
|
||||
},
|
||||
InstructionProperties::DefaultPadding,
|
||||
@ -523,7 +523,7 @@ void JKQTMathTextBoxInstructionNode::fillInstructions()
|
||||
p.setColor(jkqtp_String2QColor(parameters.value(0, p.color().name())));
|
||||
return p;
|
||||
},
|
||||
[](JKQTMathTextEnvironment& ev, const QStringList& parameters, JKQTMathText* parent){
|
||||
[](JKQTMathTextEnvironment& /*ev*/, const QStringList& parameters, JKQTMathText* /*parent*/){
|
||||
return QBrush(jkqtp_String2QColor(parameters.value(1, QColor(Qt::transparent).name())), Qt::SolidPattern);
|
||||
},
|
||||
InstructionProperties::DefaultPadding,
|
||||
@ -533,13 +533,13 @@ void JKQTMathTextBoxInstructionNode::fillInstructions()
|
||||
}
|
||||
|
||||
JKQTMathTextBoxInstructionNode::InstructionProperties::ModifyEnvironmentFunctor JKQTMathTextBoxInstructionNode::InstructionProperties::NoModification=
|
||||
[](JKQTMathTextEnvironment& ev, const QStringList& parameters){};
|
||||
[](JKQTMathTextEnvironment& /*ev*/, const QStringList& /*parameters*/){};
|
||||
JKQTMathTextBoxInstructionNode::InstructionProperties::GetBoxPenFunctor JKQTMathTextBoxInstructionNode::InstructionProperties::DefaultPen=
|
||||
[](JKQTMathTextEnvironment& ev, const QStringList& parameters, JKQTMathText* parent){ return QPen(ev.color, QFontMetricsF(ev.getFont(parent)).lineWidth(), Qt::SolidLine); };
|
||||
[](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/, JKQTMathText* parent){ return QPen(ev.color, QFontMetricsF(ev.getFont(parent)).lineWidth(), Qt::SolidLine); };
|
||||
JKQTMathTextBoxInstructionNode::InstructionProperties::GetBoxPenFunctor JKQTMathTextBoxInstructionNode::InstructionProperties::NoPen=
|
||||
[](JKQTMathTextEnvironment& ev, const QStringList& parameters, JKQTMathText* parent){ return Qt::NoPen; };
|
||||
[](JKQTMathTextEnvironment& /*ev*/, const QStringList& /*parameters*/, JKQTMathText* /*parent*/){ return Qt::NoPen; };
|
||||
JKQTMathTextBoxInstructionNode::InstructionProperties::GetBoxBrushFunctor JKQTMathTextBoxInstructionNode::InstructionProperties::NoBrush=
|
||||
[](JKQTMathTextEnvironment& ev, const QStringList& parameters, JKQTMathText* parent){ return Qt::NoBrush; };
|
||||
[](JKQTMathTextEnvironment& /*ev*/, const QStringList& /*parameters*/, JKQTMathText* /*parent*/){ return Qt::NoBrush; };
|
||||
double JKQTMathTextBoxInstructionNode::InstructionProperties::DefaultPadding=0.5;
|
||||
|
||||
JKQTMathTextBoxInstructionNode::InstructionProperties::InstructionProperties():
|
||||
@ -556,10 +556,10 @@ JKQTMathTextBoxInstructionNode::InstructionProperties::InstructionProperties(con
|
||||
}
|
||||
|
||||
JKQTMathTextBoxInstructionNode::InstructionProperties::InstructionProperties(const ModifyEnvironmentFunctor &_modifier, const GetBoxPenFunctor &_pen, const GetBoxBrushFunctor &_brush, double _paddingFactor, size_t _NParams):
|
||||
NParams(_NParams),
|
||||
modifier(_modifier),
|
||||
pen(_pen),
|
||||
brush(_brush),
|
||||
NParams(_NParams),
|
||||
paddingFactor(_paddingFactor),
|
||||
doubleLine(false),
|
||||
roundingFactor(0.0)
|
||||
|
@ -67,7 +67,7 @@ void JKQTMathTextListNode::getSizeInternal(QPainter& painter, JKQTMathTextEnviro
|
||||
|
||||
|
||||
double xnew=0;
|
||||
bool wasBrace=false;
|
||||
//bool wasBrace=false;
|
||||
for (int i=0; i<nodes.size(); i++) {
|
||||
JKQTMathTextNodeSize prevNodeSize;
|
||||
JKQTMathTextNodeSize* prevNodeSizePtrForSubscript=nullptr;
|
||||
@ -321,7 +321,7 @@ void JKQTMathTextListNode::getSizeInternal(QPainter& painter, JKQTMathTextEnviro
|
||||
xnew+=w;
|
||||
//qDebug()<<i<<xnew;
|
||||
}
|
||||
wasBrace=dynamic_cast<JKQTMathTextBraceNode*>(nodes[i]);
|
||||
//wasBrace=dynamic_cast<JKQTMathTextBraceNode*>(nodes[i]);
|
||||
}
|
||||
width=xnew;
|
||||
}
|
||||
|
@ -280,9 +280,9 @@ int JKQTMathTextDualChildNode::childCount() const
|
||||
void JKQTMathTextDualChildNode::clearChildren(bool deleteChildren)
|
||||
{
|
||||
JKQTMathTextNode* c1=child1; child1=nullptr;
|
||||
if (c1) delete c1;
|
||||
if (deleteChildren&&c1) delete c1;
|
||||
JKQTMathTextNode* c2=child2; child2=nullptr;
|
||||
if (c2) delete c2;
|
||||
if (deleteChildren&&c2) delete c2;
|
||||
}
|
||||
|
||||
JKQTMathTextMultiChildNode::JKQTMathTextMultiChildNode(JKQTMathText *parentMathText):
|
||||
|
@ -44,8 +44,10 @@ JKQTMathTextSqrtNode::JKQTMathTextSqrtNode(JKQTMathText* _parent, JKQTMathTextNo
|
||||
}
|
||||
|
||||
JKQTMathTextSqrtNode::~JKQTMathTextSqrtNode() {
|
||||
if (child) delete child; child=nullptr;
|
||||
if (childDegree) delete childDegree; childDegree=nullptr;
|
||||
if (child) { delete child; }
|
||||
child=nullptr;
|
||||
if (childDegree) { delete childDegree; }
|
||||
childDegree=nullptr;
|
||||
}
|
||||
|
||||
void JKQTMathTextSqrtNode::getSizeInternal(QPainter& painter, JKQTMathTextEnvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos, const JKQTMathTextNodeSize* /*prevNodeSize*/) {
|
||||
|
@ -129,7 +129,7 @@ void JKQTMathTextSubscriptNode::getSizeInternal(QPainter& painter, JKQTMathTextE
|
||||
|
||||
double cWidth=0, cBaselineHeight=0, cOverallHeight=0, cStrikeoutPos=0;
|
||||
getChild()->getSize(painter, ev, cWidth, cBaselineHeight, cOverallHeight, cStrikeoutPos);
|
||||
const double childDescent=cOverallHeight-cBaselineHeight;
|
||||
//const double childDescent=cOverallHeight-cBaselineHeight;
|
||||
double shift_to_childBaseline=cBaselineHeight-parentMathText->getSubShiftFactor()*tbr_of_letterM.height();
|
||||
|
||||
if (prevNodeSize!=nullptr) {
|
||||
|
@ -56,7 +56,7 @@ void JKQTMathTextSymbolNode::getSizeInternal(QPainter& painter, JKQTMathTextEnvi
|
||||
getSymbolSizeInternal(painter, currentEv, width, baselineHeight, overallHeight, strikeoutPos, dummy1, dummy2, prevNodeSize);
|
||||
}
|
||||
|
||||
void JKQTMathTextSymbolNode::getSymbolSizeInternal(QPainter &painter, JKQTMathTextEnvironment currentEv, double &width, double &baselineHeight, double &overallHeight, double &strikeoutPos, double &subSuperXCorrection, double &subBesidesXCorrection, const JKQTMathTextNodeSize *prevNodeSize)
|
||||
void JKQTMathTextSymbolNode::getSymbolSizeInternal(QPainter &painter, JKQTMathTextEnvironment currentEv, double &width, double &baselineHeight, double &overallHeight, double &strikeoutPos, double &subSuperXCorrection, double &subBesidesXCorrection, const JKQTMathTextNodeSize */*prevNodeSize*/)
|
||||
{
|
||||
const auto fullProps=symbols.value(symbolName, SymbolFullProps());
|
||||
const GlobalSymbolFlags globalFlags=fullProps.globalFlags;
|
||||
@ -70,7 +70,7 @@ void JKQTMathTextSymbolNode::getSymbolSizeInternal(QPainter &painter, JKQTMathTe
|
||||
const QRectF br=getBoundingRect(fm, sym, globalFlags);
|
||||
const QRectF tbrNoSymbol=JKQTMathTextGetTightBoundingRect(f, "X", painter.device());
|
||||
const QRectF mintbr=JKQTMathTextGetTightBoundingRect(f, "(", painter.device());
|
||||
const double yShift=symprops.yShiftFactor*tbr.height();
|
||||
//const double yShift=symprops.yShiftFactor*tbr.height();
|
||||
|
||||
|
||||
if (currentEv.insideMath) {
|
||||
@ -212,7 +212,7 @@ double JKQTMathTextSymbolNode::draw(QPainter& painter, double x, double y, JKQTM
|
||||
const QString sym=symprops.symbol;
|
||||
const QRectF tbr=getTightBoundingRect(fm, sym, globalFlags);
|
||||
const QRectF tbrNonItalic=getTightBoundingRect(fmNonItalic, sym, globalFlags);
|
||||
const QRectF br=getBoundingRect(fm, sym, globalFlags);
|
||||
//const QRectF br=getBoundingRect(fm, sym, globalFlags);
|
||||
const QRectF tbrNoSymbol=JKQTMathTextGetTightBoundingRect(f, "X", painter.device());
|
||||
const double yShift=symprops.yShiftFactor*tbr.height();
|
||||
const double xShift=(width-tbr.width())/2.0;
|
||||
@ -826,81 +826,81 @@ void JKQTMathTextSymbolNode::fillSymbolTables()
|
||||
|
||||
|
||||
JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps():
|
||||
fontType(MTECurrentFont),
|
||||
customFontFamily(),
|
||||
html(),
|
||||
fontType(MTECurrentFont),
|
||||
globalFlags(NoGLobalSymbolFlags)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(const QString &_font, const SymbolProps &props, const QString &_html, SymbolFlags _htmlflags, double _htmlfontScalingFactor, double _htmlyShiftFactor):
|
||||
fontType(MTECustomFont),
|
||||
customFontFamily(_font),
|
||||
html(_html, _htmlflags, _htmlfontScalingFactor, _htmlyShiftFactor),
|
||||
fontType(MTECustomFont),
|
||||
globalFlags(NoGLobalSymbolFlags)
|
||||
{
|
||||
this->props[MTFEStandard]=props;
|
||||
}
|
||||
|
||||
JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(const QString &_font, const QString &symbol, const QString &_html, SymbolFlags _htmlflags, double _htmlfontScalingFactor, double _htmlyShiftFactor):
|
||||
fontType(MTECustomFont),
|
||||
customFontFamily(_font),
|
||||
html(_html, _htmlflags, _htmlfontScalingFactor, _htmlyShiftFactor),
|
||||
fontType(MTECustomFont),
|
||||
globalFlags(NoGLobalSymbolFlags)
|
||||
{
|
||||
this->props[MTFEStandard]=SymbolProps(symbol);
|
||||
}
|
||||
|
||||
JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(const SymbolProps &props, const QString &_html, SymbolFlags _htmlflags, double _htmlfontScalingFactor, double _htmlyShiftFactor):
|
||||
fontType(MTECurrentFont),
|
||||
customFontFamily(),
|
||||
html(_html, _htmlflags, _htmlfontScalingFactor, _htmlyShiftFactor),
|
||||
fontType(MTECurrentFont),
|
||||
globalFlags(NoGLobalSymbolFlags)
|
||||
{
|
||||
this->props[MTFEStandard]=props;
|
||||
}
|
||||
|
||||
JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(JKQTMathTextEnvironmentFont _fontType, const SymbolProps &props, const QString &_html, SymbolFlags _htmlflags, double _htmlfontScalingFactor, double _htmlyShiftFactor):
|
||||
fontType(_fontType),
|
||||
customFontFamily(),
|
||||
html(_html, _htmlflags, _htmlfontScalingFactor, _htmlyShiftFactor),
|
||||
fontType(_fontType),
|
||||
globalFlags(NoGLobalSymbolFlags)
|
||||
{
|
||||
this->props[MTFEStandard]=props;
|
||||
}
|
||||
|
||||
JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(JKQTMathTextEnvironmentFont _fontType, const QString &symbol, const QString &_html, SymbolFlags _htmlflags, double _htmlfontScalingFactor, double _htmlyShiftFactor):
|
||||
fontType(_fontType),
|
||||
customFontFamily(),
|
||||
html(_html, _htmlflags, _htmlfontScalingFactor, _htmlyShiftFactor),
|
||||
fontType(_fontType),
|
||||
globalFlags(NoGLobalSymbolFlags)
|
||||
{
|
||||
this->props[MTFEStandard]=SymbolProps(symbol);
|
||||
}
|
||||
|
||||
JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(JKQTMathTextFontEncoding enc0, const SymbolProps &props0, const QString &_html, SymbolFlags _htmlflags, double _htmlfontScalingFactor, double _htmlyShiftFactor):
|
||||
fontType(MTECurrentFont),
|
||||
customFontFamily(),
|
||||
html(_html, _htmlflags, _htmlfontScalingFactor, _htmlyShiftFactor),
|
||||
fontType(MTECurrentFont),
|
||||
globalFlags(NoGLobalSymbolFlags)
|
||||
{
|
||||
this->props[enc0]=props0;
|
||||
}
|
||||
|
||||
JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(JKQTMathTextEnvironmentFont _fontType, JKQTMathTextFontEncoding enc0, const SymbolProps &props0, const QString &_html, SymbolFlags _htmlflags, double _htmlfontScalingFactor, double _htmlyShiftFactor):
|
||||
fontType(_fontType),
|
||||
customFontFamily(),
|
||||
html(_html, _htmlflags, _htmlfontScalingFactor, _htmlyShiftFactor),
|
||||
fontType(_fontType),
|
||||
globalFlags(NoGLobalSymbolFlags)
|
||||
{
|
||||
this->props[enc0]=props0;
|
||||
}
|
||||
|
||||
JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(JKQTMathTextFontEncoding enc0, const SymbolProps &props0, JKQTMathTextFontEncoding enc1, const SymbolProps &props1, const QString &_html, SymbolFlags _htmlflags, double _htmlfontScalingFactor, double _htmlyShiftFactor):
|
||||
fontType(MTECurrentFont),
|
||||
customFontFamily(),
|
||||
html(_html, _htmlflags, _htmlfontScalingFactor, _htmlyShiftFactor),
|
||||
fontType(MTECurrentFont),
|
||||
globalFlags(NoGLobalSymbolFlags)
|
||||
{
|
||||
this->props[enc0]=props0;
|
||||
@ -908,9 +908,9 @@ JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(JKQTMathTextFontEncodin
|
||||
}
|
||||
|
||||
JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(JKQTMathTextEnvironmentFont _fontType, JKQTMathTextFontEncoding enc0, const SymbolProps &props0, JKQTMathTextFontEncoding enc1, const SymbolProps &props1, const QString &_html, SymbolFlags _htmlflags, double _htmlfontScalingFactor, double _htmlyShiftFactor):
|
||||
fontType(_fontType),
|
||||
customFontFamily(),
|
||||
html(_html, _htmlflags, _htmlfontScalingFactor, _htmlyShiftFactor),
|
||||
fontType(_fontType),
|
||||
globalFlags(NoGLobalSymbolFlags)
|
||||
{
|
||||
this->props[enc0]=props0;
|
||||
@ -918,9 +918,9 @@ JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(JKQTMathTextEnvironment
|
||||
}
|
||||
|
||||
JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(JKQTMathTextFontEncoding enc0, const SymbolProps &props0, JKQTMathTextFontEncoding enc1, const SymbolProps &props1, JKQTMathTextFontEncoding enc2, const SymbolProps &props2, const QString &_html, SymbolFlags _htmlflags, double _htmlfontScalingFactor, double _htmlyShiftFactor):
|
||||
fontType(MTECurrentFont),
|
||||
customFontFamily(),
|
||||
html(_html, _htmlflags, _htmlfontScalingFactor, _htmlyShiftFactor),
|
||||
fontType(MTECurrentFont),
|
||||
globalFlags(NoGLobalSymbolFlags)
|
||||
{
|
||||
this->props[enc0]=props0;
|
||||
@ -929,9 +929,9 @@ JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(JKQTMathTextFontEncodin
|
||||
}
|
||||
|
||||
JKQTMathTextSymbolNode::SymbolFullProps::SymbolFullProps(JKQTMathTextEnvironmentFont _fontType, JKQTMathTextFontEncoding enc0, const SymbolProps &props0, JKQTMathTextFontEncoding enc1, const SymbolProps &props1, JKQTMathTextFontEncoding enc2, const SymbolProps &props2, const QString &_html, SymbolFlags _htmlflags, double _htmlfontScalingFactor, double _htmlyShiftFactor):
|
||||
fontType(_fontType),
|
||||
customFontFamily(),
|
||||
html(_html, _htmlflags, _htmlfontScalingFactor, _htmlyShiftFactor),
|
||||
fontType(_fontType),
|
||||
globalFlags(NoGLobalSymbolFlags)
|
||||
{
|
||||
this->props[enc0]=props0;
|
||||
|
@ -102,14 +102,14 @@ size_t JKQTMathTextWhitespaceNode::getWhitespaceCount() const
|
||||
return whitespace.count;
|
||||
}
|
||||
|
||||
double JKQTMathTextWhitespaceNode::draw(QPainter &painter, double x, double y, JKQTMathTextEnvironment currentEv, const JKQTMathTextNodeSize *prevNodeSize)
|
||||
double JKQTMathTextWhitespaceNode::draw(QPainter &painter, double x, double /*y*/, JKQTMathTextEnvironment currentEv, const JKQTMathTextNodeSize *prevNodeSize)
|
||||
{
|
||||
double width=0, bh=0, oh=0, sp=0;
|
||||
getSize(painter, currentEv, width, bh, oh, sp, prevNodeSize);
|
||||
return x+width;
|
||||
}
|
||||
|
||||
void JKQTMathTextWhitespaceNode::getSizeInternal(QPainter &painter, JKQTMathTextEnvironment currentEv, double &width, double &baselineHeight, double &overallHeight, double &strikeoutPos, const JKQTMathTextNodeSize *prevNodeSize)
|
||||
void JKQTMathTextWhitespaceNode::getSizeInternal(QPainter &painter, JKQTMathTextEnvironment currentEv, double &width, double &baselineHeight, double &overallHeight, double &strikeoutPos, const JKQTMathTextNodeSize */*prevNodeSize*/)
|
||||
{
|
||||
const double singelWidthPIX=Type2PixelWidth(whitespace.type, currentEv, painter.device());
|
||||
const QFontMetricsF fm(currentEv.getFont(parentMathText));
|
||||
|
@ -131,7 +131,7 @@ void JKQTPFilledCurveXGraph::draw(JKQTPEnhancedPainter& painter) {
|
||||
|
||||
QPen p=getLinePen(painter, parent);
|
||||
QPen ph=getHighlightingLinePen(painter, parent);
|
||||
QPen np(Qt::NoPen);
|
||||
//QPen np(Qt::NoPen);
|
||||
QBrush b=getFillBrush(painter, parent);
|
||||
QBrush b_below=fillStyleBelow().getFillBrush(painter, parent);
|
||||
|
||||
@ -144,7 +144,7 @@ void JKQTPFilledCurveXGraph::draw(JKQTPEnhancedPainter& painter) {
|
||||
QPainterPath pl, pf;
|
||||
|
||||
double xold=-1;
|
||||
double yold=-1;
|
||||
//double yold=-1;
|
||||
double y0=transformY(getBaseline());
|
||||
if (parent->getYAxis()->isLogAxis()) {
|
||||
y0=transformY(parent->getYAxis()->getMin());
|
||||
@ -173,7 +173,7 @@ void JKQTPFilledCurveXGraph::draw(JKQTPEnhancedPainter& painter) {
|
||||
pf.lineTo(x, y);
|
||||
}
|
||||
xold=x;
|
||||
yold=y;
|
||||
//yold=y;
|
||||
subsequentItem=true;
|
||||
}
|
||||
}
|
||||
@ -257,7 +257,7 @@ void JKQTPFilledCurveYGraph::draw(JKQTPEnhancedPainter &painter)
|
||||
|
||||
QPainterPath pl, pf;
|
||||
|
||||
double xold=-1;
|
||||
//double xold=-1;
|
||||
double yold=-1;
|
||||
double x0=transformX(getBaseline());
|
||||
if (parent->getXAxis()->isLogAxis()) {
|
||||
@ -286,7 +286,7 @@ void JKQTPFilledCurveYGraph::draw(JKQTPEnhancedPainter &painter)
|
||||
pf.moveTo(x0, y);
|
||||
pf.lineTo(x, y);
|
||||
}
|
||||
xold=x;
|
||||
//xold=x;
|
||||
yold=y;
|
||||
first=true;
|
||||
}
|
||||
|
@ -406,7 +406,7 @@ void JKQTPGeoInfiniteLine::draw(JKQTPEnhancedPainter& painter) {
|
||||
QLineF line(QPointF(transformX(x1), transformY(y1)), QPointF(transformX(x2), transformY(y2)));
|
||||
if (line.length()>0) {
|
||||
QPointF xx1;
|
||||
double angle1;
|
||||
double angle1=0;
|
||||
if ((getDrawMode()==DrawAsGraphicElement) || (getParent()->getXAxis()->isLinearAxis() && getParent()->getYAxis()->isLinearAxis())) {
|
||||
painter.drawLine(line);
|
||||
xx1=QPointF(transformX(x),transformY(y));
|
||||
|
@ -1178,7 +1178,7 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(JKQTBasePlotter *parent):
|
||||
}
|
||||
|
||||
JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, JKQTBasePlotter *parent):
|
||||
JKQTPRGBMathImage(x,y,width,height,JKQTPMathImageDataType::DoubleArray,nullptr,Nx,Ny,parent)
|
||||
JKQTPRGBMathImage(x,y,width,height,JKQTPMathImageDataType::DoubleArray,nullptr,0,0,parent)
|
||||
{
|
||||
this->modifierColumn=-1;
|
||||
this->imageRColumn=-1;
|
||||
|
@ -993,7 +993,8 @@ void JKQTPXYBaselineGraph::setBaseline(double __value)
|
||||
m_baseline=__value;
|
||||
}
|
||||
|
||||
JKQTPPlotAnnotationElement::JKQTPPlotAnnotationElement(JKQTBasePlotter *parent)
|
||||
JKQTPPlotAnnotationElement::JKQTPPlotAnnotationElement(JKQTBasePlotter *parent):
|
||||
JKQTPPlotElement(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -587,7 +587,7 @@ void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbGetOutsideSize(JKQTPEnha
|
||||
}
|
||||
}
|
||||
|
||||
void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbDrawOutside(JKQTPEnhancedPainter &painter, QRect leftSpace, QRect rightSpace, QRect topSpace, QRect bottomSpace)
|
||||
void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbDrawOutside(JKQTPEnhancedPainter &painter, QRect /*leftSpace*/, QRect rightSpace, QRect topSpace, QRect /*bottomSpace*/)
|
||||
{
|
||||
if (showColorBar) {
|
||||
double internalDataMin=0;
|
||||
|
@ -1766,9 +1766,9 @@ QT_BEGIN_NAMESPACE
|
||||
* \ingroup jkqtpplottersupprt
|
||||
*/
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
inline size_t qHash(const QPair<Qt::MouseButton,Qt::KeyboardModifiers> &key, size_t seed=0) {
|
||||
inline size_t qHash(const QPair<Qt::MouseButton,Qt::KeyboardModifiers> &key, size_t /*seed=0*/) {
|
||||
#else
|
||||
inline uint qHash(const QPair<Qt::MouseButton,Qt::KeyboardModifiers> &key, uint seed=0) {
|
||||
inline uint qHash(const QPair<Qt::MouseButton,Qt::KeyboardModifiers> &key, uint /*seed=0*/) {
|
||||
#endif
|
||||
return static_cast<uint>(key.first)+static_cast<uint>(key.second);
|
||||
}
|
||||
|
@ -25,8 +25,8 @@ JKQTPlotterStyle::JKQTPlotterStyle():
|
||||
usePaletteColors(true),
|
||||
registeredMouseDragActionModes(),
|
||||
registeredMouseWheelActions(),
|
||||
registeredMouseMoveActions(),
|
||||
registeredMouseDoubleClickActions()
|
||||
registeredMouseDoubleClickActions(),
|
||||
registeredMouseMoveActions()
|
||||
{
|
||||
// default user-actions:
|
||||
registeredMouseDragActionModes[qMakePair<Qt::MouseButton, Qt::KeyboardModifiers>(Qt::LeftButton, Qt::NoModifier)]=JKQTPMouseDragActions::jkqtpmdaZoomByRectangle;
|
||||
|
@ -151,7 +151,6 @@ public:
|
||||
/** \brief action to perform on a double-click of the mouse buttons (depending on the button and the modifiers) */
|
||||
JKQTPMouseDoubleClickActionsHashMap registeredMouseDoubleClickActions;
|
||||
|
||||
|
||||
/** \brief the currently executed MouseMoveAction */
|
||||
JKQTPMouseMoveActionsHashMap registeredMouseMoveActions;
|
||||
|
||||
|
@ -440,7 +440,7 @@ JKQTPColorDerivationMode::JKQTPColorDerivationMode(PredefinedModes mode):
|
||||
case JKQTPFFCMSameEvenLessTransparentColor:
|
||||
transparencyModification=TransparencyChangeMode::LessTransparent;
|
||||
transparencyModficationStrength=0.66;
|
||||
|
||||
break;
|
||||
case JKQTPFFCMInvertedColor:
|
||||
colorModification=ColorChangeMode::InvertColor;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user