Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEConsecutiveSelector.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// Consecutive lane selector module
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25// ===========================================================================
26// class declaration
27// ===========================================================================
28
29class GNEFrame;
30class GNELane;
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
38 FXDECLARE(GNEConsecutiveSelector)
39
40public:
42 GNEConsecutiveSelector(GNEFrame* frameParent, const bool allowOneLane);
43
46
49
52
54 const std::vector<std::pair<GNELane*, double> >& getLanePath() const;
55
57 const std::vector<std::string> getLaneIDPath() const;
58
60 bool addLane(GNELane* lane);
61
64
66 void updateLaneColors();
67
70
72 void abortPathCreation();
73
75 void removeLastElement();
76
80 long onCmdCreatePath(FXObject*, FXSelector, void*);
81
83 long onCmdAbortPathCreation(FXObject*, FXSelector, void*);
84
86 long onCmdRemoveLastElement(FXObject*, FXSelector, void*);
87
89 long onCmdShowCandidateLanes(FXObject*, FXSelector, void*);
91
92protected:
95
98
100 void clearPath();
101
102private:
105
107 std::vector<std::pair<GNELane*, double> > myLanePath;
108
110 FXLabel* myInfoPathLabel = nullptr;
111
113 FXButton* myFinishCreationButton = nullptr;
114
116 FXButton* myAbortCreationButton = nullptr;
117
119 FXButton* myRemoveLastInsertedElement = nullptr;
120
122 FXCheckButton* myShowCandidateLanes = nullptr;
123
125 const bool myAllowOneLane;
126
127private:
130
133};
std::vector< std::pair< GNELane *, double > > myLanePath
vector with lanes and clicked positions
void drawTemporalConsecutiveLanePath() const
draw temporal consecutive lane path
bool addLane(GNELane *lane)
add lane
void abortPathCreation()
abort path creation
FXLabel * myInfoPathLabel
label with path info
GNEFrame * myFrameParent
pointer to frame parent
const bool myAllowOneLane
allow one lane
void updateLaneColors()
update lane colors
void showConsecutiveLaneSelectorModule()
show GNEConsecutiveSelector
long onCmdCreatePath(FXObject *, FXSelector, void *)
void clearPath()
clear lanes (and restore colors)
FXButton * myRemoveLastInsertedElement
button for removing last inserted element
GNEConsecutiveSelector & operator=(GNEConsecutiveSelector *)=delete
Invalidated assignment operator.
FXCheckButton * myShowCandidateLanes
CheckBox for show candidate lanes.
long onCmdRemoveLastElement(FXObject *, FXSelector, void *)
Called when the user click over button "Remove las inserted lane".
void updateInfoRouteLabel()
update InfoRouteLabel
const std::vector< std::pair< GNELane *, double > > & getLanePath() const
get vector with lanes and clicked positions
void removeLastElement()
remove path element
bool drawCandidateLanesWithSpecialColor() const
draw candidate lanes with special color (Only for candidates, special and conflicted)
void hideConsecutiveLaneSelectorModule()
show GNEConsecutiveSelector
long onCmdShowCandidateLanes(FXObject *, FXSelector, void *)
Called when the user click over check button "show candidate lanes".
const std::vector< std::string > getLaneIDPath() const
get lane IDs
GNEConsecutiveSelector(GNEConsecutiveSelector *)=delete
Invalidated copy constructor.
FXButton * myFinishCreationButton
button for finish route creation
long onCmdAbortPathCreation(FXObject *, FXSelector, void *)
Called when the user click over button "Abort route creation".
FXButton * myAbortCreationButton
button for abort route creation
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition GNELane.h:46
MFXGroupBoxModule (based on FXGroupBox)