![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEFrameModuls.h>
Public Types | |
enum | EdgePathCreatorModes { GNE_EDGEPATHCREATOR_CONSECUTIVE = 1 << 0, GNE_EDGEPATHCREATOR_FROM_TO_VIA = 1 << 1, GNE_EDGEPATHCREATOR_FROM_BUSSTOP = 1 << 2, GNE_EDGEPATHCREATOR_TO_BUSSTOP = 1 << 3 } |
FOX-declaration. More... | |
Public Member Functions | |
void | abortEdgePathCreation () |
abort edge path creation More... | |
bool | addBusStop (GNEAdditional *busStop) |
add busStop to route More... | |
bool | addEdge (GNEEdge *edge) |
add edge to route More... | |
void | clearEdges () |
clear edges (and restore colors) More... | |
void | drawTemporalRoute () const |
draw temporal route More... | |
EdgePathCreator (GNEFrame *frameParent, int edgePathCreatorModes) | |
default constructor More... | |
void | edgePathCreatorName (const std::string &name) |
update EdgePathCreator name More... | |
void | finishEdgePathCreation () |
finish edge path creation More... | |
GNEAdditional * | getClickedBusStop () const |
get current clicked edges More... | |
std::vector< GNEEdge * > | getClickedEdges () const |
get current clicked edges More... | |
void | hideEdgePathCreator () |
show EdgePathCreator More... | |
void | removeLastInsertedElement () |
remove last added element (either a BusStop or an edge) More... | |
void | setEdgePathCreatorModes (int edgePathCreatorModes) |
set EdgePathCreatorModes More... | |
void | setVClass (SUMOVehicleClass vClass) |
set SUMOVehicleClass More... | |
void | showEdgePathCreator () |
show EdgePathCreator More... | |
~EdgePathCreator () | |
destructor More... | |
FOX-callbacks | |
Called when the user click over button "Abort route creation" | |
long | onCmdAbortRouteCreation (FXObject *, FXSelector, void *) |
long | onCmdFinishRouteCreation (FXObject *, FXSelector, void *) |
Called when the user click over button "Finish route creation". More... | |
long | onCmdRemoveLastInsertedElement (FXObject *, FXSelector, void *) |
Called when the user click over button "Remove las inserted edge/busStop". More... | |
Protected Member Functions | |
EdgePathCreator () | |
FOX needs this. More... | |
Private Member Functions | |
void | restoreEdgeColor (const GNEEdge *edge) |
restore colors of given edge More... | |
Private Attributes | |
FXButton * | myAbortCreationButton |
button for abort route creation More... | |
std::vector< GNEEdge * > | myClickedEdges |
current clicked edges More... | |
int | myEdgePathCreatorModes |
current edge path creator modes More... | |
FXButton * | myFinishCreationButton |
button for finish route creation More... | |
GNEFrame * | myFrameParent |
pointer to GNEFrame Parent More... | |
FXButton * | myRemoveLastInsertedEdge |
button for removing last inserted edge More... | |
GNEAdditional * | mySelectedBusStop |
pointer to selected busStop More... | |
std::vector< GNEEdge * > | myTemporalRoute |
vector with temporal route edges More... | |
SUMOVehicleClass | myVClass |
VClass used for this trip. More... | |
Definition at line 177 of file GNEFrameModuls.h.
FOX-declaration.
list of the edge path creator modes
Enumerator | |
---|---|
GNE_EDGEPATHCREATOR_CONSECUTIVE | |
GNE_EDGEPATHCREATOR_FROM_TO_VIA | |
GNE_EDGEPATHCREATOR_FROM_BUSSTOP | |
GNE_EDGEPATHCREATOR_TO_BUSSTOP |
Definition at line 184 of file GNEFrameModuls.h.
GNEFrameModuls::EdgePathCreator::EdgePathCreator | ( | GNEFrame * | frameParent, |
int | edgePathCreatorModes | ||
) |
default constructor
Definition at line 511 of file GNEFrameModuls.cpp.
References GUIDesignButton, MID_GNE_EDGEPATH_ABORT, MID_GNE_EDGEPATH_FINISH, MID_GNE_EDGEPATH_REMOVELAST, myAbortCreationButton, myFinishCreationButton, and myRemoveLastInsertedEdge.
GNEFrameModuls::EdgePathCreator::~EdgePathCreator | ( | ) |
destructor
Definition at line 532 of file GNEFrameModuls.cpp.
|
inlineprotected |
FOX needs this.
Definition at line 253 of file GNEFrameModuls.h.
void GNEFrameModuls::EdgePathCreator::abortEdgePathCreation | ( | ) |
abort edge path creation
Definition at line 724 of file GNEFrameModuls.cpp.
References myAbortCreationButton, and onCmdAbortRouteCreation().
Referenced by GNEViewNet::abortOperation().
bool GNEFrameModuls::EdgePathCreator::addBusStop | ( | GNEAdditional * | busStop | ) |
add busStop to route
Definition at line 661 of file GNEFrameModuls.cpp.
References GNEFrame::getEdgeCandidateSelectedColor(), myClickedEdges, myFrameParent, mySelectedBusStop, and GNEAdditional::setSpecialColor().
Referenced by GNEPersonFrame::addPerson().
bool GNEFrameModuls::EdgePathCreator::addEdge | ( | GNEEdge * | edge | ) |
add edge to route
Definition at line 597 of file GNEFrameModuls.cpp.
References GNEDemandElement::RouteCalculator::calculateDijkstraRoute(), GNEApplicationWindow::disableUndoRedo(), GNEFrame::getEdgeCandidateSelectedColor(), GNEViewParent::getGNEAppWindows(), GNEEdge::getLanes(), NBEdge::getLanes(), GNEEdge::getNBEdge(), GNEDemandElement::getRouteCalculatorInstance(), GNEAttributeCarrier::getTagProperty(), GNEAttributeCarrier::TagProperties::getTagStr(), GNEFrame::getViewNet(), GNEViewNet::getViewParent(), myAbortCreationButton, myClickedEdges, myFinishCreationButton, myFrameParent, myRemoveLastInsertedEdge, mySelectedBusStop, myTemporalRoute, myVClass, GNEFrame::myViewNet, GNEViewNet::setStatusBarText(), and WRITE_DEBUG.
Referenced by GNEPersonFrame::addPerson(), and GNEVehicleFrame::addVehicle().
void GNEFrameModuls::EdgePathCreator::clearEdges | ( | ) |
clear edges (and restore colors)
Definition at line 672 of file GNEFrameModuls.cpp.
References GNEApplicationWindow::enableUndoRedo(), GNEViewParent::getGNEAppWindows(), GNEViewNet::getViewParent(), myClickedEdges, myFrameParent, mySelectedBusStop, myTemporalRoute, GNEFrame::myViewNet, restoreEdgeColor(), and GNEAdditional::setSpecialColor().
Referenced by onCmdAbortRouteCreation(), and onCmdFinishRouteCreation().
void GNEFrameModuls::EdgePathCreator::drawTemporalRoute | ( | ) | const |
draw temporal route
Definition at line 691 of file GNEFrameModuls.cpp.
References GLHelper::drawLine(), GNEAdditional::getAdditionalGeometry(), PositionVector::getLineCenter(), GLO_MAX, myClickedEdges, mySelectedBusStop, myTemporalRoute, RGBColor::ORANGE, GLHelper::setColor(), and GNEAdditional::AdditionalGeometry::shape.
Referenced by GNEViewNet::doPaintGL().
void GNEFrameModuls::EdgePathCreator::edgePathCreatorName | ( | const std::string & | name | ) |
update EdgePathCreator name
Definition at line 536 of file GNEFrameModuls.cpp.
References myAbortCreationButton, and myFinishCreationButton.
Referenced by GNEPersonFrame::demandElementSelected(), and GNEPersonFrame::tagSelected().
void GNEFrameModuls::EdgePathCreator::finishEdgePathCreation | ( | ) |
finish edge path creation
Definition at line 732 of file GNEFrameModuls.cpp.
References myFinishCreationButton, and onCmdFinishRouteCreation().
Referenced by GNEViewNet::hotkeyEnter().
GNEAdditional * GNEFrameModuls::EdgePathCreator::getClickedBusStop | ( | ) | const |
get current clicked edges
Definition at line 591 of file GNEFrameModuls.cpp.
References mySelectedBusStop.
Referenced by GNEPersonFrame::edgePathCreated().
std::vector< GNEEdge * > GNEFrameModuls::EdgePathCreator::getClickedEdges | ( | ) | const |
get current clicked edges
Definition at line 585 of file GNEFrameModuls.cpp.
References myClickedEdges.
Referenced by GNEPersonFrame::edgePathCreated(), and GNEVehicleFrame::edgePathCreated().
void GNEFrameModuls::EdgePathCreator::hideEdgePathCreator | ( | ) |
show EdgePathCreator
Definition at line 558 of file GNEFrameModuls.cpp.
References myClickedEdges, myTemporalRoute, and restoreEdgeColor().
Referenced by GNEPersonFrame::demandElementSelected(), GNEPersonFrame::tagSelected(), and GNEVehicleFrame::tagSelected().
long GNEFrameModuls::EdgePathCreator::onCmdAbortRouteCreation | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Definition at line 748 of file GNEFrameModuls.cpp.
References clearEdges(), myAbortCreationButton, myFinishCreationButton, and myRemoveLastInsertedEdge.
Referenced by abortEdgePathCreation().
long GNEFrameModuls::EdgePathCreator::onCmdFinishRouteCreation | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user click over button "Finish route creation".
Definition at line 760 of file GNEFrameModuls.cpp.
References clearEdges(), GNEFrame::edgePathCreated(), myAbortCreationButton, myClickedEdges, myFinishCreationButton, myFrameParent, myRemoveLastInsertedEdge, GNEFrame::myViewNet, and GNEViewNet::update().
Referenced by finishEdgePathCreation().
long GNEFrameModuls::EdgePathCreator::onCmdRemoveLastInsertedElement | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user click over button "Remove las inserted edge/busStop".
Definition at line 779 of file GNEFrameModuls.cpp.
References GNEDemandElement::RouteCalculator::calculateDijkstraRoute(), GNEDemandElement::getRouteCalculatorInstance(), myClickedEdges, myFrameParent, myRemoveLastInsertedEdge, myTemporalRoute, myVClass, GNEFrame::myViewNet, restoreEdgeColor(), and GNEViewNet::update().
Referenced by removeLastInsertedElement().
void GNEFrameModuls::EdgePathCreator::removeLastInsertedElement | ( | ) |
remove last added element (either a BusStop or an edge)
Definition at line 740 of file GNEFrameModuls.cpp.
References myRemoveLastInsertedEdge, and onCmdRemoveLastInsertedElement().
Referenced by GNEViewNet::hotkeyBackSpace().
|
private |
restore colors of given edge
Definition at line 800 of file GNEFrameModuls.cpp.
References GNEEdge::getLanes().
Referenced by clearEdges(), hideEdgePathCreator(), and onCmdRemoveLastInsertedElement().
void GNEFrameModuls::EdgePathCreator::setEdgePathCreatorModes | ( | int | edgePathCreatorModes | ) |
set EdgePathCreatorModes
Definition at line 579 of file GNEFrameModuls.cpp.
References myEdgePathCreatorModes.
void GNEFrameModuls::EdgePathCreator::setVClass | ( | SUMOVehicleClass | vClass | ) |
set SUMOVehicleClass
Definition at line 573 of file GNEFrameModuls.cpp.
References myVClass.
Referenced by GNEPersonFrame::demandElementSelected(), GNEVehicleFrame::demandElementSelected(), GNEPersonFrame::GNEPersonFrame(), GNEPersonFrame::show(), and GNEPersonFrame::tagSelected().
void GNEFrameModuls::EdgePathCreator::showEdgePathCreator | ( | ) |
show EdgePathCreator
Definition at line 547 of file GNEFrameModuls.cpp.
References myAbortCreationButton, myFinishCreationButton, and myRemoveLastInsertedEdge.
Referenced by GNEPersonFrame::demandElementSelected(), GNEPersonFrame::tagSelected(), and GNEVehicleFrame::tagSelected().
|
private |
button for abort route creation
Definition at line 263 of file GNEFrameModuls.h.
Referenced by abortEdgePathCreation(), addEdge(), EdgePathCreator(), edgePathCreatorName(), onCmdAbortRouteCreation(), onCmdFinishRouteCreation(), and showEdgePathCreator().
|
private |
current clicked edges
Definition at line 272 of file GNEFrameModuls.h.
Referenced by addBusStop(), addEdge(), clearEdges(), drawTemporalRoute(), getClickedEdges(), hideEdgePathCreator(), onCmdFinishRouteCreation(), and onCmdRemoveLastInsertedElement().
|
private |
current edge path creator modes
Definition at line 281 of file GNEFrameModuls.h.
Referenced by setEdgePathCreatorModes().
|
private |
button for finish route creation
Definition at line 260 of file GNEFrameModuls.h.
Referenced by addEdge(), EdgePathCreator(), edgePathCreatorName(), finishEdgePathCreation(), onCmdAbortRouteCreation(), onCmdFinishRouteCreation(), and showEdgePathCreator().
|
private |
pointer to GNEFrame Parent
Definition at line 257 of file GNEFrameModuls.h.
Referenced by addBusStop(), addEdge(), clearEdges(), onCmdFinishRouteCreation(), and onCmdRemoveLastInsertedElement().
|
private |
button for removing last inserted edge
Definition at line 266 of file GNEFrameModuls.h.
Referenced by addEdge(), EdgePathCreator(), onCmdAbortRouteCreation(), onCmdFinishRouteCreation(), onCmdRemoveLastInsertedElement(), removeLastInsertedElement(), and showEdgePathCreator().
|
private |
pointer to selected busStop
Definition at line 275 of file GNEFrameModuls.h.
Referenced by addBusStop(), addEdge(), clearEdges(), drawTemporalRoute(), and getClickedBusStop().
|
private |
vector with temporal route edges
Definition at line 278 of file GNEFrameModuls.h.
Referenced by addEdge(), clearEdges(), drawTemporalRoute(), hideEdgePathCreator(), and onCmdRemoveLastInsertedElement().
|
private |
VClass used for this trip.
Definition at line 269 of file GNEFrameModuls.h.
Referenced by addEdge(), onCmdRemoveLastInsertedElement(), and setVClass().