Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
connection.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_APPLICATION_WINDOW_INTERCONNECTIONS_H__
22#define __ANTARES_APPLICATION_WINDOW_INTERCONNECTIONS_H__
23
24#include "../toolbox/components/datagrid/renderer/connection.h"
25#include "link-property-buttons.h"
26
27namespace Antares
28{
29namespace Window
30{
35// Forward declaration
36class Interconnection;
37
39{
40public:
41 linkGrid() = default;
42 virtual ~linkGrid() = default;
43 virtual void add(wxBoxSizer* sizer,
44 wxWindow* parent,
45 Interconnection* intercoWindow,
47 = 0;
48};
49
51{
52public:
53 linkParametersGrid() = default;
54 ~linkParametersGrid() override = default;
55 void add(wxBoxSizer* sizer,
56 wxWindow* parent,
57 Interconnection* intercoWindow,
58 Toolbox::InputSelector::Connections* notifier) override;
59};
60
61class linkNTCgrid : public linkGrid
62{
63public:
64 linkNTCgrid() = default;
65 ~linkNTCgrid() override = default;
66 void add(wxBoxSizer* sizer,
67 wxWindow* parent,
68 Interconnection* intercoWindow,
69 Toolbox::InputSelector::Connections* notifier) override;
70};
71
72class Interconnection : public wxScrolledWindow, public Yuni::IEventObserver<Interconnection>
73{
74public:
76
77 Interconnection(wxWindow* parent,
79 linkGrid* link_grid);
81 virtual ~Interconnection();
83
84private:
88 void onConnectionChanged(Data::AreaLink* link);
89
90 void onStudyLinkChanged(Data::AreaLink* link);
91
92 bool checkLinkView(Data::AreaLink* link);
93 void updateLinkView(Data::AreaLink* link);
94 void finalizeView();
95
96private:
98 Data::AreaLink* pLink = nullptr;
99
100 ntcUsageButton* ntcUsageButton_ = nullptr;
101 captionButton* captionButton_ = nullptr;
102 hurdleCostsUsageButton* hurdleCostsUsageButton_ = nullptr;
103 assetTypeButton* assetTypeButton_ = nullptr;
104 loopFlowUsageButton* loopFlowUsageButton_ = nullptr;
105 phaseShifterUsageButton* phaseShifterUsageButton_ = nullptr;
106
108 wxWindow* pNoLink;
110 wxWindow* pLinkData;
111
112}; // class Interconnection
113
114} // namespace Window
115} // namespace Antares
116
117#endif // __ANTARES_APPLICATION_WINDOW_INTERCONNECTIONS_H__
Definition connection.h:73
virtual ~Interconnection()
Destructor.
Definition connection.cpp:160
Definition link-property-buttons.h:131
Definition link-property-buttons.h:151
Definition link-property-buttons.h:114
Definition connection.h:39
Definition connection.h:62
Definition connection.h:51
Definition link-property-buttons.h:179
Definition link-property-buttons.h:96
Definition link-property-buttons.h:190