! Convenience function to create an axis on each side that doesn't have any axes yet and set their visibility to true. Further, the top/right axes are assigned the following properties of the bottom/left axes: \li range (\ref QCPAxis::setRange) \li range reversed (\ref QCPAxis::setRangeReversed) \li scale type (\ref QCPAxis::setScaleType) \li tick visibility (\ref QCPAxis::setTicks)
| 17074 | and left axes are connected to the \ref QCPAxis::setRange slots of the top and right axes. |
| 17075 | */ |
| 17076 | void QCPAxisRect::setupFullAxesBox(bool connectRanges) |
| 17077 | { |
| 17078 | QCPAxis *xAxis, *yAxis, *xAxis2, *yAxis2; |
| 17079 | if (axisCount(QCPAxis::atBottom) == 0) |
| 17080 | xAxis = addAxis(QCPAxis::atBottom); |
| 17081 | else |
| 17082 | xAxis = axis(QCPAxis::atBottom); |
| 17083 | |
| 17084 | if (axisCount(QCPAxis::atLeft) == 0) |
| 17085 | yAxis = addAxis(QCPAxis::atLeft); |
| 17086 | else |
| 17087 | yAxis = axis(QCPAxis::atLeft); |
| 17088 | |
| 17089 | if (axisCount(QCPAxis::atTop) == 0) |
| 17090 | xAxis2 = addAxis(QCPAxis::atTop); |
| 17091 | else |
| 17092 | xAxis2 = axis(QCPAxis::atTop); |
| 17093 | |
| 17094 | if (axisCount(QCPAxis::atRight) == 0) |
| 17095 | yAxis2 = addAxis(QCPAxis::atRight); |
| 17096 | else |
| 17097 | yAxis2 = axis(QCPAxis::atRight); |
| 17098 | |
| 17099 | xAxis->setVisible(true); |
| 17100 | yAxis->setVisible(true); |
| 17101 | xAxis2->setVisible(true); |
| 17102 | yAxis2->setVisible(true); |
| 17103 | xAxis2->setTickLabels(false); |
| 17104 | yAxis2->setTickLabels(false); |
| 17105 | |
| 17106 | xAxis2->setRange(xAxis->range()); |
| 17107 | xAxis2->setRangeReversed(xAxis->rangeReversed()); |
| 17108 | xAxis2->setScaleType(xAxis->scaleType()); |
| 17109 | xAxis2->setTicks(xAxis->ticks()); |
| 17110 | xAxis2->setNumberFormat(xAxis->numberFormat()); |
| 17111 | xAxis2->setNumberPrecision(xAxis->numberPrecision()); |
| 17112 | xAxis2->ticker()->setTickCount(xAxis->ticker()->tickCount()); |
| 17113 | xAxis2->ticker()->setTickOrigin(xAxis->ticker()->tickOrigin()); |
| 17114 | |
| 17115 | yAxis2->setRange(yAxis->range()); |
| 17116 | yAxis2->setRangeReversed(yAxis->rangeReversed()); |
| 17117 | yAxis2->setScaleType(yAxis->scaleType()); |
| 17118 | yAxis2->setTicks(yAxis->ticks()); |
| 17119 | yAxis2->setNumberFormat(yAxis->numberFormat()); |
| 17120 | yAxis2->setNumberPrecision(yAxis->numberPrecision()); |
| 17121 | yAxis2->ticker()->setTickCount(yAxis->ticker()->tickCount()); |
| 17122 | yAxis2->ticker()->setTickOrigin(yAxis->ticker()->tickOrigin()); |
| 17123 | |
| 17124 | if (connectRanges) |
| 17125 | { |
| 17126 | connect(xAxis, SIGNAL(rangeChanged(QCPRange)), xAxis2, SLOT(setRange(QCPRange))); |
| 17127 | connect(yAxis, SIGNAL(rangeChanged(QCPRange)), yAxis2, SLOT(setRange(QCPRange))); |
| 17128 | } |
| 17129 | } |
| 17130 | |
| 17131 | /*! |
| 17132 | Returns a list of all the plottables that are associated with this axis rect. |
nothing calls this directly
no test coverage detected