! Creates a QCPGrid instance and sets default values. You shouldn't instantiate grids on their own, since every QCPAxis brings its own QCPGrid. */
| 7857 | You shouldn't instantiate grids on their own, since every QCPAxis brings its own QCPGrid. |
| 7858 | */ |
| 7859 | QCPGrid::QCPGrid(QCPAxis *parentAxis) : |
| 7860 | QCPLayerable(parentAxis->parentPlot(), QString(), parentAxis), |
| 7861 | mSubGridVisible{}, |
| 7862 | mAntialiasedSubGrid{}, |
| 7863 | mAntialiasedZeroLine{}, |
| 7864 | mParentAxis(parentAxis) |
| 7865 | { |
| 7866 | // warning: this is called in QCPAxis constructor, so parentAxis members should not be accessed/called |
| 7867 | setParent(parentAxis); |
| 7868 | setPen(QPen(QColor(200,200,200), 0, Qt::DotLine)); |
| 7869 | setSubGridPen(QPen(QColor(220,220,220), 0, Qt::DotLine)); |
| 7870 | setZeroLinePen(QPen(QColor(200,200,200), 0, Qt::SolidLine)); |
| 7871 | setSubGridVisible(false); |
| 7872 | setAntialiased(false); |
| 7873 | setAntialiasedSubGrid(false); |
| 7874 | setAntialiasedZeroLine(false); |
| 7875 | } |
| 7876 | |
| 7877 | /*! |
| 7878 | Sets whether grid lines at sub tick marks are drawn. |