예제 #1
0
  void AnalysisObject_Impl::disconnectChild(AnalysisObject& child) const {
    child.clearParent();

    bool disconnected = disconnect(SIGNAL(clean()),
                                   child.getImpl<detail::AnalysisObject_Impl>().get(),
                                   SLOT(onParentClean()));
    BOOST_ASSERT(disconnected);
    disconnected = child.disconnect(SIGNAL(changed(ChangeType)),
                                    this,
                                    SLOT(onChildChanged(ChangeType)));
    BOOST_ASSERT(disconnected);
  }
예제 #2
0
  void AnalysisObject_Impl::connectChild(AnalysisObject& child, bool setParent) const {
    if (setParent) {
      AnalysisObject copyOfThis = getPublicObject<AnalysisObject>();
      child.setParent(copyOfThis);
    }

    bool connected = connect(SIGNAL(clean()),
                             child.getImpl<detail::AnalysisObject_Impl>().get(),
                             SLOT(onParentClean()));
    OS_ASSERT(connected);
    connected = child.connect(SIGNAL(changed(ChangeType)),
                              this,
                              SLOT(onChildChanged(ChangeType)));
    OS_ASSERT(connected);
  }