![]() |
SUMO - Simulation of Urban MObility
|
struct used to group all variables related with selecting using a square or polygon More...
Public Member Functions | |
void | beginRectangleSelection () |
begin rectangle selection More... | |
void | drawRectangleSelection (const RGBColor &color) const |
draw rectangle selection More... | |
void | finishRectangleSelection () |
finish rectangle selection More... | |
void | moveRectangleSelection () |
move rectangle selection More... | |
std::vector< GNEEdge * > | processEdgeRectangleSelection () |
process rectangle Selection (only limited to Edges) More... | |
void | processRectangleSelection () |
process rectangle Selection More... | |
void | processShapeSelection (const PositionVector &shape) |
process shape selection More... | |
SelectingArea (GNEViewNet *viewNet) | |
default constructor More... | |
Data Fields | |
bool | selectingUsingRectangle |
whether we have started rectangle-selection More... | |
bool | startDrawing |
whether we have started rectangle-selection More... | |
Private Member Functions | |
void | processBoundarySelection (const Boundary &boundary) |
Process boundary Selection. More... | |
Private Attributes | |
GNEViewNet * | myViewNet |
pointer to viewNet More... | |
Position | selectionCorner1 |
firstcorner of the rectangle-selection More... | |
Position | selectionCorner2 |
second corner of the rectangle-selection More... | |
struct used to group all variables related with selecting using a square or polygon
Definition at line 668 of file GNEViewNet.h.
GNEViewNet::SelectingArea::SelectingArea | ( | GNEViewNet * | viewNet | ) |
default constructor
Definition at line 3570 of file GNEViewNet.cpp.
void GNEViewNet::SelectingArea::beginRectangleSelection | ( | ) |
begin rectangle selection
Definition at line 3578 of file GNEViewNet.cpp.
References GUISUMOAbstractView::getPositionInformation(), myViewNet, selectingUsingRectangle, selectionCorner1, and selectionCorner2.
Referenced by GNEViewNet::onLeftBtnPress().
void GNEViewNet::SelectingArea::drawRectangleSelection | ( | const RGBColor & | color | ) | const |
draw rectangle selection
Definition at line 3657 of file GNEViewNet.cpp.
References GLO_MAX, selectingUsingRectangle, selectionCorner1, selectionCorner2, GLHelper::setColor(), Position::x(), and Position::y().
Referenced by GNEViewNet::doPaintGL().
void GNEViewNet::SelectingArea::finishRectangleSelection | ( | ) |
finish rectangle selection
Definition at line 3599 of file GNEViewNet.cpp.
References selectingUsingRectangle, and startDrawing.
Referenced by GNEViewNet::onLeftBtnRelease().
void GNEViewNet::SelectingArea::moveRectangleSelection | ( | ) |
move rectangle selection
Definition at line 3586 of file GNEViewNet.cpp.
References Position::distanceTo2D(), GUISUMOAbstractView::getPositionInformation(), myViewNet, selectionCorner1, selectionCorner2, GNEViewNet::setStatusBarText(), startDrawing, toString(), Position::x(), and Position::y().
Referenced by GNEViewNet::onMouseMove().
|
private |
Process boundary Selection.
Definition at line 3676 of file GNEViewNet.cpp.
References GNEViewNet::autoSelectNodes(), GNEViewNet::getAttributeCarriersInBoundary(), GNESelectorFrame::ModificationMode::getModificationMode(), GNESelectorFrame::getModificationModeModul(), GNENet::getSelectedAttributeCarriers(), GNEViewParent::getSelectorFrame(), GNE_ATTR_SELECTED, GUISUMOAbstractView::makeCurrent(), GNEViewNet::myNet, GNEViewNet::myUndoList, myViewNet, GNEViewNet::myViewParent, GNEUndoList::p_begin(), GNEUndoList::p_end(), GNESelectorFrame::ModificationMode::SET_ADD, GNESelectorFrame::ModificationMode::SET_REPLACE, GNESelectorFrame::ModificationMode::SET_RESTRICT, GNESelectorFrame::ModificationMode::SET_SUB, and SUMO_TAG_EDGE.
Referenced by processRectangleSelection(), and processShapeSelection().
std::vector< GNEEdge * > GNEViewNet::SelectingArea::processEdgeRectangleSelection | ( | ) |
process rectangle Selection (only limited to Edges)
Definition at line 3623 of file GNEViewNet.cpp.
References Boundary::add(), GNEViewNet::getAttributeCarriersInBoundary(), GUISUMOAbstractView::makeCurrent(), GNEViewNet::myKeyPressed, myViewNet, selectionCorner1, selectionCorner2, GNEViewNet::KeyPressed::shiftKeyPressed(), SUMO_TAG_EDGE, Position::x(), and Position::y().
Referenced by GNEViewNet::onLeftBtnRelease().
void GNEViewNet::SelectingArea::processRectangleSelection | ( | ) |
process rectangle Selection
Definition at line 3607 of file GNEViewNet.cpp.
References Boundary::add(), GNEViewNet::myKeyPressed, myViewNet, processBoundarySelection(), selectionCorner1, selectionCorner2, GNEViewNet::KeyPressed::shiftKeyPressed(), Position::x(), and Position::y().
Referenced by GNEViewNet::onLeftBtnRelease().
void GNEViewNet::SelectingArea::processShapeSelection | ( | const PositionVector & | shape | ) |
process shape selection
Definition at line 3651 of file GNEViewNet.cpp.
References PositionVector::getBoxBoundary(), and processBoundarySelection().
|
private |
pointer to viewNet
Definition at line 711 of file GNEViewNet.h.
Referenced by beginRectangleSelection(), moveRectangleSelection(), processBoundarySelection(), processEdgeRectangleSelection(), and processRectangleSelection().
bool GNEViewNet::SelectingArea::selectingUsingRectangle |
whether we have started rectangle-selection
Definition at line 695 of file GNEViewNet.h.
Referenced by GNEViewNet::abortOperation(), beginRectangleSelection(), drawRectangleSelection(), finishRectangleSelection(), GNEViewNet::onKeyRelease(), GNEViewNet::onLeftBtnRelease(), and GNEViewNet::onMouseMove().
|
private |
firstcorner of the rectangle-selection
Definition at line 705 of file GNEViewNet.h.
Referenced by beginRectangleSelection(), drawRectangleSelection(), moveRectangleSelection(), processEdgeRectangleSelection(), and processRectangleSelection().
|
private |
second corner of the rectangle-selection
Definition at line 708 of file GNEViewNet.h.
Referenced by beginRectangleSelection(), drawRectangleSelection(), moveRectangleSelection(), processEdgeRectangleSelection(), and processRectangleSelection().
bool GNEViewNet::SelectingArea::startDrawing |
whether we have started rectangle-selection
Definition at line 698 of file GNEViewNet.h.
Referenced by finishRectangleSelection(), moveRectangleSelection(), and GNEViewNet::onLeftBtnRelease().