Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
47f473fd
Commit
47f473fd
authored
Oct 30, 2009
by
stambaughw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the new pin properties dialog code missed on previous commit.
parent
2884d125
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1781 additions
and
0 deletions
+1781
-0
dialog_lib_edit_pin.cpp
eeschema/dialog_lib_edit_pin.cpp
+34
-0
dialog_lib_edit_pin.fbp
eeschema/dialog_lib_edit_pin.fbp
+1391
-0
dialog_lib_edit_pin.h
eeschema/dialog_lib_edit_pin.h
+109
-0
dialog_lib_edit_pin_base.cpp
eeschema/dialog_lib_edit_pin_base.cpp
+168
-0
dialog_lib_edit_pin_base.h
eeschema/dialog_lib_edit_pin_base.h
+79
-0
No files found.
eeschema/dialog_lib_edit_pin.cpp
0 → 100644
View file @
47f473fd
#include "dialog_lib_edit_pin.h"
DIALOG_LIB_EDIT_PIN
::
DIALOG_LIB_EDIT_PIN
(
wxWindow
*
parent
)
:
DIALOG_LIB_EDIT_PIN_BASE
(
parent
)
{
/* Required to make escape key work correctly in wxGTK. */
m_sdbSizer1OK
->
SetFocus
();
/* This ugly hack fixes a bug in wxWidgets 2.8.7 and likely earlier
* versions for the flex grid sizer in wxGTK that prevents the last
* column from being sized correctly.
*/
#ifdef __WXGTK__
m_staticNameTextSizeUnits
->
SetMinSize
(
wxSize
(
75
,
-
1
)
);
#endif
}
void
DIALOG_LIB_EDIT_PIN
::
SetOrientationList
(
const
wxArrayString
&
list
)
{
m_choiceOrientation
->
Append
(
list
);
}
void
DIALOG_LIB_EDIT_PIN
::
SetElectricalTypeList
(
const
wxArrayString
&
list
)
{
m_choiceElectricalType
->
Append
(
list
);
}
void
DIALOG_LIB_EDIT_PIN
::
SetStyleList
(
const
wxArrayString
&
list
)
{
m_choiceStyle
->
Append
(
list
);
}
eeschema/dialog_lib_edit_pin.fbp
0 → 100644
View file @
47f473fd
This diff is collapsed.
Click to expand it.
eeschema/dialog_lib_edit_pin.h
0 → 100644
View file @
47f473fd
#ifndef __dialog_lib_edit_pin__
#define __dialog_lib_edit_pin__
/**
* @file
* Subclass of DIALOG_LIB_EDIT_PIN_BASE, which is generated by wxFormBuilder.
*/
#include "dialog_lib_edit_pin_base.h"
/** Implementing DIALOG_LIB_EDIT_PIN_BASE */
class
DIALOG_LIB_EDIT_PIN
:
public
DIALOG_LIB_EDIT_PIN_BASE
{
public
:
/** Constructor */
DIALOG_LIB_EDIT_PIN
(
wxWindow
*
parent
);
void
SetOrientationList
(
const
wxArrayString
&
list
);
void
SetOrientation
(
int
orientation
)
{
m_choiceOrientation
->
SetSelection
(
orientation
);
}
int
GetOrientation
(
void
)
{
return
m_choiceOrientation
->
GetSelection
();
}
void
SetElectricalTypeList
(
const
wxArrayString
&
list
);
void
SetElectricalType
(
int
type
)
{
m_choiceElectricalType
->
SetSelection
(
type
);
}
int
GetElectricalType
(
void
)
{
return
m_choiceElectricalType
->
GetSelection
();
}
void
SetStyleList
(
const
wxArrayString
&
list
);
void
SetStyle
(
int
style
)
{
m_choiceStyle
->
SetSelection
(
style
);
}
int
GetStyle
(
void
)
{
return
m_choiceStyle
->
GetSelection
();
}
void
SetName
(
const
wxString
&
name
)
{
m_textName
->
SetValue
(
name
);
}
wxString
GetName
(
void
)
{
return
m_textName
->
GetValue
();
}
void
SetNameTextSize
(
const
wxString
&
size
)
{
m_textNameTextSize
->
SetValue
(
size
);
}
wxString
GetNameTextSize
(
void
)
{
return
m_textNameTextSize
->
GetValue
();
}
void
SetNameTextSizeUnits
(
const
wxString
&
units
)
{
m_staticNameTextSizeUnits
->
SetLabel
(
units
);
}
void
SetNumber
(
const
wxString
&
number
)
{
m_textNumber
->
SetValue
(
number
);
}
wxString
GetNumber
(
void
)
{
return
m_textNumber
->
GetValue
();
}
void
SetNumberTextSize
(
const
wxString
&
size
)
{
m_textNumberTextSize
->
SetValue
(
size
);
}
wxString
GetNumberTextSize
(
void
)
{
return
m_textNumberTextSize
->
GetValue
();
}
void
SetNumberTextSizeUnits
(
const
wxString
&
units
)
{
m_staticNumberTextSizeUnits
->
SetLabel
(
units
);
}
void
SetLength
(
const
wxString
&
length
)
{
m_textLength
->
SetValue
(
length
);
}
wxString
GetLength
(
void
)
{
return
m_textLength
->
GetValue
();
}
void
SetLengthUnits
(
const
wxString
&
units
)
{
m_staticLengthUnits
->
SetLabel
(
units
);
}
void
SetAddToAllParts
(
bool
apply
)
{
m_checkApplyToAllParts
->
SetValue
(
apply
);
}
bool
GetAddToAllParts
(
void
)
{
return
m_checkApplyToAllParts
->
GetValue
();
}
void
SetAddToAllBodyStyles
(
bool
apply
)
{
m_checkApplyToAllConversions
->
SetValue
(
apply
);
}
bool
GetAddToAllBodyStyles
(
void
)
{
return
m_checkApplyToAllConversions
->
GetValue
();
}
void
SetVisible
(
bool
visible
)
{
m_checkShow
->
SetValue
(
visible
);
}
bool
GetVisible
(
void
)
{
return
m_checkShow
->
GetValue
();
}
};
#endif // __dialog_lib_edit_pin__
eeschema/dialog_lib_edit_pin_base.cpp
0 → 100644
View file @
47f473fd
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_lib_edit_pin_base.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_LIB_EDIT_PIN_BASE
::
DIALOG_LIB_EDIT_PIN_BASE
(
wxWindow
*
parent
,
wxWindowID
id
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
:
wxDialog
(
parent
,
id
,
title
,
pos
,
size
,
style
)
{
this
->
SetSizeHints
(
wxDefaultSize
,
wxDefaultSize
);
wxBoxSizer
*
mainSizer
;
mainSizer
=
new
wxBoxSizer
(
wxVERTICAL
);
wxFlexGridSizer
*
fgSizer1
;
fgSizer1
=
new
wxFlexGridSizer
(
5
,
6
,
0
,
0
);
fgSizer1
->
SetFlexibleDirection
(
wxBOTH
);
fgSizer1
->
SetNonFlexibleGrowMode
(
wxFLEX_GROWMODE_ALL
);
m_staticText1
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"&Name:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText1
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticText1
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
m_textName
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
fgSizer1
->
Add
(
m_textName
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
fgSizer1
->
Add
(
0
,
0
,
1
,
wxEXPAND
,
3
);
m_staticText2
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"N&ame text size:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText2
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticText2
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
m_textNameTextSize
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
fgSizer1
->
Add
(
m_textNameTextSize
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
m_staticNameTextSizeUnits
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"units"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticNameTextSizeUnits
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticNameTextSizeUnits
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
m_staticText4
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"N&umber:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText4
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticText4
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
m_textNumber
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
fgSizer1
->
Add
(
m_textNumber
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
fgSizer1
->
Add
(
0
,
0
,
1
,
wxEXPAND
,
3
);
m_staticText9
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"Number te&xt size:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText9
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticText9
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
m_textNumberTextSize
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
fgSizer1
->
Add
(
m_textNumberTextSize
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
m_staticNumberTextSizeUnits
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"units"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticNumberTextSizeUnits
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticNumberTextSizeUnits
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
m_staticText5
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"&Orientation:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText5
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticText5
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
wxArrayString
m_choiceOrientationChoices
;
m_choiceOrientation
=
new
wxChoice
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
m_choiceOrientationChoices
,
0
);
m_choiceOrientation
->
SetSelection
(
0
);
fgSizer1
->
Add
(
m_choiceOrientation
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
fgSizer1
->
Add
(
15
,
0
,
1
,
wxEXPAND
,
3
);
m_staticText11
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"&Length:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText11
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticText11
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
m_textLength
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
fgSizer1
->
Add
(
m_textLength
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
m_staticLengthUnits
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"units"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticLengthUnits
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticLengthUnits
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
m_staticText6
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"&Electical type:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText6
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticText6
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
wxArrayString
m_choiceElectricalTypeChoices
;
m_choiceElectricalType
=
new
wxChoice
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
m_choiceElectricalTypeChoices
,
0
);
m_choiceElectricalType
->
SetSelection
(
0
);
fgSizer1
->
Add
(
m_choiceElectricalType
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
fgSizer1
->
Add
(
0
,
0
,
1
,
wxEXPAND
,
3
);
fgSizer1
->
Add
(
0
,
0
,
1
,
wxEXPAND
,
3
);
fgSizer1
->
Add
(
0
,
0
,
1
,
wxEXPAND
,
3
);
fgSizer1
->
Add
(
0
,
0
,
0
,
wxEXPAND
,
3
);
m_staticText7
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"&Style:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText7
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticText7
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
wxArrayString
m_choiceStyleChoices
;
m_choiceStyle
=
new
wxChoice
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
m_choiceStyleChoices
,
0
);
m_choiceStyle
->
SetSelection
(
0
);
fgSizer1
->
Add
(
m_choiceStyle
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
fgSizer1
->
Add
(
0
,
0
,
1
,
wxEXPAND
,
3
);
fgSizer1
->
Add
(
0
,
0
,
1
,
wxEXPAND
,
3
);
fgSizer1
->
Add
(
0
,
0
,
1
,
wxEXPAND
,
3
);
mainSizer
->
Add
(
fgSizer1
,
0
,
wxALL
|
wxEXPAND
,
12
);
wxBoxSizer
*
boarderSizer
;
boarderSizer
=
new
wxBoxSizer
(
wxVERTICAL
);
m_checkApplyToAllParts
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Add to all &parts in package"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
boarderSizer
->
Add
(
m_checkApplyToAllParts
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
m_checkApplyToAllConversions
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Add to all alternate &body styles (DeMorgan)"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
boarderSizer
->
Add
(
m_checkApplyToAllConversions
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
m_checkShow
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"&Visible"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_checkShow
->
SetValue
(
true
);
boarderSizer
->
Add
(
m_checkShow
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
3
);
boarderSizer
->
Add
(
0
,
5
,
0
,
wxALL
|
wxEXPAND
,
10
);
m_sdbSizer1
=
new
wxStdDialogButtonSizer
();
m_sdbSizer1OK
=
new
wxButton
(
this
,
wxID_OK
);
m_sdbSizer1
->
AddButton
(
m_sdbSizer1OK
);
m_sdbSizer1Cancel
=
new
wxButton
(
this
,
wxID_CANCEL
);
m_sdbSizer1
->
AddButton
(
m_sdbSizer1Cancel
);
m_sdbSizer1
->
Realize
();
boarderSizer
->
Add
(
m_sdbSizer1
,
0
,
wxALL
|
wxEXPAND
,
0
);
mainSizer
->
Add
(
boarderSizer
,
0
,
wxALL
|
wxEXPAND
,
12
);
this
->
SetSizer
(
mainSizer
);
this
->
Layout
();
mainSizer
->
Fit
(
this
);
this
->
Centre
(
wxBOTH
);
}
DIALOG_LIB_EDIT_PIN_BASE
::~
DIALOG_LIB_EDIT_PIN_BASE
()
{
}
eeschema/dialog_lib_edit_pin_base.h
0 → 100644
View file @
47f473fd
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_lib_edit_pin_base__
#define __dialog_lib_edit_pin_base__
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/textctrl.h>
#include <wx/choice.h>
#include <wx/sizer.h>
#include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_LIB_EDIT_PIN_BASE
///////////////////////////////////////////////////////////////////////////////
class
DIALOG_LIB_EDIT_PIN_BASE
:
public
wxDialog
{
private
:
protected
:
wxStaticText
*
m_staticText1
;
wxTextCtrl
*
m_textName
;
wxStaticText
*
m_staticText2
;
wxTextCtrl
*
m_textNameTextSize
;
wxStaticText
*
m_staticNameTextSizeUnits
;
wxStaticText
*
m_staticText4
;
wxTextCtrl
*
m_textNumber
;
wxStaticText
*
m_staticText9
;
wxTextCtrl
*
m_textNumberTextSize
;
wxStaticText
*
m_staticNumberTextSizeUnits
;
wxStaticText
*
m_staticText5
;
wxChoice
*
m_choiceOrientation
;
wxStaticText
*
m_staticText11
;
wxTextCtrl
*
m_textLength
;
wxStaticText
*
m_staticLengthUnits
;
wxStaticText
*
m_staticText6
;
wxChoice
*
m_choiceElectricalType
;
wxStaticText
*
m_staticText7
;
wxChoice
*
m_choiceStyle
;
wxCheckBox
*
m_checkApplyToAllParts
;
wxCheckBox
*
m_checkApplyToAllConversions
;
wxCheckBox
*
m_checkShow
;
wxStdDialogButtonSizer
*
m_sdbSizer1
;
wxButton
*
m_sdbSizer1OK
;
wxButton
*
m_sdbSizer1Cancel
;
public
:
DIALOG_LIB_EDIT_PIN_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Pin Properties"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxDefaultSize
,
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
~
DIALOG_LIB_EDIT_PIN_BASE
();
};
#endif //__dialog_lib_edit_pin_base__
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment