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
7080828f
Commit
7080828f
authored
May 24, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More about worksheet code.
parent
26f2c04f
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
787 additions
and
136 deletions
+787
-136
CMakeLists.txt
common/CMakeLists.txt
+7
-0
common_plot_functions.cpp
common/common_plot_functions.cpp
+5
-6
title_block_shapes.cpp
common/title_block_shapes.cpp
+627
-0
title_block_shapes_gost.cpp
common/title_block_shapes_gost.cpp
+112
-107
worksheet.cpp
common/worksheet.cpp
+3
-15
sch_junction.cpp
eeschema/sch_junction.cpp
+1
-1
worksheet.h
include/worksheet.h
+2
-2
worksheet_shape_builder.h
include/worksheet_shape_builder.h
+30
-5
No files found.
common/CMakeLists.txt
View file @
7080828f
...
...
@@ -26,6 +26,12 @@ 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_SRCS
${
COMMON_ABOUT_DLG_SRCS
}
base_struct.cpp
...
...
@@ -76,6 +82,7 @@ set(COMMON_SRCS
richio.cpp
selcolor.cpp
string.cpp
${
TITLE_BLOCK_SHAPES
}
.cpp
trigo.cpp
wildcards_and_files_ext.cpp
worksheet.cpp
...
...
common/common_plot_functions.cpp
View file @
7080828f
...
...
@@ -90,17 +90,16 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
plotter
->
SetCurrentLineWidth
(
PLOTTER
::
DEFAULT_LINE_WIDTH
);
WS_DRAW_ITEM_LIST
drawList
;
//
Initializ
e plot parameters
//
Prepar
e plot parameters
drawList
.
SetMargins
(
LTmargin
,
RBmargin
);
drawList
.
SetPenSize
(
PLOTTER
::
DEFAULT_LINE_WIDTH
);
drawList
.
SetMilsToIUfactor
(
iusPerMil
);
drawList
.
SetPageSize
(
pageSize
);
drawList
.
SetSheetNumber
(
aSheetNumber
);
drawList
.
SetSheetCount
(
aNumberOfSheets
);
drawList
.
BuildWorkSheetGraphicList
(
aPageInfo
.
GetType
(),
aFilename
,
aSheetDesc
,
aTitleBlock
,
aNumberOfSheets
,
aSheetNumber
,
plotColor
,
plotColor
);
drawList
.
BuildWorkSheetGraphicList
(
aPageInfo
.
GetType
(),
aFilename
,
aSheetDesc
,
aTitleBlock
,
plotColor
,
plotColor
);
// Draw item list
for
(
WS_DRAW_ITEM_BASE
*
item
=
drawList
.
GetFirst
();
item
;
...
...
common/title_block_shapes.
h
→
common/title_block_shapes.
cpp
View file @
7080828f
This diff is collapsed.
Click to expand it.
common/title_block_shapes_gost.
h
→
common/title_block_shapes_gost.
cpp
View file @
7080828f
This diff is collapsed.
Click to expand it.
common/worksheet.cpp
View file @
7080828f
...
...
@@ -33,28 +33,15 @@
#include <fctsys.h>
#include <gr_basic.h>
#include <common.h>
#include <macros.h>
#include <class_drawpanel.h>
#include <class_base_screen.h>
#include <drawtxt.h>
#include <confirm.h>
#include <wxstruct.h>
#include <appl_wxstruct.h>
#include <kicad_string.h>
#include <worksheet.h>
#include <class_title_block.h>
#include <build_version.h>
// include data which defines the shape of a title block
// and frame references
#include <worksheet_shape_builder.h>
#if defined(KICAD_GOST)
#include "title_block_shapes_gost.h"
#else
#include "title_block_shapes.h"
#endif
void
DrawPageLayout
(
wxDC
*
aDC
,
EDA_DRAW_PANEL
*
aCanvas
,
const
PAGE_INFO
&
aPageInfo
,
const
wxString
&
aPaperFormat
,
...
...
@@ -76,11 +63,12 @@ void DrawPageLayout( wxDC* aDC, EDA_DRAW_PANEL * aCanvas,
drawList
.
SetPenSize
(
aPenWidth
);
drawList
.
SetMilsToIUfactor
(
aScalar
);
drawList
.
SetPageSize
(
pagesize
);
drawList
.
SetSheetNumber
(
aSheetNumber
);
drawList
.
SetSheetCount
(
aSheetCount
);
drawList
.
BuildWorkSheetGraphicList
(
aPaperFormat
,
aFullSheetName
,
aFileName
,
aTitleBlock
,
aSheetCount
,
aSheetNumber
,
aLineColor
,
aTextColor
);
aTitleBlock
,
aLineColor
,
aTextColor
);
// Draw item list
for
(
WS_DRAW_ITEM_BASE
*
item
=
drawList
.
GetFirst
();
item
;
...
...
eeschema/sch_junction.cpp
View file @
7080828f
...
...
@@ -38,7 +38,7 @@
#include <sch_junction.h>
int
SCH_JUNCTION
::
m_symbolSize
=
5
0
;
// Default diameter of the junction symbol
int
SCH_JUNCTION
::
m_symbolSize
=
4
0
;
// Default diameter of the junction symbol
SCH_JUNCTION
::
SCH_JUNCTION
(
const
wxPoint
&
pos
)
:
SCH_ITEM
(
NULL
,
SCH_JUNCTION_T
)
...
...
include/worksheet.h
View file @
7080828f
...
...
@@ -21,8 +21,8 @@ public:
Ki_WorkSheetData
*
Pnext
;
int
m_Posx
,
m_Posy
;
int
m_Endx
,
m_Endy
;
const
wxChar
*
m_
Legend
e
;
const
wxChar
*
m_Text
;
const
wxChar
*
m_
TextBas
e
;
int
m_Flags
;
};
/**
...
...
common
/worksheet_shape_builder.h
→
include
/worksheet_shape_builder.h
View file @
7080828f
...
...
@@ -46,6 +46,7 @@ class WS_DRAW_ITEM_LINE : public WS_DRAW_ITEM_BASE
wxPoint
m_start
;
// start point of line/rect
wxPoint
m_end
;
// end point
int
m_penWidth
;
public
:
WS_DRAW_ITEM_LINE
(
wxPoint
aStart
,
wxPoint
aEnd
,
int
aPenWidth
,
EDA_COLOR_T
aColor
)
:
...
...
@@ -118,8 +119,10 @@ public:
};
/*
* this class stores the list of graphic items to draw/plot
* the title block and frame references
* this class stores the list of graphic items:
* rect, lines, polygons and texts to draw/plot
* the title block and frame references, and parameters to
* draw/plot them
*/
class
WS_DRAW_ITEM_LIST
{
...
...
@@ -131,6 +134,9 @@ class WS_DRAW_ITEM_LIST
double
m_milsToIu
;
// the scalar to convert pages units ( mils)
// to draw/plot units.
int
m_penSize
;
// The line width for drawings.
int
m_sheetNumber
;
// the value of the sheet number, for basic inscriptions
int
m_sheetCount
;
// the value of the number of sheets, in schematic
// for basic inscriptions, in schematic
public
:
WS_DRAW_ITEM_LIST
()
...
...
@@ -138,6 +144,8 @@ public:
m_idx
=
0
;
m_milsToIu
=
1
.
0
;
m_penSize
=
1
;
m_sheetNumber
=
1
;
m_sheetCount
=
1
;
}
~
WS_DRAW_ITEM_LIST
()
...
...
@@ -173,6 +181,26 @@ public:
m_pageSize
=
aPageSize
;
}
/**
* Function SetSheetNumber
* Set the value of the sheet number, for basic inscriptions
* @param aSheetNumber the number to display.
*/
void
SetSheetNumber
(
int
aSheetNumber
)
{
m_sheetNumber
=
aSheetNumber
;
}
/**
* Function SetSheetCount
* Set the value of the count of sheets, for basic inscriptions
* @param aSheetCount the number of esheets to display.
*/
void
SetSheetCount
(
int
aSheetCount
)
{
m_sheetCount
=
aSheetCount
;
}
/* Function SetMargins
* Set the left top margin and the right bottom margin
* of the page layout
...
...
@@ -220,8 +248,6 @@ public:
* @param aPaperFormat The paper size type, for basic inscriptions.
* @param aFileName The file name, for basic inscriptions.
* @param aTitleBlock The sheet title block, for basic inscriptions.
* @param aSheetCount The number of sheets (for basic inscriptions).
* @param aSheetNumber The sheet number (for basic inscriptions).
* @param aLineColor The color for drawing and fixed text.
* @param aTextColor The color for user inscriptions.
*/
...
...
@@ -229,7 +255,6 @@ public:
const
wxString
&
aFileName
,
const
wxString
&
aSheetPathHumanReadable
,
const
TITLE_BLOCK
&
aTitleBlock
,
int
aSheetCount
,
int
aSheetNumber
,
EDA_COLOR_T
aLineColor
,
EDA_COLOR_T
aTextColor
);
};
...
...
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