22#include <netedit/tools/GNERunNetgenerate.h>
57 GNEDialog::Buttons::ABORT_RERUN_BACK_CLOSE, OpenType::MODAL,
58 GNEDialog::ResizeMode::RESIZABLE, 640, 480) {
60 myThreadEvent.setTarget(
this);
63 myRunNetgenerate =
new GNERunNetgenerate(
this, myEvents, myThreadEvent);
67 headerFrame->setPadLeft(0);
68 headerFrame->setPadRight(0);
74 myText =
new FXText(textFrame, 0, 0, (TEXT_READONLY | LAYOUT_FILL_X | LAYOUT_FILL_Y));
77 myText->setStyled(
true);
79 myNetgenerateOptions = netgenerateOptions;
85 myRunNetgenerate->run(myNetgenerateOptions);
122 const auto logFile = GNEApplicationWindowHelper::saveToolLog(
this);
124 if (logFile.size() > 0) {
126 dev <<
myText->getText().text();
144 std::string line(
"-------------------------------------------\n");
145 myText->appendStyledText(line.c_str(), (
int)line.length(), 4, TRUE);
146 myText->appendStyledText(
"rerun tool\n", 1, TRUE);
192 bool toolFinished =
false;
218 myText->appendStyledText(ec->
getMsg().c_str(), (int)ec->
getMsg().length(), style, TRUE);
228 if (
myText->getText().find(
"Error") != -1) {
230 }
else if ((
myText->getText().find(
"Success") != -1) && (
myText->getText().find(
"Warning") == -1)) {
231 onCmdClose(
nullptr, 0,
nullptr);
@ MID_GNE_NETGENERATE
netgenerate dialog
@ MID_GNE_BUTTON_RERUN
rerun button
@ MID_GNE_BUTTON_ABORT
abort button
@ MID_GNE_BUTTON_SAVE
save button
@ ID_LOADTHREAD_EVENT
The loading thread.
@ MID_GNE_BUTTON_BACK
back button
@ MID_GNE_POSTPROCESSINGNETGENERATE
postprocesing netgenerate
#define GUIDesignFrameThick
Thick frame extended over frame parent.
#define GUIDesignButtonIcon
button only with icon
#define GUIDesignLabelThick(justify)
label extended over frame with thick and with text justify to left
#define GUIDesignHorizontalFrame
Horizontal frame extended over frame parent with padding and spacing.
@ MESSAGE_OCCURRED
send when a message occurred
@ ERROR_OCCURRED
send when a error occurred
@ OUTPUT_OCCURRED
send when a tool produces output
@ TOOL_ENDED
send when a tool finishes
GUIIcon
An enumeration of icons used by the gui applications.
The main window of Netedit.
GNEApplicationWindow * myApplicationWindow
FOX needs this.
long onCmdAbort(FXObject *, FXSelector, void *)
event after press abort button
~GNERunNetgenerateDialog()
destructor
void runInternalTest(const InternalTestStep::DialogArgument *dialogArgument)
run internal test
MFXSynchQue< GUIEvent * > myEvents
List of received events.
long onCmdSaveLog(FXObject *, FXSelector, void *)
event after press save button
bool myError
flag to check if there is an error
void updateDialog()
update toolDialog
GNERunNetgenerateDialog(GNEApplicationWindow *applicationWindow, const OptionsCont *netgenerateOptions)
Constructor.
long onCmdRerun(FXObject *, FXSelector, void *)
event after press rerun button
long onCmdAccept(FXObject *, FXSelector, void *)
event after press close button
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
GNERunNetgenerate * myRunNetgenerate
thread for running tool
long onThreadEvent(FXObject *, FXSelector, void *)
called when the thread signals an event
long onCmdBack(FXObject *, FXSelector, void *)
event after press back button
const OptionsCont * myNetgenerateOptions
netgenerate options
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
const std::string & getMsg() const
Returns the message.
GUIEventType getOwnType() const
returns the event type
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static FXHiliteStyle * getStyles()
The text colors used.
dialog arguments, used for certain modal dialogs that can not be edited using tab
A storage for options typed value containers)
Static storage of an output device and its base (abstract) implementation.
void close()
Closes the device and removes it from the dictionary.
static OutputDevice & getDevice(const std::string &name, bool usePrefix=true)
Returns the described OutputDevice.