Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
watervalues.h
1/*
2** Copyright 2007-2024, 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_WATERVALUES_H__
22#define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_WATERVALUES_H__
23
24#include "../area.h"
25#include "../matrix.h"
26#include <antares/date/date.h>
27
28namespace Antares
29{
30namespace Component
31{
32namespace Datagrid
33{
34namespace Renderer
35{
36class WaterValues final : public Renderer::Matrix<double, double, 2>, public Renderer::ARendererArea
37{
38public:
40
41public:
43
44
47 WaterValues(wxWindow* control, Toolbox::InputSelector::Area* notifier);
49 virtual ~WaterValues();
51
52 virtual int width() const;
53 virtual int height() const;
54
55 virtual wxString columnCaption(int colIndx) const;
56
57 virtual wxString rowCaption(int rowIndx) const;
58
59 virtual wxString cellValue(int x, int y) const;
60
61 virtual double cellNumericValue(int x, int y) const;
62
63 virtual bool cellValue(int, int, const Yuni::String&);
64
65 virtual void resetColors(int, int, wxColour&, wxColour&) const
66 { /*Do nothing*/
67 }
68
69 virtual Date::Precision precision()
70 {
71 return Date::daily;
72 }
73
74 virtual IRenderer::CellStyle cellStyle(int col, int row) const;
75
76 virtual bool valid() const;
77
78 virtual uint maxWidthResize() const
79 {
80 return 0;
81 }
82 virtual uint maxHeightResize() const
83 {
84 return 0;
85 }
86
87 // virtual bool circularShiftRowsUntilDate(MonthName month, uint daymonth);
88
89protected:
90 virtual void internalAreaChanged(Antares::Data::Area* area);
92 virtual void onStudyClosed() override;
94 virtual void onStudyLoaded() override;
95
96}; // class InflowPattern
97
98} // namespace Renderer
99} // namespace Datagrid
100} // namespace Component
101} // namespace Antares
102
103#endif // __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_WATERVALUES_H__
virtual void onStudyLoaded() override
Event: the study has been loaded.
Definition watervalues.cpp:137
virtual wxString cellValue(int x, int y) const
Get the value of a cell.
Definition watervalues.cpp:66
virtual wxString rowCaption(int rowIndx) const
Get the row caption.
Definition watervalues.cpp:112
virtual uint maxWidthResize() const
The most suitable column count.
Definition watervalues.h:78
virtual double cellNumericValue(int x, int y) const
Get the value of a cell.
Definition watervalues.cpp:71
virtual Date::Precision precision()
Time Precision.
Definition watervalues.h:69
virtual bool cellValue(int, int, const Yuni::String &)
Set the value of a cell.
virtual int height() const
Get the height of the datagrid.
Definition watervalues.cpp:49
virtual int width() const
Get the width of the datagrid.
Definition watervalues.cpp:44
virtual wxString columnCaption(int colIndx) const
Get the column caption.
Definition watervalues.cpp:54
WaterValues(wxWindow *control, Toolbox::InputSelector::Area *notifier)
Constructor.
Definition watervalues.cpp:34
virtual uint maxHeightResize() const
The most suitable column count.
Definition watervalues.h:82
virtual void onStudyClosed() override
Event: the study has been closed.
Definition watervalues.cpp:131
virtual ~WaterValues()
Destructor.
Definition watervalues.cpp:39
Definition for a single area.
Definition area.h:52
A n-by-n matrix.
Definition jit.h:30
Visual Component for displaying all available areas (and groups)
Definition area.h:41