Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEAttributesCreatorRow.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// Row used in AttributesCreator
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
25
26// ===========================================================================
27// class declaration
28// ===========================================================================
29
30class GNEFrame;
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
36
37class GNEAttributesCreatorRow : public FXHorizontalFrame {
40
41public:
43 GNEAttributesCreatorRow(GNEAttributesCreator* AttributesCreatorParent, const GNEAttributeProperties& attrProperties);
44
46 void destroy();
47
50
52 std::string getValue() const;
53
56
58 void setAttributeCheckButtonCheck(bool value);
59
62
65
68
70 void refreshRow();
71
73 void disableRow();
74
76 bool isAttributeValid() const;
77
80
84 long onCmdSetAttribute(FXObject*, FXSelector, void*);
85
87 long onCmdOpenColorDialog(FXObject*, FXSelector, void*);
88
90 long onCmdOpenAllowDialog(FXObject*, FXSelector, void*);
92
93protected:
95 FOX_CONSTRUCTOR(GNEAttributesCreatorRow)
96
97
98 std::string generateID() const;
99
101 bool isValidID() const;
102
103private:
106
109
111 std::string myInvalidValue;
112
115
117 FXCheckButton* myEnableAttributeCheckButton = nullptr;
118
120 FXButton* myAttributeColorButton = nullptr;
121
123 FXButton* myAttributeAllowButton = nullptr;
124
126 FXTextField* myValueTextField = nullptr;
127
129 FXCheckButton* myValueCheckButton = nullptr;
130
133};
std::string generateID() const
FOX needs this.
MFXLabelTooltip * myAttributeLabel
Label with the name of the attribute.
FXButton * myAttributeColorButton
Button for open color editor.
FXTextField * myValueTextField
textField to modify the default value of string parameters
FXCheckButton * myValueCheckButton
check button to enable/disable the value of boolean parameters
bool getAttributeCheckButtonCheck() const
return status of label checkbox button
bool isValidID() const
check if current ID placed in myValueTextField is valid
long onCmdOpenAllowDialog(FXObject *, FXSelector, void *)
called when user press the allow dialog button
bool isAttributesCreatorRowEnabled() const
check if row is enabled
long onCmdSetAttribute(FXObject *, FXSelector, void *)
std::string getValue() const
return value
void destroy()
destroy GNEAttributesCreatorRow (but don't delete)
FXButton * myAttributeAllowButton
Button for open allow editor.
bool isAttributeValid() const
check if current attribute is valid
void disableAttributesCreatorRow()
disable row
long onCmdOpenColorDialog(FXObject *, FXSelector, void *)
called when user press the color dialog button
MFXComboBoxIcon * myValueComboBox
comboBox for discrete vaues
void setAttributeCheckButtonCheck(bool value)
enable or disable label checkbox button for Terminatel attributes
GNEAttributesCreator * myAttributesCreatorParent
pointer to GNEAttributesCreator
FXCheckButton * myEnableAttributeCheckButton
check button to enable/disable Label attribute
const GNEAttributeProperties & getAttrProperties() const
return Attr
std::string myInvalidValue
string which indicates the reason due current value is invalid
const GNEAttributeProperties myAttrProperties
attribute properties
GNEAttributesCreator * getAttributesCreatorParent() const
get GNEAttributesCreator parent
ComboBox with icon.