mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-11-15 18:15:52 +08:00
fixed several static code analysis warnings and security vulnerabilities
This commit is contained in:
parent
7cf2990f08
commit
f096aa9602
@ -2168,7 +2168,7 @@ QImage JKQTPImageTools::GetPaletteImage(int i, int width)
|
|||||||
QImage JKQTPImageTools::GetPaletteImage(int i, int width, int height)
|
QImage JKQTPImageTools::GetPaletteImage(int i, int width, int height)
|
||||||
{
|
{
|
||||||
QImage img;
|
QImage img;
|
||||||
const long NPixels=static_cast<int>(jkqtp_bounded<long>(0, width*height, std::numeric_limits<int>::max()));
|
const int NPixels=jkqtp_bounded<int>(width*height);
|
||||||
|
|
||||||
QVector<double> pic(NPixels,0);
|
QVector<double> pic(NPixels,0);
|
||||||
for (int j=0; j<NPixels; j++) {
|
for (int j=0; j<NPixels; j++) {
|
||||||
|
@ -483,7 +483,7 @@ struct JKQTPImageTools {
|
|||||||
if (!dbl_in || width<=0 || height<=0)
|
if (!dbl_in || width<=0 || height<=0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const long NPixels= width*height;
|
const int NPixels= jkqtp_bounded<int>(width*height);
|
||||||
double min = *dbl_in;
|
double min = *dbl_in;
|
||||||
double max = *dbl_in;
|
double max = *dbl_in;
|
||||||
if (jkqtp_approximatelyEqual(minColor, maxColor, JKQTP_DOUBLE_EPSILON)) {
|
if (jkqtp_approximatelyEqual(minColor, maxColor, JKQTP_DOUBLE_EPSILON)) {
|
||||||
|
@ -90,7 +90,7 @@ QString JKQTPGraphSymbols2String(JKQTPGraphSymbols pos) {
|
|||||||
case JKQTPFemale: return "symbol_female";
|
case JKQTPFemale: return "symbol_female";
|
||||||
case JKQTPMale: return "symbol_male";
|
case JKQTPMale: return "symbol_male";
|
||||||
case JKQTPCirclePeace: return "symbol_circle_peace";
|
case JKQTPCirclePeace: return "symbol_circle_peace";
|
||||||
case JKQTPSymbolCount: JKQTPGraphSymbols2String(JKQTPMaxSymbolID);
|
case JKQTPSymbolCount: return JKQTPGraphSymbols2String(JKQTPMaxSymbolID);
|
||||||
case JKQTPCharacterSymbol:
|
case JKQTPCharacterSymbol:
|
||||||
case JKQTPFilledCharacterSymbol:
|
case JKQTPFilledCharacterSymbol:
|
||||||
case JKQTPFirstCustomSymbol:
|
case JKQTPFirstCustomSymbol:
|
||||||
@ -179,7 +179,7 @@ QString JKQTPGraphSymbols2NameString(JKQTPGraphSymbols pos) {
|
|||||||
case JKQTPFemale: return QObject::tr("female");
|
case JKQTPFemale: return QObject::tr("female");
|
||||||
case JKQTPMale: return QObject::tr("male");
|
case JKQTPMale: return QObject::tr("male");
|
||||||
case JKQTPCirclePeace: return QObject::tr("circled peace");
|
case JKQTPCirclePeace: return QObject::tr("circled peace");
|
||||||
case JKQTPSymbolCount: JKQTPGraphSymbols2NameString(JKQTPMaxSymbolID);
|
case JKQTPSymbolCount: return JKQTPGraphSymbols2NameString(JKQTPMaxSymbolID);
|
||||||
case JKQTPCharacterSymbol:
|
case JKQTPCharacterSymbol:
|
||||||
case JKQTPFilledCharacterSymbol:
|
case JKQTPFilledCharacterSymbol:
|
||||||
case JKQTPFirstCustomSymbol:
|
case JKQTPFirstCustomSymbol:
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
#include <array>
|
||||||
#include "jkqtcommon/jkqtpstringtools.h"
|
#include "jkqtcommon/jkqtpstringtools.h"
|
||||||
|
|
||||||
|
|
||||||
@ -1784,14 +1785,14 @@ JKQTPMathParser::jkmpFunctionNode::jkmpFunctionNode(const std::string& name, JKQ
|
|||||||
}
|
}
|
||||||
|
|
||||||
JKQTPMathParser::jkmpResult JKQTPMathParser::jkmpFunctionNode::evaluate() {
|
JKQTPMathParser::jkmpResult JKQTPMathParser::jkmpFunctionNode::evaluate() {
|
||||||
JKQTPMathParser::jkmpResult data[257];
|
std::array<JKQTPMathParser::jkmpResult,257> data;
|
||||||
if (n>0) {
|
if (n>0) {
|
||||||
for (int i=0; i<n; i++) {
|
for (int i=0; i<n; i++) {
|
||||||
data[i]=child[i]->evaluate();
|
data[i]=child[i]->evaluate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// JKQTPMathParser::jkmpResult r= getParser()->evaluateFunction(fun, data,n);
|
// JKQTPMathParser::jkmpResult r= getParser()->evaluateFunction(fun, data,n);
|
||||||
return function(data,n, parser);
|
return function(data.data(),n, parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1885,6 +1886,12 @@ const char *JKQTPMathParser::jkmpException::what() const noexcept {
|
|||||||
return errormessage.c_str();
|
return errormessage.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JKQTPMathParser::jkmpNode::jkmpNode(JKQTPMathParser *parser_, jkmpNode *parent_):
|
||||||
|
parser(parser_), parent(parent_)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
JKQTPMathParser *JKQTPMathParser::jkmpNode::getParser(){ return parser; }
|
JKQTPMathParser *JKQTPMathParser::jkmpNode::getParser(){ return parser; }
|
||||||
|
|
||||||
void JKQTPMathParser::jkmpNode::setParser(JKQTPMathParser *mp){ parser=mp; }
|
void JKQTPMathParser::jkmpNode::setParser(JKQTPMathParser *mp){ parser=mp; }
|
||||||
@ -1892,3 +1899,20 @@ void JKQTPMathParser::jkmpNode::setParser(JKQTPMathParser *mp){ parser=mp; }
|
|||||||
JKQTPMathParser::jkmpNode *JKQTPMathParser::jkmpNode::getParent(){ return parent; }
|
JKQTPMathParser::jkmpNode *JKQTPMathParser::jkmpNode::getParent(){ return parent; }
|
||||||
|
|
||||||
void JKQTPMathParser::jkmpNode::setParent(JKQTPMathParser::jkmpNode *par) { parent=par; }
|
void JKQTPMathParser::jkmpNode::setParent(JKQTPMathParser::jkmpNode *par) { parent=par; }
|
||||||
|
|
||||||
|
JKQTPMathParser::jkmpFunctionDescriptor::jkmpFunctionDescriptor(jkmpEvaluateFunc function_):
|
||||||
|
function(function_)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
JKQTPMathParser::jkmpTempVariable::jkmpTempVariable()
|
||||||
|
{
|
||||||
|
type=jkmpDouble;
|
||||||
|
name="";
|
||||||
|
internal=false;
|
||||||
|
str=nullptr;
|
||||||
|
num=nullptr;
|
||||||
|
boolean=nullptr;
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -261,6 +261,7 @@ class jkqtmath_LIB_EXPORT JKQTPMathParser
|
|||||||
|
|
||||||
/** \brief This struct is for managing temporary variables. It is generally like jkmpVariable. */
|
/** \brief This struct is for managing temporary variables. It is generally like jkmpVariable. */
|
||||||
struct jkqtmath_LIB_EXPORT jkmpTempVariable {
|
struct jkqtmath_LIB_EXPORT jkmpTempVariable {
|
||||||
|
jkmpTempVariable();
|
||||||
std::string name; /*!< \brief name of the variable */
|
std::string name; /*!< \brief name of the variable */
|
||||||
jkmpResultType type; /*!< \brief type of the variable */
|
jkmpResultType type; /*!< \brief type of the variable */
|
||||||
bool internal; /*!< \brief this is an internal variable */
|
bool internal; /*!< \brief this is an internal variable */
|
||||||
@ -298,8 +299,9 @@ class jkqtmath_LIB_EXPORT JKQTPMathParser
|
|||||||
|
|
||||||
/** \brief description of a user registered function */
|
/** \brief description of a user registered function */
|
||||||
struct jkqtmath_LIB_EXPORT jkmpFunctionDescriptor {
|
struct jkqtmath_LIB_EXPORT jkmpFunctionDescriptor {
|
||||||
jkmpEvaluateFunc function; /*!< \brief a pointer to the function implementation */
|
jkmpFunctionDescriptor(jkmpEvaluateFunc function_=nullptr);
|
||||||
std::string name; /*!< \brief name of the function */
|
jkmpEvaluateFunc function; /*!< \brief a pointer to the function implementation */
|
||||||
|
std::string name; /*!< \brief name of the function */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -316,6 +318,7 @@ class jkqtmath_LIB_EXPORT JKQTPMathParser
|
|||||||
JKQTPMathParser* parser; /*!< \brief points to the parser object that is used to evaluate this node */
|
JKQTPMathParser* parser; /*!< \brief points to the parser object that is used to evaluate this node */
|
||||||
jkmpNode* parent; /*!< \brief points to the parent node */
|
jkmpNode* parent; /*!< \brief points to the parent node */
|
||||||
public:
|
public:
|
||||||
|
jkmpNode(JKQTPMathParser* parser_=nullptr, jkmpNode* parent_=nullptr);
|
||||||
/** \brief virtual class destructor */
|
/** \brief virtual class destructor */
|
||||||
virtual ~jkmpNode();
|
virtual ~jkmpNode();
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ void JKQTMathTextMatrixNode::parseColumnSpec(const QString &columnSpec)
|
|||||||
|
|
||||||
|
|
||||||
JKQTMathTextMatrixNode::LayoutInfo::LayoutInfo():
|
JKQTMathTextMatrixNode::LayoutInfo::LayoutInfo():
|
||||||
JKQTMathTextNodeSize(), colwidth(), rowheight()
|
JKQTMathTextNodeSize(), colwidth(), rowheight(), leftPadding(0), rightPadding(0), topPadding(0), bottomPadding(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -35,11 +35,12 @@
|
|||||||
# include <QVector3D>
|
# include <QVector3D>
|
||||||
|
|
||||||
JKQTPContourPlot::JKQTPContourPlot(JKQTBasePlotter *parent) :
|
JKQTPContourPlot::JKQTPContourPlot(JKQTBasePlotter *parent) :
|
||||||
JKQTPMathImage(parent)
|
JKQTPMathImage(parent),
|
||||||
|
ignoreOnPlane(false),
|
||||||
|
contourColoringMode(ColorContoursFromPaletteByValue),
|
||||||
|
relativeLevels(false),
|
||||||
|
contourLinesCachedForChecksum(0)
|
||||||
{
|
{
|
||||||
ignoreOnPlane=false;
|
|
||||||
contourColoringMode=ColorContoursFromPaletteByValue;
|
|
||||||
relativeLevels=false;
|
|
||||||
|
|
||||||
initLineStyle(parent, parentPlotStyle, JKQTPPlotStyleType::Default);
|
initLineStyle(parent, parentPlotStyle, JKQTPPlotStyleType::Default);
|
||||||
}
|
}
|
||||||
@ -428,7 +429,8 @@ void JKQTPContourPlot::calcContourLines(QList<QVector<QLineF> > &ContourLines)
|
|||||||
|
|
||||||
|
|
||||||
JKQTPColumnContourPlot::JKQTPColumnContourPlot(JKQTBasePlotter *parent):
|
JKQTPColumnContourPlot::JKQTPColumnContourPlot(JKQTBasePlotter *parent):
|
||||||
JKQTPContourPlot(parent)
|
JKQTPContourPlot(parent),
|
||||||
|
imageColumn(-1)
|
||||||
{
|
{
|
||||||
this->datatype=JKQTPMathImageDataType::DoubleArray;
|
this->datatype=JKQTPMathImageDataType::DoubleArray;
|
||||||
}
|
}
|
||||||
|
@ -382,8 +382,42 @@ void JKQTPImage::copyImagePlotAsImage()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
JKQTPMathImageBase::JKQTPMathImageBase(JKQTBasePlotter *parent):
|
||||||
|
JKQTPImageBase(parent),
|
||||||
|
data(nullptr),
|
||||||
|
datatype(JKQTPMathImageDataType::DoubleArray),
|
||||||
|
Nx(0), Ny(0),
|
||||||
|
dataModifier(nullptr), datatypeModifier(JKQTPMathImageDataType::DoubleArray),
|
||||||
|
internalDataMin(0.0), internalDataMax(0.0),
|
||||||
|
internalModifierMin(0.0), internalModifierMax(0.0)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, JKQTBasePlotter *parent):
|
||||||
|
JKQTPImageBase(x,y,width,height,parent),
|
||||||
|
data(nullptr),
|
||||||
|
datatype(JKQTPMathImageDataType::DoubleArray),
|
||||||
|
Nx(0), Ny(0),
|
||||||
|
dataModifier(nullptr), datatypeModifier(JKQTPMathImageDataType::DoubleArray),
|
||||||
|
internalDataMin(0.0), internalDataMax(0.0),
|
||||||
|
internalModifierMin(0.0), internalModifierMax(0.0)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
JKQTPMathImageBase::JKQTPMathImageBase(JKQTPlotter *parent):
|
||||||
|
JKQTPMathImageBase(parent->getPlotter())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, JKQTPlotter *parent):
|
||||||
|
JKQTPMathImageBase(x,y,width,height,parent->getPlotter())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, JKQTPMathImageDataType datatype, const void* data, int Nx, int Ny, JKQTBasePlotter* parent):
|
JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, JKQTPMathImageDataType datatype, const void* data, int Nx, int Ny, JKQTBasePlotter* parent):
|
||||||
JKQTPImageBase(x, y, width, height, parent)
|
JKQTPMathImageBase(x, y, width, height, parent)
|
||||||
{
|
{
|
||||||
this->data=data;
|
this->data=data;
|
||||||
this->datatype=datatype;
|
this->datatype=datatype;
|
||||||
@ -395,14 +429,9 @@ JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double
|
|||||||
|
|
||||||
|
|
||||||
JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, JKQTPMathImageDataType datatype, const void* data, int Nx, int Ny, JKQTPlotter* parent):
|
JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, JKQTPMathImageDataType datatype, const void* data, int Nx, int Ny, JKQTPlotter* parent):
|
||||||
JKQTPImageBase(x, y, width, height, parent)
|
JKQTPMathImageBase(x, y, width, height, datatype, data, Nx, Ny, parent->getPlotter())
|
||||||
{
|
{
|
||||||
this->data=data;
|
|
||||||
this->datatype=datatype;
|
|
||||||
this->Nx=Nx;
|
|
||||||
this->Ny=Ny;
|
|
||||||
dataModifier=nullptr;
|
|
||||||
datatypeModifier=JKQTPMathImageDataType::DoubleArray;
|
|
||||||
}
|
}
|
||||||
void JKQTPMathImageBase::drawKeyMarker(JKQTPEnhancedPainter &/*painter*/, const QRectF &/*rect*/)
|
void JKQTPMathImageBase::drawKeyMarker(JKQTPEnhancedPainter &/*painter*/, const QRectF &/*rect*/)
|
||||||
{
|
{
|
||||||
@ -411,138 +440,94 @@ void JKQTPMathImageBase::drawKeyMarker(JKQTPEnhancedPainter &/*painter*/, const
|
|||||||
|
|
||||||
void JKQTPMathImageBase::setNx(int __value)
|
void JKQTPMathImageBase::setNx(int __value)
|
||||||
{
|
{
|
||||||
this->Nx = __value;
|
Nx = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPMathImageBase::setNx(size_t __value)
|
void JKQTPMathImageBase::setNx(size_t __value)
|
||||||
{
|
{
|
||||||
this->Nx = static_cast<int>(__value);
|
Nx = static_cast<int>(__value);
|
||||||
}
|
}
|
||||||
|
|
||||||
int JKQTPMathImageBase::getNx() const
|
int JKQTPMathImageBase::getNx() const
|
||||||
{
|
{
|
||||||
return this->Nx;
|
return Nx;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPMathImageBase::setNy(int __value)
|
void JKQTPMathImageBase::setNy(int __value)
|
||||||
{
|
{
|
||||||
this->Ny = __value;
|
Ny = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPMathImageBase::setNy(size_t __value)
|
void JKQTPMathImageBase::setNy(size_t __value)
|
||||||
{
|
{
|
||||||
this->Ny = static_cast<int>(__value);
|
Ny = static_cast<int>(__value);
|
||||||
}
|
}
|
||||||
|
|
||||||
int JKQTPMathImageBase::getNy() const
|
int JKQTPMathImageBase::getNy() const
|
||||||
{
|
{
|
||||||
return this->Ny;
|
return Ny;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPMathImageBase::setData(const void *__value)
|
void JKQTPMathImageBase::setData(const void *__value)
|
||||||
{
|
{
|
||||||
this->data = __value;
|
data = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
const void *JKQTPMathImageBase::getData() const
|
const void *JKQTPMathImageBase::getData() const
|
||||||
{
|
{
|
||||||
return this->data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPMathImageBase::setDatatype(JKQTPMathImageDataType __value)
|
void JKQTPMathImageBase::setDatatype(JKQTPMathImageDataType __value)
|
||||||
{
|
{
|
||||||
this->datatype = __value;
|
datatype = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
JKQTPMathImageDataType JKQTPMathImageBase::getDatatype() const
|
JKQTPMathImageDataType JKQTPMathImageBase::getDatatype() const
|
||||||
{
|
{
|
||||||
return this->datatype;
|
return datatype;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPMathImageBase::setDataModifier(const void *__value)
|
void JKQTPMathImageBase::setDataModifier(const void *__value)
|
||||||
{
|
{
|
||||||
this->dataModifier = __value;
|
dataModifier = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
const void *JKQTPMathImageBase::getDataModifier() const
|
const void *JKQTPMathImageBase::getDataModifier() const
|
||||||
{
|
{
|
||||||
return this->dataModifier;
|
return dataModifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPMathImageBase::setDatatypeModifier(JKQTPMathImageDataType __value)
|
void JKQTPMathImageBase::setDatatypeModifier(JKQTPMathImageDataType __value)
|
||||||
{
|
{
|
||||||
this->datatypeModifier = __value;
|
datatypeModifier = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
JKQTPMathImageDataType JKQTPMathImageBase::getDatatypeModifier() const
|
JKQTPMathImageDataType JKQTPMathImageBase::getDatatypeModifier() const
|
||||||
{
|
{
|
||||||
return this->datatypeModifier;
|
return datatypeModifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
JKQTPMathImageBase::JKQTPMathImageBase(JKQTBasePlotter *parent):
|
void JKQTPMathImageBase::setData(const void *data_, int Nx_, int Ny_, JKQTPMathImageDataType datatype_) {
|
||||||
JKQTPImageBase(parent)
|
data=data_;
|
||||||
{
|
datatype=datatype_;
|
||||||
this->data=nullptr;
|
Nx=Nx_;
|
||||||
this->Nx=0;
|
Ny=Ny_;
|
||||||
this->Ny=0;
|
|
||||||
this->datatype=JKQTPMathImageDataType::DoubleArray;
|
|
||||||
dataModifier=nullptr;
|
|
||||||
datatypeModifier=JKQTPMathImageDataType::DoubleArray;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, JKQTBasePlotter *parent):
|
void JKQTPMathImageBase::setData(const void *data_, int Nx_, int Ny_) {
|
||||||
JKQTPImageBase(x,y,width,height,parent)
|
data=data_;
|
||||||
{
|
Nx=Nx_;
|
||||||
this->data=nullptr;
|
Ny=Ny_;
|
||||||
this->Nx=0;
|
|
||||||
this->Ny=0;
|
|
||||||
this->datatype=JKQTPMathImageDataType::DoubleArray;
|
|
||||||
dataModifier=nullptr;
|
|
||||||
datatypeModifier=JKQTPMathImageDataType::DoubleArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
JKQTPMathImageBase::JKQTPMathImageBase(JKQTPlotter *parent):
|
|
||||||
JKQTPImageBase(parent)
|
|
||||||
{
|
|
||||||
this->data=nullptr;
|
|
||||||
this->Nx=0;
|
|
||||||
this->Ny=0;
|
|
||||||
this->datatype=JKQTPMathImageDataType::DoubleArray;
|
|
||||||
dataModifier=nullptr;
|
|
||||||
datatypeModifier=JKQTPMathImageDataType::DoubleArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, JKQTPlotter *parent):
|
|
||||||
JKQTPImageBase(x,y,width,height,parent)
|
|
||||||
{
|
|
||||||
this->data=nullptr;
|
|
||||||
this->Nx=0;
|
|
||||||
this->Ny=0;
|
|
||||||
this->datatype=JKQTPMathImageDataType::DoubleArray;
|
|
||||||
dataModifier=nullptr;
|
|
||||||
datatypeModifier=JKQTPMathImageDataType::DoubleArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
void JKQTPMathImageBase::setData(const void *data, int Nx, int Ny, JKQTPMathImageDataType datatype) {
|
|
||||||
this->data=data;
|
|
||||||
this->datatype=datatype;
|
|
||||||
this->Nx=Nx;
|
|
||||||
this->Ny=Ny;
|
|
||||||
}
|
|
||||||
|
|
||||||
void JKQTPMathImageBase::setData(const void* data, int Nx, int Ny) {
|
|
||||||
this->data=data;
|
|
||||||
this->Nx=Nx;
|
|
||||||
this->Ny=Ny;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPMathImageBase::setDataModifier(const void *data, JKQTPMathImageDataType datatype)
|
void JKQTPMathImageBase::setDataModifier(const void *data, JKQTPMathImageDataType datatype)
|
||||||
{
|
{
|
||||||
this->dataModifier=data;
|
dataModifier=data;
|
||||||
this->datatypeModifier=datatype;
|
datatypeModifier=datatype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -731,23 +716,25 @@ void JKQTPMathImage::initJKQTPMathImage() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
this->palette=JKQTPMathImageGRAY;
|
palette=JKQTPMathImageGRAY;
|
||||||
this->autoModifierRange=true;
|
autoModifierRange=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
JKQTPMathImage::JKQTPMathImage(double x, double y, double width, double height, JKQTPMathImageDataType datatype, const void* data, int Nx, int Ny, JKQTPMathImageColorPalette palette, JKQTBasePlotter* parent):
|
JKQTPMathImage::JKQTPMathImage(double x, double y, double width, double height, JKQTPMathImageDataType datatype, const void* data, int Nx, int Ny, JKQTPMathImageColorPalette palette, JKQTBasePlotter* parent):
|
||||||
JKQTPMathImageBase(x, y, width, height, datatype, data, Nx, Ny, parent),
|
JKQTPMathImageBase(x, y, width, height, datatype, data, Nx, Ny, parent),
|
||||||
JKQTPColorPaletteWithModifierStyleAndToolsMixin(parent)
|
JKQTPColorPaletteWithModifierStyleAndToolsMixin(parent),
|
||||||
|
actCopyImage(nullptr),
|
||||||
|
actSaveImage(nullptr),
|
||||||
|
actCopyPalette(nullptr),
|
||||||
|
actSavePalette(nullptr)
|
||||||
{
|
{
|
||||||
initJKQTPMathImage();
|
initJKQTPMathImage();
|
||||||
this->palette=palette;
|
this->palette=palette;
|
||||||
}
|
}
|
||||||
|
|
||||||
JKQTPMathImage::JKQTPMathImage(JKQTBasePlotter *parent):
|
JKQTPMathImage::JKQTPMathImage(JKQTBasePlotter *parent):
|
||||||
JKQTPMathImageBase(0, 0, 1, 1, JKQTPMathImageDataType::UInt8Array, nullptr, 0, 0, parent),
|
JKQTPMathImage(0, 0, 1, 1, JKQTPMathImageDataType::UInt8Array, nullptr, 0, 0, JKQTPMathImageGRAY, parent)
|
||||||
JKQTPColorPaletteWithModifierStyleAndToolsMixin(parent)
|
|
||||||
{
|
{
|
||||||
initJKQTPMathImage();
|
|
||||||
if (parent) this->palette=parent->getCurrentPlotterStyle().graphsStyle.defaultPalette;
|
if (parent) this->palette=parent->getCurrentPlotterStyle().graphsStyle.defaultPalette;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,6 +218,16 @@ void JKQTPRGBMathImage::getOutsideSize(JKQTPEnhancedPainter& painter, int& leftS
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct RGBOutsizeData {
|
struct RGBOutsizeData {
|
||||||
|
RGBOutsizeData():
|
||||||
|
internalDataMin(0),
|
||||||
|
internalDataMax(0),
|
||||||
|
data(nullptr),
|
||||||
|
colorBarRightAxis(nullptr),
|
||||||
|
colorBarTopAxis(nullptr),
|
||||||
|
name(),
|
||||||
|
palette(JKQTPMathImageMATLAB),
|
||||||
|
paletteImage()
|
||||||
|
{}
|
||||||
double internalDataMin;
|
double internalDataMin;
|
||||||
double internalDataMax;
|
double internalDataMax;
|
||||||
const void* data;
|
const void* data;
|
||||||
|
@ -78,6 +78,7 @@ protected:
|
|||||||
/** \brief INTERNAL data structure combining a JKQTPMathParser and a JKQTPMathParser::jkmpNode
|
/** \brief INTERNAL data structure combining a JKQTPMathParser and a JKQTPMathParser::jkmpNode
|
||||||
*/
|
*/
|
||||||
struct ParsedFunctionLineGraphFunctionData {
|
struct ParsedFunctionLineGraphFunctionData {
|
||||||
|
inline ParsedFunctionLineGraphFunctionData(): varcount(0) {};
|
||||||
std::shared_ptr<JKQTPMathParser> parser;
|
std::shared_ptr<JKQTPMathParser> parser;
|
||||||
std::shared_ptr<JKQTPMathParser::jkmpNode> node;
|
std::shared_ptr<JKQTPMathParser::jkmpNode> node;
|
||||||
int varcount;
|
int varcount;
|
||||||
|
@ -36,12 +36,11 @@
|
|||||||
|
|
||||||
|
|
||||||
JKQTPSingleColumnSymbolsGraph::JKQTPSingleColumnSymbolsGraph(JKQTBasePlotter *parent):
|
JKQTPSingleColumnSymbolsGraph::JKQTPSingleColumnSymbolsGraph(JKQTBasePlotter *parent):
|
||||||
JKQTPSingleColumnGraph(parent), seedValue(123456)
|
JKQTPSingleColumnGraph(parent), seedValue(123456), positionScatterStyle(NoScatter), position(0), width(1)
|
||||||
|
|
||||||
{
|
{
|
||||||
parentPlotStyle=-1;
|
parentPlotStyle=-1;
|
||||||
dataDirection=DataDirection::Y;
|
dataDirection=DataDirection::Y;
|
||||||
position=0;
|
|
||||||
width=1;
|
|
||||||
|
|
||||||
initSymbolStyle(parent, parentPlotStyle, JKQTPPlotStyleType::Default);
|
initSymbolStyle(parent, parentPlotStyle, JKQTPPlotStyleType::Default);
|
||||||
}
|
}
|
||||||
|
@ -36,17 +36,19 @@
|
|||||||
|
|
||||||
|
|
||||||
JKQTPViolinplotElementBase::JKQTPViolinplotElementBase(JKQTBasePlotter* parent):
|
JKQTPViolinplotElementBase::JKQTPViolinplotElementBase(JKQTBasePlotter* parent):
|
||||||
JKQTPPlotElement(parent)
|
JKQTPPlotElement(parent),
|
||||||
|
pos(JKQTP_NAN),
|
||||||
|
median(JKQTP_NAN),
|
||||||
|
mean(JKQTP_NAN),
|
||||||
|
min(JKQTP_NAN),
|
||||||
|
max(JKQTP_NAN),
|
||||||
|
drawMean(false),
|
||||||
|
drawMinMax(false),
|
||||||
|
drawMedian(false),
|
||||||
|
violinPositionColumn(-1),
|
||||||
|
violinFrequencyColumn(-1)
|
||||||
{
|
{
|
||||||
pos=JKQTP_NAN;
|
|
||||||
median=JKQTP_NAN;
|
|
||||||
mean=JKQTP_NAN;
|
|
||||||
min=JKQTP_NAN;
|
|
||||||
max=JKQTP_NAN;
|
|
||||||
drawMean=false;
|
|
||||||
drawMinMax=false;
|
|
||||||
violinPositionColumn=-1;
|
|
||||||
violinFrequencyColumn=-1;
|
|
||||||
|
|
||||||
initViolinplotStyle(parent, parentPlotStyle);
|
initViolinplotStyle(parent, parentPlotStyle);
|
||||||
setMeanSymbolType(JKQTPPlus);
|
setMeanSymbolType(JKQTPPlus);
|
||||||
|
@ -1520,6 +1520,10 @@ void JKQTBasePlotter::print(QPrinter* printer, bool displayPreview) {
|
|||||||
|
|
||||||
|
|
||||||
bool JKQTBasePlotter::printpreviewNew(QPaintDevice* paintDevice, bool setAbsolutePaperSize, double printsizeX_inMM, double printsizeY_inMM, bool displayPreview) {
|
bool JKQTBasePlotter::printpreviewNew(QPaintDevice* paintDevice, bool setAbsolutePaperSize, double printsizeX_inMM, double printsizeY_inMM, bool displayPreview) {
|
||||||
|
|
||||||
|
JKQTPASSERT_M(paintDevice, "INTERNAL ERROR: no QPaintDevice given to JKQTBasePlotter::printpreviewNew()!");
|
||||||
|
|
||||||
|
|
||||||
#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
|
#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
|
||||||
QPrinter *printer=dynamic_cast<QPrinter*>(paintDevice);
|
QPrinter *printer=dynamic_cast<QPrinter*>(paintDevice);
|
||||||
QSvgGenerator* svg=dynamic_cast<QSvgGenerator*>(paintDevice);
|
QSvgGenerator* svg=dynamic_cast<QSvgGenerator*>(paintDevice);
|
||||||
@ -1939,6 +1943,8 @@ void JKQTBasePlotter::updatePreviewLabel() {
|
|||||||
|
|
||||||
#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
|
#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
|
||||||
void JKQTBasePlotter::printpreviewPaintRequested(QPrinter* printer) {
|
void JKQTBasePlotter::printpreviewPaintRequested(QPrinter* printer) {
|
||||||
|
JKQTPASSERT_M(printer, "INTERNAL ERROR: no QPrinter given to JKQTBasePlotter::printpreviewPaintRequested()!");
|
||||||
|
|
||||||
double lw=lineWidthMultiplier;
|
double lw=lineWidthMultiplier;
|
||||||
double fs=fontSizeMultiplier;
|
double fs=fontSizeMultiplier;
|
||||||
QBrush bc=plotterStyle.widgetBackgroundBrush;
|
QBrush bc=plotterStyle.widgetBackgroundBrush;
|
||||||
@ -2016,6 +2022,7 @@ void JKQTBasePlotter::printpreviewPaintRequested(QPrinter* printer) {
|
|||||||
|
|
||||||
|
|
||||||
void JKQTBasePlotter::printpreviewPaintRequestedNewPrinter(QPrinter* printer) {
|
void JKQTBasePlotter::printpreviewPaintRequestedNewPrinter(QPrinter* printer) {
|
||||||
|
JKQTPASSERT_M(printer, "INTERNAL ERROR: no QPrinter given to JKQTBasePlotter::printpreviewPaintRequestedNewPrinter()!");
|
||||||
QPaintDevice* paintDevice=dynamic_cast<QPaintDevice*>(printer);
|
QPaintDevice* paintDevice=dynamic_cast<QPaintDevice*>(printer);
|
||||||
printpreviewPaintRequestedNewPaintDevice(paintDevice);
|
printpreviewPaintRequestedNewPaintDevice(paintDevice);
|
||||||
|
|
||||||
@ -2024,6 +2031,8 @@ void JKQTBasePlotter::printpreviewPaintRequestedNewPrinter(QPrinter* printer) {
|
|||||||
|
|
||||||
void JKQTBasePlotter::printpreviewPaintRequestedNewPaintDevice(QPaintDevice *paintDevice)
|
void JKQTBasePlotter::printpreviewPaintRequestedNewPaintDevice(QPaintDevice *paintDevice)
|
||||||
{
|
{
|
||||||
|
JKQTPASSERT_M(paintDevice, "INTERNAL ERROR: no QPaintDevice given to JKQTBasePlotter::printpreviewPaintRequestedNewPaintDevice()!");
|
||||||
|
|
||||||
//QPaintDevice* paintDevice=dynamic_cast<QPaintDevice*>(printer);
|
//QPaintDevice* paintDevice=dynamic_cast<QPaintDevice*>(printer);
|
||||||
#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
|
#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
|
||||||
QPrinter* printer=dynamic_cast<QPrinter*>(paintDevice);
|
QPrinter* printer=dynamic_cast<QPrinter*>(paintDevice);
|
||||||
|
@ -947,13 +947,17 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPDatastore{
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
size_t addCopiedColumn(const T* data, size_t rows, const QString& name=QString("")){
|
size_t addCopiedColumn(const T* data, size_t rows, const QString& name=QString("")){
|
||||||
double* d=static_cast<double*>(malloc(static_cast<size_t>(rows)*sizeof(double)));
|
double* d=static_cast<double*>(malloc(static_cast<size_t>(rows)*sizeof(double)));
|
||||||
if (data) {
|
if (d) {
|
||||||
for (size_t r=0; r<rows; r++) {
|
if (data) {
|
||||||
d[r]=jkqtp_todouble(data[r]);
|
for (size_t r=0; r<rows; r++) {
|
||||||
|
d[r]=jkqtp_todouble(data[r]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
const size_t itemid=addInternalItem(d, rows);
|
||||||
|
return addColumnForItem(itemid, 0, name);
|
||||||
|
} else {
|
||||||
|
throw std::runtime_error("could not allocate memory in JKQTPDataStore::addCopiedColumn()");
|
||||||
}
|
}
|
||||||
size_t itemid=addInternalItem(d, rows);
|
|
||||||
return addColumnForItem(itemid, 0, name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief copy an external column to the datastore. It contains \a rows rows. The external data is copied to an internal array, so
|
/** \brief copy an external column to the datastore. It contains \a rows rows. The external data is copied to an internal array, so
|
||||||
@ -980,13 +984,17 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPDatastore{
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
size_t addCopiedColumn(const T* data, size_t rows, size_t stride, int start, const QString& name) {
|
size_t addCopiedColumn(const T* data, size_t rows, size_t stride, int start, const QString& name) {
|
||||||
double* d=static_cast<double*>(malloc(static_cast<size_t>(rows)*sizeof(double)));
|
double* d=static_cast<double*>(malloc(static_cast<size_t>(rows)*sizeof(double)));
|
||||||
if (data) {
|
if (d) {
|
||||||
for (size_t r=0; r<rows; r++) {
|
if (data) {
|
||||||
d[r]=jkqtp_todouble(data[static_cast<size_t>(start+static_cast<int64_t>(r*stride))]);
|
for (size_t r=0; r<rows; r++) {
|
||||||
|
d[r]=jkqtp_todouble(data[static_cast<size_t>(start+static_cast<int64_t>(r*stride))]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
size_t itemid=addInternalItem(d, rows);
|
||||||
|
return addColumnForItem(itemid, 0, name);
|
||||||
|
} else {
|
||||||
|
throw std::runtime_error("could not allocate memory in JKQTPDataStore::addCopiedColumn()");
|
||||||
}
|
}
|
||||||
size_t itemid=addInternalItem(d, rows);
|
|
||||||
return addColumnForItem(itemid, 0, name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief copy an external column to the datastore. It contains \a rows rows. The external data is copied to an internal array, so
|
/** \brief copy an external column to the datastore. It contains \a rows rows. The external data is copied to an internal array, so
|
||||||
@ -1761,7 +1769,7 @@ class JKQTPColumnIterator {
|
|||||||
|
|
||||||
/** \brief dereferences the iterator, throws an exception if the iterator is invalid (see isValid() ) or the value does not exist in the column */
|
/** \brief dereferences the iterator, throws an exception if the iterator is invalid (see isValid() ) or the value does not exist in the column */
|
||||||
inline reference operator*() const {
|
inline reference operator*() const {
|
||||||
JKQTPASSERT(col_!=nullptr && pos_>=0 && pos_<static_cast<int>(col_->getRows()));
|
JKQTPASSERT((col_!=nullptr) && (pos_>=0) && (pos_<static_cast<int>(col_->getRows())));
|
||||||
return col_->at(pos_);
|
return col_->at(pos_);
|
||||||
}
|
}
|
||||||
inline reference operator[](difference_type off) const
|
inline reference operator[](difference_type off) const
|
||||||
@ -1769,7 +1777,7 @@ class JKQTPColumnIterator {
|
|||||||
if (!isValid() && off<0) {
|
if (!isValid() && off<0) {
|
||||||
return col_->at(static_cast<int>(col_->getRows())+off);
|
return col_->at(static_cast<int>(col_->getRows())+off);
|
||||||
}
|
}
|
||||||
JKQTPASSERT(col_!=nullptr && pos_+off>=0 && pos_+off<static_cast<int>(col_->getRows()));
|
JKQTPASSERT((col_!=nullptr) && (pos_+off>=0) && (pos_+off<static_cast<int>(col_->getRows())));
|
||||||
return col_->at(pos_+off);
|
return col_->at(pos_+off);
|
||||||
}
|
}
|
||||||
/** \brief comparison operator (less than)
|
/** \brief comparison operator (less than)
|
||||||
@ -2092,6 +2100,7 @@ class JKQTPColumnConstIterator {
|
|||||||
inline reference operator[](difference_type off) const
|
inline reference operator[](difference_type off) const
|
||||||
{
|
{
|
||||||
if (!isValid() && off<0) {
|
if (!isValid() && off<0) {
|
||||||
|
JKQTPASSERT(col_!=nullptr);
|
||||||
return col_->at(static_cast<int>(col_->getRows())+off);
|
return col_->at(static_cast<int>(col_->getRows())+off);
|
||||||
}
|
}
|
||||||
JKQTPASSERT(col_!=nullptr && pos_+off>=0 && pos_+off<static_cast<int>(col_->getRows()));
|
JKQTPASSERT(col_!=nullptr && pos_+off>=0 && pos_+off<static_cast<int>(col_->getRows()));
|
||||||
|
@ -43,27 +43,27 @@ JKQTPColorPaletteStyleAndToolsMixin::JKQTPColorPaletteStyleAndToolsMixin(JKQTBas
|
|||||||
colorBarTopAxis->setAxisLabel("");
|
colorBarTopAxis->setAxisLabel("");
|
||||||
|
|
||||||
|
|
||||||
this->palette=JKQTPMathImageMATLAB;
|
palette=JKQTPMathImageMATLAB;
|
||||||
this->imageNameFontName=parent->getDefaultTextFontName();
|
imageNameFontName=parent->getDefaultTextFontName();
|
||||||
this->imageNameFontSize=parent->getDefaultTextSize();
|
imageNameFontSize=parent->getDefaultTextSize();
|
||||||
this->imageName="";
|
imageName="";
|
||||||
this->showColorBar=true;
|
showColorBar=true;
|
||||||
this->colorBarWidth=14;
|
colorBarWidth=14;
|
||||||
this->colorBarRelativeHeight=0.75;
|
colorBarRelativeHeight=0.75;
|
||||||
this->autoImageRange=true;
|
autoImageRange=true;
|
||||||
this->imageMin=0;
|
imageMin=0;
|
||||||
this->imageMax=1;
|
imageMax=1;
|
||||||
this->colorBarOffset=4;
|
colorBarOffset=4;
|
||||||
this->rangeMinFailAction=JKQTPMathImageLastPaletteColor;
|
rangeMinFailAction=JKQTPMathImageLastPaletteColor;
|
||||||
this->rangeMaxFailAction=JKQTPMathImageLastPaletteColor;
|
rangeMaxFailAction=JKQTPMathImageLastPaletteColor;
|
||||||
this->rangeMinFailColor=QColor("black");
|
rangeMinFailColor=QColor("black");
|
||||||
this->rangeMaxFailColor=QColor("black");
|
rangeMaxFailColor=QColor("black");
|
||||||
this->nanColor=QColor("black");
|
nanColor=QColor("black");
|
||||||
this->infColor=QColor("black");
|
infColor=QColor("black");
|
||||||
this->colorBarTopVisible=false;
|
colorBarTopVisible=false;
|
||||||
this->colorBarRightVisible=true;
|
colorBarRightVisible=true;
|
||||||
|
|
||||||
if (parent) this->palette=parent->getCurrentPlotterStyle().graphsStyle.defaultPalette;
|
if (parent) palette=parent->getCurrentPlotterStyle().graphsStyle.defaultPalette;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,208 +328,208 @@ void JKQTPColorPaletteStyleAndToolsMixin::cbSetParent(JKQTBasePlotter* parent) {
|
|||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setColorPalette(const JKQTPMathImageColorPalette &__value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setColorPalette(const JKQTPMathImageColorPalette &__value)
|
||||||
{
|
{
|
||||||
this->palette = __value;
|
palette = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
JKQTPMathImageColorPalette JKQTPColorPaletteStyleAndToolsMixin::getColorPalette() const
|
JKQTPMathImageColorPalette JKQTPColorPaletteStyleAndToolsMixin::getColorPalette() const
|
||||||
{
|
{
|
||||||
return this->palette;
|
return palette;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setRangeMinFailAction(const JKQTPMathImageColorRangeFailAction &__value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setRangeMinFailAction(const JKQTPMathImageColorRangeFailAction &__value)
|
||||||
{
|
{
|
||||||
this->rangeMinFailAction = __value;
|
rangeMinFailAction = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
JKQTPMathImageColorRangeFailAction JKQTPColorPaletteStyleAndToolsMixin::getActionRangeMinFail() const
|
JKQTPMathImageColorRangeFailAction JKQTPColorPaletteStyleAndToolsMixin::getActionRangeMinFail() const
|
||||||
{
|
{
|
||||||
return this->rangeMinFailAction;
|
return rangeMinFailAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setRangeMaxFailAction(const JKQTPMathImageColorRangeFailAction &__value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setRangeMaxFailAction(const JKQTPMathImageColorRangeFailAction &__value)
|
||||||
{
|
{
|
||||||
this->rangeMaxFailAction = __value;
|
rangeMaxFailAction = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
JKQTPMathImageColorRangeFailAction JKQTPColorPaletteStyleAndToolsMixin::getActionRangeMaxFail() const
|
JKQTPMathImageColorRangeFailAction JKQTPColorPaletteStyleAndToolsMixin::getActionRangeMaxFail() const
|
||||||
{
|
{
|
||||||
return this->rangeMaxFailAction;
|
return rangeMaxFailAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setRangeMinFailColor(const QColor &__value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setRangeMinFailColor(const QColor &__value)
|
||||||
{
|
{
|
||||||
this->rangeMinFailColor = __value;
|
rangeMinFailColor = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor JKQTPColorPaletteStyleAndToolsMixin::getRangeMinFailColor() const
|
QColor JKQTPColorPaletteStyleAndToolsMixin::getRangeMinFailColor() const
|
||||||
{
|
{
|
||||||
return this->rangeMinFailColor;
|
return rangeMinFailColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setRangeMaxFailColor(const QColor &__value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setRangeMaxFailColor(const QColor &__value)
|
||||||
{
|
{
|
||||||
this->rangeMaxFailColor = __value;
|
rangeMaxFailColor = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor JKQTPColorPaletteStyleAndToolsMixin::getRangeMaxFailColor() const
|
QColor JKQTPColorPaletteStyleAndToolsMixin::getRangeMaxFailColor() const
|
||||||
{
|
{
|
||||||
return this->rangeMaxFailColor;
|
return rangeMaxFailColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setNanColor(const QColor &__value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setNanColor(const QColor &__value)
|
||||||
{
|
{
|
||||||
this->nanColor = __value;
|
nanColor = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor JKQTPColorPaletteStyleAndToolsMixin::getNanColor() const
|
QColor JKQTPColorPaletteStyleAndToolsMixin::getNanColor() const
|
||||||
{
|
{
|
||||||
return this->nanColor;
|
return nanColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setInfColor(const QColor &__value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setInfColor(const QColor &__value)
|
||||||
{
|
{
|
||||||
this->infColor = __value;
|
infColor = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor JKQTPColorPaletteStyleAndToolsMixin::getInfColor() const
|
QColor JKQTPColorPaletteStyleAndToolsMixin::getInfColor() const
|
||||||
{
|
{
|
||||||
return this->infColor;
|
return infColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setShowColorBar(bool __value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setShowColorBar(bool __value)
|
||||||
{
|
{
|
||||||
this->showColorBar = __value;
|
showColorBar = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JKQTPColorPaletteStyleAndToolsMixin::getShowColorBar() const
|
bool JKQTPColorPaletteStyleAndToolsMixin::getShowColorBar() const
|
||||||
{
|
{
|
||||||
return this->showColorBar;
|
return showColorBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setColorBarWidth(int __value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setColorBarWidth(int __value)
|
||||||
{
|
{
|
||||||
this->colorBarWidth = __value;
|
colorBarWidth = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int JKQTPColorPaletteStyleAndToolsMixin::getColorBarWidth() const
|
int JKQTPColorPaletteStyleAndToolsMixin::getColorBarWidth() const
|
||||||
{
|
{
|
||||||
return this->colorBarWidth;
|
return colorBarWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setColorBarOffset(int __value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setColorBarOffset(int __value)
|
||||||
{
|
{
|
||||||
this->colorBarOffset = __value;
|
colorBarOffset = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int JKQTPColorPaletteStyleAndToolsMixin::getColorBarOffset() const
|
int JKQTPColorPaletteStyleAndToolsMixin::getColorBarOffset() const
|
||||||
{
|
{
|
||||||
return this->colorBarOffset;
|
return colorBarOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setColorBarRelativeHeight(double __value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setColorBarRelativeHeight(double __value)
|
||||||
{
|
{
|
||||||
this->colorBarRelativeHeight = __value;
|
colorBarRelativeHeight = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
double JKQTPColorPaletteStyleAndToolsMixin::getColorBarRelativeHeight() const
|
double JKQTPColorPaletteStyleAndToolsMixin::getColorBarRelativeHeight() const
|
||||||
{
|
{
|
||||||
return this->colorBarRelativeHeight;
|
return colorBarRelativeHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setImageMin(double __value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setImageMin(double __value)
|
||||||
{
|
{
|
||||||
this->imageMin = __value;
|
imageMin = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
double JKQTPColorPaletteStyleAndToolsMixin::getImageMin() const
|
double JKQTPColorPaletteStyleAndToolsMixin::getImageMin() const
|
||||||
{
|
{
|
||||||
return this->imageMin;
|
return imageMin;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setImageMax(double __value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setImageMax(double __value)
|
||||||
{
|
{
|
||||||
this->imageMax = __value;
|
imageMax = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
double JKQTPColorPaletteStyleAndToolsMixin::getImageMax() const
|
double JKQTPColorPaletteStyleAndToolsMixin::getImageMax() const
|
||||||
{
|
{
|
||||||
return this->imageMax;
|
return imageMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setAutoImageRange(bool __value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setAutoImageRange(bool __value)
|
||||||
{
|
{
|
||||||
this->autoImageRange = __value;
|
autoImageRange = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JKQTPColorPaletteStyleAndToolsMixin::getAutoImageRange() const
|
bool JKQTPColorPaletteStyleAndToolsMixin::getAutoImageRange() const
|
||||||
{
|
{
|
||||||
return this->autoImageRange;
|
return autoImageRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setImageName(const QString &__value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setImageName(const QString &__value)
|
||||||
{
|
{
|
||||||
this->imageName = __value;
|
imageName = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString JKQTPColorPaletteStyleAndToolsMixin::getImageName() const
|
QString JKQTPColorPaletteStyleAndToolsMixin::getImageName() const
|
||||||
{
|
{
|
||||||
return this->imageName;
|
return imageName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setImageNameFontName(const QString &__value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setImageNameFontName(const QString &__value)
|
||||||
{
|
{
|
||||||
this->imageNameFontName = __value;
|
imageNameFontName = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString JKQTPColorPaletteStyleAndToolsMixin::getImageNameFontName() const
|
QString JKQTPColorPaletteStyleAndToolsMixin::getImageNameFontName() const
|
||||||
{
|
{
|
||||||
return this->imageNameFontName;
|
return imageNameFontName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setImageNameFontSize(double __value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setImageNameFontSize(double __value)
|
||||||
{
|
{
|
||||||
this->imageNameFontSize = __value;
|
imageNameFontSize = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
double JKQTPColorPaletteStyleAndToolsMixin::getImageNameFontSize() const
|
double JKQTPColorPaletteStyleAndToolsMixin::getImageNameFontSize() const
|
||||||
{
|
{
|
||||||
return this->imageNameFontSize;
|
return imageNameFontSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
JKQTPVerticalIndependentAxis *JKQTPColorPaletteStyleAndToolsMixin::getColorBarRightAxis() {
|
JKQTPVerticalIndependentAxis *JKQTPColorPaletteStyleAndToolsMixin::getColorBarRightAxis() {
|
||||||
return this->colorBarRightAxis;
|
return colorBarRightAxis;
|
||||||
}
|
}
|
||||||
|
|
||||||
JKQTPHorizontalIndependentAxis *JKQTPColorPaletteStyleAndToolsMixin::getColorBarTopAxis() {
|
JKQTPHorizontalIndependentAxis *JKQTPColorPaletteStyleAndToolsMixin::getColorBarTopAxis() {
|
||||||
return this->colorBarTopAxis;
|
return colorBarTopAxis;
|
||||||
}
|
}
|
||||||
|
|
||||||
const JKQTPVerticalIndependentAxis *JKQTPColorPaletteStyleAndToolsMixin::getColorBarRightAxis() const {
|
const JKQTPVerticalIndependentAxis *JKQTPColorPaletteStyleAndToolsMixin::getColorBarRightAxis() const {
|
||||||
return this->colorBarRightAxis;
|
return colorBarRightAxis;
|
||||||
}
|
}
|
||||||
|
|
||||||
const JKQTPHorizontalIndependentAxis *JKQTPColorPaletteStyleAndToolsMixin::getColorBarTopAxis() const {
|
const JKQTPHorizontalIndependentAxis *JKQTPColorPaletteStyleAndToolsMixin::getColorBarTopAxis() const {
|
||||||
return this->colorBarTopAxis;
|
return colorBarTopAxis;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setColorBarTopVisible(bool __value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setColorBarTopVisible(bool __value)
|
||||||
{
|
{
|
||||||
this->colorBarTopVisible = __value;
|
colorBarTopVisible = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JKQTPColorPaletteStyleAndToolsMixin::getColorBarTopVisible() const
|
bool JKQTPColorPaletteStyleAndToolsMixin::getColorBarTopVisible() const
|
||||||
{
|
{
|
||||||
return this->colorBarTopVisible;
|
return colorBarTopVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteStyleAndToolsMixin::setColorBarRightVisible(bool __value)
|
void JKQTPColorPaletteStyleAndToolsMixin::setColorBarRightVisible(bool __value)
|
||||||
{
|
{
|
||||||
this->colorBarRightVisible = __value;
|
colorBarRightVisible = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JKQTPColorPaletteStyleAndToolsMixin::getColorBarRightVisible() const
|
bool JKQTPColorPaletteStyleAndToolsMixin::getColorBarRightVisible() const
|
||||||
{
|
{
|
||||||
return this->colorBarRightVisible;
|
return colorBarRightVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -540,8 +540,11 @@ JKQTPColorPaletteWithModifierStyleAndToolsMixin::JKQTPColorPaletteWithModifierSt
|
|||||||
modifierColorBarTopAxis->setAxisLabel("");
|
modifierColorBarTopAxis->setAxisLabel("");
|
||||||
modifierColorBarRightAxis=new JKQTPHorizontalIndependentAxis (0, 100, 0, 100, parent);
|
modifierColorBarRightAxis=new JKQTPHorizontalIndependentAxis (0, 100, 0, 100, parent);
|
||||||
modifierColorBarRightAxis->setAxisLabel("");
|
modifierColorBarRightAxis->setAxisLabel("");
|
||||||
this->colorBarModifiedWidth=80;
|
colorBarModifiedWidth=80;
|
||||||
modifierMode=JKQTPMathImageModifierMode::ModifyNone;
|
modifierMode=JKQTPMathImageModifierMode::ModifyNone;
|
||||||
|
modifierMin=0;
|
||||||
|
modifierMax=0;
|
||||||
|
autoModifierRange=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -735,12 +738,12 @@ void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbSetParent(JKQTBasePlotte
|
|||||||
|
|
||||||
void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setModifierMode(const JKQTPMathImageModifierMode &__value)
|
void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setModifierMode(const JKQTPMathImageModifierMode &__value)
|
||||||
{
|
{
|
||||||
this->modifierMode = __value;
|
modifierMode = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
JKQTPMathImageModifierMode JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierMode() const
|
JKQTPMathImageModifierMode JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierMode() const
|
||||||
{
|
{
|
||||||
return this->modifierMode;
|
return modifierMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -752,59 +755,59 @@ void JKQTPColorPaletteWithModifierStyleAndToolsMixin::modifyImage(QImage &img, c
|
|||||||
|
|
||||||
void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setColorBarModifiedWidth(double __value)
|
void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setColorBarModifiedWidth(double __value)
|
||||||
{
|
{
|
||||||
this->colorBarModifiedWidth = __value;
|
colorBarModifiedWidth = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
double JKQTPColorPaletteWithModifierStyleAndToolsMixin::getColorBarModifiedWidth() const
|
double JKQTPColorPaletteWithModifierStyleAndToolsMixin::getColorBarModifiedWidth() const
|
||||||
{
|
{
|
||||||
return this->colorBarModifiedWidth;
|
return colorBarModifiedWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
JKQTPVerticalIndependentAxis *JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierColorBarTopAxis() {
|
JKQTPVerticalIndependentAxis *JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierColorBarTopAxis() {
|
||||||
return this->modifierColorBarTopAxis;
|
return modifierColorBarTopAxis;
|
||||||
}
|
}
|
||||||
|
|
||||||
JKQTPHorizontalIndependentAxis *JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierColorBarRightAxis() {
|
JKQTPHorizontalIndependentAxis *JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierColorBarRightAxis() {
|
||||||
return this->modifierColorBarRightAxis ;
|
return modifierColorBarRightAxis ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const JKQTPVerticalIndependentAxis *JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierColorBarTopAxis() const {
|
const JKQTPVerticalIndependentAxis *JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierColorBarTopAxis() const {
|
||||||
return this->modifierColorBarTopAxis;
|
return modifierColorBarTopAxis;
|
||||||
}
|
}
|
||||||
|
|
||||||
const JKQTPHorizontalIndependentAxis *JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierColorBarRightAxis() const {
|
const JKQTPHorizontalIndependentAxis *JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierColorBarRightAxis() const {
|
||||||
return this->modifierColorBarRightAxis ;
|
return modifierColorBarRightAxis ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setAutoModifierRange(bool __value)
|
void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setAutoModifierRange(bool __value)
|
||||||
{
|
{
|
||||||
this->autoModifierRange = __value;
|
autoModifierRange = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JKQTPColorPaletteWithModifierStyleAndToolsMixin::getAutoModifierRange() const
|
bool JKQTPColorPaletteWithModifierStyleAndToolsMixin::getAutoModifierRange() const
|
||||||
{
|
{
|
||||||
return this->autoModifierRange;
|
return autoModifierRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setModifierMin(double __value)
|
void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setModifierMin(double __value)
|
||||||
{
|
{
|
||||||
this->modifierMin = __value;
|
modifierMin = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
double JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierMin() const
|
double JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierMin() const
|
||||||
{
|
{
|
||||||
return this->modifierMin;
|
return modifierMin;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setModifierMax(double __value)
|
void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setModifierMax(double __value)
|
||||||
{
|
{
|
||||||
this->modifierMax = __value;
|
modifierMax = __value;
|
||||||
}
|
}
|
||||||
|
|
||||||
double JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierMax() const
|
double JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierMax() const
|
||||||
{
|
{
|
||||||
return this->modifierMax;
|
return modifierMax;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user