![]() |
SUMO - Simulation of Urban MObility
|
#include <GNEProhibitionFrame.h>
Public Member Functions | |
void | focusUpperElement () |
focus upper element of frame More... | |
FXFont * | getFrameHeaderFont () const |
get font of the header's frame More... | |
FXLabel * | getFrameHeaderLabel () const |
get the label for the frame's header More... | |
GNEViewNet * | getViewNet () const |
get view net More... | |
GNEProhibitionFrame (FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet) | |
FOX-declaration. More... | |
void | handleProhibitionClick (const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor) |
handle prohibitions and set the relative colouring More... | |
void | hide () |
hide prohibition frame More... | |
void | setFrameWidth (int newWidth) |
set width of GNEFrame More... | |
void | show () |
show prohibition frame More... | |
~GNEProhibitionFrame () | |
Destructor. More... | |
Protected Member Functions | |
virtual bool | buildShape () |
build a shaped element using the drawed shape (can be reimplemented in frame childs) return true if was sucesfully created More... | |
virtual void | disableModuls () |
disable moduls if element selected in itemSelector isn't valid (can be reimplemented in frame childs) More... | |
virtual void | enableModuls (const GNEAttributeCarrier::TagProperties &tagProperties) |
enable moduls depending of item selected in ItemSelector (can be reimplemented in frame childs) More... | |
const RGBColor & | getEdgeCandidateColor () const |
get edge candidate color More... | |
const RGBColor & | getEdgeCandidateSelectedColor () const |
get selected color More... | |
void | openHelpAttributesDialog (const GNEAttributeCarrier::TagProperties &tagProperties) const |
Open help attributes dialog. More... | |
Protected Attributes | |
FXVerticalFrame * | myContentFrame |
Vertical frame that holds all widgets of frame. More... | |
FXHorizontalFrame * | myHeaderFrame |
fame for header elements More... | |
FXHorizontalFrame * | myHeaderLeftFrame |
fame for left header elements More... | |
FXHorizontalFrame * | myHeaderRightFrame |
fame for right header elements More... | |
GNEViewNet * | myViewNet |
View Net for changes. More... | |
FOX-callbacks | |
Called when the user presses the OK-Button saves any prohibition modifications | |
enum | ConnStatus { UNDEFINED, PROHIBITED, PROHIBITING } |
the prohibition status of a connection More... | |
FXGroupBox * | myGroupBoxDescription |
Groupbox for description. More... | |
FXLabel * | myConnDescriptionLabel |
the label that shows the currently selected connection More... | |
FXGroupBox * | myGroupBoxLegend |
group box for legend More... | |
FXLabel * | mySelectedLabel |
selected connection label More... | |
FXLabel * | myUndefinedLabel |
"undefined" yielding label More... | |
FXLabel * | myProhibitedLabel |
"prohibited" label More... | |
FXLabel * | myProhibitingLabel |
"prohibiting" label More... | |
FXButton * | myCancelButton |
"Cancel" button More... | |
GNEConnection * | myCurrentConn |
"OK" button More... | |
std::set< GNEConnection * > | myConcernedConns |
the set of connections which More... | |
static RGBColor | selectedColor |
color for selected connection whose prohibition shall be shown More... | |
static RGBColor | undefinedColor |
color for non-conflicting pairs of connections More... | |
static RGBColor | prohibitedColor |
color for waiting connections More... | |
static RGBColor | prohibitingColor |
color for connections with precedence More... | |
static RGBColor | unregulatedConflictColor |
color for unregulated conflicts More... | |
static RGBColor | mutualConflictColor |
color for mutual conflicts More... | |
long | onCmdOK (FXObject *, FXSelector, void *) |
long | onCmdCancel (FXObject *, FXSelector, void *) |
Called when the user presses the Cancel-button discards any prohibition modifications. More... | |
GNEProhibitionFrame () | |
FOX needs this. More... | |
void | buildProhibition (GNEConnection *conn, bool mayDefinitelyPass, bool allowConflict, bool toggle) |
build prohibition More... | |
void | updateDescription () const |
update description More... | |
The Widget for editing connection foes
Definition at line 40 of file GNEProhibitionFrame.h.
|
private |
the prohibition status of a connection
Enumerator | |
---|---|
UNDEFINED | |
PROHIBITED | |
PROHIBITING |
Definition at line 81 of file GNEProhibitionFrame.h.
GNEProhibitionFrame::GNEProhibitionFrame | ( | FXHorizontalFrame * | horizontalFrameParent, |
GNEViewNet * | viewNet | ||
) |
FOX-declaration.
Constructor parent FXHorizontalFrame in which this GNEFrame is placed viewNet viewNet that uses this GNEFrame
Definition at line 60 of file GNEProhibitionFrame.cpp.
References RGBColor::CYAN, GNEFrame::getFrameHeaderLabel(), MFXUtils::getFXColor(), GUIIconSubSys::getIcon(), GUISUMOAbstractView::getVisualisationSettings(), RGBColor::GREY, GUIDesignButton, GUIDesignGroupBoxFrame, GUIDesignLabelFrameInformation, ICON_CANCEL, MID_CANCEL, mutualConflictColor, myCancelButton, myConnDescriptionLabel, GNEFrame::myContentFrame, myGroupBoxDescription, myGroupBoxLegend, myProhibitedLabel, myProhibitingLabel, mySelectedLabel, myUndefinedLabel, RGBColor::ORANGE, prohibitedColor, prohibitingColor, RGBColor::RED, selectedColor, GUIVisualizationSettings::selectedConnectionColor, undefinedColor, unregulatedConflictColor, updateDescription(), and RGBColor::WHITE.
GNEProhibitionFrame::~GNEProhibitionFrame | ( | ) |
Destructor.
Definition at line 106 of file GNEProhibitionFrame.cpp.
|
inlineprotected |
FOX needs this.
Definition at line 77 of file GNEProhibitionFrame.h.
|
private |
build prohibition
Definition at line 155 of file GNEProhibitionFrame.cpp.
References NBNode::getConnectionIndex(), GNEConnection::getEdgeFrom(), NBNode::getFoes(), GNEJunction::getGNEConnections(), GNEEdge::getGNEJunctionDestiny(), GNEEdge::getNBEdge(), GNEConnection::getNBEdgeConnection(), GNEJunction::getNBNode(), NBNode::getResponse(), mutualConflictColor, myConcernedConns, myCurrentConn, prohibitedColor, prohibitingColor, selectedColor, GNEConnection::setSpecialColor(), undefinedColor, unregulatedConflictColor, and updateDescription().
Referenced by handleProhibitionClick().
|
protectedvirtualinherited |
build a shaped element using the drawed shape (can be reimplemented in frame childs) return true if was sucesfully created
Reimplemented in GNETAZFrame, and GNEPolygonFrame.
Definition at line 1738 of file GNEFrame.cpp.
Referenced by GNEFrame::GNEFrame(), and GNEFrame::DrawingShape::stopDrawing().
|
protectedvirtualinherited |
disable moduls if element selected in itemSelector isn't valid (can be reimplemented in frame childs)
Reimplemented in GNEAdditionalFrame, and GNEPolygonFrame.
Definition at line 1751 of file GNEFrame.cpp.
Referenced by GNEFrame::GNEFrame(), GNEFrame::ItemSelector::onCmdSelectItem(), and GNEFrame::ItemSelector::setCurrentTypeTag().
|
protectedvirtualinherited |
enable moduls depending of item selected in ItemSelector (can be reimplemented in frame childs)
Reimplemented in GNEAdditionalFrame, and GNEPolygonFrame.
Definition at line 1745 of file GNEFrame.cpp.
Referenced by GNEFrame::GNEFrame(), GNEFrame::ItemSelector::onCmdSelectItem(), and GNEFrame::ItemSelector::setCurrentTypeTag().
|
inherited |
focus upper element of frame
Definition at line 1689 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderLabel.
Referenced by GNEViewNet::hotkeyFocusFrame(), GNEInspectorFrame::processClick(), GNEViewNet::setEditMode(), and GNEViewNet::updateModeSpecificControls().
|
protectedinherited |
get edge candidate color
Definition at line 1824 of file GNEFrame.cpp.
References GNEFrame::myEdgeCandidateColor.
Referenced by GNECrossingFrame::GNECrossingFrame(), GNEFrame::GNEFrame(), and GNECrossingFrame::CrossingParameters::onCmdSetAttribute().
|
protectedinherited |
get selected color
Definition at line 1830 of file GNEFrame.cpp.
References GNEFrame::myEdgeCandidateSelectedColor.
Referenced by GNECrossingFrame::GNECrossingFrame(), GNEFrame::GNEFrame(), and GNECrossingFrame::CrossingParameters::onCmdSetAttribute().
|
inherited |
get font of the header's frame
Definition at line 1732 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderFont.
|
inherited |
get the label for the frame's header
Definition at line 1726 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderLabel.
Referenced by GNEProhibitionFrame(), and GNEInspectorFrame::inspectMultisection().
|
inherited |
get view net
Definition at line 1720 of file GNEFrame.cpp.
References GNEFrame::myViewNet.
Referenced by GNEAdditionalFrame::SelectorLaneParents::abortConsecutiveLaneSelector(), GNEFrame::DrawingShape::abortDrawing(), GNEAdditionalFrame::SelectorLaneParents::addSelectedLane(), GNEFrame::ACHierarchy::createPopUpMenu(), GNECrossingFrame::EdgesSelector::enableEdgeSelector(), GNEAdditionalFrame::SelectorEdgeChilds::getEdgeIdsSelected(), GNEAdditionalFrame::SelectorLaneChilds::getLaneIdsSelected(), GNEConnectorFrame::ConnectionModifications::onCmdCancelModifications(), GNEFrame::ACHierarchy::onCmdCenterItem(), GNEConnectorFrame::ConnectionOperations::onCmdClearSelectedConnections(), GNEInspectorFrame::TemplateEditor::onCmdCopyTemplate(), GNEFrame::ACHierarchy::onCmdDeleteItem(), GNEFrame::GenericParametersEditor::onCmdEditGenericParameter(), GNEFrame::ACHierarchy::onCmdInspectItem(), GNESelectorFrame::SelectionOperation::onCmdInvert(), GNESelectorFrame::SelectionOperation::onCmdLoad(), GNETLSEditorFrame::TLSFile::onCmdLoadTLSProgram(), GNEInspectorFrame::OverlappedInspection::onCmdNextElement(), GNEInspectorFrame::AttributesEditor::AttributeInput::onCmdOpenAttributeDialog(), GNEInspectorFrame::OverlappedInspection::onCmdPreviousElement(), GNEConnectorFrame::ConnectionOperations::onCmdResetSelectedConnections(), GNEConnectorFrame::ConnectionModifications::onCmdSaveModifications(), GNESelectorFrame::VisualScaling::onCmdScaleSelection(), GNEConnectorFrame::ConnectionOperations::onCmdSelectConflicts(), GNEConnectorFrame::ConnectionOperations::onCmdSelectDeadEnds(), GNEConnectorFrame::ConnectionOperations::onCmdSelectDeadStarts(), GNEConnectorFrame::ConnectionOperations::onCmdSelectPass(), GNEInspectorFrame::AttributesEditor::AttributeInput::onCmdSetAttribute(), GNECrossingFrame::CrossingParameters::onCmdSetAttribute(), GNEFrame::GenericParametersEditor::onCmdSetGenericParameter(), GNEInspectorFrame::GEOAttributesEditor::onCmdSetGEOAttribute(), GNEInspectorFrame::NeteditAttributesEditor::onCmdSetNeteditAttribute(), GNEAdditionalFrame::SelectorAdditionalParent::refreshSelectorAdditionalParentModul(), GNEDeleteFrame::removeAttributeCarrier(), GNECrossingFrame::EdgesSelector::restoreEdgeColors(), GNEFrame::ACHierarchy::showAttributeCarrierChilds(), GNEFrame::ACHierarchy::showAttributeCarrierParents(), GNEAdditionalFrame::SelectorEdgeChilds::showSelectorEdgeChildsModul(), GNEAdditionalFrame::SelectorLaneChilds::showSelectorLaneChildsModul(), GNEFrame::ACAttributes::showWarningMessage(), GNEFrame::DrawingShape::stopDrawing(), GNEAdditionalFrame::SelectorEdgeChilds::updateUseSelectedEdges(), and GNEAdditionalFrame::SelectorLaneChilds::updateUseSelectedLanes().
void GNEProhibitionFrame::handleProhibitionClick | ( | const GNEViewNet::ObjectsUnderCursor & | objectsUnderCursor | ) |
handle prohibitions and set the relative colouring
objectsUnderCursor | collection of objects under cursor after click over view |
Definition at line 110 of file GNEProhibitionFrame.cpp.
References buildProhibition(), GNEViewNet::KeyPressed::controlKeyPressed(), GNEViewNet::ObjectsUnderCursor::getConnectionFront(), GNEViewNet::getKeyPressed(), GNEFrame::myViewNet, and GNEViewNet::KeyPressed::shiftKeyPressed().
Referenced by GNEViewNet::onLeftBtnPress().
|
virtual |
hide prohibition frame
Reimplemented from GNEFrame.
Definition at line 123 of file GNEProhibitionFrame.cpp.
References GNEFrame::hide().
Referenced by GNEViewParent::Frames::hideFrames().
long GNEProhibitionFrame::onCmdCancel | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the Cancel-button discards any prohibition modifications.
Definition at line 139 of file GNEProhibitionFrame.cpp.
References myConcernedConns, myCurrentConn, GNEFrame::myViewNet, GNEConnection::setSpecialColor(), and updateDescription().
Referenced by GNEViewNet::abortOperation().
long GNEProhibitionFrame::onCmdOK | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Definition at line 207 of file GNEProhibitionFrame.cpp.
|
protectedinherited |
Open help attributes dialog.
Definition at line 1757 of file GNEFrame.cpp.
References GUIIconSubSys::getIcon(), GNEAttributeCarrier::TagProperties::getNumberOfAttributes(), GNEAttributeCarrier::TagProperties::getTagStr(), GUIDesignAuxiliarHorizontalFrame, GUIDesignButtonOK, GUIDesignDialogBoxResizable, GUIDesignHorizontalSeparator, GUIDesignTableNotEditable, ICON_ACCEPT, ICON_MODEINSPECT, MAX2(), MID_TABLE, GNEFrame::myScrollWindowsContents, toString(), and WRITE_DEBUG.
Referenced by GNEFrame::GNEFrame(), GNEInspectorFrame::AttributesEditor::onCmdAttributeHelp(), GNECrossingFrame::CrossingParameters::onCmdHelp(), GNEFrame::ACAttributes::onCmdHelp(), and GNETAZFrame::TAZParameters::onCmdHelp().
|
inherited |
set width of GNEFrame
Definition at line 1713 of file GNEFrame.cpp.
References GNEFrame::myScrollWindowsContents.
Referenced by GNEViewParent::Frames::setWidth().
|
virtual |
show prohibition frame
Reimplemented from GNEFrame.
Definition at line 117 of file GNEProhibitionFrame.cpp.
References GNEFrame::show().
Referenced by GNEViewNet::updateModeSpecificControls().
|
private |
update description
Definition at line 129 of file GNEProhibitionFrame.cpp.
References GNEConnection::getLaneFrom(), GNEConnection::getLaneTo(), GUIGlObject::getMicrosimID(), myConnDescriptionLabel, and myCurrentConn.
Referenced by buildProhibition(), GNEProhibitionFrame(), and onCmdCancel().
|
staticprivate |
color for mutual conflicts
Definition at line 139 of file GNEProhibitionFrame.h.
Referenced by buildProhibition(), and GNEProhibitionFrame().
|
private |
"Cancel" button
Definition at line 112 of file GNEProhibitionFrame.h.
Referenced by GNEProhibitionFrame().
|
private |
the set of connections which
Definition at line 121 of file GNEProhibitionFrame.h.
Referenced by buildProhibition(), and onCmdCancel().
|
private |
the label that shows the currently selected connection
Definition at line 94 of file GNEProhibitionFrame.h.
Referenced by GNEProhibitionFrame(), and updateDescription().
|
protectedinherited |
Vertical frame that holds all widgets of frame.
Definition at line 615 of file GNEFrame.h.
Referenced by GNECrossingFrame::GNECrossingFrame(), GNEFrame::GNEFrame(), GNEProhibitionFrame(), and GNEInspectorFrame::inspectMultisection().
|
private |
"OK" button
the connection which prohibits
Definition at line 118 of file GNEProhibitionFrame.h.
Referenced by buildProhibition(), onCmdCancel(), and updateDescription().
|
private |
Groupbox for description.
Definition at line 91 of file GNEProhibitionFrame.h.
Referenced by GNEProhibitionFrame().
|
private |
group box for legend
Definition at line 97 of file GNEProhibitionFrame.h.
Referenced by GNEProhibitionFrame().
|
protectedinherited |
fame for header elements
Definition at line 618 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
protectedinherited |
fame for left header elements
Definition at line 621 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame(), GNEInspectorFrame::inspectChild(), GNEInspectorFrame::inspectFromDeleteFrame(), and GNEInspectorFrame::inspectMultisection().
|
protectedinherited |
fame for right header elements
Definition at line 624 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
private |
"prohibited" label
Definition at line 106 of file GNEProhibitionFrame.h.
Referenced by GNEProhibitionFrame().
|
private |
"prohibiting" label
Definition at line 109 of file GNEProhibitionFrame.h.
Referenced by GNEProhibitionFrame().
|
private |
selected connection label
Definition at line 100 of file GNEProhibitionFrame.h.
Referenced by GNEProhibitionFrame().
|
private |
"undefined" yielding label
Definition at line 103 of file GNEProhibitionFrame.h.
Referenced by GNEProhibitionFrame().
|
protectedinherited |
View Net for changes.
Definition at line 612 of file GNEFrame.h.
Referenced by GNEAdditionalFrame::addAdditional(), GNECrossingFrame::addCrossing(), GNETAZFrame::addOrRemoveTAZMember(), GNEPolygonFrame::addPOI(), GNEPolygonFrame::addPOILane(), GNEPolygonFrame::addPolygon(), GNETAZFrame::TAZCurrent::addTAZChild(), GNEAdditionalFrame::buildAdditionalOverEdge(), GNEAdditionalFrame::buildAdditionalOverLane(), GNEAdditionalFrame::buildAdditionalOverLanes(), GNEAdditionalFrame::buildAdditionalOverView(), GNEConnectorFrame::buildConnection(), GNETLSEditorFrame::buildIinternalLanes(), GNEPolygonFrame::buildShape(), GNETAZFrame::buildShape(), GNESelectorFrame::clearCurrentSelection(), GNEInspectorFrame::clearInspectedAC(), GNETAZFrame::dropTAZMembers(), GNETLSEditorFrame::editJunction(), GNETAZFrame::TAZSaveChanges::enableButtonsAndBeginUndoList(), GNEAdditionalFrame::generateID(), GNESelectorFrame::getMatches(), GNEFrame::NeteditAttributes::getNeteditAttributesAndValues(), GNEFrame::getViewNet(), GNETLSEditorFrame::handleChange(), GNESelectorFrame::handleIDs(), GNEConnectorFrame::handleLaneClick(), GNETLSEditorFrame::handleMultiChange(), handleProhibitionClick(), GNEInspectorFrame::hide(), GNEFrame::hide(), GNEConnectorFrame::initTargets(), GNEInspectorFrame::inspectSingleElement(), onCmdCancel(), GNETLSEditorFrame::onCmdCancel(), GNETAZFrame::TAZSaveChanges::onCmdCancelChanges(), GNECrossingFrame::CreateCrossing::onCmdCreateCrossing(), GNEPolygonFrame::GEOPOICreator::onCmdCreateGEOPOI(), GNETLSEditorFrame::onCmdDefCreate(), GNETLSEditorFrame::onCmdDefDelete(), GNETLSEditorFrame::onCmdDefSwitch(), GNEInspectorFrame::onCmdGoBack(), GNETLSEditorFrame::TLSFile::onCmdLoadTLSProgram(), GNETLSEditorFrame::onCmdOK(), GNETLSEditorFrame::onCmdPhaseSwitch(), GNESelectorFrame::SelectionOperation::onCmdSave(), GNETAZFrame::TAZSaveChanges::onCmdSaveChanges(), GNETAZFrame::TAZSelectionStatistics::onCmdSelectEdges(), GNETAZFrame::TAZSelectionStatistics::onCmdSetNewValues(), GNETAZFrame::TAZChildDefaultParameters::onCmdUseSelectedEdges(), GNETLSEditorFrame::parseTLSPrograms(), GNEPolygonFrame::processClick(), GNEInspectorFrame::processClick(), GNEAdditionalFrame::removeAdditional(), GNEDeleteFrame::removeAttributeCarrier(), GNEDeleteFrame::removeSelectedAttributeCarriers(), GNETAZFrame::TAZCurrent::setTAZ(), GNEDeleteFrame::show(), GNEFrame::show(), GNEAdditionalFrame::SelectorLaneParents::stopConsecutiveLaneSelector(), and GNETAZFrame::TAZEdgesGraphic::updateEdgeColors().
|
staticprivate |
color for waiting connections
Definition at line 130 of file GNEProhibitionFrame.h.
Referenced by buildProhibition(), and GNEProhibitionFrame().
|
staticprivate |
color for connections with precedence
Definition at line 133 of file GNEProhibitionFrame.h.
Referenced by buildProhibition(), and GNEProhibitionFrame().
|
staticprivate |
color for selected connection whose prohibition shall be shown
Definition at line 124 of file GNEProhibitionFrame.h.
Referenced by buildProhibition(), and GNEProhibitionFrame().
|
staticprivate |
color for non-conflicting pairs of connections
Definition at line 127 of file GNEProhibitionFrame.h.
Referenced by buildProhibition(), and GNEProhibitionFrame().
|
staticprivate |
color for unregulated conflicts
Definition at line 136 of file GNEProhibitionFrame.h.
Referenced by buildProhibition(), and GNEProhibitionFrame().