Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEAttributesCreator.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// Attribute creator
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
25
26
27// ===========================================================================
28// class declaration
29// ===========================================================================
30
31class GNEFrame;
33class GNEFlowEditor;
34
35// ===========================================================================
36// class definitions
37// ===========================================================================
38
41 FXDECLARE(GNEAttributesCreator)
42
43public:
45 GNEAttributesCreator(GNEFrame* frameParent);
46
49
51 void showAttributesCreatorModule(GNEAttributeCarrier* templateAC, const std::vector<SumoXMLAttr>& hiddenAttributes);
52
55
57 GNEFrame* getFrameParent() const;
58
60 void getAttributesAndValues(CommonXMLStructure::SumoBaseObject* baseObject, bool includeAll) const;
61
64
66 bool areValuesValid() const;
67
69 void showWarningMessage(std::string extra = "") const;
70
73
76
80 long onCmdReset(FXObject*, FXSelector, void*);
81
83 long onCmdHelp(FXObject*, FXSelector, void*);
84
86
87protected:
90
92 void refreshRows(const bool createRows);
93
94private:
97
100
103
105 std::vector<SumoXMLAttr> myHiddenAttributes;
106
108 std::vector<GNEAttributesCreatorRow*> myAttributesCreatorRows;
109
111 FXHorizontalFrame* myFrameButtons = nullptr;
112
114 FXButton* myResetButton = nullptr;
115};
void refreshRows(const bool createRows)
refresh rows
void getAttributesAndValues(CommonXMLStructure::SumoBaseObject *baseObject, bool includeAll) const
get attributes and their values
bool areValuesValid() const
check if parameters of attributes are valid
GNEAttributeCarrier * getCurrentTemplateAC() const
get current template AC
void showAttributesCreatorModule(GNEAttributeCarrier *templateAC, const std::vector< SumoXMLAttr > &hiddenAttributes)
show GNEAttributesCreator modul
GNEAttributeCarrier * myTemplateAC
current templateAC
FXHorizontalFrame * myFrameButtons
frame buttons
long onCmdReset(FXObject *, FXSelector, void *)
void hideAttributesCreatorModule()
hide group box
void showWarningMessage(std::string extra="") const
show warning message with information about non-valid attributes
std::vector< GNEAttributesCreatorRow * > myAttributesCreatorRows
vector with the GNEAttributesCreatorRow
void disableAttributesCreator()
disable GNEAttributesCreator
GNEFlowEditor * myFlowEditor
pointer to myFlowEditor
GNEFrame * getFrameParent() const
return frame parent
FOX_CONSTRUCTOR(GNEAttributesCreator)
FOX need this.
void refreshAttributesCreator()
refresh attribute creator
FXButton * myResetButton
reset button
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
GNEFrame * myFrameParent
pointer to Frame Parent
std::vector< SumoXMLAttr > myHiddenAttributes
hidden attributes
MFXGroupBoxModule (based on FXGroupBox)