Antares Simulator
Power System Simulator
connection.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_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 
27 namespace Antares::Window
28 {
33 // Forward declaration
34 class Interconnection;
35 
36 class linkGrid
37 {
38 public:
39  linkGrid() = default;
40  virtual ~linkGrid() = default;
41  virtual void add(wxBoxSizer* sizer,
42  wxWindow* parent,
43  Interconnection* intercoWindow,
45  = 0;
46 };
47 
49 {
50 public:
51  linkParametersGrid() = default;
52  ~linkParametersGrid() override = default;
53  void add(wxBoxSizer* sizer,
54  wxWindow* parent,
55  Interconnection* intercoWindow,
56  Toolbox::InputSelector::Connections* notifier) override;
57 };
58 
59 class linkNTCgrid: public linkGrid
60 {
61 public:
62  linkNTCgrid() = default;
63  ~linkNTCgrid() override = default;
64  void add(wxBoxSizer* sizer,
65  wxWindow* parent,
66  Interconnection* intercoWindow,
67  Toolbox::InputSelector::Connections* notifier) override;
68 };
69 
70 class Interconnection: public wxScrolledWindow, public Yuni::IEventObserver<Interconnection>
71 {
72 public:
74 
75  Interconnection(wxWindow* parent,
77  linkGrid* link_grid);
79  virtual ~Interconnection();
81 
82 private:
86  void onConnectionChanged(Data::AreaLink* link);
87 
88  void onStudyLinkChanged(Data::AreaLink* link);
89 
90  bool checkLinkView(Data::AreaLink* link);
91  void updateLinkView(Data::AreaLink* link);
92  void finalizeView();
93 
94 private:
96  Data::AreaLink* pLink = nullptr;
97 
98  ntcUsageButton* ntcUsageButton_ = nullptr;
99  captionButton* captionButton_ = nullptr;
100  hurdleCostsUsageButton* hurdleCostsUsageButton_ = nullptr;
101  assetTypeButton* assetTypeButton_ = nullptr;
102  loopFlowUsageButton* loopFlowUsageButton_ = nullptr;
103  phaseShifterUsageButton* phaseShifterUsageButton_ = nullptr;
104 
106  wxWindow* pNoLink;
108  wxWindow* pLinkData;
109 
110 }; // class Interconnection
111 
112 } // namespace Antares::Window
113 
114 #endif // __ANTARES_APPLICATION_WINDOW_INTERCONNECTIONS_H__
Definition: connection.h:71
virtual ~Interconnection()
Destructor.
Definition: connection.cpp:168
Definition: link-property-buttons.h:131
Definition: link-property-buttons.h:151
Definition: link-property-buttons.h:114
Definition: connection.h:37
Definition: connection.h:60
Definition: connection.h:49
Definition: link-property-buttons.h:180
Definition: link-property-buttons.h:96
Definition: link-property-buttons.h:191