Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEFrameAttributeModules.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-2025 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// Auxiliar class for GNEFrame Modules (only for attributes edition)
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
31
32// ===========================================================================
33// class declaration
34// ===========================================================================
35
37class GNEFlowEditor;
38class GNEFrame;
40class GNETypeFrame;
41class GNEViewParent;
42
43// ===========================================================================
44// class definitions
45// ===========================================================================
46
48
49public:
50 // ===========================================================================
51 // class declaration
52 // ===========================================================================
53
54 class AttributesEditor;
55
56 // ===========================================================================
57 // class GenericDataAttributes
58 // ===========================================================================
59
63
64 public:
66 GenericDataAttributes(GNEFrame* frameParent);
67
70
73
76
79
82
84 std::string getParametersStr() const;
85
87 std::vector<std::pair<std::string, std::string> > getParameters() const;
88
90 void setParameters(const std::vector<std::pair<std::string, std::string> >& parameters);
91
93 GNEFrame* getFrameParent() const;
94
96 bool areAttributesValid() const;
97
101 long onCmdEditParameters(FXObject*, FXSelector, void*);
102
104 long onCmdSetParameters(FXObject*, FXSelector, void*);
106
107 protected:
108 FOX_CONSTRUCTOR(GenericDataAttributes)
109
110 private:
113
116
118 FXTextField* myTextFieldParameters = nullptr;
119
121 FXButton* myButtonEditParameters = nullptr;
122 };
123
125 static bool isSupermodeValid(const GNEViewNet* viewNet, const GNEAttributeCarrier* AC);
126
128 static bool isSupermodeValid(const GNEViewNet* viewNet, const GNEAttributeProperties* attributeProperties);
129};
long onCmdSetParameters(FXObject *, FXSelector, void *)
Called when user udpate the parameter text field.
bool areAttributesValid() const
check if current attributes are valid
const Parameterised::Map & getParametersMap() const
get parameters as map
FXButton * myButtonEditParameters
button for edit parameters using specific dialog
void refreshGenericDataAttributes()
refresh netedit attributes
FXTextField * myTextFieldParameters
text field for write parameters
void showGenericDataAttributes()
show netedit attributes EditorCreator
long onCmdEditParameters(FXObject *, FXSelector, void *)
GNEFrame * getFrameParent() const
pointer to frame parent
std::vector< std::pair< std::string, std::string > > getParameters() const
get parameters as vector of strings
std::string getParametersStr() const
get parameters as string
Parameterised::Map myParameters
pointer to current map of parameters
void hideGenericDataAttributes()
hide netedit attributes EditorCreator
void setParameters(const std::vector< std::pair< std::string, std::string > > &parameters)
set parameters
static bool isSupermodeValid(const GNEViewNet *viewNet, const GNEAttributeCarrier *AC)
return true if AC can be edited in the current supermode
A single child window which contains a view of the simulation area.
MFXGroupBoxModule (based on FXGroupBox)
std::map< std::string, std::string > Map
parameters map