KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sim_tab.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2016-2023 CERN
5 * Copyright (C) 2016-2024 KiCad Developers, see AUTHORS.txt for contributors.
6 * @author Sylwester Kocjan <[email protected]>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 3
11 * of the License, or (at your option) any later version.
12 *
13 * This program 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 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * https://www.gnu.org/licenses/gpl-3.0.html
21 * or you may search the http://www.gnu.org website for the version 3 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#ifndef __SIM_PLOT_PANEL_BASE_H
27#define __SIM_PLOT_PANEL_BASE_H
28
29#include <sim/sim_preferences.h>
30#include <sim/sim_types.h>
32#include <wx/panel.h>
33#include <wx/sizer.h>
34#include <wx/stattext.h>
35
36
37class SIM_TAB : public wxWindow
38{
39public:
40 SIM_TAB();
41 SIM_TAB( const wxString& aSimCommand, wxWindow* parent );
42 virtual ~SIM_TAB();
43
44 static bool IsPlottable( SIM_TYPE aSimType );
45
46 virtual void OnLanguageChanged() = 0;
47
48 virtual void ApplyPreferences( const SIM_PREFERENCES& aPrefs );
49
50 SIM_TYPE GetSimType() const;
51
52 const wxString& GetSimCommand() const { return m_simCommand; }
53 void SetSimCommand( const wxString& aSimCommand ) { m_simCommand = aSimCommand; }
54
55 int GetSimOptions() const { return m_simOptions; }
56 void SetSimOptions( int aOptions ) { m_simOptions = aOptions; }
57
59 void SetLastSchTextSimCommand( const wxString& aCmd ) { m_lastSchTextSimCommand = aCmd; }
60
61 const wxString& GetSpicePlotName() const { return m_spicePlotName; }
62 void SetSpicePlotName( const wxString& aPlotName ) { m_spicePlotName = aPlotName; }
63
64private:
65 wxString m_simCommand;
66 unsigned m_simOptions;
69};
70
71
72class SIM_NOPLOT_TAB : public SIM_TAB
73{
74public:
75 SIM_NOPLOT_TAB( const wxString& aSimCommand, wxWindow* parent );
76
77 virtual ~SIM_NOPLOT_TAB();
78
79 void OnLanguageChanged() override;
80
81private:
82 wxSizer* m_sizer;
83 wxStaticText* m_textInfo;
84};
85
86
87#endif
wxStaticText * m_textInfo
Definition: sim_tab.h:83
wxSizer * m_sizer
Definition: sim_tab.h:82
void OnLanguageChanged() override
Definition: sim_tab.cpp:106
virtual ~SIM_NOPLOT_TAB()
Definition: sim_tab.cpp:101
int GetSimOptions() const
Definition: sim_tab.h:55
const wxString & GetSpicePlotName() const
Definition: sim_tab.h:61
SIM_TAB()
Definition: sim_tab.cpp:33
unsigned m_simOptions
Definition: sim_tab.h:66
void SetLastSchTextSimCommand(const wxString &aCmd)
Definition: sim_tab.h:59
virtual void OnLanguageChanged()=0
SIM_TYPE GetSimType() const
Definition: sim_tab.cpp:75
wxString m_simCommand
Definition: sim_tab.h:65
wxString m_lastSchTextSimCommand
Definition: sim_tab.h:67
void SetSimCommand(const wxString &aSimCommand)
Definition: sim_tab.h:53
const wxString & GetSimCommand() const
Definition: sim_tab.h:52
static bool IsPlottable(SIM_TYPE aSimType)
Definition: sim_tab.cpp:53
void SetSimOptions(int aOptions)
Definition: sim_tab.h:56
wxString m_spicePlotName
Definition: sim_tab.h:68
virtual void ApplyPreferences(const SIM_PREFERENCES &aPrefs)
Definition: sim_tab.cpp:70
virtual ~SIM_TAB()
Definition: sim_tab.cpp:48
wxString GetLastSchTextSimCommand() const
Definition: sim_tab.h:58
void SetSpicePlotName(const wxString &aPlotName)
Definition: sim_tab.h:62
Contains preferences pertaining to the simulator.
SIM_TYPE
< Possible simulation types
Definition: sim_types.h:32
Contains preferences pertaining to the simulator.