mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-26 10:31:39 +08:00
Use linesP and vec_linesP names
This commit is contained in:
parent
ae722e8c33
commit
65c23c9669
@ -94,8 +94,8 @@ void JKQTPXYLineGraph::draw(JKQTPEnhancedPainter& painter) {
|
|||||||
//double yold=-1;
|
//double yold=-1;
|
||||||
//bool first=false;
|
//bool first=false;
|
||||||
//QVector<QLineF> lines;
|
//QVector<QLineF> lines;
|
||||||
std::vector<QPolygonF> linesP;
|
std::vector<QPolygonF> vec_linesP;
|
||||||
linesP.push_back(QPolygonF());
|
vec_linesP.push_back(QPolygonF());
|
||||||
intSortData();
|
intSortData();
|
||||||
for (int iii=imin; iii<imax; iii++) {
|
for (int iii=imin; iii<imax; iii++) {
|
||||||
int i=qBound(imin, getDataIndex(iii), imax);
|
int i=qBound(imin, getDataIndex(iii), imax);
|
||||||
@ -112,25 +112,25 @@ void JKQTPXYLineGraph::draw(JKQTPEnhancedPainter& painter) {
|
|||||||
if ((!parent->getXAxis()->isLogAxis() || xv>0.0) && (!parent->getYAxis()->isLogAxis() || yv>0.0) ) {
|
if ((!parent->getXAxis()->isLogAxis() || xv>0.0) && (!parent->getYAxis()->isLogAxis() || yv>0.0) ) {
|
||||||
plotStyledSymbol(parent, painter, x, y);
|
plotStyledSymbol(parent, painter, x, y);
|
||||||
if (drawLine) {
|
if (drawLine) {
|
||||||
linesP[linesP.size()-1] << QPointF(x,y);
|
vec_linesP[vec_linesP.size()-1] << QPointF(x,y);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
linesP.push_back(QPolygonF());
|
vec_linesP.push_back(QPolygonF());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//qDebug()<<"JKQTPXYLineGraph::draw(): "<<4<<" lines="<<lines.size();
|
//qDebug()<<"JKQTPXYLineGraph::draw(): "<<4<<" lines="<<lines.size();
|
||||||
//qDebug()<<"JKQTPXYLineGraph::draw(): "<<5<<" p="<<painter.pen();
|
//qDebug()<<"JKQTPXYLineGraph::draw(): "<<5<<" p="<<painter.pen();
|
||||||
for (auto &lines : linesP) {
|
for (auto &linesP : vec_linesP) {
|
||||||
if (lines.size()>0) {
|
if (linesP.size()>0) {
|
||||||
if (isHighlighted()) {
|
if (isHighlighted()) {
|
||||||
painter.setPen(penSelection);
|
painter.setPen(penSelection);
|
||||||
//painter.drawLines(lines);
|
//painter.drawLines(lines);
|
||||||
painter.drawPolyline(lines);
|
painter.drawPolyline(linesP);
|
||||||
}
|
}
|
||||||
painter.setPen(p);
|
painter.setPen(p);
|
||||||
//painter.drawLines(lines);
|
//painter.drawLines(lines);
|
||||||
painter.drawPolyline(lines);
|
painter.drawPolyline(linesP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//qDebug()<<"JKQTPXYLineGraph::draw(): "<<6;
|
//qDebug()<<"JKQTPXYLineGraph::draw(): "<<6;
|
||||||
|
Loading…
Reference in New Issue
Block a user