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
d7f569ae
Commit
d7f569ae
authored
Jul 22, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GOST compatibility.
parent
c328d6b1
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
50 additions
and
12 deletions
+50
-12
CMakeLists.txt
common/CMakeLists.txt
+1
-7
page_layout_reader.cpp
common/page_layout/page_layout_reader.cpp
+2
-0
title_block_shapes.cpp
common/page_layout/title_block_shapes.cpp
+18
-2
title_block_shapes_gost.cpp
common/page_layout/title_block_shapes_gost.cpp
+10
-1
dialog_eeschema_options_base.cpp
eeschema/dialogs/dialog_eeschema_options_base.cpp
+1
-1
dialog_eeschema_options_base.fbp
eeschema/dialogs/dialog_eeschema_options_base.fbp
+1
-1
worksheet_shape_builder.h
include/worksheet_shape_builder.h
+8
-0
files.cpp
pagelayout_editor/files.cpp
+6
-0
pl_editor.cpp
pagelayout_editor/pl_editor.cpp
+3
-0
No files found.
common/CMakeLists.txt
View file @
d7f569ae
...
...
@@ -26,14 +26,8 @@ set(COMMON_ABOUT_DLG_SRCS
dialogs/dialog_page_settings_base.cpp
)
if
(
KICAD_GOST
)
set
(
TITLE_BLOCK_SHAPES title_block_shapes_gost
)
else
()
set
(
TITLE_BLOCK_SHAPES title_block_shapes
)
endif
()
set
(
COMMON_PAGE_LAYOUT_SRCS
page_layout/
${
TITLE_BLOCK_SHAPES
}
.cpp
page_layout/
title_block_shapes
.cpp
page_layout/class_worksheet_dataitem.cpp
page_layout/class_worksheet_layout.cpp
page_layout/page_layout_default_description.cpp
...
...
common/page_layout/page_layout_reader.cpp
View file @
d7f569ae
...
...
@@ -630,6 +630,7 @@ void WORKSHEET_LAYOUT::SetDefaultLayout()
try
{
lp_parser
.
Parse
(
this
);
SetDefaultDescrFlag
(
true
);
}
catch
(
IO_ERROR
ioe
)
{
...
...
@@ -693,6 +694,7 @@ void WORKSHEET_LAYOUT::SetPageLayout( const wxString& aFullFileName, bool Append
try
{
lp_parser
.
Parse
(
this
);
SetDefaultDescrFlag
(
false
);
}
catch
(
IO_ERROR
ioe
)
{
...
...
common/page_layout/title_block_shapes.cpp
View file @
d7f569ae
...
...
@@ -61,19 +61,35 @@
#include <worksheet_shape_builder.h>
#include <class_worksheet_dataitem.h>
// Temporary include. Will be removed when a GOST page layout descr file is available
#ifdef KICAD_GOST
#include "title_block_shapes_gost.cpp"
#endif
void
WS_DRAW_ITEM_LIST
::
BuildWorkSheetGraphicList
(
const
PAGE_INFO
&
aPageInfo
,
const
TITLE_BLOCK
&
aTitleBlock
,
EDA_COLOR_T
aColor
,
EDA_COLOR_T
aAltColor
)
{
WORKSHEET_LAYOUT
&
pglayout
=
WORKSHEET_LAYOUT
::
GetTheInstance
();
// Ugly hack: will be removed when a GOST page layout descr file is available
#ifdef KICAD_GOST
if
(
pglayout
.
IsDefaultDescr
()
)
{
((
WS_DRAW_ITEM_LIST_GOST
*
)
this
)
->
BuildWorkSheetGraphicListGOST
(
aPageInfo
,
aTitleBlock
,
aColor
,
aAltColor
);
return
;
}
#endif
#define milsTomm (25.4/1000)
#define mmTomils (1000/25.4)
m_titleBlock
=
&
aTitleBlock
;
m_paperFormat
=
&
aPageInfo
.
GetType
();
WORKSHEET_LAYOUT
&
pglayout
=
WORKSHEET_LAYOUT
::
GetTheInstance
();
wxPoint
LTmargin
(
Mm2mils
(
pglayout
.
GetLeftMargin
()
),
Mm2mils
(
pglayout
.
GetTopMargin
()
)
);
wxPoint
RBmargin
(
Mm2mils
(
pglayout
.
GetRightMargin
()
),
...
...
common/page_layout/title_block_shapes_gost.cpp
View file @
d7f569ae
...
...
@@ -977,7 +977,16 @@ Ki_WorkSheetData WS_DopTop_Line6 =
#include <worksheet_shape_builder.h>
void
WS_DRAW_ITEM_LIST
::
BuildWorkSheetGraphicList
(
class
WS_DRAW_ITEM_LIST_GOST
:
public
WS_DRAW_ITEM_LIST
{
public
:
void
BuildWorkSheetGraphicListGOST
(
const
PAGE_INFO
&
aPageInfo
,
const
TITLE_BLOCK
&
aTitleBlock
,
EDA_COLOR_T
aLineColor
,
EDA_COLOR_T
aTextColor
);
};
void
WS_DRAW_ITEM_LIST_GOST
::
BuildWorkSheetGraphicListGOST
(
const
PAGE_INFO
&
aPageInfo
,
const
TITLE_BLOCK
&
aTitleBlock
,
EDA_COLOR_T
aLineColor
,
EDA_COLOR_T
aTextColor
)
...
...
eeschema/dialogs/dialog_eeschema_options_base.cpp
View file @
d7f569ae
...
...
@@ -143,7 +143,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
m_staticText23
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticText23
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxRIGHT
|
wxLEFT
,
3
);
m_staticText26
=
new
wxStaticText
(
m_panel1
,
wxID_ANY
,
_
(
"
p
art id notation:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText26
=
new
wxStaticText
(
m_panel1
,
wxID_ANY
,
_
(
"
P
art id notation:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText26
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticText26
,
0
,
wxRIGHT
|
wxLEFT
|
wxALIGN_CENTER_VERTICAL
,
5
);
...
...
eeschema/dialogs/dialog_eeschema_options_base.fbp
View file @
d7f569ae
...
...
@@ -2455,7 +2455,7 @@
<property
name=
"gripper"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
p
art id notation:
</property>
<property
name=
"label"
>
P
art id notation:
</property>
<property
name=
"max_size"
></property>
<property
name=
"maximize_button"
>
0
</property>
<property
name=
"maximum_size"
></property>
...
...
include/worksheet_shape_builder.h
View file @
d7f569ae
...
...
@@ -240,6 +240,7 @@ public:
*/
class
WS_DRAW_ITEM_LIST
{
protected
:
std
::
vector
<
WS_DRAW_ITEM_BASE
*>
m_graphicList
;
// Items to draw/plot
unsigned
m_idx
;
// for GetFirst, GetNext functions
wxPoint
m_LTmargin
;
// The left top margin in mils of the page layout.
...
...
@@ -464,6 +465,10 @@ class WORKSHEET_LAYOUT
double
m_rightMargin
;
// the right page margin in mm
double
m_topMargin
;
// the top page margin in mm
double
m_bottomMargin
;
// the bottom page margin in mm
bool
m_isDefaultDescr
;
// true if the internal default descr is loaded
// mainly used in Kicad GOST version, until
// a GOST page descr file is available
// to force the GOST default title block
public
:
WORKSHEET_LAYOUT
();
...
...
@@ -480,6 +485,9 @@ public:
}
// Accessors:
bool
IsDefaultDescr
()
{
return
m_isDefaultDescr
;
}
void
SetDefaultDescrFlag
(
bool
aFlg
)
{
m_isDefaultDescr
=
aFlg
;
}
double
GetLeftMargin
()
{
return
m_leftMargin
;
}
double
GetRightMargin
()
{
return
m_rightMargin
;
}
double
GetTopMargin
()
{
return
m_topMargin
;
}
...
...
pagelayout_editor/files.cpp
View file @
d7f569ae
...
...
@@ -96,6 +96,9 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
{
case
ID_LOAD_DEFAULT_PAGE_LAYOUT
:
pglayout
.
SetPageLayout
();
// Force DefaultDescrFlag to false in page layout editor,
// has meaning only for GOST version
pglayout
.
SetDefaultDescrFlag
(
false
);
OnNewPageLayout
();
break
;
...
...
@@ -103,6 +106,9 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
pglayout
.
AllowVoidList
(
true
);
SetCurrFileName
(
wxEmptyString
);
pglayout
.
ClearList
();
// Force DefaultDescrFlag to false in page layout editor,
// has meaning only for GOST version
pglayout
.
SetDefaultDescrFlag
(
false
);
OnNewPageLayout
();
break
;
...
...
pagelayout_editor/pl_editor.cpp
View file @
d7f569ae
...
...
@@ -120,6 +120,9 @@ bool EDA_APP::OnInit()
if
(
!
descrLoaded
)
{
WORKSHEET_LAYOUT
::
GetTheInstance
().
SetPageLayout
();
// Force DefaultDescrFlag to false in page layout editor,
// has meaning only for GOST version
WORKSHEET_LAYOUT
::
GetTheInstance
().
SetDefaultDescrFlag
(
false
);
frame
->
OnNewPageLayout
();
}
...
...
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