Antares Simulator
Power System Simulator
thermalprepro.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_THERMALPREPRO_H__
22 #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_THERMALPREPRO_H__
23 
24 #include "../../../../input/thermal-cluster.h"
25 #include "../matrix.h"
26 #include <antares/solver/ts-generator/prepro.h>
27 
28 namespace Antares::Component::Datagrid::Renderer
29 {
31 {
32 public:
34 
35 public:
37 
38 
42 
44  virtual ~ThermalClusterPrepro();
45 
47 
48  virtual int width() const
49  {
50  return 8;
51  }
52 
53  virtual int height() const
54  {
55  return DAYS_PER_YEAR;
56  }
57 
58  virtual wxString columnCaption(int colIndx) const;
59 
60  virtual wxString rowCaption(int rowIndx) const;
61 
62  virtual wxString cellValue(int x, int y) const;
63 
64  virtual double cellNumericValue(int x, int y) const;
65 
66  virtual bool cellValue(int, int, const Yuni::String&);
67 
68  virtual void resetColors(int, int, wxColour&, wxColour&) const
69  { /*Do nothing*/
70  }
71 
72  virtual Date::Precision precision()
73  {
74  return Date::daily;
75  }
76 
77  virtual bool valid() const
78  {
79  return MatrixAncestorType::valid();
80  }
81 
82  virtual IRenderer::CellStyle cellStyle(int col, int row) const;
83 
84  virtual wxColour verticalBorderColor(int x, int y) const;
85  virtual wxColour horizontalBorderColor(int x, int y) const;
86 
87  virtual uint maxWidthResize() const
88  {
89  return 0;
90  }
91 
92  virtual uint maxHeightResize() const
93  {
94  return 0;
95  }
96 
97 protected:
98  virtual void internalThermalClusterChanged(Antares::Data::ThermalCluster* cluster);
99 
100 private:
101  virtual void onStudyClosed() override;
102 
103 private:
104  Antares::Data::PreproAvailability* pPreproAvailability = nullptr;
106 
107 }; // class ThermalClusterPrepro
108 
109 } // namespace Antares::Component::Datagrid::Renderer
110 
111 #endif // __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_THERMALPREPRO_H__
virtual wxColour verticalBorderColor(int x, int y) const
Get the color of the vertical right border.
Definition: thermalprepro.cpp:285
virtual uint maxHeightResize() const
The most suitable column count.
Definition: thermalprepro.h:92
virtual int height() const
Get the height of the datagrid.
Definition: thermalprepro.h:53
virtual Date::Precision precision()
Time Precision.
Definition: thermalprepro.h:72
virtual wxColour horizontalBorderColor(int x, int y) const
Get the color of the horizontal bottom border.
Definition: thermalprepro.cpp:291
ThermalClusterPrepro(wxWindow *control, Toolbox::InputSelector::ThermalCluster *notifier)
Default constructor.
Definition: thermalprepro.cpp:78
virtual wxString rowCaption(int rowIndx) const
Get the row caption.
Definition: thermalprepro.cpp:201
virtual double cellNumericValue(int x, int y) const
Get the value of a cell.
Definition: thermalprepro.cpp:150
virtual ~ThermalClusterPrepro()
Destructor.
Definition: thermalprepro.cpp:89
virtual bool cellValue(int, int, const Yuni::String &)
Set the value of a cell.
virtual int width() const
Get the width of the datagrid.
Definition: thermalprepro.h:48
virtual wxString cellValue(int x, int y) const
Get the value of a cell.
Definition: thermalprepro.cpp:120
virtual wxString columnCaption(int colIndx) const
Get the column caption.
Definition: thermalprepro.cpp:94
virtual uint maxWidthResize() const
The most suitable column count.
Definition: thermalprepro.h:87
Thermal.
Definition: prepro.h:35
A single thermal cluster.
Definition: cluster.h:76
A n-by-n matrix.
Definition: matrix.h:44
Visual Component for displaying thermal clusters of an arbitrary area.
Definition: thermal-cluster.h:45