void TimelineAbstractRenderer::setZoomer(TimelineZoomControl *zoomer)
{
    Q_D(TimelineAbstractRenderer);
    if (zoomer != d->zoomer) {
        if (d->zoomer != 0)
            disconnect(d->zoomer, &TimelineZoomControl::windowChanged, this, &QQuickItem::update);
        d->zoomer = zoomer;
        if (d->zoomer != 0)
            connect(d->zoomer, &TimelineZoomControl::windowChanged, this, &QQuickItem::update);
        emit zoomerChanged(zoomer);
        update();
    }
}
void TimelineAbstractRenderer::setZoomer(TimelineZoomControl *zoomer)
{
    Q_D(TimelineAbstractRenderer);
    if (zoomer != d->zoomer) {
        if (d->zoomer) {
            disconnect(d->zoomer, &TimelineZoomControl::windowChanged, this, &QQuickItem::update);
            disconnect(d->zoomer, &QObject::destroyed, this, nullptr);
        }
        d->zoomer = zoomer;
        if (d->zoomer) {
            connect(d->zoomer, &TimelineZoomControl::windowChanged, this, &QQuickItem::update);
            connect(d->zoomer, &QObject::destroyed, this, [this, d]() {
                // Weak pointers are supposed to be notified before the destroyed() signal is sent.
                Q_ASSERT(d->zoomer.isNull());
                emit zoomerChanged(d->zoomer);
                update();
            });
        }
        emit zoomerChanged(zoomer);
        update();
    }
}
void TimelineAbstractRenderer::setZoomer(TimelineZoomControl *zoomer)
{
    Q_D(TimelineAbstractRenderer);
    if (zoomer != d->zoomer) {
        if (d->zoomer != 0)
            disconnect(d->zoomer, SIGNAL(windowChanged(qint64,qint64)), this, SLOT(update()));
        d->zoomer = zoomer;
        if (d->zoomer != 0)
            connect(d->zoomer, SIGNAL(windowChanged(qint64,qint64)), this, SLOT(update()));
        emit zoomerChanged(zoomer);
        update();
    }
}