Antares Simulator
Power System Simulator
panel.h
1 /*
2  * Copyright 2007-2025, RTE (https://www.rte-france.com)
3  * See AUTHORS.txt
4  * SPDX-License-Identifier: MPL-2.0
5  * This file is part of Antares-Simulator,
6  * Adequacy and Performance assessment for interconnected energy networks.
7  *
8  * Antares_Simulator is free software: you can redistribute it and/or modify
9  * it under the terms of the Mozilla Public Licence 2.0 as published by
10  * the Mozilla Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * Antares_Simulator is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * Mozilla Public Licence 2.0 for more details.
17  *
18  * You should have received a copy of the Mozilla Public Licence 2.0
19  * along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
20  */
21 #ifndef __ANTARES_APPLICATION_WINDOWS_SCENARIO_BUILDER_PANEL_H__
22 #define __ANTARES_APPLICATION_WINDOWS_SCENARIO_BUILDER_PANEL_H__
23 
24 #include <ui/common/component/panel.h>
25 #include <antares/study/fwd.h>
26 #include <antares/study/scenario-builder/rules.h>
27 #include <antares/study/scenario-builder/sets.h>
28 #include "../../toolbox/components/button.h"
29 
30 namespace Antares::Window::ScenarioBuilder
31 {
35 class Panel final: public Antares::Component::Panel, public Yuni::IEventObserver<Panel>
36 {
37 public:
39 
40 
45  Panel(wxWindow* parent);
47  virtual ~Panel();
49 
50 public:
53 
54 private:
55  void onStudyClosed();
56  void onStudyChanged(Data::Study&);
57  void onFileMenu(Antares::Component::Button&, wxMenu& menu, void*);
58  void onActiveMenu(Antares::Component::Button&, wxMenu& menu, void*);
59 
60  void onFileNew(wxCommandEvent&);
61  void onFileDelete(wxCommandEvent&);
62  void onFileRename(wxCommandEvent&);
63  void onActiveRuleset(wxCommandEvent&);
64 
65  void scenarioBuilderDataAreLoaded();
66  void update();
67 
68 private:
72  Component::Button* pBtnFile;
73  Component::Button* pBtnActive;
78 
79 }; // class Panel
80 
81 } // namespace Antares::Window::ScenarioBuilder
82 
83 #endif // __ANTARES_APPLICATION_WINDOWS_SCENARIO_BUILDER_PANEL_H__
Definition: button.h:32
Panel implementation.
Definition: panel.h:34
std::shared_ptr< Rules > Ptr
Smart pointer.
Definition: rules.h:53
std::map< int, Ptr > MappingID
Map ID.
Definition: rules.h:57
Definition: study.h:57
Panel to access to the simulation settings.
Definition: panel.h:36
Yuni::Event< void(Data::ScenarioBuilder::Rules::Ptr)> updateRules
Event: A rules set has been changed.
Definition: panel.h:52
virtual ~Panel()
Destructor.
Definition: panel.cpp:112
Panel(wxWindow *parent)
Default constructor.
Definition: panel.cpp:62