Skip to content

Commit

Permalink
improved documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jkriege2 committed Sep 18, 2024
1 parent 7d37140 commit 9b877f9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/jkqtplotter/jkqtpbaseplotter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,10 +821,12 @@ void JKQTBasePlotter::setXY(double xminn, double xmaxx, double yminn, double yma
yAxis->setRange(yminn, ymaxx);

if (affectsSecondaryAxes) {
for (auto ax: getXAxes(false)) {
const auto xaxes=getXAxes(false);
for (auto ax: xaxes) {
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));
}
}
Expand Down
10 changes: 9 additions & 1 deletion lib/jkqtplotter/jkqtpbaseplotter.h
Original file line number Diff line number Diff line change
Expand Up @@ -1771,7 +1771,15 @@ public Q_SLOTS:
/**@}*/

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);

/** \brief emitted when the plot has to be updated */
Expand Down
4 changes: 3 additions & 1 deletion lib/jkqtplotter/jkqtplotter.h
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPlotter: public QWidget {
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 newxmax end of the selected x-range (in plot coordinates)
Expand All @@ -1257,6 +1257,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPlotter: public QWidget {
* \param sender JKQTPlotter sending this event
*
* 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);

Expand Down

0 comments on commit 9b877f9

Please sign in to comment.