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
555b1c5a
Commit
555b1c5a
authored
May 21, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleaning
parent
b256efc5
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
149 additions
and
158 deletions
+149
-158
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+77
-78
CMakeLists.txt
pcbnew/CMakeLists.txt
+0
-1
affiche.cpp
pcbnew/affiche.cpp
+0
-71
class_equipot.cpp
pcbnew/class_equipot.cpp
+57
-2
class_equipot.h
pcbnew/class_equipot.h
+9
-0
ioascii.cpp
pcbnew/ioascii.cpp
+1
-0
onleftclick.cpp
pcbnew/onleftclick.cpp
+5
-1
protos.h
pcbnew/protos.h
+0
-5
No files found.
internat/fr/kicad.mo
View file @
555b1c5a
No preview for this file type
internat/fr/kicad.po
View file @
555b1c5a
This diff is collapsed.
Click to expand it.
pcbnew/CMakeLists.txt
View file @
555b1c5a
...
...
@@ -7,7 +7,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
# Many of the commented out ones are nested in *.cpp files for dialogs
set
(
PCBNEW_SRCS
affiche.cpp
attribut.cpp
automove.cpp
autoplac.cpp
...
...
pcbnew/affiche.cpp
deleted
100644 → 0
View file @
b256efc5
/**********************************************************/
/* Routines d'affichage de parametres et caracteristiques */
/**********************************************************/
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "pcbnew.h"
#include "autorout.h"
#include "3d_struct.h"
#include "protos.h"
/* Routines locales */
/*******************************************************************/
void
Affiche_Infos_Equipot
(
int
netcode
,
WinEDA_BasePcbFrame
*
frame
)
/*******************************************************************/
/* Affiche les infos relatives a une equipot: nb de pads, nets , connexions.. */
{
int
nb_vias
=
0
,
ii
;
EDA_BaseStruct
*
Struct
;
wxString
txt
;
MODULE
*
module
;
D_PAD
*
pad
;
EQUIPOT
*
equipot
;
double
lengthnet
=
0
;
frame
->
MsgPanel
->
EraseMsgBox
();
equipot
=
frame
->
GetBoard
()
->
FindNet
(
netcode
);
if
(
equipot
)
Affiche_1_Parametre
(
frame
,
1
,
_
(
"Net Name"
),
equipot
->
GetNetname
(),
RED
);
else
Affiche_1_Parametre
(
frame
,
1
,
_
(
"No Net (not connected)"
),
wxEmptyString
,
RED
);
txt
.
Printf
(
wxT
(
"%d"
),
netcode
);
Affiche_1_Parametre
(
frame
,
30
,
_
(
"Net Code"
),
txt
,
RED
);
for
(
ii
=
0
,
module
=
frame
->
GetBoard
()
->
m_Modules
;
module
!=
0
;
module
=
module
->
Next
()
)
{
for
(
pad
=
module
->
m_Pads
;
pad
!=
0
;
pad
=
pad
->
Next
()
)
{
if
(
pad
->
GetNet
()
==
netcode
)
ii
++
;
}
}
txt
.
Printf
(
wxT
(
"%d"
),
ii
);
Affiche_1_Parametre
(
frame
,
40
,
_
(
"Pads"
),
txt
,
DARKGREEN
);
for
(
ii
=
0
,
Struct
=
frame
->
GetBoard
()
->
m_Track
;
Struct
!=
NULL
;
Struct
=
Struct
->
Next
()
)
{
ii
++
;
if
(
Struct
->
Type
()
==
TYPE_VIA
)
if
(
(
(
SEGVIA
*
)
Struct
)
->
GetNet
()
==
netcode
)
nb_vias
++
;
if
(
Struct
->
Type
()
==
TYPE_TRACK
)
if
(
(
(
TRACK
*
)
Struct
)
->
GetNet
()
==
netcode
)
lengthnet
+=
(
(
TRACK
*
)
Struct
)
->
GetLength
();
}
txt
.
Printf
(
wxT
(
"%d"
),
nb_vias
);
Affiche_1_Parametre
(
frame
,
50
,
_
(
"Vias"
),
txt
,
BLUE
);
valeur_param
(
(
int
)
lengthnet
,
txt
);
Affiche_1_Parametre
(
frame
,
60
,
_
(
"Net Length"
),
txt
,
RED
);
}
pcbnew/class_equipot.cpp
View file @
555b1c5a
...
...
@@ -4,10 +4,9 @@
#include "fctsys.h"
#include "wxstruct.h"
#include "
gr_basic
.h"
#include "
common
.h"
#include "kicad_string.h"
#include "pcbnew.h"
#include "protos.h"
/*********************************************************/
...
...
@@ -128,6 +127,62 @@ void EQUIPOT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const wxPo
}
/**
* Function DisplayInfo
* has knowledge about the frame and how and where to put status information
* about this object into the frame's message panel.
* Is virtual from EDA_BaseStruct.
* @param frame A WinEDA_DrawFrame in which to print status information.
*/
void
EQUIPOT
::
DisplayInfo
(
WinEDA_DrawFrame
*
frame
)
{
int
count
;
EDA_BaseStruct
*
Struct
;
wxString
txt
;
MODULE
*
module
;
D_PAD
*
pad
;
double
lengthnet
=
0
;
frame
->
MsgPanel
->
EraseMsgBox
();
Affiche_1_Parametre
(
frame
,
1
,
_
(
"Net Name"
),
GetNetname
(),
RED
);
txt
.
Printf
(
wxT
(
"%d"
),
GetNet
()
);
Affiche_1_Parametre
(
frame
,
30
,
_
(
"Net Code"
),
txt
,
RED
);
count
=
0
;
module
=
((
WinEDA_BasePcbFrame
*
)
frame
)
->
GetBoard
()
->
m_Modules
;
for
(
;
module
!=
0
;
module
=
module
->
Next
()
)
{
for
(
pad
=
module
->
m_Pads
;
pad
!=
0
;
pad
=
pad
->
Next
()
)
{
if
(
pad
->
GetNet
()
==
GetNet
()
)
count
++
;
}
}
txt
.
Printf
(
wxT
(
"%d"
),
count
);
Affiche_1_Parametre
(
frame
,
40
,
_
(
"Pads"
),
txt
,
DARKGREEN
);
count
=
0
;
Struct
=
((
WinEDA_BasePcbFrame
*
)
frame
)
->
GetBoard
()
->
m_Track
;
for
(
;
Struct
!=
NULL
;
Struct
=
Struct
->
Next
()
)
{
if
(
Struct
->
Type
()
==
TYPE_VIA
)
if
(
(
(
SEGVIA
*
)
Struct
)
->
GetNet
()
==
GetNet
()
)
count
++
;
if
(
Struct
->
Type
()
==
TYPE_TRACK
)
if
(
(
(
TRACK
*
)
Struct
)
->
GetNet
()
==
GetNet
()
)
lengthnet
+=
(
(
TRACK
*
)
Struct
)
->
GetLength
();
}
txt
.
Printf
(
wxT
(
"%d"
),
count
);
Affiche_1_Parametre
(
frame
,
50
,
_
(
"Vias"
),
txt
,
BLUE
);
valeur_param
(
(
int
)
lengthnet
,
txt
);
Affiche_1_Parametre
(
frame
,
60
,
_
(
"Net Length"
),
txt
,
RED
);
}
#if defined(DEBUG)
/**
...
...
pcbnew/class_equipot.h
View file @
555b1c5a
...
...
@@ -94,6 +94,15 @@ public:
}
/**
* Function DisplayInfo
* has knowledge about the frame and how and where to put status information
* about this object into the frame's message panel.
* Is virtual from EDA_BaseStruct.
* @param frame A WinEDA_DrawFrame in which to print status information.
*/
void
DisplayInfo
(
WinEDA_DrawFrame
*
frame
);
#if defined(DEBUG)
/**
* Function Show
...
...
pcbnew/ioascii.cpp
View file @
555b1c5a
...
...
@@ -904,6 +904,7 @@ int WinEDA_PcbFrame::SavePcbFormatAscii( FILE* aFile )
/* Ecriture de l'entete PCB : */
fprintf
(
aFile
,
"PCBNEW-BOARD Version %d date %s
\n\n
"
,
g_CurrentVersionPCB
,
DateAndTime
(
line
)
);
fprintf
(
aFile
,
"# Created by Pcbnew%s
\n\n
"
,
CONV_TO_UTF8
(
GetBuildVersion
()
)
);
WriteGeneralDescrPcb
(
aFile
);
WriteSheetDescr
(
GetScreen
(),
aFile
);
...
...
pcbnew/onleftclick.cpp
View file @
555b1c5a
...
...
@@ -138,7 +138,11 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if
(
netcode
<
0
)
GetBoard
()
->
DisplayInfo
(
this
);
else
Affiche_Infos_Equipot
(
netcode
,
this
);
{
EQUIPOT
*
net
=
GetBoard
()
->
FindNet
(
netcode
);
if
(
net
)
net
->
DisplayInfo
(
this
);
}
}
break
;
...
...
pcbnew/protos.h
View file @
555b1c5a
...
...
@@ -330,11 +330,6 @@ void Trace_Block( WinEDA_DrawPanel* panel, wxDC* DC, int ox, int oy, int fx,
* (toujours en mode XOR) */
/*****************************************************************/
/* AFFICHE.CPP: (Fonctions d'affichage de messages, parametres... */
/*****************************************************************/
void
Affiche_Infos_Equipot
(
int
netcode
,
WinEDA_BasePcbFrame
*
frame
);
/************/
/* ZONES.CPP */
/************/
...
...
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