5 class Observer::_ObserverImpl{
10 void stopObserving(
Subject *sub);
20 Observer::Observer(QObject *parent) : QObject(parent)
21 ,_pimpl{std::make_unique<Observer::_ObserverImpl>(
this)}
26 void Observer::observe(
Subject *sub)
31 void Observer::stopObserving(
Subject *sub)
33 _pimpl->stopObserving(sub);
38 Observer::_ObserverImpl::_ObserverImpl(
Observer *
const ptr):_ptr{ptr}
43 void Observer::_ObserverImpl::observe(
Subject *sub)
47 sub->addObserver(_ptr);
50 void Observer::_ObserverImpl::stopObserving(
Subject *sub)
54 sub->removeObserver(_ptr);