Power System Platform  2026w10a-beta
Loading...
Searching...
No Matches
TextForm.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef TEXTFORM_H
19#define TEXTFORM_H
20#include "ElementFormBase.h"
21
22#include "../elements/Text.h"
23#include "../simulation/ElectricCalculation.h"
24
32class TextForm : public TextFormBase
33{
34 public:
35 TextForm(wxWindow* parent, Text* text, std::vector<Element*> elementList, double systemPowerBase = 100e6);
36 virtual ~TextForm();
37
38 virtual bool LoadChoices();
39
40 virtual void ElementTypeChoice();
41 virtual void ElementNumberChoice();
42 virtual void DataTypeChoice();
43 virtual void UnitChoice();
44
45 virtual void Preview();
46 virtual bool ValidateData();
47
48 protected:
49 virtual void OnUnitChoiceSelected(wxCommandEvent& event);
50 virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
51 virtual void OnOKButtonClick(wxCommandEvent& event);
52 virtual void OnElementChoiceSelected(wxCommandEvent& event);
53 virtual void OnFromBusChoiceSelected(wxCommandEvent& event);
54 virtual void OnNameChoiceSelected(wxCommandEvent& event);
55 virtual void OnTextEnter(wxCommandEvent& event);
56 virtual void OnToBusChoiceSelected(wxCommandEvent& event);
57 virtual void OnTypeChoiceSelected(wxCommandEvent& event);
58
59 Text* m_text = nullptr;
60 Text* m_textToEdit = nullptr;
61 wxWindow* m_parent = nullptr;
62 ElectricCalculation m_allElements;
63 double m_systemPowerBase;
64};
65#endif // TEXTFORM_H
Base class for electrical calculations providing general utility methods.
Form to edit the text graphical data.
Definition TextForm.h:33
Element that shows power element informations in workspace.
Definition Text.h:70