Пример #1
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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
0
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
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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;
}
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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
0
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
0
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
0
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;
}
Пример #16
0
void KviWindow::childRemoved(QWidget * pObject)
{
	pObject->removeEventFilter(this);

	if(pObject == m_pFocusHandler)
		m_pFocusHandler = nullptr;
	if(pObject == m_pLastFocusedChild)
		m_pLastFocusedChild = nullptr;

	for(auto & it : pObject->children())
	{
		QObject * pObj = it;
		if(pObj->isWidgetType())
			childRemoved((QWidget *)pObj);
	}
}
Пример #17
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool Origin::removeMagnitude(size_t i) {
	// index out of bounds
	if ( i >= _magnitudes.size() )
		return false;

	// Create the notifiers
	if ( Notifier::IsEnabled() ) {
		NotifierCreator nc(OP_REMOVE);
		_magnitudes[i]->accept(&nc);
	}

	_magnitudes[i]->setParent(NULL);
	childRemoved(_magnitudes[i].get());
	
	_magnitudes.erase(_magnitudes.begin() + i);

	return true;
}
Пример #18
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool StrongMotionParameters::removeStrongOriginDescription(size_t i) {
	// index out of bounds
	if ( i >= _strongOriginDescriptions.size() )
		return false;

	// Create the notifiers
	if ( Notifier::IsEnabled() ) {
		NotifierCreator nc(OP_REMOVE);
		_strongOriginDescriptions[i]->accept(&nc);
	}

	_strongOriginDescriptions[i]->setParent(NULL);
	childRemoved(_strongOriginDescriptions[i].get());
	
	_strongOriginDescriptions.erase(_strongOriginDescriptions.begin() + i);

	return true;
}
Пример #19
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool QualityControl::removeOutage(size_t i) {
	// index out of bounds
	if ( i >= _outages.size() )
		return false;

	// Create the notifiers
	if ( Notifier::IsEnabled() ) {
		NotifierCreator nc(OP_REMOVE);
		_outages[i]->accept(&nc);
	}

	_outages[i]->setParent(NULL);
	childRemoved(_outages[i].get());
	
	_outages.erase(_outages.begin() + i);

	return true;
}
Пример #20
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool Route::removeRouteSeedlink(size_t i) {
	// index out of bounds
	if ( i >= _routeSeedlinks.size() )
		return false;

	// Create the notifiers
	if ( Notifier::IsEnabled() ) {
		NotifierCreator nc(OP_REMOVE);
		_routeSeedlinks[i]->accept(&nc);
	}

	_routeSeedlinks[i]->setParent(NULL);
	childRemoved(_routeSeedlinks[i].get());
	
	_routeSeedlinks.erase(_routeSeedlinks.begin() + i);

	return true;
}
Пример #21
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool EnvelopeChannel::removeEnvelopeValue(size_t i) {
	// index out of bounds
	if ( i >= _envelopeValues.size() )
		return false;

	// Create the notifiers
	if ( Notifier::IsEnabled() ) {
		NotifierCreator nc(OP_REMOVE);
		_envelopeValues[i]->accept(&nc);
	}

	_envelopeValues[i]->setParent(NULL);
	childRemoved(_envelopeValues[i].get());
	
	_envelopeValues.erase(_envelopeValues.begin() + i);

	return true;
}
Пример #22
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool MomentTensor::removeMomentTensorStationContribution(size_t i) {
	// index out of bounds
	if ( i >= _momentTensorStationContributions.size() )
		return false;

	// Create the notifiers
	if ( Notifier::IsEnabled() ) {
		NotifierCreator nc(OP_REMOVE);
		_momentTensorStationContributions[i]->accept(&nc);
	}

	_momentTensorStationContributions[i]->setParent(NULL);
	childRemoved(_momentTensorStationContributions[i].get());
	
	_momentTensorStationContributions.erase(_momentTensorStationContributions.begin() + i);

	return true;
}
Пример #23
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool Pick::removeComment(size_t i) {
	// index out of bounds
	if ( i >= _comments.size() )
		return false;

	// Create the notifiers
	if ( Notifier::IsEnabled() ) {
		NotifierCreator nc(OP_REMOVE);
		_comments[i]->accept(&nc);
	}

	_comments[i]->setParent(NULL);
	childRemoved(_comments[i].get());
	
	_comments.erase(_comments.begin() + i);

	return true;
}
Пример #24
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool StrongOriginDescription::removeEventRecordReference(size_t i) {
	// index out of bounds
	if ( i >= _eventRecordReferences.size() )
		return false;

	// Create the notifiers
	if ( Notifier::IsEnabled() ) {
		NotifierCreator nc(OP_REMOVE);
		_eventRecordReferences[i]->accept(&nc);
	}

	_eventRecordReferences[i]->setParent(NULL);
	childRemoved(_eventRecordReferences[i].get());
	
	_eventRecordReferences.erase(_eventRecordReferences.begin() + i);

	return true;
}
Пример #25
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool Record::removePeakMotion(size_t i) {
	// index out of bounds
	if ( i >= _peakMotions.size() )
		return false;

	// Create the notifiers
	if ( Notifier::IsEnabled() ) {
		NotifierCreator nc(OP_REMOVE);
		_peakMotions[i]->accept(&nc);
	}

	_peakMotions[i]->setParent(NULL);
	childRemoved(_peakMotions[i].get());
	
	_peakMotions.erase(_peakMotions.begin() + i);

	return true;
}
Пример #26
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool StationGroup::removeStationReference(size_t i) {
    // index out of bounds
    if ( i >= _stationReferences.size() )
        return false;

    // Create the notifiers
    if ( Notifier::IsEnabled() ) {
        NotifierCreator nc(OP_REMOVE);
        _stationReferences[i]->accept(&nc);
    }

    _stationReferences[i]->setParent(NULL);
    childRemoved(_stationReferences[i].get());

    _stationReferences.erase(_stationReferences.begin() + i);

    return true;
}
Пример #27
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool Record::removeSimpleFilterChainMember(size_t i) {
	// index out of bounds
	if ( i >= _simpleFilterChainMembers.size() )
		return false;

	// Create the notifiers
	if ( Notifier::IsEnabled() ) {
		NotifierCreator nc(OP_REMOVE);
		_simpleFilterChainMembers[i]->accept(&nc);
	}

	_simpleFilterChainMembers[i]->setParent(NULL);
	childRemoved(_simpleFilterChainMembers[i].get());
	
	_simpleFilterChainMembers.erase(_simpleFilterChainMembers.begin() + i);

	return true;
}
Пример #28
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool EventParameters::removeFocalMechanism(size_t i) {
	// index out of bounds
	if ( i >= _focalMechanisms.size() )
		return false;

	// Create the notifiers
	if ( Notifier::IsEnabled() ) {
		NotifierCreator nc(OP_REMOVE);
		_focalMechanisms[i]->accept(&nc);
	}

	_focalMechanisms[i]->setParent(NULL);
	childRemoved(_focalMechanisms[i].get());
	
	_focalMechanisms.erase(_focalMechanisms.begin() + i);

	return true;
}
Пример #29
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
bool ArclinkLog::removeArclinkUser(size_t i) {
	// index out of bounds
	if ( i >= _arclinkUsers.size() )
		return false;

	// Create the notifiers
	if ( Notifier::IsEnabled() ) {
		NotifierCreator nc(OP_REMOVE);
		_arclinkUsers[i]->accept(&nc);
	}

	_arclinkUsers[i]->setParent(NULL);
	childRemoved(_arclinkUsers[i].get());
	
	_arclinkUsers.erase(_arclinkUsers.begin() + i);

	return true;
}
Пример #30
0
void KviWindow::childRemoved(QWidget * pObject)
{
    pObject->removeEventFilter(this);

    if(pObject == m_pFocusHandler)
        m_pFocusHandler = NULL;
    if(pObject == m_pLastFocusedChild)
        m_pLastFocusedChild = NULL;

    QList<QObject *> list = pObject->children();
    for(QList<QObject *>::Iterator it = list.begin(); it != list.end(); ++it)
    {
        QObject * pObj = *it;
        if(pObj->isWidgetType())
        {
            childRemoved((QWidget *)pObj);
        }
    }
}