KiCad PCB EDA Suite
dialog_lib_new_component.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) 2009-2105 Wayne Stambaugh <stambaughw@verizon.net>
5  * Copyright (C) 2015 KiCad Developers, see CHANGELOG.TXT for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #ifndef __dialog_lib_new_component__
26 #define __dialog_lib_new_component__
27 
34 
37 {
38 public:
40  DIALOG_LIB_NEW_COMPONENT( wxWindow* parent );
41 
42  void SetName( const wxString& name ) override { m_textName->SetValue( name ); }
43  wxString GetName( void ) const override { return m_textName->GetValue(); }
44 
45  void SetReference( const wxString& reference )
46  {
47  m_textReference->SetValue( reference );
48  }
49  wxString GetReference( void ) { return m_textReference->GetValue(); }
50 
51  void SetPartCount( int count ) { m_spinPartCount->SetValue( count ); }
52  int GetUnitCount( void ) { return m_spinPartCount->GetValue(); }
53 
54  void SetAlternateBodyStyle( bool enable )
55  {
56  m_checkHasConversion->SetValue( enable );
57  }
58  bool GetAlternateBodyStyle( void )
59  {
60  return m_checkHasConversion->GetValue();
61  }
62 
63  void SetPowerSymbol( bool enable )
64  {
65  m_checkIsPowerSymbol->SetValue( enable );
66  }
67  bool GetPowerSymbol( void ) { return m_checkIsPowerSymbol->GetValue(); }
68 
69  void SetLockItems( bool enable ) { m_checkLockItems->SetValue( enable ); }
70  bool GetLockItems( void ) { return m_checkLockItems->GetValue(); }
71 
72  void SetPinTextPosition( int position )
73  {
74  m_spinPinTextPosition->SetValue( position );
75  }
76  int GetPinTextPosition( void ) { return m_spinPinTextPosition->GetValue(); }
77 
78  void SetShowPinNumber( bool show )
79  {
80  m_checkShowPinNumber->SetValue( show );
81  }
82  bool GetShowPinNumber( void ) { return m_checkShowPinNumber->GetValue(); }
83 
84  void SetShowPinName( bool show )
85  {
86  m_checkShowPinName->SetValue( show );
87  }
88  bool GetShowPinName( void ) { return m_checkShowPinName->GetValue(); }
89 
90  void SetPinNameInside( bool show )
91  {
92  m_checkShowPinNameInside->SetValue( show );
93  }
94  bool GetPinNameInside( void ) { return m_checkShowPinNameInside->GetValue(); }
95 };
96 
97 #endif // __dialog_lib_new_component__
void SetReference(const wxString &reference)
DIALOG_LIB_NEW_COMPONENT(wxWindow *parent)
Constructor.
void SetName(const wxString &name) override
Class DIALOG_LIB_NEW_COMPONENT_BASE.
void SetPinTextPosition(int position)
wxString GetName(void) const override
Implementing DIALOG_LIB_NEW_COMPONENT.
void SetAlternateBodyStyle(bool enable)