Eclipse SUMO - Simulation of Urban MObility
GNEAttributesCreator.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3// Copyright (C) 2001-2022 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
24
25// ===========================================================================
26// class declaration
27// ===========================================================================
28
29class GNEFrame;
31class GNEFlowEditor;
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
36
39 FXDECLARE(GNEAttributesCreator)
40
41public:
43 GNEAttributesCreator(GNEFrame* frameParent);
44
47
49 void showAttributesCreatorModule(GNEAttributeCarrier* templateAC, const std::vector<SumoXMLAttr>& hiddenAttributes);
50
53
55 GNEFrame* getFrameParent() const;
56
58 void getAttributesAndValues(CommonXMLStructure::SumoBaseObject* baseObject, bool includeAll) const;
59
62
64 bool areValuesValid() const;
65
67 void showWarningMessage(std::string extra = "") const;
68
71
74
78 long onCmdReset(FXObject*, FXSelector, void*);
79
81 long onCmdHelp(FXObject*, FXSelector, void*);
82
84
85protected:
88
90 void refreshRows(const bool createRows);
91
92private:
95
98
101
103 std::vector<SumoXMLAttr> myHiddenAttributes;
104
106 std::vector<GNEAttributesCreatorRow*> myAttributesCreatorRows;
107
109 FXHorizontalFrame* myFrameButtons = nullptr;
110
112 FXButton* myResetButton = nullptr;
113};
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
GNEAttributesCreator(GNEFrame *frameParent)
FOX-declaration.
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)