SUMO - Simulation of Urban MObility
GNEConnectorFrame Class Reference

#include <GNEConnectorFrame.h>

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

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...
 
 GNEConnectorFrame (FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
 FOX-declaration. More...
 
void handleLaneClick (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...
 
virtual void hide ()
 hide Frame More...
 
void setFrameWidth (int newWidth)
 set width of GNEFrame More...
 
virtual void show ()
 show Frame More...
 
 ~GNEConnectorFrame ()
 Destructor. More...
 
FOX-callbacks

Called when the user presses the OK-Button saves any connection modifications

long onCmdOK (FXObject *, FXSelector, void *)
 
long onCmdCancel (FXObject *, FXSelector, void *)
 Called when the user presses the Cancel-button discards any connection modifications. More...
 
long onCmdSelectDeadEnds (FXObject *, FXSelector, void *)
 Called when the user presses the Corresponding-button. More...
 
long onCmdSelectDeadStarts (FXObject *, FXSelector, void *)
 
long onCmdSelectConflicts (FXObject *, FXSelector, void *)
 
long onCmdSelectPass (FXObject *, FXSelector, void *)
 
long onCmdClearSelectedConnections (FXObject *, FXSelector, void *)
 
long onCmdResetSelectedConnections (FXObject *, FXSelector, void *)
 

Protected Member Functions

 GNEConnectorFrame ()
 FOX needs this. More...
 
void openHelpAttributesDialog (SumoXMLTag tag) 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...
 

Private Types

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

Private Member Functions

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...
 
void updateDescription () const
 update description More...
 

Private Attributes

FXButton * myCancelButton
 "Cancel" button More...
 
FXButton * myClearSelectedButton
 "Clear Selected" More...
 
FXLabel * myConflictLabel
 conflict label More...
 
GNELane * myCurrentLane
 the lane of which connections are to be modified More...
 
std::vector< NBEdge::Connection > myDeletedConnections
 vector of connections deleted in the current editing step More...
 
FXGroupBox * myGroupBoxDescription
 Groupbox for description. More...
 
FXGroupBox * myGroupBoxLegend
 group box for legend More...
 
FXGroupBox * myGroupBoxModifications
 GroupBox for Buttons. More...
 
FXGroupBox * myGroupBoxOperations
 groupbox for operations More...
 
FXGroupBox * myGroupBoxSelection
 groupbox for selection hints More...
 
FXLabel * myHoldControlLabel
 hold control label More...
 
FXLabel * myHoldShiftLabel
 Selection Hint. More...
 
std::map< int, GNEInternalLane * > myInternalLanes
 the internal lanes belonging the the current junction indexed by their tl-index More...
 
FXLabel * myLaneDescriptionLabel
 the label that shows the current editing state More...
 
int myNumChanges
 number of changes More...
 
FXLabel * myPossibleTargetLabel
 possible target label More...
 
std::set< GNELane * > myPotentialTargets
 the set of lanes to which the current lane may be connected More...
 
FXButton * myResetSelectedButton
 "Reset Selected" More...
 
FXButton * mySaveButton
 "OK" button More...
 
FXButton * mySelectConflictsButton
 "Select Conflicts" button More...
 
FXButton * mySelectDeadEndsButton
 "Select Dead Ends" button More...
 
FXButton * mySelectDeadStartsButton
 "Select Dead Starts" button More...
 
FXButton * mySelectPassingButton
 "Select Edges which may always pass" More...
 
FXLabel * mySourceLabel
 source label More...
 
FXLabel * myTargetLabel
 target label More...
 
FXLabel * myTargetPassLabel
 target pass label More...
 

Static Private Attributes

static RGBColor conflictColor
 color for a to-lane that cannot be used because another connection conflicts More...
 
static RGBColor potentialTargetColor
 color for potential to-lane targets (currently unconnected) More...
 
static RGBColor sourceColor
 color for the from-lane of a connection More...
 
static RGBColor targetColor
 color for the to-lane of a connection More...
 
static RGBColor targetPassColor
 color for the to-lane of a connection with pass attribute More...
 

Detailed Description

The Widget for modifying selections of network-elements

Definition at line 40 of file GNEConnectorFrame.h.

Member Enumeration Documentation

◆ LaneStatus

the status of a target lane

Enumerator
UNCONNECTED 
CONNECTED 
CONNECTED_PASS 
CONFLICTED 

Definition at line 86 of file GNEConnectorFrame.h.

Constructor & Destructor Documentation

◆ GNEConnectorFrame() [1/2]

◆ ~GNEConnectorFrame()

GNEConnectorFrame::~GNEConnectorFrame ( )

Destructor.

Definition at line 158 of file GNEConnectorFrame.cpp.

◆ GNEConnectorFrame() [2/2]

GNEConnectorFrame::GNEConnectorFrame ( )
inlineprotected

FOX needs this.

Definition at line 81 of file GNEConnectorFrame.h.

Member Function Documentation

◆ cleanup()

void GNEConnectorFrame::cleanup ( )
private

clean up when deselecting current lane

Definition at line 438 of file GNEConnectorFrame.cpp.

References myCurrentLane, myDeletedConnections, myNumChanges, myPotentialTargets, GNELane::setSpecialColor(), and updateDescription().

Referenced by onCmdCancel(), and onCmdOK().

◆ focusUpperElement()

void GNEFrame::focusUpperElement ( )
inherited

◆ getFrameHeaderFont()

FXFont * GNEFrame::getFrameHeaderFont ( ) const
inherited

get font of the header's frame

Definition at line 778 of file GNEFrame.cpp.

References GNEFrame::myFrameHeaderFont.

◆ getFrameHeaderLabel()

FXLabel * GNEFrame::getFrameHeaderLabel ( ) const
inherited

get the label for the frame's header

Definition at line 772 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 766 of file GNEFrame.cpp.

References GNEFrame::myViewNet.

Referenced by GNEPolygonFrame::DrawingMode::abortDrawing(), GNETLSEditorFrame::TLSFile::checkTLSValids(), GNEFrame::ACHierarchy::createPopUpMenu(), GNECrossingFrame::edgesSelector::enableEdgeSelector(), GNETLSEditorFrame::TLSFile::myStartElement(), GNEFrame::ACHierarchy::onCmdCenterItem(), GNEInspectorFrame::TemplateEditor::onCmdCopyTemplate(), GNEFrame::ACHierarchy::onCmdDeleteItem(), GNEFrame::GenericParametersEditor::onCmdEditGenericParameter(), GNEFrame::ACHierarchy::onCmdInspectItem(), GNESelectorFrame::SelectionOperation::onCmdInvert(), GNESelectorFrame::SelectionOperation::onCmdLoad(), GNEInspectorFrame::AttributesEditor::AttributeInput::onCmdOpenAttributeDialog(), GNESelectorFrame::VisualScaling::onCmdScaleSelection(), GNEInspectorFrame::AttributesEditor::AttributeInput::onCmdSetAttribute(), GNECrossingFrame::crossingParameters::onCmdSetAttribute(), GNEFrame::GenericParametersEditor::onCmdSetGenericParameter(), GNEInspectorFrame::GEOAttributesEditor::onCmdSetGEOAttribute(), GNEInspectorFrame::NeteditAttributesEditor::onCmdSetNeteditAttribute(), GNEAdditionalFrame::SelectorParentAdditional::refreshListOfAdditionalParents(), GNEDeleteFrame::removeAttributeCarrier(), GNECrossingFrame::edgesSelector::restoreEdgeColors(), GNEFrame::ACHierarchy::showAttributeCarrierChilds(), GNEFrame::ACHierarchy::showAttributeCarrierParents(), GNEAdditionalFrame::SelectorParentEdges::showList(), GNEAdditionalFrame::SelectorParentLanes::showList(), GNEInspectorFrame::NeteditAttributesEditor::showNeteditAttributesEditor(), GNEAdditionalFrame::AdditionalAttributes::showWarningMessage(), GNEPolygonFrame::ShapeAttributes::showWarningMessage(), GNEPolygonFrame::DrawingMode::stopDrawing(), GNESelectorFrame::LockGLObjectTypes::updateLockGLObjectTypes(), GNEAdditionalFrame::SelectorParentEdges::updateUseSelectedEdges(), and GNEAdditionalFrame::SelectorParentLanes::updateUseSelectedLanes().

◆ handleLaneClick()

void GNEConnectorFrame::handleLaneClick ( GNELane *  lane,
bool  mayDefinitelyPass,
bool  allowConflict,
bool  toggle 
)

◆ hide()

◆ initTargets()

◆ onCmdCancel()

long GNEConnectorFrame::onCmdCancel ( FXObject *  ,
FXSelector  ,
void *   
)

Called when the user presses the Cancel-button discards any connection modifications.

Definition at line 231 of file GNEConnectorFrame.cpp.

References cleanup(), GNEViewNet::getUndoList(), myCurrentLane, myNumChanges, GNEFrame::myViewNet, GNEUndoList::p_abort(), and GNEViewNet::setStatusBarText().

Referenced by GNEViewNet::abortOperation(), onCmdClearSelectedConnections(), and onCmdResetSelectedConnections().

◆ onCmdClearSelectedConnections()

◆ onCmdOK()

long GNEConnectorFrame::onCmdOK ( FXObject *  ,
FXSelector  ,
void *   
)

◆ onCmdResetSelectedConnections()

long GNEConnectorFrame::onCmdResetSelectedConnections ( FXObject *  ,
FXSelector  ,
void *   
)

◆ onCmdSelectConflicts()

◆ onCmdSelectDeadEnds()

long GNEConnectorFrame::onCmdSelectDeadEnds ( FXObject *  ,
FXSelector  ,
void *   
)

◆ onCmdSelectDeadStarts()

◆ onCmdSelectPass()

◆ openHelpAttributesDialog()

◆ removeConnections()

void GNEConnectorFrame::removeConnections ( GNELane *  lane)
private

remove connections

Definition at line 369 of file GNEConnectorFrame.cpp.

References handleLaneClick(), myPotentialTargets, and onCmdOK().

Referenced by onCmdClearSelectedConnections().

◆ setFrameWidth()

void GNEFrame::setFrameWidth ( int  newWidth)
inherited

set width of GNEFrame

Definition at line 759 of file GNEFrame.cpp.

References GNEFrame::myScrollWindowsContents.

◆ show()

◆ updateDescription()

void GNEConnectorFrame::updateDescription ( ) const
private

Field Documentation

◆ conflictColor

RGBColor GNEConnectorFrame::conflictColor
staticprivate

color for a to-lane that cannot be used because another connection conflicts

Definition at line 178 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame(), and initTargets().

◆ myCancelButton

FXButton* GNEConnectorFrame::myCancelButton
private

"Cancel" button

Definition at line 103 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myClearSelectedButton

FXButton* GNEConnectorFrame::myClearSelectedButton
private

"Clear Selected"

Definition at line 124 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myConflictLabel

FXLabel* GNEConnectorFrame::myConflictLabel
private

conflict label

Definition at line 154 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myContentFrame

FXVerticalFrame* GNEFrame::myContentFrame
protectedinherited

◆ myCurrentLane

GNELane* GNEConnectorFrame::myCurrentLane
private

the lane of which connections are to be modified

Definition at line 157 of file GNEConnectorFrame.h.

Referenced by cleanup(), getLaneStatus(), handleLaneClick(), initTargets(), onCmdCancel(), onCmdOK(), and updateDescription().

◆ myDeletedConnections

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

vector of connections deleted in the current editing step

Definition at line 169 of file GNEConnectorFrame.h.

Referenced by cleanup(), and handleLaneClick().

◆ myGroupBoxDescription

FXGroupBox* GNEConnectorFrame::myGroupBoxDescription
private

Groupbox for description.

Definition at line 94 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myGroupBoxLegend

FXGroupBox* GNEConnectorFrame::myGroupBoxLegend
private

group box for legend

Definition at line 139 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myGroupBoxModifications

FXGroupBox* GNEConnectorFrame::myGroupBoxModifications
private

GroupBox for Buttons.

Definition at line 100 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myGroupBoxOperations

FXGroupBox* GNEConnectorFrame::myGroupBoxOperations
private

groupbox for operations

Definition at line 109 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myGroupBoxSelection

FXGroupBox* GNEConnectorFrame::myGroupBoxSelection
private

groupbox for selection hints

Definition at line 130 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myHeaderFrame

FXHorizontalFrame* GNEFrame::myHeaderFrame
protectedinherited

fame for header elements

Definition at line 238 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 244 of file GNEFrame.h.

Referenced by GNEFrame::GNEFrame().

◆ myHoldControlLabel

FXLabel* GNEConnectorFrame::myHoldControlLabel
private

hold control label

Definition at line 136 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myHoldShiftLabel

FXLabel* GNEConnectorFrame::myHoldShiftLabel
private

Selection Hint.

Definition at line 133 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myInternalLanes

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

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

Definition at line 166 of file GNEConnectorFrame.h.

◆ myLaneDescriptionLabel

FXLabel* GNEConnectorFrame::myLaneDescriptionLabel
private

the label that shows the current editing state

Definition at line 97 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame(), and updateDescription().

◆ myNumChanges

int GNEConnectorFrame::myNumChanges
private

number of changes

Definition at line 163 of file GNEConnectorFrame.h.

Referenced by cleanup(), handleLaneClick(), onCmdCancel(), onCmdOK(), and updateDescription().

◆ myPossibleTargetLabel

FXLabel* GNEConnectorFrame::myPossibleTargetLabel
private

possible target label

Definition at line 148 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myPotentialTargets

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

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

Definition at line 160 of file GNEConnectorFrame.h.

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

◆ myResetSelectedButton

FXButton* GNEConnectorFrame::myResetSelectedButton
private

"Reset Selected"

Definition at line 127 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ mySaveButton

FXButton* GNEConnectorFrame::mySaveButton
private

"OK" button

Definition at line 106 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ mySelectConflictsButton

FXButton* GNEConnectorFrame::mySelectConflictsButton
private

"Select Conflicts" button

Definition at line 118 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ mySelectDeadEndsButton

FXButton* GNEConnectorFrame::mySelectDeadEndsButton
private

"Select Dead Ends" button

Definition at line 112 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ mySelectDeadStartsButton

FXButton* GNEConnectorFrame::mySelectDeadStartsButton
private

"Select Dead Starts" button

Definition at line 115 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ mySelectPassingButton

FXButton* GNEConnectorFrame::mySelectPassingButton
private

"Select Edges which may always pass"

Definition at line 121 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ mySourceLabel

FXLabel* GNEConnectorFrame::mySourceLabel
private

source label

Definition at line 142 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myTargetLabel

FXLabel* GNEConnectorFrame::myTargetLabel
private

target label

Definition at line 145 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myTargetPassLabel

FXLabel* GNEConnectorFrame::myTargetPassLabel
private

target pass label

Definition at line 151 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame().

◆ myViewNet

GNEViewNet* GNEFrame::myViewNet
protectedinherited

View Net for changes.

Definition at line 232 of file GNEFrame.h.

Referenced by GNEAdditionalFrame::addAdditional(), GNEPolygonFrame::addPOI(), GNEPolygonFrame::addPOILane(), GNEPolygonFrame::addPolygon(), GNETLSEditorFrame::buildIinternalLanes(), GNEPolygonFrame::buildPoly(), GNESelectorFrame::clearCurrentSelection(), GNEInspectorFrame::clearInspectedAC(), GNETLSEditorFrame::editJunction(), GNEAdditionalFrame::generateID(), GNESelectorFrame::getMatches(), GNEFrame::getViewNet(), GNETLSEditorFrame::handleChange(), GNESelectorFrame::handleIDs(), handleLaneClick(), GNETLSEditorFrame::handleMultiChange(), GNEFrame::hide(), GNEInspectorFrame::hide(), initTargets(), GNEInspectorFrame::inspectElement(), onCmdCancel(), GNEProhibitionFrame::onCmdCancel(), GNETLSEditorFrame::onCmdCancel(), onCmdClearSelectedConnections(), GNECrossingFrame::onCmdCreateCrossing(), GNETLSEditorFrame::onCmdDefCreate(), GNETLSEditorFrame::onCmdDefDelete(), GNETLSEditorFrame::onCmdDefSwitch(), GNEInspectorFrame::onCmdGoBack(), onCmdOK(), GNETLSEditorFrame::onCmdOK(), GNETLSEditorFrame::onCmdPhaseSwitch(), onCmdResetSelectedConnections(), GNESelectorFrame::SelectionOperation::onCmdSave(), onCmdSelectConflicts(), onCmdSelectDeadEnds(), onCmdSelectDeadStarts(), onCmdSelectPass(), GNETLSEditorFrame::parseTLSPrograms(), GNEPolygonFrame::processClick(), GNEAdditionalFrame::removeAdditional(), GNEDeleteFrame::removeAttributeCarrier(), GNEDeleteFrame::removeSelectedAttributeCarriers(), GNEDeleteFrame::show(), and GNEFrame::show().

◆ potentialTargetColor

RGBColor GNEConnectorFrame::potentialTargetColor
staticprivate

color for potential to-lane targets (currently unconnected)

Definition at line 184 of file GNEConnectorFrame.h.

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

◆ sourceColor

RGBColor GNEConnectorFrame::sourceColor
staticprivate

color for the from-lane of a connection

Definition at line 172 of file GNEConnectorFrame.h.

Referenced by GNEConnectorFrame(), and handleLaneClick().

◆ targetColor

RGBColor GNEConnectorFrame::targetColor
staticprivate

color for the to-lane of a connection

Definition at line 175 of file GNEConnectorFrame.h.

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

◆ targetPassColor

RGBColor GNEConnectorFrame::targetPassColor
staticprivate

color for the to-lane of a connection with pass attribute

Definition at line 181 of file GNEConnectorFrame.h.

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


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