Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEMatchAttribute.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// The Widget for modifying selections of network-elements
19// (some elements adapted from GUIDialog_GLChosenEditor)
20/****************************************************************************/
21#pragma once
22#include <config.h>
23
25
26// ===========================================================================
27// class declaration
28// ===========================================================================
29
36
37// ===========================================================================
38// class definitions
39// ===========================================================================
40
43 FXDECLARE(GNEMatchAttribute)
44
45public:
47 GNEMatchAttribute(GNESelectorFrame* selectorFrameParent);
48
51
54
57
59 void showMatchAttribute();
60
62 void hideMatchAttribute();
63
66
69
71 long onCmdTagSelected(FXObject* obj, FXSelector, void*);
72
74 long onCmdAttributeSelected(FXObject*, FXSelector, void*);
75
77 long onCmdToogleOnlyCommon(FXObject*, FXSelector, void*);
78
80 long onCmdProcessString(FXObject*, FXSelector, void*);
81
83 long onCmdHelp(FXObject*, FXSelector, void*);
84
86
87protected:
89 FOX_CONSTRUCTOR(GNEMatchAttribute)
90
91
94 std::vector<GNEAttributeCarrier*> getMatches(const char compOp, const double val, const std::string& expr);
95
101 std::vector<GNEAttributeCarrier*> getGenericMatches(const std::vector<GNEGenericData*>& genericDatas, const std::string& attr, const char compOp, const double val, const std::string& expr);
102
103
104private:
107
108 public:
110 CurrentEditedProperties(const GNEMatchAttribute* matchAttributeParent);
111
114
117
120
122 const GNETagProperties* getTagProperties() const;
123
126
128 const std::string& getMatchValue() const;
129
131 void setTagProperties(const GNETagProperties* tagProperty);
132
134 void setAttributeProperties(const GNEAttributeProperties* attrProperty);
135
137 void setMatchValue(const std::string value);
138
139 private:
142
144 std::vector<const GNETagProperties*> myNetworkTagProperties;
145
148
151
153 std::vector<const GNETagProperties*> myDemandTagProperties;
154
157
160
162 std::vector<const GNETagProperties*> myDataTagProperties;
163
166
168 std::string myDataMatchValue;
169
172
175
178
181
184 };
185
188
190 std::vector <MFXComboBoxTagProperty*> myTagComboBoxVector;
191
193 FXCheckButton* myShowOnlyCommonAttributes = nullptr;
194
197
199 FXTextField* myMatchString = nullptr;
200
202 FXButton* myMatchStringButton = nullptr;
203
206
209
212};
container with current edited properties
std::string myDemandMatchValue
current demand match value
CurrentEditedProperties()=delete
default constructor
std::vector< const GNETagProperties * > myDemandTagProperties
current demand tag properties
const GNEAttributeProperties * getAttributePropertiesNoCommon() const
get attr properties no common
const GNEAttributeProperties * myDataAttributeProperties
current data attribute properties
std::vector< const GNETagProperties * > myNetworkTagProperties
current network tag properties
std::string myNetworkMatchValue
current network match value
GNETagProperties * myTagPropertiesAllAttributes
tag properties <all>
void setTagProperties(const GNETagProperties *tagProperty)
set tag property (depending of supermode)
const GNEAttributeProperties * myNetworkAttributeProperties
current network attribute properties
const std::string & getMatchValue() const
get match value (depending of supermode)
const GNETagProperties * getTagPropertiesAll() const
get special tag <all>
void setAttributeProperties(const GNEAttributeProperties *attrProperty)
set attribute property (depending of supermode)
std::string myDataMatchValue
current data match value
const GNEMatchAttribute * myMatchAttributeParent
pointer to match attribute parent
const GNEAttributeProperties * myAttributePropertiesNoCommon
attribute properties no common
const GNETagProperties * getTagProperties() const
get tag property (depending of supermode)
void setMatchValue(const std::string value)
set match value (depending of supermode)
CurrentEditedProperties & operator=(const CurrentEditedProperties &src)=delete
Invalidated assignment operator.
const GNEAttributeProperties * getAttributeProperties() const
get attribute property (depending of supermode)
std::vector< const GNETagProperties * > myDataTagProperties
current data tag properties
CurrentEditedProperties(const CurrentEditedProperties &)=delete
Invalidated copy constructor.
const GNEAttributeProperties * myDemandAttributeProperties
current demand attribute properties
GNEMatchAttribute & operator=(const GNEMatchAttribute &)=delete
Invalidated assignment operator.
CurrentEditedProperties * myCurrentEditedProperties
current edited properties
~GNEMatchAttribute()
destructor
FXButton * myMatchStringButton
match string button
long onCmdAttributeSelected(FXObject *, FXSelector, void *)
Called when the user selects an attribute in the match box.
void showMatchAttribute()
show match attributes
std::vector< MFXComboBoxTagProperty * > myTagComboBoxVector
vector with tag property comboBoxes
std::vector< GNEAttributeCarrier * > getGenericMatches(const std::vector< GNEGenericData * > &genericDatas, const std::string &attr, const char compOp, const double val, const std::string &expr)
return GenericDatas of the given type with matching attrs
long onCmdProcessString(FXObject *, FXSelector, void *)
Called when the user enters a new selection expression.
GNESelectorFrame * mySelectorFrameParent
pointer to selector frame parent
long onCmdToogleOnlyCommon(FXObject *, FXSelector, void *)
Called when the user toogle the only common checkbox.
long onCmdTagSelected(FXObject *obj, FXSelector, void *)
Called when the user selects a tag in the match box.
GNEMatchAttribute(const GNEMatchAttribute &)=delete
Invalidated copy constructor.
FXTextField * myMatchString
string of the match
void hideMatchAttribute()
hide match attributes
FXCheckButton * myShowOnlyCommonAttributes
checkbox for enable/disable show only common attributes
long onCmdHelp(FXObject *, FXSelector, void *)
Called when the user clicks the help button.
void refreshMatchAttribute()
refresh match attribute
std::vector< GNEAttributeCarrier * > getMatches(const char compOp, const double val, const std::string &expr)
FOX need this.
void enableMatchAttribute()
enable match attributes
void disableMatchAttribute()
disable match attributes
MFXComboBoxAttrProperty * myAttributeComboBox
attribute property comboBox
MFXGroupBoxModule (based on FXGroupBox)