![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNERouteFrame.h>
Public Member Functions | |
bool | addEdge (GNEEdge *edge) |
add edge to current route (note: edge must be included in set of candidate edges More... | |
void | clearEdges () |
clear edges (and restore colors) More... | |
ConsecutiveEdges (GNERouteFrame *routeFrameParent) | |
FOX-declaration. More... | |
const std::vector< GNEEdge * > & | getRouteEdges () const |
get temporal route More... | |
void | hideConsecutiveEdgesModul () |
hide ConsecutiveEdges modul More... | |
void | refreshEdgeCandidates () |
refresh edge candidates More... | |
void | showConsecutiveEdgesModul () |
show ConsecutiveEdges modul More... | |
~ConsecutiveEdges () | |
destructor More... | |
FOX-callbacks | |
Called when the user press create route button | |
long | onCmdCreateRoute (FXObject *, FXSelector, void *) |
long | onCmdAbortRoute (FXObject *, FXSelector, void *) |
Called when the user press create route button. More... | |
long | onCmdRemoveLastRouteEdge (FXObject *, FXSelector, void *) |
Called when the user click over button "Remove las inserted edge". More... | |
Protected Member Functions | |
ConsecutiveEdges () | |
FOX needs this. More... | |
void | updateInfoRouteLabel () |
update InfoRouteLabel More... | |
Private Attributes | |
FXButton * | myAbortCreationButton |
FXButton for abort creating route More... | |
FXButton * | myCreateRouteButton |
FXButton for create routes. More... | |
FXLabel * | myInfoRouteLabel |
label with route info More... | |
FXButton * | myRemoveLastInsertedEdge |
button for removing last inserted edge More... | |
std::vector< GNEEdge * > | myRouteEdges |
vector with current route edges More... | |
GNERouteFrame * | myRouteFrameParent |
pointer to Frame Parent More... | |
Definition at line 110 of file GNERouteFrame.h.
GNERouteFrame::ConsecutiveEdges::ConsecutiveEdges | ( | GNERouteFrame * | routeFrameParent | ) |
FOX-declaration.
constructor
Definition at line 251 of file GNERouteFrame.cpp.
References GUIDesignButton, GUIDesignLabelFrameInformation, MID_GNE_EDGEPATH_ABORT, MID_GNE_EDGEPATH_FINISH, MID_GNE_EDGEPATH_REMOVELAST, myAbortCreationButton, myCreateRouteButton, myInfoRouteLabel, myRemoveLastInsertedEdge, and GNERouteFrame::show().
GNERouteFrame::ConsecutiveEdges::~ConsecutiveEdges | ( | ) |
destructor
Definition at line 270 of file GNERouteFrame.cpp.
|
inlineprotected |
FOX needs this.
Definition at line 153 of file GNERouteFrame.h.
bool GNERouteFrame::ConsecutiveEdges::addEdge | ( | GNEEdge * | edge | ) |
add edge to current route (note: edge must be included in set of candidate edges
Definition at line 292 of file GNERouteFrame.cpp.
References GNEDemandElement::RouteCalculator::areEdgesConsecutives(), GNEApplicationWindow::disableUndoRedo(), GNERouteFrame::RouteModeSelector::getCurrentVehicleClass(), GNEViewParent::getGNEAppWindows(), GNEDemandElement::getRouteCalculatorInstance(), GNEViewNet::getViewParent(), myAbortCreationButton, myCreateRouteButton, myRemoveLastInsertedEdge, myRouteEdges, myRouteFrameParent, GNERouteFrame::myRouteModeSelector, GNEFrame::myViewNet, and refreshEdgeCandidates().
Referenced by GNERouteFrame::handleEdgeClick().
void GNERouteFrame::ConsecutiveEdges::clearEdges | ( | ) |
clear edges (and restore colors)
Definition at line 360 of file GNERouteFrame.cpp.
References myRouteEdges.
Referenced by onCmdAbortRoute().
const std::vector< GNEEdge * > & GNERouteFrame::ConsecutiveEdges::getRouteEdges | ( | ) | const |
get temporal route
Definition at line 379 of file GNERouteFrame.cpp.
References myRouteEdges.
Referenced by GNERouteFrame::drawTemporalRoute().
void GNERouteFrame::ConsecutiveEdges::hideConsecutiveEdgesModul | ( | ) |
hide ConsecutiveEdges modul
Definition at line 283 of file GNERouteFrame.cpp.
References GNERouteFrame::hide(), and onCmdAbortRoute().
Referenced by GNERouteFrame::RouteModeSelector::onCmdSelectRouteMode(), GNERouteFrame::RouteModeSelector::onCmdSelectVClass(), and GNERouteFrame::RouteModeSelector::setCurrentRouteMode().
long GNERouteFrame::ConsecutiveEdges::onCmdAbortRoute | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user press create route button.
Definition at line 414 of file GNERouteFrame.cpp.
References clearEdges(), GNEApplicationWindow::enableUndoRedo(), GNEViewParent::getGNEAppWindows(), GNEFrame::getViewNet(), GNEViewNet::getViewParent(), myAbortCreationButton, myCreateRouteButton, myRemoveLastInsertedEdge, myRouteEdges, myRouteFrameParent, GNEFrame::myViewNet, GNEViewNet::update(), and updateInfoRouteLabel().
Referenced by hideConsecutiveEdgesModul(), GNERouteFrame::hotkeyEsc(), onCmdCreateRoute(), GNERouteFrame::RouteModeSelector::onCmdSelectRouteMode(), and GNERouteFrame::RouteModeSelector::onCmdSelectVClass().
long GNERouteFrame::ConsecutiveEdges::onCmdCreateRoute | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Definition at line 385 of file GNERouteFrame.cpp.
References GNEFrameAttributesModuls::AttributesCreator::areValuesValid(), GNERouteHandler::RouteParameter::color, GNERouteHandler::RouteParameter::edges, GNENet::generateDemandElementID(), GNEFrameAttributesModuls::AttributesCreator::getAttributesAndValues(), GNERouteFrame::RouteModeSelector::getCurrentVehicleClass(), GNEViewNet::getNet(), GNEAttributeCarrier::getTagStr(), GNEViewNet::getUndoList(), GNEFrame::getViewNet(), GNERouteFrame::myRouteAttributes, myRouteEdges, myRouteFrameParent, GNERouteFrame::myRouteModeSelector, onCmdAbortRoute(), GNEUndoList::p_begin(), GNEUndoList::p_end(), GNERouteHandler::RouteParameter::routeID, GNEFrameAttributesModuls::AttributesCreator::showWarningMessage(), SUMO_ATTR_COLOR, SUMO_TAG_ROUTE, and GNERouteHandler::RouteParameter::VClass.
Referenced by GNERouteFrame::hotkeyEnter().
long GNERouteFrame::ConsecutiveEdges::onCmdRemoveLastRouteEdge | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user click over button "Remove las inserted edge".
Definition at line 435 of file GNERouteFrame.cpp.
References GNEFrame::getEdgeCandidateColor(), GNEFrame::getEdgeCandidateSelectedColor(), GNEFrame::getViewNet(), myRemoveLastInsertedEdge, myRouteEdges, myRouteFrameParent, GNEViewNet::update(), and updateInfoRouteLabel().
Referenced by GNERouteFrame::hotkeyBackSpace().
void GNERouteFrame::ConsecutiveEdges::refreshEdgeCandidates | ( | ) |
refresh edge candidates
Definition at line 333 of file GNERouteFrame.cpp.
References GNEDemandElement::RouteCalculator::areEdgesConsecutives(), GNERouteFrame::RouteModeSelector::getCurrentVehicleClass(), GNEFrame::getEdgeCandidateColor(), GNEFrame::getEdgeCandidateSelectedColor(), GNEDemandElement::getRouteCalculatorInstance(), GNEFrame::getViewNet(), myRouteEdges, myRouteFrameParent, GNERouteFrame::myRouteModeSelector, GNEViewNet::update(), and updateInfoRouteLabel().
Referenced by addEdge().
void GNERouteFrame::ConsecutiveEdges::showConsecutiveEdgesModul | ( | ) |
show ConsecutiveEdges modul
Definition at line 274 of file GNERouteFrame.cpp.
References GNERouteFrame::show().
Referenced by GNERouteFrame::RouteModeSelector::onCmdSelectRouteMode(), GNERouteFrame::RouteModeSelector::onCmdSelectVClass(), and GNERouteFrame::RouteModeSelector::setCurrentRouteMode().
|
protected |
update InfoRouteLabel
Definition at line 475 of file GNERouteFrame.cpp.
References myInfoRouteLabel, myRouteEdges, and toString().
Referenced by onCmdAbortRoute(), onCmdRemoveLastRouteEdge(), and refreshEdgeCandidates().
|
private |
FXButton for abort creating route
Definition at line 169 of file GNERouteFrame.h.
Referenced by addEdge(), ConsecutiveEdges(), and onCmdAbortRoute().
|
private |
FXButton for create routes.
Definition at line 166 of file GNERouteFrame.h.
Referenced by addEdge(), ConsecutiveEdges(), and onCmdAbortRoute().
|
private |
label with route info
Definition at line 163 of file GNERouteFrame.h.
Referenced by ConsecutiveEdges(), and updateInfoRouteLabel().
|
private |
button for removing last inserted edge
Definition at line 172 of file GNERouteFrame.h.
Referenced by addEdge(), ConsecutiveEdges(), onCmdAbortRoute(), and onCmdRemoveLastRouteEdge().
|
private |
vector with current route edges
Definition at line 175 of file GNERouteFrame.h.
Referenced by addEdge(), clearEdges(), getRouteEdges(), onCmdAbortRoute(), onCmdCreateRoute(), onCmdRemoveLastRouteEdge(), refreshEdgeCandidates(), and updateInfoRouteLabel().
|
private |
pointer to Frame Parent
Definition at line 160 of file GNERouteFrame.h.
Referenced by addEdge(), onCmdAbortRoute(), onCmdCreateRoute(), onCmdRemoveLastRouteEdge(), and refreshEdgeCandidates().