Antares Simulator
Power System Simulator
xcast.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_WINDOWS_XCAST_XCAST_H__
22 #define __ANTARES_WINDOWS_XCAST_XCAST_H__
23 
24 #include "../../toolbox/components/notebook/notebook.h"
25 #include "../../toolbox/components/datagrid/component.h"
26 #include "../../toolbox/input/area.h"
27 #include <yuni/core/event.h>
28 #include <antares/study/study.h>
29 #include <wx/stattext.h>
30 #include <wx/sizer.h>
31 #include <wx/checkbox.h>
32 #include <wx/choice.h>
33 
34 namespace Antares::Window
35 {
36 template<enum Data::TimeSeriesType T>
37 class XCast final: public wxPanel, public Yuni::IEventObserver<XCast<T>>
38 {
39 public:
43  using ObserverAncestorType = Yuni::IEventObserver<XCast<T>>;
44 
45 public:
47 
48 
51  XCast(wxWindow* parent, Toolbox::InputSelector::Area* notifier);
55  virtual ~XCast();
57 
58  void selectDefaultPage();
59 
60 private:
62  void onStudyClosed();
64  void onAreaChanged(Data::Area* area);
66  void onInstalledCapacityChanged(wxCommandEvent& evt);
68  void onUpdateDistribution(wxCommandEvent& evt);
70  void onUpdateTSTranslationUse(wxCommandEvent& evt);
72  void onUpdateConversion(wxCommandEvent& evt);
73 
74 private:
78  Data::Area* pArea;
80  wxTextCtrl* pInstalledCapacity;
81  wxChoice* pDistribution;
82  wxCheckBox* useConversion;
83  wxChoice* useTranslation;
84 
85  Component::Notebook* pNotebook;
86  //
87  Component::Notebook::Page* pPageDailyProfile;
88  Component::Notebook::Page* pPageGeneral;
89  Component::Notebook::Page* pPageTranslation;
90 
91  Component::Datagrid::Component* pGridCoeffs;
92 
93 }; // class XCast
94 
95 } // namespace Antares::Window
96 
97 #include "xcast.hxx"
98 
99 #endif // __ANTARES_WINDOWS_XCAST_XCAST_H__
A datagrid with virtual values.
Definition: component.h:84
Definition: notebook.h:61
Notebook.
Definition: notebook.h:36
Definition for a single area.
Definition: area.h:51
Visual Component for displaying all available areas (and groups)
Definition: area.h:37
Definition: xcast.h:38
XCast(wxWindow *parent, Toolbox::InputSelector::Area *notifier)
Default constructor.
Definition: xcast.hxx:38
virtual ~XCast()
Destructor.
Definition: xcast.hxx:207
Yuni::IEventObserver< XCast< T > > ObserverAncestorType
The Observer ancestor type.
Definition: xcast.h:43