Well then something like this:
void XXX::syncScale(int axis)
{
...
yourScale->setScaleDiv(
plot->axisScaleEngine(axis)->transformation(),
plot->axisWidget(axis)->scaleDiv() );
int startDist, endDist;
yourScale->getBorderDistHint(startDist, endDist);
yourScale->setBorderDist(startDist, endDist);
}
connect(plot->axisWidget(...), SIGNAL(scaleDivChanged(),
..., SLOT(syncScale() );
void XXX::syncScale(int axis)
{
...
yourScale->setScaleDiv(
plot->axisScaleEngine(axis)->transformation(),
plot->axisWidget(axis)->scaleDiv() );
int startDist, endDist;
yourScale->getBorderDistHint(startDist, endDist);
yourScale->setBorderDist(startDist, endDist);
}
connect(plot->axisWidget(...), SIGNAL(scaleDivChanged(),
..., SLOT(syncScale() );
To copy to clipboard, switch view to plain text mode
Bookmarks