Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
dsm.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_DSM_H__
22#define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_DSM_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
29namespace Antares
30{
31namespace Component
32{
33namespace Datagrid
34{
35namespace Renderer
36{
37class DSM final : public Renderer::Matrix<>, public Renderer::ARendererArea
38{
39public:
41
42
45 DSM(wxWindow* control, Toolbox::InputSelector::Area* notifier);
46
48 virtual ~DSM();
50
51 virtual int width() const
52 {
54 }
55 virtual int height() const
56 {
58 }
59
60 virtual wxString columnCaption(int colIndx) const;
61
62 virtual wxString rowCaption(int rowIndx) const
63 {
64 return Renderer::Matrix<>::rowCaption(rowIndx);
65 }
66
67 virtual wxString cellValue(int x, int y) const
68 {
70 }
71
72 virtual double cellNumericValue(int x, int y) const
73 {
75 }
76
77 virtual bool cellValue(int x, int y, const Yuni::String& value)
78 {
79 return Renderer::Matrix<>::cellValue(x, y, value);
80 }
81
82 virtual void resetColors(int, int, wxColour&, wxColour&) const
83 { /*Do nothing*/
84 }
85
86 virtual IRenderer::CellStyle cellStyle(int col, int row) const;
87
88 virtual wxColour horizontalBorderColor(int x, int y) const;
89
90 virtual uint maxWidthResize() const
91 {
92 return 0;
93 }
94 virtual bool valid() const
95 {
97 }
98
99 virtual Date::Precision precision()
100 {
101 return Date::hourly;
102 }
103
104protected:
105 virtual void internalAreaChanged(Antares::Data::Area* area);
106
108 virtual void onStudyClosed() override;
110 virtual void onStudyLoaded() override;
111
112private:
114 Antares::Data::Area* pArea;
115
116}; // class DSM
117
118} // namespace Renderer
119} // namespace Datagrid
120} // namespace Component
121} // namespace Antares
122
123#endif // __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_DSM_H__
DSM(wxWindow *control, Toolbox::InputSelector::Area *notifier)
Constructor.
Definition dsm.cpp:33
virtual int width() const
Get the width of the datagrid.
Definition dsm.h:51
virtual ~DSM()
Destructor.
Definition dsm.cpp:38
virtual wxString cellValue(int x, int y) const
Get the value of a cell.
Definition dsm.h:67
virtual uint maxWidthResize() const
The most suitable column count.
Definition dsm.h:90
virtual void onStudyLoaded() override
Event: the study has been loaded.
Definition dsm.cpp:95
virtual double cellNumericValue(int x, int y) const
Get the value of a cell.
Definition dsm.h:72
virtual Date::Precision precision()
Time Precision.
Definition dsm.h:99
virtual wxColour horizontalBorderColor(int x, int y) const
Get the color of the horizontal bottom border.
Definition dsm.cpp:72
virtual int height() const
Get the height of the datagrid.
Definition dsm.h:55
virtual wxString rowCaption(int rowIndx) const
Get the row caption.
Definition dsm.h:62
virtual bool cellValue(int x, int y, const Yuni::String &value)
Set the value of a cell.
Definition dsm.h:77
virtual wxString columnCaption(int colIndx) const
Get the column caption.
Definition dsm.cpp:43
virtual void onStudyClosed() override
Event: the study has been closed.
Definition dsm.cpp:89
virtual double cellNumericValue(int x, int y) const override
Get the value of a cell.
Definition matrix.hxx:104
virtual wxString cellValue(int x, int y) const override
Get the value of a cell.
Definition matrix.hxx:96
virtual wxString rowCaption(int rowIndx) const override
Get the row caption.
Definition matrix.hxx:47
virtual int width() const override
Get the width of the datagrid.
Definition matrix.hxx:63
virtual int height() const override
Get the height of the datagrid.
Definition matrix.hxx:69
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