! \internal Draws the sub grid lines with the specified painter. This is a helper function called by \ref draw. */
| 7345 | This is a helper function called by \ref draw. |
| 7346 | */ |
| 7347 | void QCPGrid::drawSubGridLines(QCPPainter *painter) const |
| 7348 | { |
| 7349 | if (!mParentAxis) { qDebug() << Q_FUNC_INFO << "invalid parent axis"; return; } |
| 7350 | |
| 7351 | applyAntialiasingHint(painter, mAntialiasedSubGrid, QCP::aeSubGrid); |
| 7352 | double t; // helper variable, result of coordinate-to-pixel transforms |
| 7353 | painter->setPen(mSubGridPen); |
| 7354 | if (mParentAxis->orientation() == Qt::Horizontal) |
| 7355 | { |
| 7356 | for (int i=0; i<mParentAxis->mSubTickVector.size(); ++i) |
| 7357 | { |
| 7358 | t = mParentAxis->coordToPixel(mParentAxis->mSubTickVector.at(i)); // x |
| 7359 | painter->drawLine(QLineF(t, mParentAxis->mAxisRect->bottom(), t, mParentAxis->mAxisRect->top())); |
| 7360 | } |
| 7361 | } else |
| 7362 | { |
| 7363 | for (int i=0; i<mParentAxis->mSubTickVector.size(); ++i) |
| 7364 | { |
| 7365 | t = mParentAxis->coordToPixel(mParentAxis->mSubTickVector.at(i)); // y |
| 7366 | painter->drawLine(QLineF(mParentAxis->mAxisRect->left(), t, mParentAxis->mAxisRect->right(), t)); |
| 7367 | } |
| 7368 | } |
| 7369 | } |
| 7370 | |
| 7371 | |
| 7372 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected