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
e7cd29ec
Commit
e7cd29ec
authored
Nov 02, 2008
by
jerryjacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Beautify code for kicad.cpp, kicad/mainframe.cpp, treeprj_frame.cpp
parent
365dbe15
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
644 additions
and
360 deletions
+644
-360
kicad.cpp
kicad/kicad.cpp
+173
-63
mainframe.cpp
kicad/mainframe.cpp
+48
-42
treeprj_frame.cpp
kicad/treeprj_frame.cpp
+423
-255
No files found.
kicad/kicad.cpp
View file @
e7cd29ec
This diff is collapsed.
Click to expand it.
kicad/mainframe.cpp
View file @
e7cd29ec
...
@@ -21,16 +21,19 @@
...
@@ -21,16 +21,19 @@
#include "kicad.h"
#include "kicad.h"
/****************/
/* Constructor */
/****************/
// Constructor
/*****************************************************************************/
WinEDA_MainFrame
::
WinEDA_MainFrame
(
WinEDA_App
*
eda_app
,
WinEDA_MainFrame
::
WinEDA_MainFrame
(
WinEDA_App
*
eda_app
,
wxWindow
*
parent
,
const
wxString
&
title
,
wxWindow
*
parent
,
const
wxPoint
&
pos
,
const
wxSize
&
size
)
:
const
wxString
&
title
,
WinEDA_BasicFrame
(
parent
,
KICAD_MAIN_FRAME
,
eda_app
,
title
,
pos
,
size
)
const
wxPoint
&
pos
,
const
wxSize
&
size
)
:
WinEDA_BasicFrame
(
parent
,
KICAD_MAIN_FRAME
,
eda_app
,
title
,
pos
,
size
)
/*****************************************************************************/
{
{
wxString
msg
;
wxString
msg
;
wxString
line
;
wxSize
clientsize
;
wxSize
clientsize
;
m_FrameName
=
wxT
(
"KicadFrame"
);
m_FrameName
=
wxT
(
"KicadFrame"
);
...
@@ -44,8 +47,10 @@ WinEDA_MainFrame::WinEDA_MainFrame( WinEDA_App* eda_app,
...
@@ -44,8 +47,10 @@ WinEDA_MainFrame::WinEDA_MainFrame( WinEDA_App* eda_app,
GetSettings
();
GetSettings
();
if
(
m_Parent
->
m_EDA_Config
)
if
(
m_Parent
->
m_EDA_Config
)
{
{
m_Parent
->
m_EDA_Config
->
Read
(
wxT
(
"LeftWinWidth"
),
&
m_LeftWin_Width
);
m_Parent
->
m_EDA_Config
->
Read
(
wxT
(
"LeftWinWidth"
),
m_Parent
->
m_EDA_Config
->
Read
(
wxT
(
"CommandWinWidth"
),
&
m_CommandWin_Height
);
&
m_LeftWin_Width
);
m_Parent
->
m_EDA_Config
->
Read
(
wxT
(
"CommandWinWidth"
),
&
m_CommandWin_Height
);
}
}
SetSize
(
m_FramePos
.
x
,
m_FramePos
.
y
,
m_FrameSize
.
x
,
m_FrameSize
.
y
);
SetSize
(
m_FramePos
.
x
,
m_FramePos
.
y
,
m_FrameSize
.
x
,
m_FrameSize
.
y
);
...
@@ -78,7 +83,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( WinEDA_App* eda_app,
...
@@ -78,7 +83,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( WinEDA_App* eda_app,
wxNO_BORDER
|
wxSW_3D
);
wxNO_BORDER
|
wxSW_3D
);
m_BottomWin
->
SetDefaultSize
(
wxSize
(
clientsize
.
x
,
150
)
);
m_BottomWin
->
SetDefaultSize
(
wxSize
(
clientsize
.
x
,
150
)
);
m_BottomWin
->
SetOrientation
(
wxLAYOUT_HORIZONTAL
);
m_BottomWin
->
SetOrientation
(
wxLAYOUT_HORIZONTAL
);
m_BottomWin
->
SetAlignment
(
wxLAYOUT_BOTTOM
);
m_BottomWin
->
SetAlignment
(
wxLAYOUT_BOTTOM
);
m_BottomWin
->
SetSashVisible
(
wxSASH_TOP
,
TRUE
);
m_BottomWin
->
SetSashVisible
(
wxSASH_TOP
,
TRUE
);
m_BottomWin
->
SetSashVisible
(
wxSASH_LEFT
,
TRUE
);
m_BottomWin
->
SetSashVisible
(
wxSASH_LEFT
,
TRUE
);
m_BottomWin
->
SetExtraBorderSize
(
2
);
m_BottomWin
->
SetExtraBorderSize
(
2
);
...
@@ -91,28 +96,27 @@ WinEDA_MainFrame::WinEDA_MainFrame( WinEDA_App* eda_app,
...
@@ -91,28 +96,27 @@ WinEDA_MainFrame::WinEDA_MainFrame( WinEDA_App* eda_app,
m_DialogWin
->
SetFont
(
*
g_StdFont
);
m_DialogWin
->
SetFont
(
*
g_StdFont
);
// m_CommandWin is the box with buttons which launch eechema, pcbnew ...
// m_CommandWin is the box with buttons which launch eechema, pcbnew ...
m_CommandWin
=
new
WinEDA_CommandFrame
(
this
,
ID_MAIN_COMMAND
,
m_CommandWin
=
new
WinEDA_CommandFrame
(
this
,
ID_MAIN_COMMAND
,
wxPoint
(
m_LeftWin_Width
,
wxPoint
(
m_LeftWin_Width
,
0
),
0
),
wxSize
(
clientsize
.
x
,
m_CommandWin_Height
),
wxSize
(
clientsize
.
x
,
m_CommandWin_Height
),
wxNO_BORDER
|
wxSW_3D
);
wxNO_BORDER
|
wxSW_3D
);
wxString
line
;
msg
=
wxGetCwd
();
msg
=
wxGetCwd
();
line
.
Printf
(
_
(
"Ready
\n
Working dir: %s
\n
"
),
msg
.
GetData
()
);
line
.
Printf
(
_
(
"Ready
\n
Working dir: %s
\n
"
),
msg
.
GetData
()
);
PrintMsg
(
line
);
PrintMsg
(
line
);
#ifdef KICAD_PYTHON
#ifdef KICAD_PYTHON
PyHandler
::
GetInstance
()
->
DeclareEvent
(
wxT
(
"kicad::LoadProject"
)
);
PyHandler
::
GetInstance
()
->
DeclareEvent
(
wxT
(
"kicad::LoadProject"
)
);
#endif
#endif
}
}
/***************/
/*****************************************************************************/
/* Destructor */
/***************/
WinEDA_MainFrame
::~
WinEDA_MainFrame
()
WinEDA_MainFrame
::~
WinEDA_MainFrame
()
/*****************************************************************************/
{
{
if
(
m_Parent
->
m_EDA_Config
)
if
(
m_Parent
->
m_EDA_Config
)
{
{
...
@@ -127,7 +131,6 @@ WinEDA_MainFrame::~WinEDA_MainFrame()
...
@@ -127,7 +131,6 @@ WinEDA_MainFrame::~WinEDA_MainFrame()
/*******************************************************/
/*******************************************************/
void
WinEDA_MainFrame
::
PrintMsg
(
const
wxString
&
text
)
void
WinEDA_MainFrame
::
PrintMsg
(
const
wxString
&
text
)
/*******************************************************/
/*******************************************************/
/*
/*
* Put text in the dialog frame
* Put text in the dialog frame
*/
*/
...
@@ -394,6 +397,7 @@ void WinEDA_MainFrame::OnRefresh( wxCommandEvent& event )
...
@@ -394,6 +397,7 @@ void WinEDA_MainFrame::OnRefresh( wxCommandEvent& event )
}
}
/*********************************/
/*********************************/
void
WinEDA_MainFrame
::
ClearMsg
()
void
WinEDA_MainFrame
::
ClearMsg
()
/*********************************/
/*********************************/
...
@@ -401,11 +405,13 @@ void WinEDA_MainFrame::ClearMsg()
...
@@ -401,11 +405,13 @@ void WinEDA_MainFrame::ClearMsg()
m_DialogWin
->
Clear
();
m_DialogWin
->
Clear
();
}
}
#ifdef KICAD_PYTHON
#ifdef KICAD_PYTHON
/*****************************************************************************/
void
WinEDA_MainFrame
::
OnRefreshPy
()
void
WinEDA_MainFrame
::
OnRefreshPy
()
/*****************************************************************************/
{
{
m_LeftWin
->
ReCreateTreePrj
();
m_LeftWin
->
ReCreateTreePrj
();
}
}
#endif
#endif
kicad/treeprj_frame.cpp
View file @
e7cd29ec
This diff is collapsed.
Click to expand it.
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