本文整理汇总了C++中childRemoved函数的典型用法代码示例。如果您正苦于以下问题:C++ childRemoved函数的具体用法?C++ childRemoved怎么用?C++ childRemoved使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了childRemoved函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SEISCOMP_ERROR
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool EnvelopeChannel::remove(EnvelopeValue* envelopeValue) {
if ( envelopeValue == NULL )
return false;
if ( envelopeValue->parent() != this ) {
SEISCOMP_ERROR("EnvelopeChannel::remove(EnvelopeValue*) -> element has another parent");
return false;
}
std::vector<EnvelopeValuePtr>::iterator it;
it = std::find(_envelopeValues.begin(), _envelopeValues.end(), envelopeValue);
// Element has not been found
if ( it == _envelopeValues.end() ) {
SEISCOMP_ERROR("EnvelopeChannel::remove(EnvelopeValue*) -> child object has not been found although the parent pointer matches???");
return false;
}
// Create the notifiers
if ( Notifier::IsEnabled() ) {
NotifierCreator nc(OP_REMOVE);
(*it)->accept(&nc);
}
(*it)->setParent(NULL);
childRemoved((*it).get());
_envelopeValues.erase(it);
return true;
}
示例2: SEISCOMP_ERROR
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool Record::remove(SimpleFilterChainMember* simpleFilterChainMember) {
if ( simpleFilterChainMember == NULL )
return false;
if ( simpleFilterChainMember->parent() != this ) {
SEISCOMP_ERROR("Record::remove(SimpleFilterChainMember*) -> element has another parent");
return false;
}
std::vector<SimpleFilterChainMemberPtr>::iterator it;
it = std::find(_simpleFilterChainMembers.begin(), _simpleFilterChainMembers.end(), simpleFilterChainMember);
// Element has not been found
if ( it == _simpleFilterChainMembers.end() ) {
SEISCOMP_ERROR("Record::remove(SimpleFilterChainMember*) -> child object has not been found although the parent pointer matches???");
return false;
}
// Create the notifiers
if ( Notifier::IsEnabled() ) {
NotifierCreator nc(OP_REMOVE);
(*it)->accept(&nc);
}
(*it)->setParent(NULL);
childRemoved((*it).get());
_simpleFilterChainMembers.erase(it);
return true;
}
示例3: switch
bool KviWindow::eventFilter(QObject * pObject, QEvent * pEvent)
{
switch(pEvent->type())
{
case QEvent::FocusIn:
// a child got focused
m_pLastFocusedChild = (QWidget *)pObject;
if(g_pActiveWindow != this)
g_pMainWindow->windowActivated(this);
break;
case QEvent::Enter:
// this is a handler moved here from KviMdiChild::eventFilter
if(QApplication::overrideCursor())
QApplication::restoreOverrideCursor();
break;
case QEvent::ChildAdded:
if(((QChildEvent *)pEvent)->child()->isWidgetType())
childInserted((QWidget *)((QChildEvent *)pEvent)->child());
break;
case QEvent::ChildRemoved:
if(((QChildEvent *)pEvent)->child()->isWidgetType())
childRemoved((QWidget *)((QChildEvent *)pEvent)->child());
break;
default: /* make gcc happy */
break;
}
return false;
}
示例4: SEISCOMP_ERROR
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool QualityControl::remove(Outage* outage) {
if ( outage == NULL )
return false;
if ( outage->parent() != this ) {
SEISCOMP_ERROR("QualityControl::remove(Outage*) -> element has another parent");
return false;
}
std::vector<OutagePtr>::iterator it;
it = std::find(_outages.begin(), _outages.end(), outage);
// Element has not been found
if ( it == _outages.end() ) {
SEISCOMP_ERROR("QualityControl::remove(Outage*) -> child object has not been found although the parent pointer matches???");
return false;
}
// Create the notifiers
if ( Notifier::IsEnabled() ) {
NotifierCreator nc(OP_REMOVE);
(*it)->accept(&nc);
}
(*it)->setParent(NULL);
childRemoved((*it).get());
_outages.erase(it);
return true;
}
示例5: SEISCOMP_ERROR
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool Route::remove(RouteSeedlink* routeSeedlink) {
if ( routeSeedlink == NULL )
return false;
if ( routeSeedlink->parent() != this ) {
SEISCOMP_ERROR("Route::remove(RouteSeedlink*) -> element has another parent");
return false;
}
std::vector<RouteSeedlinkPtr>::iterator it;
it = std::find(_routeSeedlinks.begin(), _routeSeedlinks.end(), routeSeedlink);
// Element has not been found
if ( it == _routeSeedlinks.end() ) {
SEISCOMP_ERROR("Route::remove(RouteSeedlink*) -> child object has not been found although the parent pointer matches???");
return false;
}
// Create the notifiers
if ( Notifier::IsEnabled() ) {
NotifierCreator nc(OP_REMOVE);
(*it)->accept(&nc);
}
(*it)->setParent(NULL);
childRemoved((*it).get());
_routeSeedlinks.erase(it);
return true;
}
示例6: SEISCOMP_ERROR
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool EventParameters::remove(FocalMechanism* focalMechanism) {
if ( focalMechanism == NULL )
return false;
if ( focalMechanism->parent() != this ) {
SEISCOMP_ERROR("EventParameters::remove(FocalMechanism*) -> element has another parent");
return false;
}
std::vector<FocalMechanismPtr>::iterator it;
it = std::find(_focalMechanisms.begin(), _focalMechanisms.end(), focalMechanism);
// Element has not been found
if ( it == _focalMechanisms.end() ) {
SEISCOMP_ERROR("EventParameters::remove(FocalMechanism*) -> child object has not been found although the parent pointer matches???");
return false;
}
// Create the notifiers
if ( Notifier::IsEnabled() ) {
NotifierCreator nc(OP_REMOVE);
(*it)->accept(&nc);
}
(*it)->setParent(NULL);
childRemoved((*it).get());
_focalMechanisms.erase(it);
return true;
}
示例7: SEISCOMP_ERROR
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool StrongMotionParameters::remove(StrongOriginDescription* strongOriginDescription) {
if ( strongOriginDescription == NULL )
return false;
if ( strongOriginDescription->parent() != this ) {
SEISCOMP_ERROR("StrongMotionParameters::remove(StrongOriginDescription*) -> element has another parent");
return false;
}
std::vector<StrongOriginDescriptionPtr>::iterator it;
it = std::find(_strongOriginDescriptions.begin(), _strongOriginDescriptions.end(), strongOriginDescription);
// Element has not been found
if ( it == _strongOriginDescriptions.end() ) {
SEISCOMP_ERROR("StrongMotionParameters::remove(StrongOriginDescription*) -> child object has not been found although the parent pointer matches???");
return false;
}
// Create the notifiers
if ( Notifier::IsEnabled() ) {
NotifierCreator nc(OP_REMOVE);
(*it)->accept(&nc);
}
(*it)->setParent(NULL);
childRemoved((*it).get());
_strongOriginDescriptions.erase(it);
return true;
}
示例8: SEISCOMP_ERROR
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool Origin::remove(Magnitude* magnitude) {
if ( magnitude == NULL )
return false;
if ( magnitude->parent() != this ) {
SEISCOMP_ERROR("Origin::remove(Magnitude*) -> element has another parent");
return false;
}
std::vector<MagnitudePtr>::iterator it;
it = std::find(_magnitudes.begin(), _magnitudes.end(), magnitude);
// Element has not been found
if ( it == _magnitudes.end() ) {
SEISCOMP_ERROR("Origin::remove(Magnitude*) -> child object has not been found although the parent pointer matches???");
return false;
}
// Create the notifiers
if ( Notifier::IsEnabled() ) {
NotifierCreator nc(OP_REMOVE);
(*it)->accept(&nc);
}
(*it)->setParent(NULL);
childRemoved((*it).get());
_magnitudes.erase(it);
return true;
}
示例9: SEISCOMP_ERROR
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool Reading::remove(PickReference* pickReference) {
if ( pickReference == NULL )
return false;
if ( pickReference->parent() != this ) {
SEISCOMP_ERROR("Reading::remove(PickReference*) -> element has another parent");
return false;
}
std::vector<PickReferencePtr>::iterator it;
it = std::find(_pickReferences.begin(), _pickReferences.end(), pickReference);
// Element has not been found
if ( it == _pickReferences.end() ) {
SEISCOMP_ERROR("Reading::remove(PickReference*) -> child object has not been found although the parent pointer matches???");
return false;
}
// Create the notifiers
if ( Notifier::IsEnabled() ) {
NotifierCreator nc(OP_REMOVE);
(*it)->accept(&nc);
}
(*it)->setParent(NULL);
childRemoved((*it).get());
_pickReferences.erase(it);
return true;
}
示例10: SEISCOMP_ERROR
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool MomentTensorStationContribution::remove(MomentTensorComponentContribution* momentTensorComponentContribution) {
if ( momentTensorComponentContribution == NULL )
return false;
if ( momentTensorComponentContribution->parent() != this ) {
SEISCOMP_ERROR("MomentTensorStationContribution::remove(MomentTensorComponentContribution*) -> element has another parent");
return false;
}
std::vector<MomentTensorComponentContributionPtr>::iterator it;
it = std::find(_momentTensorComponentContributions.begin(), _momentTensorComponentContributions.end(), momentTensorComponentContribution);
// Element has not been found
if ( it == _momentTensorComponentContributions.end() ) {
SEISCOMP_ERROR("MomentTensorStationContribution::remove(MomentTensorComponentContribution*) -> child object has not been found although the parent pointer matches???");
return false;
}
// Create the notifiers
if ( Notifier::IsEnabled() ) {
NotifierCreator nc(OP_REMOVE);
(*it)->accept(&nc);
}
(*it)->setParent(NULL);
childRemoved((*it).get());
_momentTensorComponentContributions.erase(it);
return true;
}
示例11: SEISCOMP_ERROR
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool Pick::remove(Comment* comment) {
if ( comment == NULL )
return false;
if ( comment->parent() != this ) {
SEISCOMP_ERROR("Pick::remove(Comment*) -> element has another parent");
return false;
}
std::vector<CommentPtr>::iterator it;
it = std::find(_comments.begin(), _comments.end(), comment);
// Element has not been found
if ( it == _comments.end() ) {
SEISCOMP_ERROR("Pick::remove(Comment*) -> child object has not been found although the parent pointer matches???");
return false;
}
// Create the notifiers
if ( Notifier::IsEnabled() ) {
NotifierCreator nc(OP_REMOVE);
(*it)->accept(&nc);
}
(*it)->setParent(NULL);
childRemoved((*it).get());
_comments.erase(it);
return true;
}
示例12: SEISCOMP_ERROR
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool MomentTensor::remove(DataUsed* dataUsed) {
if ( dataUsed == NULL )
return false;
if ( dataUsed->parent() != this ) {
SEISCOMP_ERROR("MomentTensor::remove(DataUsed*) -> element has another parent");
return false;
}
std::vector<DataUsedPtr>::iterator it;
it = std::find(_dataUseds.begin(), _dataUseds.end(), dataUsed);
// Element has not been found
if ( it == _dataUseds.end() ) {
SEISCOMP_ERROR("MomentTensor::remove(DataUsed*) -> child object has not been found although the parent pointer matches???");
return false;
}
// Create the notifiers
if ( Notifier::IsEnabled() ) {
NotifierCreator nc(OP_REMOVE);
(*it)->accept(&nc);
}
(*it)->setParent(NULL);
childRemoved((*it).get());
_dataUseds.erase(it);
return true;
}
示例13: childRemoved
void KviWindow::childEvent(QChildEvent * pEvent)
{
if(pEvent->child()->isWidgetType())
{
if(pEvent->removed())
childRemoved((QWidget *)(pEvent->child()));
else
childInserted((QWidget *)(pEvent->child()));
}
QWidget::childEvent(pEvent);
}
示例14: disconnect
void Item::removeChild( Item *child )
{
if ( !child || !m_children.contains(child) )
return;
m_children.removeAll(child);
disconnect( child, SIGNAL(removed(Item* )), this, SLOT(removeChild(Item* )) );
childRemoved(child);
p_itemDocument->slotUpdateZOrdering();
}
示例15: switch
bool KviWindow::eventFilter(QObject * pObject, QEvent * pEvent)
{
switch(pEvent->type())
{
case QEvent::FocusIn:
// a child got focused
m_pLastFocusedChild = (QWidget *)pObject;
if(g_pActiveWindow != this)
g_pMainWindow->childWindowActivated(this);
break;
case QEvent::Enter:
// this is a handler moved here from KviMdiChild::eventFilter
if(QApplication::overrideCursor())
QApplication::restoreOverrideCursor();
break;
#if 0
case QEvent::MouseButtonPress:
if((((QWidget *)pObject)->focusPolicy() == Qt::NoFocus) ||
(((QWidget *)pObject)->focusPolicy() == Qt::TabFocus))
{
// this will not focus our window
// set the focus to the focus handler
if(m_pLastFocusedChild)
{
if(m_pLastFocusedChild->hasFocus() && m_pLastFocusedChild->isVisible())
return false;
}
if(m_pFocusHandler)
m_pFocusHandler->setFocus();
else
setFocus(); // we grab the focus (someone must do it, damn :D)
}
break;
#endif
case QEvent::ChildAdded:
if(((QChildEvent *)pEvent)->child()->isWidgetType())
childInserted((QWidget *)((QChildEvent *)pEvent)->child());
break;
case QEvent::ChildRemoved:
if(((QChildEvent *)pEvent)->child()->isWidgetType())
childRemoved((QWidget *)((QChildEvent *)pEvent)->child());
break;
default: /* make gcc happy */
break;
}
return false;
}