60 myDeleteFrameParent(deleteFrameParent) {
91 GNEFrame(horizontalFrameParent, viewNet,
"Delete") {
165 int numberOfAdditionals = 0;
167 numberOfAdditionals += (int)i->getAdditionalChilds().size();
168 for (
auto j : i->getLanes()) {
170 numberOfAdditionals += (int)i->getAdditionalChilds().size();
177 if (numberOfAdditionals > 0) {
179 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
180 std::string plural = numberOfAdditionals > 1 ?
"s" :
"";
182 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " +
toString(junction->
getTag())).c_str(),
"%s",
183 (
toString(junction->
getTag()) +
" '" + junction->
getID() +
"' cannot be deleted because owns " +
184 toString(numberOfAdditionals) +
" additional child" + plural +
".\n Check 'Force deletion of additionals' to force deletion.").c_str());
186 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
204 numberOfAdditionalChilds += (int)i->getAdditionalChilds().size();
211 if (numberOfAdditionalChilds > 0) {
213 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
214 std::string plural = numberOfAdditionalChilds > 1 ?
"s" :
"";
216 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " +
toString(edge->
getTag())).c_str(),
"%s",
218 toString(numberOfAdditionalChilds) +
" additional" + plural +
".\n Check 'Force deletion of additionals' to force deletion.").c_str());
220 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
221 }
else if (numberOfAdditionalParents > 0) {
223 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
224 std::string plural = numberOfAdditionalParents > 1 ?
"s" :
"";
226 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " +
toString(edge->
getTag())).c_str(),
"%s",
227 (
toString(edge->
getTag()) +
" '" + edge->
getID() +
"' cannot be deleted because is part of " +
228 toString(numberOfAdditionalParents) +
" additional" + plural +
".\n Check 'Force deletion of additionals' to force deletion.").c_str());
230 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
252 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
254 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " +
toString(lane->
getTag())).c_str(),
"%s",
256 toString(lane->
getAdditionalChilds().size()) +
" additional childs.\n Check 'Force deletion of Additionals' to force deletion.").c_str());
258 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
278 if (tagValue.isAdditional()) {
282 }
else if (tagValue.isShape()) {
DeleteOptions * getDeleteOptions() const
get delete options
#define GUIDesignCheckButtonAttribute
checkButton without thick extended over the frame used for attributes
void hide()
hide delete frame
begin/end of the description of a junction
begin/end of the description of a single lane
void showACHierarchy(GNEAttributeCarrier *AC)
show ACHierarchy
void show()
show delete frame
connectio between two lanes
void hideACHierarchy()
hide ACHierarchy
GNEViewParent * getViewParent() const
get the net object
int getVertexIndex(const Position &pos, bool createIfNoExist=true)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
void deleteShape(GNEShape *shape, GNEUndoList *undoList)
remove shape
GNEDeleteFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
automatically delete additional childs
FXCheckButton * myDeleteOnlyGeometryPoints
checkbox for enable/disable delete only geometry points
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
ACHierarchy * myACHierarchy
modul for hierarchy
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers()
get all selected attribute carriers
const std::vector< GNEEdge * > & getGNEEdges() const
Returns all GNEEdges vinculated with this Junction.
#define UNUSED_PARAMETER(x)
GNEViewNet * getViewNet() const
get view net
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
GNEViewNet * myViewNet
View Net for changes.
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_MODE_ADDITIONAL
int getVertexIndex(const Position &pos, bool createIfNoExist=true)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
GNEUndoList * getUndoList() const
get the undoList object
delete only geometry points
const std::vector< GNEAdditional * > & getAdditionalParents() const
return vector of additionals that have as Parameter this edge (For example, Rerouters) ...
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
void deleteLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
removes lane
~GNEDeleteFrame()
Destructor.
A point in 2D or 3D with translation and scaling methods.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
void removeAdditional(GNEAdditional *additional)
remove an additional element previously added
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
const std::string getID() const
function to support debugging
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
DeleteOptions * myDeleteOptions
modul for delete options
begin/end of the description of an edge
A road/street connecting two junctions (netedit-version)
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
virtual void show()
show Frame
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList, bool recomputeConnections)
removes edge
An Element which don't belongs to GNENet but has influency in the simulation.
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
bool deleteOnlyGeometryPoints() const
check if only delete geometry points checkbox is enabled
crossing between edges for pedestrians
virtual void hide()
hide Frame
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
GNENet * getNet() const
get the net object
~DeleteOptions()
destructor
void removeAttributeCarrier(GNEAttributeCarrier *ac, bool ignoreOptions=false)
remove attribute carrier (element)
const std::vector< GNEAdditional * > & getAdditionalChilds() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
static const TagValues & getTagProperties(SumoXMLTag tag)
get Tag Properties
DeleteOptions(GNEDeleteFrame *deleteFrameParent)
constructor
FXCheckButton * myForceDeleteAdditionals
checkbox for enable/disable automatically delete additionals childs
begin/end of the description of a polygon
bool forceDeleteAdditionals() const
check if force delete additionals checkbox is enabled
void removeSelectedAttributeCarriers()
remove selected attribute carriers (element)
SumoXMLTag getTag() const
get XML Tag assigned to this object