Antares Simulator
Power System Simulator
hydroprepro.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_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_HYDROPREPRO_H__
22 #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_HYDROPREPRO_H__
23 
24 #include "../area.h"
25 #include "../matrix.h"
26 #include <antares/date/date.h>
27 #include <antares/study/parts/wind/prepro.h>
28 
29 namespace Antares::Component::Datagrid::Renderer
30 {
31 class HydroPrepro final: public Renderer::Matrix<double, double, 3>, public Renderer::ARendererArea
32 {
33 public:
35 
36 public:
38 
39 
42  HydroPrepro(wxWindow* control, Toolbox::InputSelector::Area* notifier);
44  virtual ~HydroPrepro();
46 
47  virtual int width() const;
48  virtual int height() const;
49 
50  virtual wxString columnCaption(int colIndx) const;
51 
52  virtual wxString rowCaption(int rowIndx) const;
53 
54  virtual wxString cellValue(int x, int y) const;
55 
56  virtual double cellNumericValue(int x, int y) const;
57 
58  virtual bool cellValue(int, int, const Yuni::String&);
59 
60  virtual void resetColors(int, int, wxColour&, wxColour&) const
61  { /*Do nothing*/
62  }
63 
64  virtual Date::Precision precision()
65  {
66  return Date::monthly;
67  }
68 
69  virtual IRenderer::CellStyle cellStyle(int col, int row) const;
70 
71  virtual bool valid() const;
72 
73  virtual uint maxWidthResize() const
74  {
75  return 0;
76  }
77 
78  virtual uint maxHeightResize() const
79  {
80  return 0;
81  }
82 
83  virtual bool circularShiftRowsUntilDate(MonthName month, uint daymonth);
84 
85 protected:
86  virtual void internalAreaChanged(Antares::Data::Area* area);
88  virtual void onStudyClosed() override;
90  virtual void onStudyLoaded() override;
91 
92 }; // class HydroPrepro
93 
94 } // namespace Antares::Component::Datagrid::Renderer
95 
96 #endif // __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_HYDROPREPRO_H__
virtual Date::Precision precision()
Time Precision.
Definition: hydroprepro.h:64
virtual void onStudyLoaded() override
Event: the study has been loaded.
Definition: hydroprepro.cpp:240
virtual double cellNumericValue(int x, int y) const
Get the value of a cell.
Definition: hydroprepro.cpp:84
virtual wxString columnCaption(int colIndx) const
Get the column caption.
Definition: hydroprepro.cpp:49
virtual wxString rowCaption(int rowIndx) const
Get the row caption.
Definition: hydroprepro.cpp:215
virtual bool circularShiftRowsUntilDate(MonthName month, uint daymonth)
Rotate all rows until a given date.
Definition: hydroprepro.cpp:225
virtual wxString cellValue(int x, int y) const
Get the string representation of a cell.
Definition: hydroprepro.cpp:69
virtual uint maxHeightResize() const
The most suitable column count.
Definition: hydroprepro.h:78
virtual bool cellValue(int, int, const Yuni::String &)
Set the value of a cell.
virtual void onStudyClosed() override
Event: the study has been closed.
Definition: hydroprepro.cpp:234
virtual int width() const
Get the current width.
Definition: hydroprepro.cpp:39
HydroPrepro(wxWindow *control, Toolbox::InputSelector::Area *notifier)
Constructor.
Definition: hydroprepro.cpp:28
virtual uint maxWidthResize() const
The most suitable column count.
Definition: hydroprepro.h:73
virtual ~HydroPrepro()
Destructor.
Definition: hydroprepro.cpp:34
virtual int height() const
Get the current height.
Definition: hydroprepro.cpp:44
Definition for a single area.
Definition: area.h:51
A n-by-n matrix.
Definition: matrix.h:44
Visual Component for displaying all available areas (and groups)
Definition: area.h:37