101 m_qListVecPointFPaths.clear();
114 if(p_dVec.size() > 0)
119 QVector<QPointF> t_qVecPointFPaths;
128 for(qint32 i = 0; i < p_dVec.size(); ++i)
130 t_qVecPointFPaths.append(QPointF(t_dX, p_dVec[i]));
134 m_qListVecPointFPaths.append(t_qVecPointFPaths);
143 void Plot::paintEvent(QPaintEvent *)
145 QPainter painter(
this);
146 if (m_qListVecPointFPaths.size() > 0)
157 QPainter painter(
this);
158 painter.fillRect(t_qPointTopLeft.x(), t_qPointTopLeft.y(), t_qSizePlot.width(), t_qSizePlot.height(), Qt::white);
161 painter.drawRect(t_qPointTopLeft.x()-1, t_qPointTopLeft.y()-1, t_qSizePlot.width()+1, t_qSizePlot.height()+1);
167 pen.setBrush(Qt::blue);
170 for(qint32 i = 0; i < m_qListVecPointFPaths.size(); ++i)
173 double scale_y = (t_qSizePlot.height()-(t_qSizePlot.height()*0.1))/(
m_dMaxY -
m_dMinY);
176 QVector<QPointF> t_qVecPointFPath;
177 QVector<QPointF>::ConstIterator it;
178 for(it = m_qListVecPointFPaths[i].begin(); it != m_qListVecPointFPaths[i].end(); ++it)
179 t_qVecPointFPath.append(QPointF(it->x()*scale_x, it->y()*scale_y));
182 for(it = t_qVecPointFPath.begin()+1; it != t_qVecPointFPath.end(); ++it)
183 painter.drawLine(*(it-1), *it);
189 Graph::drawLabels(t_qSizePlot.width(), t_qSizePlot.height());
qint32 m_iBorderLeftRight
qint32 m_iBorderTopBottom
void updateData(VectorXd &p_dVec)