Eclipse SUMO - Simulation of Urban MObility
GNEConnectorFrame Class Reference

#include <GNEConnectorFrame.h>

Inheritance diagram for GNEConnectorFrame:
Collaboration diagram for GNEConnectorFrame:

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 GNEViewNetHelper::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...
 
virtual void updateFrameAfterUndoRedo ()
 function called after undo/redo in the current frame (can be reimplemented in frame children) More...
 
 ~GNEConnectorFrame ()
 Destructor. More...
 

Protected Member Functions

const RGBColorgetEdgeCandidateColor () const
 get edge candidate color More...
 
const RGBColorgetEdgeCandidateSelectedColor () const
 get selected color More...
 
const std::map< int, std::string > & getPredefinedTagsMML () const
 get predefinedTagsMML More...
 
void openHelpAttributesDialog (const GNEAttributeCarrier::TagProperties &tagProperties) const
 Open help attributes dialog. More...
 
functions called by moduls that can be reimplemented in frame children
virtual void tagSelected ()
 Tag selected in TagSelector. More...
 
virtual void demandElementSelected ()
 selected demand element in DemandElementSelector More...
 
virtual void edgePathCreated ()
 finish edge path creation More...
 
virtual bool shapeDrawed ()
 build a shaped element using the drawed shape (can be reimplemented in frame children) More...
 
virtual void attributeUpdated ()
 function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/... More...
 
virtual void attributesEditorExtendedDialogOpened ()
 open AttributesCreator extended dialog (can be reimplemented in frame children) More...
 
virtual void selectedOverlappedElement (GNEAttributeCarrier *AC)
 open AttributesCreator extended dialog (can be reimplemented in frame children) More...
 

Protected Attributes

FXVerticalFrame * myContentFrame = nullptr
 Vertical frame that holds all widgets of frame. More...
 
FXHorizontalFrame * myHeaderFrame = nullptr
 fame for header elements More...
 
FXHorizontalFrame * myHeaderLeftFrame = nullptr
 fame for left header elements More...
 
FXHorizontalFrame * myHeaderRightFrame = nullptr
 fame for right header elements More...
 
GNEViewNetmyViewNet = nullptr
 View Net. 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...
 
RGBColor myEdgeCandidateColor
 edge candidate color (used by some modulds to mark edges) More...
 
RGBColor myEdgeCandidateSelectedColor
 selected edge candidate color (used by some modulds to selected mark edges) More...
 
FXLabel * myFrameHeaderLabel = nullptr
 the label for the frame's header 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...
 
std::map< int, std::string > myPredefinedTagsMML
 Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cached) More...
 
FXScrollWindow * myScrollWindowsContents = nullptr
 scroll windows that holds the content frame More...
 

Static Private Attributes

static FXFont * myFrameHeaderFont = nullptr
 static Font for the Header (it's common for all headers, then create only one time) More...
 

Detailed Description

The Widget for modifying selections of network-elements

Definition at line 34 of file GNEConnectorFrame.h.

Member Enumeration Documentation

◆ LaneStatus

the status of a target lane

Enumerator
UNCONNECTED 
CONNECTED 
CONNECTED_PASS 
CONFLICTED 

Definition at line 264 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 394 of file GNEConnectorFrame.cpp.

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

◆ ~GNEConnectorFrame()

GNEConnectorFrame::~GNEConnectorFrame ( )

Destructor.

Definition at line 414 of file GNEConnectorFrame.cpp.

Member Function Documentation

◆ attributesEditorExtendedDialogOpened()

void GNEFrame::attributesEditorExtendedDialogOpened ( )
protectedvirtualinherited

open AttributesCreator extended dialog (can be reimplemented in frame children)

Reimplemented in GNEVehicleTypeFrame.

Definition at line 190 of file GNEFrame.cpp.

◆ attributeUpdated()

void GNEFrame::attributeUpdated ( )
protectedvirtualinherited

function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/...

Reimplemented in GNEVehicleTypeFrame, GNEPersonTypeFrame, and GNEInspectorFrame.

Definition at line 184 of file GNEFrame.cpp.

◆ 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 445 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, NBEdge::Connection::tlLinkIndex, toString(), UNCONNECTED, and GNEConnectorFrame::CurrentLane::updateCurrentLaneLabel().

Referenced by handleLaneClick(), and removeConnections().

◆ cleanup()

void GNEConnectorFrame::cleanup ( )
private

◆ demandElementSelected()

void GNEFrame::demandElementSelected ( )
protectedvirtualinherited

selected demand element in DemandElementSelector

Reimplemented in GNEVehicleFrame, GNEStopFrame, GNEPersonPlanFrame, and GNEPersonFrame.

Definition at line 165 of file GNEFrame.cpp.

◆ edgePathCreated()

void GNEFrame::edgePathCreated ( )
protectedvirtualinherited

finish edge path creation

Reimplemented in GNEVehicleFrame, and GNEPersonFrame.

Definition at line 171 of file GNEFrame.cpp.

◆ focusUpperElement()

◆ getConnectionModifications()

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

get pointer to ConnectionModifications modul

Definition at line 425 of file GNEConnectorFrame.cpp.

References myConnectionModifications.

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

◆ getEdgeCandidateColor()

const RGBColor & GNEFrame::getEdgeCandidateColor ( ) const
protectedinherited

get edge candidate color

Definition at line 269 of file GNEFrame.cpp.

References GNEFrame::myEdgeCandidateColor.

Referenced by GNECrossingFrame::GNECrossingFrame().

◆ getEdgeCandidateSelectedColor()

const RGBColor & GNEFrame::getEdgeCandidateSelectedColor ( ) const
protectedinherited

get selected color

Definition at line 275 of file GNEFrame.cpp.

References GNEFrame::myEdgeCandidateSelectedColor.

Referenced by GNECrossingFrame::GNECrossingFrame().

◆ getFrameHeaderFont()

FXFont * GNEFrame::getFrameHeaderFont ( ) const
inherited

get font of the header's frame

Definition at line 144 of file GNEFrame.cpp.

References GNEFrame::myFrameHeaderFont.

◆ getFrameHeaderLabel()

FXLabel * GNEFrame::getFrameHeaderLabel ( ) const
inherited

get the label for the frame's header

Definition at line 138 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

◆ getPredefinedTagsMML()

◆ getViewNet()

GNEViewNet * GNEFrame::getViewNet ( ) const
inherited

◆ handleLaneClick()

void GNEConnectorFrame::handleLaneClick ( const GNEViewNetHelper::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 418 of file GNEConnectorFrame.cpp.

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

Referenced by GNEViewNet::processLeftButtonPressNetwork().

◆ hide()

◆ initTargets()

◆ openHelpAttributesDialog()

◆ removeConnections()

void GNEConnectorFrame::removeConnections ( GNELane lane)
private

◆ selectedOverlappedElement()

void GNEFrame::selectedOverlappedElement ( GNEAttributeCarrier AC)
protectedvirtualinherited

open AttributesCreator extended dialog (can be reimplemented in frame children)

Reimplemented in GNETLSEditorFrame, and GNEInspectorFrame.

Definition at line 196 of file GNEFrame.cpp.

◆ setFrameWidth()

void GNEFrame::setFrameWidth ( int  newWidth)
inherited

set width of GNEFrame

Definition at line 125 of file GNEFrame.cpp.

References GNEFrame::myScrollWindowsContents.

◆ shapeDrawed()

bool GNEFrame::shapeDrawed ( )
protectedvirtualinherited

build a shaped element using the drawed shape (can be reimplemented in frame children)

Reimplemented in GNETAZFrame, and GNEPolygonFrame.

Definition at line 177 of file GNEFrame.cpp.

◆ show()

◆ tagSelected()

void GNEFrame::tagSelected ( )
protectedvirtualinherited

Tag selected in TagSelector.

Reimplemented in GNEVehicleFrame, GNEStopFrame, GNEPolygonFrame, GNEPersonPlanFrame, GNEPersonFrame, and GNEAdditionalFrame.

Definition at line 159 of file GNEFrame.cpp.

◆ updateFrameAfterUndoRedo()

void GNEFrame::updateFrameAfterUndoRedo ( )
virtualinherited

function called after undo/redo in the current frame (can be reimplemented in frame children)

Reimplemented in GNEInspectorFrame.

Definition at line 150 of file GNEFrame.cpp.

Referenced by GNEApplicationWindow::onCmdRedo(), and GNEApplicationWindow::onCmdUndo().

Field Documentation

◆ myConnectionLegend

ConnectionLegend* GNEConnectorFrame::myConnectionLegend
private

ConnectionLegend modul.

Definition at line 304 of file GNEConnectorFrame.h.

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

◆ myConnectionModifications

ConnectionModifications* GNEConnectorFrame::myConnectionModifications
private

◆ myConnectionOperations

ConnectionOperations* GNEConnectorFrame::myConnectionOperations
private

ConnectionOperations modul.

Definition at line 298 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myConnectionSelection

ConnectionSelection* GNEConnectorFrame::myConnectionSelection
private

ConnectionSelection modul.

Definition at line 301 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myContentFrame

FXVerticalFrame* GNEFrame::myContentFrame = nullptr
protectedinherited

Vertical frame that holds all widgets of frame.

Definition at line 124 of file GNEFrame.h.

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

◆ myCurrentEditedLane

GNELane* GNEConnectorFrame::myCurrentEditedLane
private

the lane of which connections are to be modified

Definition at line 307 of file GNEConnectorFrame.h.

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

◆ myCurrentLane

CurrentLane* GNEConnectorFrame::myCurrentLane
private

CurrentLane modul.

Definition at line 292 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 319 of file GNEConnectorFrame.h.

Referenced by buildConnection(), and cleanup().

◆ myEdgeCandidateColor

RGBColor GNEFrame::myEdgeCandidateColor
privateinherited

edge candidate color (used by some modulds to mark edges)

Definition at line 146 of file GNEFrame.h.

Referenced by GNEFrame::getEdgeCandidateColor().

◆ myEdgeCandidateSelectedColor

RGBColor GNEFrame::myEdgeCandidateSelectedColor
privateinherited

selected edge candidate color (used by some modulds to selected mark edges)

Definition at line 149 of file GNEFrame.h.

Referenced by GNEFrame::getEdgeCandidateSelectedColor().

◆ myFrameHeaderFont

FXFont * GNEFrame::myFrameHeaderFont = nullptr
staticprivateinherited

static Font for the Header (it's common for all headers, then create only one time)

Definition at line 140 of file GNEFrame.h.

Referenced by GNEFrame::getFrameHeaderFont(), GNEFrame::GNEFrame(), and GNEFrame::~GNEFrame().

◆ myFrameHeaderLabel

FXLabel* GNEFrame::myFrameHeaderLabel = nullptr
privateinherited

the label for the frame's header

Definition at line 143 of file GNEFrame.h.

Referenced by GNEFrame::focusUpperElement(), GNEFrame::getFrameHeaderLabel(), and GNEFrame::GNEFrame().

◆ myHeaderFrame

FXHorizontalFrame* GNEFrame::myHeaderFrame = nullptr
protectedinherited

fame for header elements

Definition at line 127 of file GNEFrame.h.

Referenced by GNEFrame::GNEFrame().

◆ myHeaderLeftFrame

FXHorizontalFrame* GNEFrame::myHeaderLeftFrame = nullptr
protectedinherited

◆ myHeaderRightFrame

FXHorizontalFrame* GNEFrame::myHeaderRightFrame = nullptr
protectedinherited

fame for right header elements

Definition at line 133 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 316 of file GNEConnectorFrame.h.

◆ myNumChanges

int GNEConnectorFrame::myNumChanges
private

number of changes

Definition at line 313 of file GNEConnectorFrame.h.

Referenced by buildConnection(), and cleanup().

◆ myPotentialTargets

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

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

Definition at line 310 of file GNEConnectorFrame.h.

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

◆ myPredefinedTagsMML

std::map<int, std::string> GNEFrame::myPredefinedTagsMML
privateinherited

Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cached)

Definition at line 152 of file GNEFrame.h.

Referenced by GNEFrame::getPredefinedTagsMML(), and GNEFrame::GNEFrame().

◆ myScrollWindowsContents

FXScrollWindow* GNEFrame::myScrollWindowsContents = nullptr
privateinherited

scroll windows that holds the content frame

Definition at line 137 of file GNEFrame.h.

Referenced by GNEFrame::GNEFrame(), GNEFrame::openHelpAttributesDialog(), and GNEFrame::setFrameWidth().

◆ myViewNet

GNEViewNet* GNEFrame::myViewNet = nullptr
protectedinherited

View Net.

Definition at line 121 of file GNEFrame.h.

Referenced by GNEDeleteFrame::ACsToDelete(), GNESelectorFrame::ACsToSelected(), GNEAdditionalFrame::addAdditional(), GNECrossingFrame::addCrossing(), GNETAZFrame::addOrRemoveTAZMember(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlan(), GNEPolygonFrame::addPOI(), GNEPolygonFrame::addPOILane(), GNEPolygonFrame::addPolygon(), GNEStopFrame::addStop(), GNEVehicleFrame::addVehicle(), GNEFrameAttributesModuls::AttributesEditorRow::AttributesEditorRow(), GNEAdditionalFrame::buildAdditionalOverEdge(), GNEAdditionalFrame::buildAdditionalOverLane(), GNEAdditionalFrame::buildAdditionalOverLanes(), GNEAdditionalFrame::buildAdditionalOverView(), buildConnection(), GNETLSEditorFrame::buildIinternalLanes(), GNEPersonFrame::buildPerson(), GNEPersonFrame::buildPersonOverRoute(), GNEPersonFrame::buildPersonOverStop(), GNEProhibitionFrame::buildProhibition(), GNETLSEditorFrame::cleanup(), GNESelectorFrame::clearCurrentSelection(), GNEInspectorFrame::clearInspectedAC(), GNETAZFrame::dropTAZMembers(), GNEPersonFrame::edgePathCreated(), GNEVehicleFrame::edgePathCreated(), GNETLSEditorFrame::editJunction(), GNETLSEditorFrame::editTLS(), GNEAdditionalFrame::generateID(), GNESelectorFrame::getMatches(), GNEFrame::getViewNet(), GNEPersonTypeFrame::GNEPersonTypeFrame(), GNEVehicleTypeFrame::GNEVehicleTypeFrame(), GNETLSEditorFrame::handleChange(), GNERouteFrame::handleEdgeClick(), GNESelectorFrame::handleIDs(), handleLaneClick(), GNETLSEditorFrame::handleMultiChange(), GNEProhibitionFrame::handleProhibitionClick(), GNEFrame::hide(), GNEInspectorFrame::hide(), GNERouteFrame::hotkeyBackSpace(), GNERouteFrame::hotkeyEnter(), GNERouteFrame::hotkeyEsc(), initTargets(), GNEInspectorFrame::inspectSingleElement(), GNEProhibitionFrame::onCmdCancel(), GNETLSEditorFrame::onCmdCancel(), GNETLSEditorFrame::onCmdDefCreate(), GNETLSEditorFrame::onCmdDefDelete(), GNETLSEditorFrame::onCmdDefSwitch(), GNEInspectorFrame::onCmdGoBack(), GNETLSEditorFrame::onCmdOK(), GNETLSEditorFrame::onCmdPhaseSwitch(), GNETLSEditorFrame::parseTLSPrograms(), GNEPersonPlanFrame::personPlanCreated(), GNEPolygonFrame::processClick(), GNECreateEdgeFrame::processClick(), GNEInspectorFrame::processDemandSupermodeClick(), GNEInspectorFrame::processNetworkSupermodeClick(), GNEProhibitionFrame::ProhibitionLegend::ProhibitionLegend(), GNEDeleteFrame::removeAttributeCarrier(), GNEDeleteFrame::removeSelectedAttributeCarriers(), GNEInspectorFrame::selectedOverlappedElement(), GNEPolygonFrame::shapeDrawed(), GNETAZFrame::shapeDrawed(), GNEDeleteFrame::show(), GNEFrame::show(), GNEPersonPlanFrame::show(), and GNEStopFrame::show().


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