21 #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_XCAST_TRANSLATION_HXX__
22 #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_XCAST_TRANSLATION_HXX__
24 #include <antares/study/xcast/xcast.h>
25 #include <antares/date/date.h>
27 namespace Antares::Component::Datagrid::Renderer
29 template<enum Data::TimeSeriesType T>
36 template<enum Data::TimeSeriesType T>
42 template<enum Data::TimeSeriesType T>
45 return MatrixAncestorType::columnCaption(colIndx);
48 template<enum Data::TimeSeriesType T>
51 return MatrixAncestorType::cellValue(x, y);
54 template<enum Data::TimeSeriesType T>
57 return MatrixAncestorType::cellNumericValue(x, y);
60 template<enum Data::TimeSeriesType T>
63 return MatrixAncestorType::cellValue(x, y, value);
66 template<enum Data::TimeSeriesType T>
71 auto* xcastData = area->xcastData<T>();
72 this->matrix(&(xcastData->translation));
76 this->matrix(
nullptr);
79 Renderer::ARendererArea::internalAreaChanged(area);
82 template<enum Data::TimeSeriesType T>
83 inline IRenderer::CellStyle XCastTranslation<T>::cellStyle(
int col,
int row)
const
85 return MatrixAncestorType::cellStyle(col, row);
88 template<enum Data::TimeSeriesType T>
91 return MatrixAncestorType::rowCaption(rowIndx);
94 template<enum Data::TimeSeriesType T>
102 auto& hourinfo = study->calendar.hours[y + 1];
104 if (hourinfo.firstHourInMonth)
106 return Default::BorderMonthSeparator();
108 if (hourinfo.firstHourInDay)
110 return Default::BorderDaySeparator();
116 template<enum Data::TimeSeriesType T>
123 template<enum Data::TimeSeriesType T>
virtual void onStudyClosed() override
The study has been closed.
Definition: area.cpp:86
virtual void onStudyLoaded() override
Event: the study has been loaded.
Definition: area.cpp:92
virtual wxColour verticalBorderColor(int x, int y) const
Get the color of the vertical right border.
Definition: renderer.hxx:69
Definition: xcast-translation.h:31
virtual wxString columnCaption(int colIndx) const
Get the column caption.
Definition: xcast-translation.hxx:43
virtual wxString cellValue(int x, int y) const
Get the string representation of a cell.
Definition: xcast-translation.hxx:49
virtual void onStudyClosed() override
Event: the study has been closed.
Definition: xcast-translation.hxx:117
virtual wxString rowCaption(int rowIndx) const
Get the row caption.
Definition: xcast-translation.hxx:89
virtual double cellNumericValue(int x, int y) const
Get the value of a cell.
Definition: xcast-translation.hxx:55
virtual ~XCastTranslation()
Destructor.
Definition: xcast-translation.hxx:37
virtual wxColour horizontalBorderColor(int x, int y) const
Get the color of the horizontal bottom border.
Definition: xcast-translation.hxx:95
XCastTranslation(wxWindow *control, Toolbox::InputSelector::Area *notifier)
Constructor.
Definition: xcast-translation.hxx:30
virtual void onStudyLoaded() override
Event: the study has been loaded.
Definition: xcast-translation.hxx:124
Definition for a single area.
Definition: area.h:51
@ maxHoursInYear
The maximum number of hours in a year.
Definition: date.h:192
A n-by-n matrix.
Definition: matrix.h:44