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 The 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, see <https://www.gnu.org/licenses/>.
20 */
21
22#ifndef __SIM_PLOT_PANEL_BASE_H
23#define __SIM_PLOT_PANEL_BASE_H
24
25#include <sim/sim_preferences.h>
26#include <sim/sim_types.h>
28#include <wx/panel.h>
29#include <wx/sizer.h>
30#include <wx/stattext.h>
31
32
33class SIM_TAB : public wxWindow
34{
35public:
36 SIM_TAB();
37 SIM_TAB( const wxString& aSimCommand, wxWindow* parent );
38 virtual ~SIM_TAB();
39
40 static bool IsPlottable( SIM_TYPE aSimType );
41
42 virtual void OnLanguageChanged() = 0;
43
44 virtual void ApplyPreferences( const SIM_PREFERENCES& aPrefs );
45
46 SIM_TYPE GetSimType() const;
47
48 const wxString& GetSimCommand() const { return m_simCommand; }
49 void SetSimCommand( const wxString& aSimCommand ) { m_simCommand = aSimCommand; }
50
51 int GetSimOptions() const { return m_simOptions; }
52 void SetSimOptions( int aOptions ) { m_simOptions = aOptions; }
53
55 void SetLastSchTextSimCommand( const wxString& aCmd ) { m_lastSchTextSimCommand = aCmd; }
56
57 const wxString& GetSpicePlotName() const { return m_spicePlotName; }
58 void SetSpicePlotName( const wxString& aPlotName ) { m_spicePlotName = aPlotName; }
59
60private:
61 wxString m_simCommand;
62 unsigned m_simOptions;
65};
66
67
68class SIM_NOPLOT_TAB : public SIM_TAB
69{
70public:
71 SIM_NOPLOT_TAB( const wxString& aSimCommand, wxWindow* parent );
72
73 virtual ~SIM_NOPLOT_TAB();
74
75 void OnLanguageChanged() override;
76
77private:
78 wxSizer* m_sizer;
79 wxStaticText* m_textInfo;
80};
81
82
83#endif
SIM_NOPLOT_TAB(const wxString &aSimCommand, wxWindow *parent)
Definition sim_tab.cpp:77
wxStaticText * m_textInfo
Definition sim_tab.h:79
wxSizer * m_sizer
Definition sim_tab.h:78
void OnLanguageChanged() override
Definition sim_tab.cpp:102
virtual ~SIM_NOPLOT_TAB()
Definition sim_tab.cpp:97
int GetSimOptions() const
Definition sim_tab.h:51
const wxString & GetSpicePlotName() const
Definition sim_tab.h:57
SIM_TAB()
Definition sim_tab.cpp:29
unsigned m_simOptions
Definition sim_tab.h:62
void SetLastSchTextSimCommand(const wxString &aCmd)
Definition sim_tab.h:55
virtual void OnLanguageChanged()=0
SIM_TYPE GetSimType() const
Definition sim_tab.cpp:71
wxString m_simCommand
Definition sim_tab.h:61
wxString m_lastSchTextSimCommand
Definition sim_tab.h:63
void SetSimCommand(const wxString &aSimCommand)
Definition sim_tab.h:49
const wxString & GetSimCommand() const
Definition sim_tab.h:48
static bool IsPlottable(SIM_TYPE aSimType)
Definition sim_tab.cpp:49
void SetSimOptions(int aOptions)
Definition sim_tab.h:52
wxString m_spicePlotName
Definition sim_tab.h:64
virtual void ApplyPreferences(const SIM_PREFERENCES &aPrefs)
Definition sim_tab.cpp:66
virtual ~SIM_TAB()
Definition sim_tab.cpp:44
wxString GetLastSchTextSimCommand() const
Definition sim_tab.h:54
void SetSpicePlotName(const wxString &aPlotName)
Definition sim_tab.h:58
Contains preferences pertaining to the simulator.
SIM_TYPE
< Possible simulation types
Definition sim_types.h:28
Contains preferences pertaining to the simulator.