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
89849cdf
Commit
89849cdf
authored
Aug 29, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unified Set/GetPosition() for BOARD_ITEMs.
parent
edea2f91
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
1 deletion
+42
-1
class_board_item.h
include/class_board_item.h
+4
-0
class_board.cpp
pcbnew/class_board.cpp
+14
-1
class_board.h
pcbnew/class_board.h
+4
-0
class_pcb_text.h
pcbnew/class_pcb_text.h
+10
-0
class_text_mod.h
pcbnew/class_text_mod.h
+10
-0
No files found.
include/class_board_item.h
View file @
89849cdf
...
@@ -90,6 +90,10 @@ public:
...
@@ -90,6 +90,10 @@ public:
// Do not create a copy constructor. The one generated by the compiler is adequate.
// Do not create a copy constructor. The one generated by the compiler is adequate.
virtual
const
wxPoint
&
GetPosition
()
const
=
0
;
virtual
void
SetPosition
(
const
wxPoint
&
aPos
)
=
0
;
/**
/**
* A value of wxPoint(0,0) which can be passed to the Draw() functions.
* A value of wxPoint(0,0) which can be passed to the Draw() functions.
*/
*/
...
...
pcbnew/class_board.cpp
View file @
89849cdf
...
@@ -123,9 +123,22 @@ BOARD::~BOARD()
...
@@ -123,9 +123,22 @@ BOARD::~BOARD()
}
}
void
BOARD
::
Move
(
const
wxPoint
&
aMoveVector
)
// overload
const
wxPoint
&
BOARD
::
GetPosition
()
const
{
{
wxLogWarning
(
wxT
(
"This should not be called on the BOARD object"
)
);
return
ZeroOffset
;
}
void
BOARD
::
SetPosition
(
const
wxPoint
&
aPos
)
{
wxLogWarning
(
wxT
(
"This should not be called on the BOARD object"
)
);
}
void
BOARD
::
Move
(
const
wxPoint
&
aMoveVector
)
// overload
{
wxLogWarning
(
wxT
(
"This should not be called on the BOARD object"
)
);
}
}
...
...
pcbnew/class_board.h
View file @
89849cdf
...
@@ -308,6 +308,10 @@ public:
...
@@ -308,6 +308,10 @@ public:
BOARD
();
BOARD
();
~
BOARD
();
~
BOARD
();
virtual
const
wxPoint
&
GetPosition
()
const
;
virtual
void
SetPosition
(
const
wxPoint
&
aPos
);
bool
IsEmpty
()
const
bool
IsEmpty
()
const
{
{
return
m_Drawings
.
GetCount
()
==
0
&&
m_Modules
.
GetCount
()
==
0
&&
return
m_Drawings
.
GetCount
()
==
0
&&
m_Modules
.
GetCount
()
==
0
&&
...
...
pcbnew/class_pcb_text.h
View file @
89849cdf
...
@@ -49,6 +49,16 @@ public:
...
@@ -49,6 +49,16 @@ public:
~
TEXTE_PCB
();
~
TEXTE_PCB
();
virtual
const
wxPoint
&
GetPosition
()
const
{
return
m_Pos
;
}
virtual
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Pos
=
aPos
;
}
void
Move
(
const
wxPoint
&
aMoveVector
)
void
Move
(
const
wxPoint
&
aMoveVector
)
{
{
m_Pos
+=
aMoveVector
;
m_Pos
+=
aMoveVector
;
...
...
pcbnew/class_text_mod.h
View file @
89849cdf
...
@@ -79,6 +79,16 @@ public:
...
@@ -79,6 +79,16 @@ public:
~
TEXTE_MODULE
();
~
TEXTE_MODULE
();
virtual
const
wxPoint
&
GetPosition
()
const
{
return
m_Pos
;
}
virtual
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Pos
=
aPos
;
}
TEXTE_MODULE
*
Next
()
const
{
return
(
TEXTE_MODULE
*
)
Pnext
;
}
TEXTE_MODULE
*
Next
()
const
{
return
(
TEXTE_MODULE
*
)
Pnext
;
}
TEXTE_MODULE
*
Back
()
const
{
return
(
TEXTE_MODULE
*
)
Pback
;
}
TEXTE_MODULE
*
Back
()
const
{
return
(
TEXTE_MODULE
*
)
Pback
;
}
...
...
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