SUMO - Simulation of Urban MObility
|
#include <GUITrafficLightLogicWrapper.h>
Data Structures | |
class | GUITrafficLightLogicWrapperPopupMenu |
Public Member Functions | |
void | begin2TrackPhases () |
Builds a GUITLLogicPhasesTrackerWindow which will receive new phases. | |
virtual void | drawGLAdditional (GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const |
Draws additional, user-triggered visualisations. | |
void | drawName (const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const |
int | getLinkIndex (const MSLink *const link) const |
Returns the index of the given link within the according tls. | |
GUITrafficLightLogicWrapper (MSTLLogicControl &control, MSTrafficLightLogic &tll) | |
Constructor. | |
void | showPhases () |
Builds a GUITLLogicPhasesTrackerWindow which displays the phase diagram. | |
void | switchTLSLogic (int to) |
Builds a GUITLLogicPhasesTrackerWindow which displays the phase diagram. | |
~GUITrafficLightLogicWrapper () | |
Destructor. | |
inherited from GUIGlObject | |
GUIGLObjectPopupMenu * | getPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent) |
Returns an own popup-menu. | |
GUIParameterTableWindow * | getParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent) |
Returns an own parameter window. | |
Boundary | getCenteringBoundary () const |
Returns the boundary to which the view shall be centered in order to show the object. | |
void | drawGL (const GUIVisualizationSettings &s) const |
Draws the object. | |
Atomar getter methods | |
const std::string & | getFullName () const |
Returns the full name appearing in the tool tip. | |
GUIGlID | getGlID () const |
Returns the numerical id of the object. | |
interfaces to be implemented by derived classes | |
const std::string & | getMicrosimID () const |
Returns the id of the object as known to microsim. | |
void | setMicrosimID (const std::string &newID) |
Changes the microsimID of the object (happens in NETEDIT) | |
GUIGlObjectType | getType () const |
Returns the type of the object as coded in GUIGlObjectType. | |
Parameter table window I/O | |
void | addParameterTable (GUIParameterTableWindow *w) |
Lets this object know a parameter window showing the object's values was opened. | |
void | removeParameterTable (GUIParameterTableWindow *w) |
Lets this object know a parameter window showing the object's values was closed. |
Static Public Attributes | |
static StringBijection < GUIGlObjectType > | TypeNames |
associates object types with strings |
Protected Member Functions | |
void | setPrefix (const std::string &prefix) |
helper methods for building popup-menus | |
void | buildPopupHeader (GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true) |
Builds the header. | |
void | buildCenterPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to center to the object. | |
void | buildNameCopyPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds entries which allow to copy the name / typed name into the clipboard. | |
void | buildSelectionPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to (de)select the object. | |
void | buildShowParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to open the parameter window. | |
void | buildPositionCopyEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position. | |
void | buildShowManipulatorPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to open the manipulator window. |
Private Attributes | |
GUIMainWindow * | myApp |
The main application. | |
MSTrafficLightLogic & | myTLLogic |
The wrapped tl-logic. | |
MSTLLogicControl & | myTLLogicControl |
Reference to the according tls. |
This class is responsible for the visualisation of tl-logics and the interaction with them.
Definition at line 55 of file GUITrafficLightLogicWrapper.h.
GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapper | ( | MSTLLogicControl & | control, |
MSTrafficLightLogic & | tll | ||
) |
Constructor.
Definition at line 130 of file GUITrafficLightLogicWrapper.cpp.
GUITrafficLightLogicWrapper::~GUITrafficLightLogicWrapper | ( | ) |
Destructor.
Definition at line 136 of file GUITrafficLightLogicWrapper.cpp.
|
inherited |
Lets this object know a parameter window showing the object's values was opened.
[in] | w | The opened parameter window |
Definition at line 187 of file GUIGlObject.cpp.
References GUIGlObject::myParamWindows.
void GUITrafficLightLogicWrapper::begin2TrackPhases | ( | ) |
Builds a GUITLLogicPhasesTrackerWindow which will receive new phases.
Definition at line 173 of file GUITrafficLightLogicWrapper.cpp.
References GUITLLogicPhasesTrackerWindow::create(), Named::getID(), MSNet::getInstance(), MSTLLogicControl::getPhaseDef(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), myApp, and myTLLogic.
Referenced by GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdBegin2TrackPhases().
|
protectedinherited |
Builds an entry which allows to center to the object.
in,filled] | ret The popup menu to add the entry to | |
[in] | addSeparator | Whether a separator shall be added, too |
Definition at line 125 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_RECENTERVIEW, and MID_CENTER.
Referenced by GUIDetectorWrapper::getPopUpMenu(), getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIVehicle::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds entries which allow to copy the name / typed name into the clipboard.
in,filled] | ret The popup menu to add the entry to | |
[in] | addSeparator | Whether a separator shall be added, too |
Definition at line 134 of file GUIGlObject.cpp.
References MID_COPY_NAME, and MID_COPY_TYPED_NAME.
Referenced by GUIDetectorWrapper::getPopUpMenu(), getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIVehicle::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIEdge::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds the header.
in,filled] | ret The popup menu to add the entry to | |
[in] | addSeparator | Whether a separator shall be added, too |
Definition at line 115 of file GUIGlObject.cpp.
References GUIMainWindow::getBoldFont(), and GUIGlObject::getFullName().
Referenced by GUIDetectorWrapper::getPopUpMenu(), getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIVehicle::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
in,filled] | ret The popup menu to add the entry to | |
[in] | addSeparator | Whether a separator shall be added, too |
Definition at line 166 of file GUIGlObject.cpp.
References GeoConvHelper::getFinal(), MID_COPY_CURSOR_GEOPOSITION, and MID_COPY_CURSOR_POSITION.
Referenced by GUIDetectorWrapper::getPopUpMenu(), getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIVehicle::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to (de)select the object.
in,filled] | ret The popup menu to add the entry to | |
[in] | addSeparator | Whether a separator shall be added, too |
Definition at line 144 of file GUIGlObject.cpp.
References GUIGlObject::getGlID(), GUIIconSubSys::getIcon(), GUIGlObject::getType(), gSelected, ICON_FLAG_MINUS, ICON_FLAG_PLUS, GUISelectedStorage::isSelected(), MID_ADDSELECT, and MID_REMOVESELECT.
Referenced by GUIDetectorWrapper::getPopUpMenu(), getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIVehicle::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIEdge::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to open the manipulator window.
in,filled] | ret The popup menu to add the entry to | |
[in] | addSeparator | Whether a separator shall be added, too |
Definition at line 178 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_MANIP, and MID_MANIP.
Referenced by GUILaneSpeedTrigger::getPopUpMenu(), and GUITriggeredRerouter::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to open the parameter window.
in,filled] | ret The popup menu to add the entry to | |
[in] | addSeparator | Whether a separator shall be added, too |
Definition at line 157 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWPARS.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIVehicle::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), and GUILane::getPopUpMenu().
|
virtual |
Draws the object.
[in] | s | The settings for the current view (may influence drawing) |
Implements GUIGlObject.
Definition at line 237 of file GUITrafficLightLogicWrapper.cpp.
References GLHelper::drawFilledCircle(), GUIVisualizationSettings::gaming, MSTrafficLightLogic::getCurrentPhaseDef(), MSTrafficLightLogic::getCurrentPhaseIndex(), MSNet::getInstance(), MSTrafficLightLogic::getLanesAt(), MSTrafficLightLogic::getPhases(), MSPhaseDefinition::getState(), GLO_MAX, LINKSTATE_TL_GREEN_MAJOR, LINKSTATE_TL_GREEN_MINOR, myTLLogic, Position::x(), and Position::y().
|
inlinevirtualinherited |
Draws additional, user-triggered visualisations.
[in] | parent | The view |
[in] | s | The settings for the current view (may influence drawing) |
Reimplemented in GUIVehicle, and GUIPerson.
Definition at line 182 of file GUIGlObject.h.
References UNUSED_PARAMETER.
|
inherited |
Definition at line 214 of file GUIGlObject.cpp.
References GUIVisualizationTextSettings::color, GLHelper::drawText(), GUIGlObject::getMicrosimID(), GLO_MAX, GUIVisualizationTextSettings::show, and GUIVisualizationTextSettings::size.
Referenced by GUIPerson::drawGL(), GUIPolygon::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GUIPointOfInterest::drawGL(), GUIJunctionWrapper::drawGL(), GUIVehicle::drawGL(), GUIBusStop::drawGL(), and GUIEdge::drawGL().
|
virtual |
Returns the boundary to which the view shall be centered in order to show the object.
Implements GUIGlObject.
Definition at line 202 of file GUITrafficLightLogicWrapper.cpp.
References Boundary::add(), MSTrafficLightLogic::getLaneVectors(), Boundary::grow(), and myTLLogic.
|
inlineinherited |
Returns the full name appearing in the tool tip.
Definition at line 107 of file GUIGlObject.h.
References GUIGlObject::myFullName.
Referenced by GUIGlObject::buildPopupHeader(), GUIGlObject_AbstractAdd::GUIGlObject_AbstractAdd(), GUIGLObjectPopupMenu::onCmdCopyTypedName(), GUIParam_PopupMenuInterface::onCmdOpenTracker(), GUILaneSpeedTrigger::openManipulator(), GUICalibrator::openManipulator(), GUITriggeredRerouter::openManipulator(), GUIDialog_GLChosenEditor::rebuildList(), GUIGlObject_AbstractAdd::remove(), GUISelectedStorage::save(), and GUISUMOAbstractView::showToolTipFor().
|
inlineinherited |
Returns the numerical id of the object.
Definition at line 115 of file GUIGlObject.h.
References GUIGlObject::myGlID.
Referenced by GUIGlObject::buildSelectionPopupEntry(), GUINet::createTLWrapper(), GUIPerson::drawGL(), GUIPolygon::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GUIPointOfInterest::drawGL(), GUIJunctionWrapper::drawGL(), GUIVehicle::drawGL(), GUIBusStop::drawGL(), GUIEdge::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GUIPerson::drawGLAdditional(), GUIVehicle::drawGLAdditional(), GUILane::drawLinkRule(), GUIPerson::getColorValue(), GUILane::getColorValue(), GUIVehicle::getColorValue(), GUIEdge::getIDs(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIVehicle::getPopUpMenu(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GUIGlChildWindow::isSelected(), GUISUMOViewParent::isSelected(), GUISelectedStorage::loadIDs(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCenter(), GUIApplicationWindow::onCmdEditChosen(), GUIGLObjectPopupMenu::onCmdRemoveSelected(), GUIVehicle::GUIVehiclePopupMenu::onCmdStartTrack(), GUISUMOAbstractView::removeAdditionalGLVisualisation(), GLObjectValuePassConnector< std::pair< SUMOTime, MSPhaseDefinition > >::removeObject(), GUIVehicle::selectBlockingFoes(), and GUIGlObject::~GUIGlObject().
Returns the index of the given link within the according tls.
Definition at line 231 of file GUITrafficLightLogicWrapper.cpp.
References MSTrafficLightLogic::getLinkIndex(), and myTLLogic.
|
inlineinherited |
Returns the id of the object as known to microsim.
Definition at line 146 of file GUIGlObject.h.
References GUIGlObject::myMicrosimID.
Referenced by GUIGlObject::createFullName(), GUIGlObject::drawName(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), and GUIGLObjectPopupMenu::onCmdCopyName().
|
virtual |
Returns an own parameter window.
[in] | app | The application needed to build the parameter window |
[in] | parent | The parent window needed to build the parameter window |
Implements GUIGlObject.
Definition at line 195 of file GUITrafficLightLogicWrapper.cpp.
|
virtual |
Returns an own popup-menu.
[in] | app | The application needed to build the popup-menu |
[in] | parent | The parent window needed to build the popup-menu |
Implements GUIGlObject.
Definition at line 140 of file GUITrafficLightLogicWrapper.cpp.
References GUIGlObject::buildCenterPopupEntry(), GUIGlObject::buildNameCopyPopupEntry(), GUIGlObject::buildPopupHeader(), GUIGlObject::buildPositionCopyEntry(), GUIGlObject::buildSelectionPopupEntry(), MSTLLogicControl::get(), MSTLLogicControl::TLSLogicVariants::getAllLogics(), GUIIconSubSys::getIcon(), Named::getID(), ICON_FLAG_MINUS, MSTLLogicControl::TLSLogicVariants::isActive(), MID_SHOWPHASES, MID_SWITCH, MID_SWITCH_OFF, MID_TRACKPHASES, myApp, myTLLogic, and myTLLogicControl.
|
inlineinherited |
Returns the type of the object as coded in GUIGlObjectType.
Definition at line 159 of file GUIGlObject.h.
References GUIGlObject::myGLObjectType.
Referenced by GUIGlObject::buildSelectionPopupEntry(), GUIVehicle::drawAction_drawRailCarriages(), GUIPerson::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GUIJunctionWrapper::drawGL(), GUIVehicle::drawGL(), GUIBusStop::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GUIVehicle::drawGLAdditional(), GUILane::getColorValue(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIGlChildWindow::isSelected(), GUISUMOViewParent::isSelected(), GUISelectedStorage::loadIDs(), LayeredRTree::selectLayer(), and GUISelectedStorage::toggleSelection().
|
inherited |
Lets this object know a parameter window showing the object's values was closed.
[in] | w | The closed parameter window |
Definition at line 193 of file GUIGlObject.cpp.
References GUIGlObject::myParamWindows.
Referenced by GUIParameterTableWindow::~GUIParameterTableWindow().
|
inherited |
Changes the microsimID of the object (happens in NETEDIT)
Definition at line 108 of file GUIGlObject.cpp.
References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myMicrosimID.
|
protectedinherited |
Definition at line 202 of file GUIGlObject.cpp.
References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myPrefix.
void GUITrafficLightLogicWrapper::showPhases | ( | ) |
Builds a GUITLLogicPhasesTrackerWindow which displays the phase diagram.
Definition at line 184 of file GUITrafficLightLogicWrapper.cpp.
References GUITLLogicPhasesTrackerWindow::create(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), myApp, myTLLogic, and GUITLLogicPhasesTrackerWindow::setBeginTime().
Referenced by GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdShowPhases().
void GUITrafficLightLogicWrapper::switchTLSLogic | ( | int | to | ) |
Builds a GUITLLogicPhasesTrackerWindow which displays the phase diagram.
Definition at line 217 of file GUITrafficLightLogicWrapper.cpp.
References GUINet::createTLWrapper(), MSTLLogicControl::get(), MSTLLogicControl::getActive(), MSTLLogicControl::TLSLogicVariants::getAllLogics(), GUINet::getGUIInstance(), Named::getID(), myTLLogic, myTLLogicControl, and MSTLLogicControl::switchTo().
Referenced by GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLS2Off(), and GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLSLogic().
|
private |
The main application.
Definition at line 158 of file GUITrafficLightLogicWrapper.h.
Referenced by begin2TrackPhases(), getPopUpMenu(), and showPhases().
|
private |
The wrapped tl-logic.
Definition at line 155 of file GUITrafficLightLogicWrapper.h.
Referenced by begin2TrackPhases(), drawGL(), getCenteringBoundary(), getLinkIndex(), getPopUpMenu(), showPhases(), and switchTLSLogic().
|
private |
Reference to the according tls.
Definition at line 152 of file GUITrafficLightLogicWrapper.h.
Referenced by getPopUpMenu(), and switchTLSLogic().
|
staticinherited |
associates object types with strings
Definition at line 99 of file GUIGlObject.h.