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
9cf56261
Commit
9cf56261
authored
Jun 20, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
give an icon to bitmapt2component frame
parent
c22c0bad
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
81 additions
and
15 deletions
+81
-15
CMakeLists.txt
bitmap2component/CMakeLists.txt
+11
-1
bitmap2cmp_gui.cpp
bitmap2component/bitmap2cmp_gui.cpp
+3
-1
bitmap2component.cpp
bitmap2component/bitmap2component.cpp
+0
-2
bitmap2component.xpm
bitmap2component/bitmap2component.xpm
+54
-0
build_BOM.cpp
eeschema/build_BOM.cpp
+11
-7
class_edge_mod.cpp
pcbnew/class_edge_mod.cpp
+2
-4
No files found.
bitmap2component/CMakeLists.txt
View file @
9cf56261
...
@@ -9,7 +9,17 @@ set(BITMAP2COMPONENT_SRCS
...
@@ -9,7 +9,17 @@ set(BITMAP2COMPONENT_SRCS
bitmap2cmp_gui
bitmap2cmp_gui
)
)
add_executable
(
bitmap2component WIN32 MACOSX_BUNDLE
${
BITMAP2COMPONENT_SRCS
}
${
BITMAP2COMPONENT_RESOURCES
}
)
if
(
WIN32
)
if
(
MINGW
)
# BITMAP2COMPONENT_RESOURCES variable is set by the macro.
mingw_resource_compiler
(
bitmap2component
)
else
(
MINGW
)
set
(
BITMAP2COMPONENT_RESOURCES bitmap2component.rc
)
endif
(
MINGW
)
endif
(
WIN32
)
add_executable
(
bitmap2component WIN32 MACOSX_BUNDLE
${
BITMAP2COMPONENT_SRCS
}
${
BITMAP2COMPONENT_RESOURCES
}
)
target_link_libraries
(
bitmap2component
target_link_libraries
(
bitmap2component
...
...
bitmap2component/bitmap2cmp_gui.cpp
View file @
9cf56261
...
@@ -29,6 +29,8 @@
...
@@ -29,6 +29,8 @@
#include "potracelib.h"
#include "potracelib.h"
#include "bitmap_io.h"
#include "bitmap_io.h"
//#include "bitmap2component.xpm"
#define KEYWORD_FRAME_POSX wxT( "bmconverter_Pos_x" )
#define KEYWORD_FRAME_POSX wxT( "bmconverter_Pos_x" )
#define KEYWORD_FRAME_POSY wxT( "bmconverter_Pos_y" )
#define KEYWORD_FRAME_POSY wxT( "bmconverter_Pos_y" )
...
@@ -72,7 +74,6 @@ private:
...
@@ -72,7 +74,6 @@ private:
void
ExportFile
(
FILE
*
aOutfile
,
int
aFormat
);
void
ExportFile
(
FILE
*
aOutfile
,
int
aFormat
);
};
};
BM2CMP_FRAME
::
BM2CMP_FRAME
()
:
BM2CMP_FRAME_BASE
(
NULL
)
BM2CMP_FRAME
::
BM2CMP_FRAME
()
:
BM2CMP_FRAME_BASE
(
NULL
)
{
{
m_Config
=
new
wxConfig
();
m_Config
=
new
wxConfig
();
...
@@ -81,6 +82,7 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
...
@@ -81,6 +82,7 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
m_Config
->
Read
(
KEYWORD_FRAME_SIZEX
,
&
m_FrameSize
.
x
,
-
1
);
m_Config
->
Read
(
KEYWORD_FRAME_SIZEX
,
&
m_FrameSize
.
x
,
-
1
);
m_Config
->
Read
(
KEYWORD_FRAME_SIZEY
,
&
m_FrameSize
.
y
,
-
1
);
m_Config
->
Read
(
KEYWORD_FRAME_SIZEY
,
&
m_FrameSize
.
y
,
-
1
);
SetIcon
(
wxICON
(
bitmap2component_icon
)
);
wxString
msg
(
wxT
(
" 0000 "
)
);
wxString
msg
(
wxT
(
" 0000 "
)
);
m_gridInfo
->
SetCellValue
(
1
,
0
,
msg
);
m_gridInfo
->
SetCellValue
(
1
,
0
,
msg
);
...
...
bitmap2component/bitmap2component.cpp
View file @
9cf56261
...
@@ -32,10 +32,8 @@
...
@@ -32,10 +32,8 @@
#include <vector>
#include <vector>
#include "potracelib.h"
#include "potracelib.h"
//#include "bitmap_io.h"
#include "auxiliary.h"
#include "auxiliary.h"
#ifndef max
#ifndef max
#define max( a, b ) ( ( (a) > (b) ) ? (a) : (b) )
#define max( a, b ) ( ( (a) > (b) ) ? (a) : (b) )
#endif
#endif
...
...
bitmap2component/bitmap2component.xpm
0 → 100644
View file @
9cf56261
/* XPM */
static const char *bitmap2component_xpm[] = {
/* columns rows colors chars-per-pixel */
"32 32 16 1",
"@ c #592904",
"# c #974704",
"$ c #5455D0",
"o c #090915",
"- c #2E1604",
"+ c #4B4BB5",
"* c #222352",
"X c #0F1128",
": c #BE5904",
" c #0CFA0C",
"% c #FC7A04",
"= c #323378",
"; c #753704",
"O c #3C3B8F",
"& c #DF6904",
". c #050204",
/* pixels */
" . ..",
" .",
" ",
"........................ .. ",
"........................ .. ",
" X.oO ... ",
"+++X@#.X+ $ ... .",
"...o@%&@.*$$X.o= ... ..",
"....@%%%#-..-#;.... ........",
"....@%%&%&-.#%%-.... .......",
"....@%%%%;..;%&......====O+$ ",
"....@%%:-....o..............= ",
"....@&@.... +*O ......%%%%&#.X ",
"....-..... .....%%&%%%:...",
"OO O=+ . *.%%%%%&%@X ",
" ... =.%%%%%%%#..",
" . O.%%%%&%%;.=",
".......... .....%%%%%%%-..",
"....@@..... ......%%%%%%;...",
"....@%:-....X.........###;;-.= ",
"....@%%&#...-#@...........o*$ ",
"....@%%%%&-.#%%...... $ ",
"....@%%%%#..;%%..... .......",
"....@%%&-....-..... ........",
"XXXo@%;.X+ +*=$ ... ..",
" X-.oO ... .",
" X.= ... ",
"........................ .. ",
"........................ .. ",
" ",
" .",
" . .."
};
eeschema/build_BOM.cpp
View file @
9cf56261
...
@@ -798,7 +798,7 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
...
@@ -798,7 +798,7 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
for
(
int
jj
=
FOOTPRINT
;
jj
<
currCmp
->
GetFieldCount
();
jj
++
)
for
(
int
jj
=
FOOTPRINT
;
jj
<
currCmp
->
GetFieldCount
();
jj
++
)
{
{
//Ensure fields exists in dummy component
//Ensure fields exists in dummy component
if
(
dummyCmp
.
GetFieldCount
()
<
currCmp
->
GetFieldCount
()
)
if
(
dummyCmp
.
GetFieldCount
()
<
=
jj
)
dummyCmp
.
AddField
(
*
currCmp
->
GetField
(
jj
)
);
dummyCmp
.
AddField
(
*
currCmp
->
GetField
(
jj
)
);
// store useful data
// store useful data
if
(
!
currCmp
->
GetField
(
jj
)
->
m_Text
.
IsEmpty
()
)
if
(
!
currCmp
->
GetField
(
jj
)
->
m_Text
.
IsEmpty
()
)
...
@@ -849,23 +849,27 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
...
@@ -849,23 +849,27 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
CONV_TO_UTF8
(
currCmp
->
GetField
(
DATASHEET
)
->
m_Text
)
);
CONV_TO_UTF8
(
currCmp
->
GetField
(
DATASHEET
)
->
m_Text
)
);
#endif
#endif
fprintf
(
f
,
"%c%s"
,
s_ExportSeparatorSymbol
,
CONV_TO_UTF8
(
RNames
)
);
// print fields, on demand
// print fields, on demand
for
(
int
jj
=
FIELD1
;
jj
<=
FIELD8
;
jj
++
)
int
last_nonempty_field_idx
=
0
;
for
(
int
jj
=
FOOTPRINT
;
jj
<
dummyCmp
.
GetFieldCount
();
jj
++
)
if
(
!
dummyCmp
.
GetField
(
jj
)
->
m_Text
.
IsEmpty
()
)
last_nonempty_field_idx
=
jj
;
for
(
int
jj
=
FIELD1
;
jj
<=
last_nonempty_field_idx
;
jj
++
)
{
{
if
(
dummyCmp
.
GetFieldCount
()
>=
jj
)
break
;
if
(
IsFieldChecked
(
jj
)
)
if
(
IsFieldChecked
(
jj
)
)
fprintf
(
f
,
"%c%4s"
,
s_ExportSeparatorSymbol
,
fprintf
(
f
,
"%c%4s"
,
s_ExportSeparatorSymbol
,
CONV_TO_UTF8
(
dummyCmp
.
GetField
(
jj
)
->
m_Text
)
);
CONV_TO_UTF8
(
dummyCmp
.
GetField
(
jj
)
->
m_Text
)
);
}
}
fprintf
(
f
,
"%c%s
\n
"
,
s_ExportSeparatorSymbol
,
fprintf
(
f
,
"
\n
"
);
CONV_TO_UTF8
(
RNames
)
);
// Clear strings and values, to prepare next component
// Clear strings and values, to prepare next component
qty
=
0
;
qty
=
0
;
RNames
.
Empty
();
RNames
.
Empty
();
for
(
int
jj
=
FOOTPRINT
;
jj
<
currCmp
->
GetFieldCount
();
jj
++
)
for
(
int
jj
=
FOOTPRINT
;
jj
<
dummyCmp
.
GetFieldCount
();
jj
++
)
dummyCmp
.
GetField
(
jj
)
->
m_Text
.
Empty
();
dummyCmp
.
GetField
(
jj
)
->
m_Text
.
Empty
();
}
}
...
...
pcbnew/class_edge_mod.cpp
View file @
9cf56261
...
@@ -105,12 +105,10 @@ EDA_Rect EDGE_MODULE::GetBoundingBox()
...
@@ -105,12 +105,10 @@ EDA_Rect EDGE_MODULE::GetBoundingBox()
if
(
Module
)
if
(
Module
)
{
{
RotatePoint
(
&
pt
.
x
,
&
pt
.
y
,
Module
->
m_Orient
);
RotatePoint
(
&
pt
.
x
,
&
pt
.
y
,
Module
->
m_Orient
);
pt
.
x
+=
Module
->
m_Pos
.
x
;
pt
+=
Module
->
m_Pos
;
pt
.
y
+=
Module
->
m_Pos
.
y
;
}
}
pt
.
x
+=
m_Start0
.
x
;
pt
+=
m_Start0
;
pt
.
y
+=
m_Start0
.
y
;
bbox
.
m_Pos
.
x
=
MIN
(
bbox
.
m_Pos
.
x
,
pt
.
x
);
bbox
.
m_Pos
.
x
=
MIN
(
bbox
.
m_Pos
.
x
,
pt
.
x
);
bbox
.
m_Pos
.
y
=
MIN
(
bbox
.
m_Pos
.
y
,
pt
.
y
);
bbox
.
m_Pos
.
y
=
MIN
(
bbox
.
m_Pos
.
y
,
pt
.
y
);
p_end
.
x
=
MAX
(
p_end
.
x
,
pt
.
x
);
p_end
.
x
=
MAX
(
p_end
.
x
,
pt
.
x
);
...
...
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