improved documentation

This commit is contained in:
jkriege2 2024-09-18 14:38:02 +02:00
parent 7d37140837
commit 9b877f9ed6
3 changed files with 16 additions and 4 deletions

View File

@ -821,10 +821,12 @@ void JKQTBasePlotter::setXY(double xminn, double xmaxx, double yminn, double yma
yAxis->setRange(yminn, ymaxx); yAxis->setRange(yminn, ymaxx);
if (affectsSecondaryAxes) { if (affectsSecondaryAxes) {
for (auto ax: getXAxes(false)) { const auto xaxes=getXAxes(false);
for (auto ax: xaxes) {
ax->setRange(ax->p2x(xminpix), ax->p2x(xmaxpix)); ax->setRange(ax->p2x(xminpix), ax->p2x(xmaxpix));
} }
for (auto ax: getYAxes(false)) { const auto yaxes=getYAxes(false);
for (auto ax: yaxes) {
ax->setRange(ax->p2x(yminpix), ax->p2x(ymaxpix)); ax->setRange(ax->p2x(yminpix), ax->p2x(ymaxpix));
} }
} }

View File

@ -1771,7 +1771,15 @@ public Q_SLOTS:
/**@}*/ /**@}*/
Q_SIGNALS: Q_SIGNALS:
/** \brief signal: emitted whenever the user selects a new x-y zoom range (by mouse) */ /** \brief signal: emitted whenever the user selects a new x-y zoom range (in the major axes, e.g. setX(), setY(), setXY(), zoomToFit()... )
*
* \param newxmin start of the selected x-range (in plot coordinates)
* \param newxmax end of the selected x-range (in plot coordinates)
* \param newymin start of the selected x-range (in plot coordinates)
* \param newymax end of the selected x-range (in plot coordinates)
* \param sender JKQTPlotter sending this event
*
*/
void zoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter* sender); void zoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter* sender);
/** \brief emitted when the plot has to be updated */ /** \brief emitted when the plot has to be updated */

View File

@ -1248,7 +1248,7 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPlotter: public QWidget {
void contextMenuOpened(double x, double y, QMenu* contextMenu); void contextMenuOpened(double x, double y, QMenu* contextMenu);
/** \brief signal: emitted whenever the user selects a new x-y zoom range (by mouse) /** \brief signal: emitted whenever the user selects a new x-y zoom range (in the major axes, e.g. by mouse, setX(), setY(), setXY(), zoomToFit()... )
* *
* \param newxmin start of the selected x-range (in plot coordinates) * \param newxmin start of the selected x-range (in plot coordinates)
* \param newxmax end of the selected x-range (in plot coordinates) * \param newxmax end of the selected x-range (in plot coordinates)
@ -1257,6 +1257,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPlotter: public QWidget {
* \param sender JKQTPlotter sending this event * \param sender JKQTPlotter sending this event
* *
* This signal is designed to be connected to these Q_SLOTS: synchronizeXAxis(), synchronizeYAxis(), synchronizeXYAxis() * This signal is designed to be connected to these Q_SLOTS: synchronizeXAxis(), synchronizeYAxis(), synchronizeXYAxis()
*
* \see JKQTBasePlotter::zoomChangedLocally()
*/ */
void zoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQTPlotter* sender); void zoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQTPlotter* sender);