Eclipse SUMO - Simulation of Urban MObility
GNETAZRelDataFrame.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 // The Widget for add TAZRelationData elements
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
23 #include "GNEGenericDataFrame.h"
24 
25 
26 // ===========================================================================
27 // class definitions
28 // ===========================================================================
34 
35 public:
36  // ===========================================================================
37  // Confirm TAZ relation
38  // ===========================================================================
39 
43 
44  public:
46  ConfirmTAZRelation(GNETAZRelDataFrame* TAZRelDataFrame);
47 
50 
52  long onCmdConfirmTAZRelation(FXObject*, FXSelector, void*);
53 
55  long onUpdConfirmTAZRelation(FXObject*, FXSelector, void*);
56 
58  long onCmdClearSelection(FXObject*, FXSelector, void*);
59 
60  protected:
62  FOX_CONSTRUCTOR(ConfirmTAZRelation)
63 
64  private:
67 
69  FXButton* myConfirmTAZButton = nullptr;
70 
72  FXButton* myClearTAZButton = nullptr;
73  };
74 
75  // ===========================================================================
76  // class Legend
77  // ===========================================================================
78 
79  class Legend : public MFXGroupBoxModule {
80 
81  public:
83  Legend(GNETAZRelDataFrame* TAZRelDataFrame);
84 
86  ~Legend();
87 
89  void setLabels(const GNETAZ* fromTAZ, const GNETAZ* toTAZ);
90 
91  private:
93  FXLabel* myFromTAZLabel;
94 
96  FXLabel* myToTAZLabel;
97  };
98 
103  GNETAZRelDataFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
104 
107 
109  bool setTAZ(const GNEViewNetHelper::ViewObjectsSelector& viewObjects);
110 
112  void buildTAZRelationData();
113 
115  GNEAdditional* getFirstTAZ() const;
116 
118  GNEAdditional* getSecondTAZ() const;
119 
121  void clearTAZSelection();
122 
123 protected:
125  GNETAZ* myFirstTAZ = nullptr;
126 
128  GNETAZ* mySecondTAZ = nullptr;
129 
132 
135 
136 private:
139 
142 };
143 
144 /****************************************************************************/
An Element which don't belong to GNENet but has influence in the simulation.
Definition: GNEAdditional.h:49
Definition: GNETAZ.h:34
FXButton * myClearTAZButton
clear TAZ Button
long onCmdConfirmTAZRelation(FXObject *, FXSelector, void *)
called when user press confirm TAZ Relation button
GNETAZRelDataFrame * myTAZRelDataFrame
FOX needs this.
long onUpdConfirmTAZRelation(FXObject *, FXSelector, void *)
called when TAZ Relation button is updated
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when user press clear TAZ Relation button
FXButton * myConfirmTAZButton
confirm TAZ Button
ConfirmTAZRelation(GNETAZRelDataFrame *TAZRelDataFrame)
FOX-declaration.
void setLabels(const GNETAZ *fromTAZ, const GNETAZ *toTAZ)
set labels
FXLabel * myToTAZLabel
to TAZ Label
FXLabel * myFromTAZLabel
from TAZ label
Legend(GNETAZRelDataFrame *TAZRelDataFrame)
constructor
GNETAZRelDataFrame(const GNETAZRelDataFrame &)=delete
Invalidated copy constructor.
GNETAZ * mySecondTAZ
first selected TAZ Element
bool setTAZ(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
set clicked TAZ
void buildTAZRelationData()
build TAZRelation data
~GNETAZRelDataFrame()
Destructor.
GNETAZRelDataFrame::Legend * myLegend
TAZRel legend.
GNEAdditional * getSecondTAZ() const
get first selected TAZ Element
GNETAZRelDataFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
void clearTAZSelection()
clear TAZ selection
GNETAZRelDataFrame::ConfirmTAZRelation * myConfirmTAZRelation
confirm TAZ Relation
GNETAZ * myFirstTAZ
first selected TAZ Element
GNETAZRelDataFrame & operator=(const GNETAZRelDataFrame &)=delete
Invalidated assignment operator.
GNEAdditional * getFirstTAZ() const
get first selected TAZ Element
class used to group all variables related with objects under cursor after a click over view
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:88
MFXGroupBoxModule (based on FXGroupBox)