Path: blob/main/src/netedit/dialogs/tools/GNERunPythonToolDialog.h
169684 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GNERunPythonToolDialog.h14/// @author Pablo Alvarez Lopez15/// @date Mar 202316///17// Dialog for running tools18/****************************************************************************/19#pragma once20#include <config.h>2122#include <netedit/dialogs/GNEDialog.h>23#include <utils/foxtools/MFXSynchQue.h>24#include <utils/foxtools/MFXThreadEvent.h>2526// ===========================================================================27// class declarations28// ===========================================================================2930class GNERunPythonTool;31class GNEPythonTool;32class GUIEvent;3334// ===========================================================================35// class definitions36// ===========================================================================3738class GNERunPythonToolDialog : public GNEDialog {39/// @brief FOX-declaration40FXDECLARE(GNERunPythonToolDialog)4142public:43/// @brief Constructor44GNERunPythonToolDialog(GNEApplicationWindow* applicationWindow, GNEPythonTool* tool);4546/// @brief destructor47~GNERunPythonToolDialog();4849/// @brief run internal test50void runInternalTest(const InternalTestStep::DialogArgument* dialogArgument);5152/// @name FOX-callbacks53/// @{5455/// @brief event after press save button56long onCmdSaveLog(FXObject*, FXSelector, void*);5758/// @brief event after press abort button59long onCmdAbort(FXObject*, FXSelector, void*);6061/// @brief event after press rerun button62long onCmdRerun(FXObject*, FXSelector, void*);6364/// @brief event after press back button65long onCmdBack(FXObject*, FXSelector, void*);6667/// @brief event after press cancel button68long onCmdCancel(FXObject*, FXSelector, void*);6970/// @brief event after press close button71long onCmdAccept(FXObject*, FXSelector, void*);7273/// @brief called when the thread signals an event74long onThreadEvent(FXObject*, FXSelector, void*);7576/// @}7778protected:79/// @brief FOX needs this80FOX_CONSTRUCTOR(GNERunPythonToolDialog);8182/// @brief update toolDialog83void updateDialog();8485private:86/// @brief tool87GNEPythonTool* myPythonTool = nullptr;8889/// @brief thread for running tool90GNERunPythonTool* myRunTool = nullptr;9192/// @brief text93FXText* myText = nullptr;9495/// @brief List of received events96MFXSynchQue<GUIEvent*> myEvents;9798/// @brief io-event with the runner thread99FXEX::MFXThreadEvent myThreadEvent;100101/// @brief Invalidated copy constructor.102GNERunPythonToolDialog(const GNERunPythonToolDialog&) = delete;103104/// @brief Invalidated assignment operator.105GNERunPythonToolDialog& operator=(const GNERunPythonToolDialog&) = delete;106};107108109