SUMO - Simulation of Urban MObility
GNEConnectorFrame Class Reference

#include <GNEConnectorFrame.h>

Inheritance diagram for GNEConnectorFrame:
Inheritance graph
Collaboration diagram for GNEConnectorFrame:
Collaboration graph

Data Structures

class  ConnectionLegend
 
class  ConnectionModifications
 
class  ConnectionOperations
 
class  ConnectionSelection
 
class  CurrentLane
 

Public Member Functions

void focusUpperElement ()
 focus upper element of frame More...
 
ConnectionModificationsgetConnectionModifications () const
 get pointer to ConnectionModifications modul More...
 
FXFont * getFrameHeaderFont () const
 get font of the header's frame More...
 
FXLabel * getFrameHeaderLabel () const
 get the label for the frame's header More...
 
GNEViewNetgetViewNet () const
 get view net More...
 
 GNEConnectorFrame (FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
 Constructor. More...
 
void handleLaneClick (const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor)
 either sets the current lane or toggles the connection of the More...
 
virtual void hide ()
 hide Frame More...
 
void setFrameWidth (int newWidth)
 set width of GNEFrame More...
 
virtual void show ()
 show Frame More...
 
 ~GNEConnectorFrame ()
 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 RGBColorgetEdgeCandidateColor () const
 get edge candidate color More...
 
const RGBColorgetEdgeCandidateSelectedColor () 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...
 
GNEViewNetmyViewNet
 View Net for changes. More...
 

Private Types

enum  LaneStatus { UNCONNECTED, CONNECTED, CONNECTED_PASS, CONFLICTED }
 the status of a target lane More...
 

Private Member Functions

void buildConnection (GNELane *lane, bool mayDefinitelyPass, bool allowConflict, bool toggle)
 either sets the current lane or toggles the connection of the current lane to this lane (if they share a junction) More...
 
void cleanup ()
 clean up when deselecting current lane More...
 
LaneStatus getLaneStatus (const std::vector< NBEdge::Connection > &connections, GNELane *targetLane)
 return the status of toLane More...
 
void initTargets ()
 init targets More...
 
void removeConnections (GNELane *lane)
 remove connections More...
 

Private Attributes

ConnectionLegendmyConnectionLegend
 ConnectionLegend modul. More...
 
ConnectionModificationsmyConnectionModifications
 ConnectionModifications modul. More...
 
ConnectionOperationsmyConnectionOperations
 ConnectionOperations modul. More...
 
ConnectionSelectionmyConnectionSelection
 ConnectionSelection modul. More...
 
GNELanemyCurrentEditedLane
 the lane of which connections are to be modified More...
 
CurrentLanemyCurrentLane
 CurrentLane modul. More...
 
std::vector< NBEdge::ConnectionmyDeletedConnections
 vector of connections deleted in the current editing step More...
 
std::map< int, GNEInternalLane * > myInternalLanes
 the internal lanes belonging the the current junction indexed by their tl-index More...
 
int myNumChanges
 number of changes More...
 
std::set< GNELane * > myPotentialTargets
 the set of lanes to which the current lane may be connected More...
 

Detailed Description

The Widget for modifying selections of network-elements

Definition at line 33 of file GNEConnectorFrame.h.

Member Enumeration Documentation

◆ LaneStatus

the status of a target lane

Enumerator
UNCONNECTED 
CONNECTED 
CONNECTED_PASS 
CONFLICTED 

Definition at line 262 of file GNEConnectorFrame.h.

Constructor & Destructor Documentation

◆ GNEConnectorFrame()

GNEConnectorFrame::GNEConnectorFrame ( FXHorizontalFrame *  horizontalFrameParent,
GNEViewNet viewNet 
)

Constructor.

parent FXHorizontalFrame in which this GNEFrame is placed viewNet viewNet that uses this GNEFrame

Definition at line 376 of file GNEConnectorFrame.cpp.

References myConnectionLegend, myConnectionModifications, myConnectionOperations, myConnectionSelection, and myCurrentLane.

◆ ~GNEConnectorFrame()

GNEConnectorFrame::~GNEConnectorFrame ( )

Destructor.

Definition at line 396 of file GNEConnectorFrame.cpp.

Member Function Documentation

◆ buildConnection()

void GNEConnectorFrame::buildConnection ( GNELane lane,
bool  mayDefinitelyPass,
bool  allowConflict,
bool  toggle 
)
private

either sets the current lane or toggles the connection of the current lane to this lane (if they share a junction)

Parameters
[in]laneEither the lane to set as current lane, or the destination from current lane
[in]mayDefinitelyPassWhether new connections shall have the pass attribute set
[in]toggleWhether non-existing connections shall be created

Definition at line 427 of file GNEConnectorFrame.cpp.

References CONFLICTED, CONNECTED, CONNECTED_PASS, GNENet::deleteConnection(), NBEdge::getConnectionsFromLane(), GNEEdge::getGNEJunctionDestiny(), GNEEdge::getGNEJunctionSource(), GNEAttributeCarrier::getID(), GNELane::getIndex(), getLaneStatus(), GNEEdge::getNBEdge(), GNEConnection::getNBEdgeConnection(), GNEViewNet::getNet(), GNELane::getParentEdge(), NBEdge::getPermissions(), GNEConnectorFrame::ConnectionLegend::getPotentialTargetColor(), GNEConnectorFrame::ConnectionLegend::getSourceColor(), GNEConnectorFrame::ConnectionLegend::getTargetColor(), GNEConnectorFrame::ConnectionLegend::getTargetPassColor(), GNEViewNet::getUndoList(), initTargets(), GNEJunction::invalidateTLS(), NBConnection::InvalidConnection, NBEdge::Connection::mayDefinitelyPass, myConnectionLegend, myCurrentEditedLane, myCurrentLane, myDeletedConnections, myNumChanges, myPotentialTargets, GNEFrame::myViewNet, GNEUndoList::p_begin(), GNEEdge::retrieveGNEConnection(), GNELane::setSpecialColor(), GNEViewNet::setStatusBarText(), SUMO_TAG_CONNECTION, SVC_PEDESTRIAN, toString(), UNCONNECTED, and GNEConnectorFrame::CurrentLane::updateCurrentLaneLabel().

Referenced by handleLaneClick(), and removeConnections().

◆ buildShape()

bool GNEFrame::buildShape ( )
protectedvirtualinherited

build a shaped element using the drawed shape (can be reimplemented in frame childs) return true if was sucesfully created

Note
called when user stop drawing shape

Reimplemented in GNETAZFrame, and GNEPolygonFrame.

Definition at line 1738 of file GNEFrame.cpp.

Referenced by GNEFrame::GNEFrame(), and GNEFrame::DrawingShape::stopDrawing().

◆ cleanup()

◆ disableModuls()

void GNEFrame::disableModuls ( )
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().

◆ enableModuls()

void GNEFrame::enableModuls ( const GNEAttributeCarrier::TagProperties tagProperties)
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().

◆ focusUpperElement()

void GNEFrame::focusUpperElement ( )
inherited

◆ getConnectionModifications()

GNEConnectorFrame::ConnectionModifications * GNEConnectorFrame::getConnectionModifications ( ) const

get pointer to ConnectionModifications modul

Definition at line 407 of file GNEConnectorFrame.cpp.

References myConnectionModifications.

Referenced by GNEViewNet::abortOperation(), and GNEViewNet::hotkeyEnter().

◆ getEdgeCandidateColor()

const RGBColor & GNEFrame::getEdgeCandidateColor ( ) const
protectedinherited

◆ getEdgeCandidateSelectedColor()

const RGBColor & GNEFrame::getEdgeCandidateSelectedColor ( ) const
protectedinherited

◆ getFrameHeaderFont()

FXFont * GNEFrame::getFrameHeaderFont ( ) const
inherited

get font of the header's frame

Definition at line 1732 of file GNEFrame.cpp.

References GNEFrame::myFrameHeaderFont.

◆ getFrameHeaderLabel()

FXLabel * GNEFrame::getFrameHeaderLabel ( ) const
inherited

get the label for the frame's header

Definition at line 1726 of file GNEFrame.cpp.

References GNEFrame::myFrameHeaderLabel.

Referenced by GNEProhibitionFrame::GNEProhibitionFrame(), and GNEInspectorFrame::inspectMultisection().

◆ getLaneStatus()

GNEConnectorFrame::LaneStatus GNEConnectorFrame::getLaneStatus ( const std::vector< NBEdge::Connection > &  connections,
GNELane targetLane 
)
private

◆ getViewNet()

GNEViewNet * GNEFrame::getViewNet ( ) const
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().

◆ handleLaneClick()

void GNEConnectorFrame::handleLaneClick ( const GNEViewNet::ObjectsUnderCursor objectsUnderCursor)

either sets the current lane or toggles the connection of the

Parameters
objectsUnderCursorcollection of objects under cursor after click over view

Definition at line 400 of file GNEConnectorFrame.cpp.

References buildConnection(), GNEViewNet::KeyPressed::controlKeyPressed(), GNEViewNet::getKeyPressed(), GNEViewNet::ObjectsUnderCursor::getLaneFront(), GNEFrame::myViewNet, and GNEViewNet::KeyPressed::shiftKeyPressed().

Referenced by GNEViewNet::onLeftBtnPress().

◆ hide()

◆ initTargets()

◆ openHelpAttributesDialog()

◆ removeConnections()

◆ setFrameWidth()

void GNEFrame::setFrameWidth ( int  newWidth)
inherited

set width of GNEFrame

Definition at line 1713 of file GNEFrame.cpp.

References GNEFrame::myScrollWindowsContents.

Referenced by GNEViewParent::Frames::setWidth().

◆ show()

Field Documentation

◆ myConnectionLegend

ConnectionLegend* GNEConnectorFrame::myConnectionLegend
private

ConnectionLegend modul.

Definition at line 302 of file GNEConnectorFrame.h.

Referenced by buildConnection(), GNEConnectorFrame(), and initTargets().

◆ myConnectionModifications

◆ myConnectionOperations

ConnectionOperations* GNEConnectorFrame::myConnectionOperations
private

ConnectionOperations modul.

Definition at line 296 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myConnectionSelection

ConnectionSelection* GNEConnectorFrame::myConnectionSelection
private

ConnectionSelection modul.

Definition at line 299 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myContentFrame

FXVerticalFrame* GNEFrame::myContentFrame
protectedinherited

Vertical frame that holds all widgets of frame.

Definition at line 615 of file GNEFrame.h.

Referenced by GNECrossingFrame::GNECrossingFrame(), GNEFrame::GNEFrame(), GNEProhibitionFrame::GNEProhibitionFrame(), and GNEInspectorFrame::inspectMultisection().

◆ myCurrentEditedLane

GNELane* GNEConnectorFrame::myCurrentEditedLane
private

◆ myCurrentLane

CurrentLane* GNEConnectorFrame::myCurrentLane
private

CurrentLane modul.

Definition at line 290 of file GNEConnectorFrame.h.

Referenced by buildConnection(), cleanup(), and GNEConnectorFrame().

◆ myDeletedConnections

std::vector<NBEdge::Connection> GNEConnectorFrame::myDeletedConnections
private

vector of connections deleted in the current editing step

Definition at line 317 of file GNEConnectorFrame.h.

Referenced by buildConnection(), and cleanup().

◆ myHeaderFrame

FXHorizontalFrame* GNEFrame::myHeaderFrame
protectedinherited

fame for header elements

Definition at line 618 of file GNEFrame.h.

Referenced by GNEFrame::GNEFrame().

◆ myHeaderLeftFrame

FXHorizontalFrame* GNEFrame::myHeaderLeftFrame
protectedinherited

◆ myHeaderRightFrame

FXHorizontalFrame* GNEFrame::myHeaderRightFrame
protectedinherited

fame for right header elements

Definition at line 624 of file GNEFrame.h.

Referenced by GNEFrame::GNEFrame().

◆ myInternalLanes

std::map<int, GNEInternalLane*> GNEConnectorFrame::myInternalLanes
private

the internal lanes belonging the the current junction indexed by their tl-index

Definition at line 314 of file GNEConnectorFrame.h.

◆ myNumChanges

◆ myPotentialTargets

std::set<GNELane*> GNEConnectorFrame::myPotentialTargets
private

the set of lanes to which the current lane may be connected

Definition at line 308 of file GNEConnectorFrame.h.

Referenced by buildConnection(), cleanup(), initTargets(), and removeConnections().

◆ myViewNet

GNEViewNet* GNEFrame::myViewNet
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(), 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(), handleLaneClick(), GNETLSEditorFrame::handleMultiChange(), GNEProhibitionFrame::handleProhibitionClick(), GNEInspectorFrame::hide(), GNEFrame::hide(), initTargets(), GNEInspectorFrame::inspectSingleElement(), GNEProhibitionFrame::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().


The documentation for this class was generated from the following files: