Example #1
0
void
JunctionElementItem::updateObserver()
{
    // Parent //
    //
    JunctionComponentItem::updateObserver();
    if (isInGarbage())
    {
        return; // will be deleted anyway
    }
}
Example #2
0
void
SectionItem::updateObserver()
{
    // Parent first //
    //
    GraphElement::updateObserver();
    if (isInGarbage())
    {
        return; // will be deleted anyway
    }

    // Redraw //
    //
    bool recreatePath = false; // create path only once

    // RoadSection //
    //
    int changes = roadSection_->getRoadSectionChanges();
    if (changes & RoadSection::CRS_SChange)
    {
        // Change of the road coordinate s //
        //
        recreatePath = true;
    }
    if (changes & RoadSection::CRS_LengthChange)
    {
        // Change of the length of the section //
        //
        recreatePath = true;
    }

    // Road //
    //
    int roadChanges = roadSection_->getParentRoad()->getRoadChanges();
    if ((roadChanges & RSystemElementRoad::CRD_TrackSectionChange)
        || (roadChanges & RSystemElementRoad::CRD_LaneSectionChange)
        || (roadChanges & RSystemElementRoad::CRD_ShapeChange))
    {
        // Change of the shape //
        //
        recreatePath = true;
    }

    // Redraw //
    //
    if (recreatePath)
    {
        createPath();
        if (sectionHandle_)
        {
            sectionHandle_->updateTransform();
        }
    }
}
void
SuperelevationSectionPolynomialItem::updateObserver()
{
    // Parent //
    //
    GraphElement::updateObserver();
    if (isInGarbage())
    {
        return; // will be deleted anyway
    }

    // SuperelevationSection //
    //
    int superelevationChanges = superelevationSection_->getSuperelevationSectionChanges();
    if (superelevationChanges & SuperelevationSection::CSE_ParameterChange)
    {
        createPath();
        updateColor();
    }
}
Example #4
0
void
TrackSpArcSItem::updateObserver()
{
    // Parent //
    //
    TrackCompositeItem::updateObserver();
    if (isInGarbage())
    {
        return; // will be deleted anyway
    }

    // Get change flags //
    //
    int changes = trackSpArcS_->getTrackSpArcSChanges();
    if (changes & TrackSpiralArcSpiral::CTV_ParameterChange)
    {
        createPath();
        updateFactorHandle();
    }
}
Example #5
0
/*! \brief Called when the observed DataElement has been changed.
*
*/
void
BridgeItem::updateObserver()
{
    // Parent //
    //
    GraphElement::updateObserver();
    if (isInGarbage())
    {
        return; // will be deleted anyway
    }

    // Bridge //
    //
    int changes = bridge_->getBridgeChanges();

    if ((changes & Bridge::CEL_ParameterChange))
    {
        updatePosition();
    }
}
Example #6
0
void
ObjectTextItem::updateObserver()
{
    // Parent //
    //
    GraphElement::updateObserver();
    if (isInGarbage())
    {
        return; // will be deleted anyway
    }

    // Get change flags //
    //
    int changes = object_->getObjectChanges();

    if (changes & Object::CEL_ParameterChange)
    {
        updatePosition();
        updateName();
    }
}
Example #7
0
void
ObjectSettings::updateObserver()
{

    // Parent //
    //
    SettingsElement::updateObserver();
    if (isInGarbage())
    {
        return; // no need to go on
    }

    // Object //
    //
    int changes = object_->getObjectChanges();

	if ((changes & Object::CEL_ParameterChange) || (changes & Object::CEL_TypeChange))
    {
        updateProperties();
    }
}
Example #8
0
void
SignalSettings::updateObserver()
{

    // Parent //
    //
    SettingsElement::updateObserver();
    if (isInGarbage())
    {
        return; // no need to go on
    }

    // Signal //
    //
    int changes = signal_->getSignalChanges();

    if ((changes & Signal::CEL_ParameterChange) || (changes & Signal::CEL_TypeChange))
    {
        updateProperties();
    }
}
Example #9
0
void
SuperelevationSectionTreeItem::updateObserver()
{

    // Parent //
    //
    SectionTreeItem::updateObserver();

    if (isInGarbage())
    {
        return; // will be deleted anyway
    }

    // SuperelevationSection //
    //
    int changes = superelevationSection_->getSuperelevationSectionChanges();

    if (changes & SuperelevationSection::CSE_ParameterChange)
    {
        updateName();
    }
}
Example #10
0
/*! \brief Called when the observed DataElement has been changed.
*
*/
void
OSCItem::updateObserver()
{
    // Parent //
    //
    GraphElement::updateObserver();
    if (isInGarbage())
    {
        return; // will be deleted anyway
    }

    // Signal //
    //
 /*   int changes = signal_->getSignalChanges();

    if ((changes & Signal::CEL_TypeChange))
    {
        updatePosition();
    }
    else if ((changes & Signal::CEL_ParameterChange))
    {
        updatePosition();
    } */
}
Example #11
0
void
LaneSpeedTreeItem::updateObserver()
{

    // Parent //
    //
    ProjectTreeItem::updateObserver();

    if (isInGarbage())
    {
        return; // will be deleted anyway
    }

    // Lane //
    //
    int changes = laneSpeed_->getLaneSpeedChanges();
    if ((changes & LaneSpeed::CLS_OffsetChanged)
        || (changes & LaneSpeed::CLS_MaxSpeedChanged))
    {
        // Change of the road coordinate s //
        //
        updateName();
    }
}