Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEUndoListDialog.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// Dialog for show undo-list
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include "GNEDialog.h"
24
25// ===========================================================================
26// class declarations
27// ===========================================================================
28
30
31// ===========================================================================
32// class definitions
33// ===========================================================================
34
37 FXDECLARE(GNEUndoListDialog)
38
39public:
41 GNEUndoListDialog(GNEApplicationWindow* applicationWindow);
42
45
47 void runInternalTest(const InternalTestStep::DialogArgument* dialogArgument);
48
51
53 long onCmdSelectRow(FXObject*, FXSelector, void*);
54
56
57protected:
59 struct UndoListRow {
61 UndoListRow(const int index_, FXIcon* icon_, const std::string description_, const std::string timestamp_);
62
64 int index = 0;
65
67 FXIcon* icon = nullptr;
68
70 std::string description;
71
73 std::string timestamp;
74 };
75
77 class GUIRow {
78
79 public:
81 GUIRow(GNEUndoListDialog* undoListDialog, FXVerticalFrame* mainFrame, MFXStaticToolTip* staticToolTip);
82
84 ~GUIRow();
85
87 void update(const UndoListRow& row);
88
90 int getIndex() const;
91
93 const FXRadioButton* getRadioButton() const;
94
96 void setRedBackground();
97
99 void setBlueBackground();
100
102 void checkRow();
103
104 private:
106 FXRadioButton* myRadioButton;
107
109 int myIndex = 0;
110
112 FXLabel* myIcon = nullptr;
113
116
118 FXTextField* myTextFieldTimeStamp = nullptr;
119 };
120
122 FOX_CONSTRUCTOR(GNEUndoListDialog)
123
124
125 void updateList();
126
128 FXVerticalFrame* myRowFrame = nullptr;
129
131 std::vector<GUIRow*> myGUIRows;
132
133private:
136
139};
The main window of Netedit.
row used for show GUI row elements
void checkRow()
check row and set background green
const FXRadioButton * getRadioButton() const
get radio button (read only)
int getIndex() const
get index
void setBlueBackground()
set blue background
void setRedBackground()
set red background
FXTextField * myTextFieldTimeStamp
textField timeStamp
MFXTextFieldIcon * myTextFieldDescription
textField description
FXLabel * myIcon
label with icon
FXRadioButton * myRadioButton
radioButton
void updateList()
FOX needs this.
long onCmdSelectRow(FXObject *, FXSelector, void *)
event after select row
~GNEUndoListDialog()
destructor
GNEUndoListDialog & operator=(const GNEUndoListDialog &)=delete
Invalidated assignment operator.
FXVerticalFrame * myRowFrame
frame for rows
std::vector< GUIRow * > myGUIRows
vector with rows
GNEUndoListDialog(const GNEUndoListDialog &)=delete
Invalidated copy constructor.
void runInternalTest(const InternalTestStep::DialogArgument *dialogArgument)
run internal test
dialog arguments, used for certain modal dialogs that can not be edited using tab
MFXStaticToolTip (based on FXToolTip)
int index
index uses for count undo/redos
FXIcon * icon
icon associated with undo/redo operation
std::string description
definition of undo/redo operation