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
3c738fae
Commit
3c738fae
authored
Oct 02, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed WORKSHEET_ITEM to WORKSHEET_VIEWITEM.
parent
54946f46
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
22 deletions
+22
-22
CMakeLists.txt
common/CMakeLists.txt
+1
-1
worksheet_viewitem.cpp
common/worksheet_viewitem.cpp
+13
-13
worksheet_viewitem.h
include/worksheet_viewitem.h
+6
-6
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+2
-2
No files found.
common/CMakeLists.txt
View file @
3c738fae
...
...
@@ -32,7 +32,7 @@ set(GAL_SRCS
# Common part
drawpanel_gal.cpp
painter.cpp
worksheet_item.cpp
worksheet_
view
item.cpp
gal/graphics_abstraction_layer.cpp
gal/stroke_font.cpp
gal/color4d.cpp
...
...
common/worksheet_item.cpp
→
common/worksheet_
view
item.cpp
View file @
3c738fae
...
...
@@ -23,11 +23,11 @@
*/
/**
* @file worksheet_item.cpp
* @file worksheet_
view
item.cpp
* @brief Class that handles properties and drawing of worksheet layout.
*/
#include <worksheet_item.h>
#include <worksheet_
view
item.h>
#include <worksheet_shape_builder.h>
#include <gal/graphics_abstraction_layer.h>
#include <painter.h>
...
...
@@ -36,28 +36,28 @@
using
namespace
KiGfx
;
WORKSHEET_
ITEM
::
WORKSHEET_
ITEM
(
const
std
::
string
&
aFileName
,
const
std
::
string
&
aSheetName
,
WORKSHEET_
VIEWITEM
::
WORKSHEET_VIEW
ITEM
(
const
std
::
string
&
aFileName
,
const
std
::
string
&
aSheetName
,
const
PAGE_INFO
*
aPageInfo
,
const
TITLE_BLOCK
*
aTitleBlock
)
:
EDA_ITEM
(
NOT_USED
),
// this item is never added to a BOARD so it needs no type
m_fileName
(
aFileName
),
m_sheetName
(
aSheetName
),
m_titleBlock
(
aTitleBlock
),
m_pageInfo
(
aPageInfo
),
m_sheetNumber
(
1
),
m_sheetCount
(
1
)
{}
void
WORKSHEET_ITEM
::
SetPageInfo
(
const
PAGE_INFO
*
aPageInfo
)
void
WORKSHEET_
VIEW
ITEM
::
SetPageInfo
(
const
PAGE_INFO
*
aPageInfo
)
{
m_pageInfo
=
aPageInfo
;
ViewUpdate
(
GEOMETRY
);
}
void
WORKSHEET_ITEM
::
SetTitleBlock
(
const
TITLE_BLOCK
*
aTitleBlock
)
void
WORKSHEET_
VIEW
ITEM
::
SetTitleBlock
(
const
TITLE_BLOCK
*
aTitleBlock
)
{
m_titleBlock
=
aTitleBlock
;
ViewUpdate
(
GEOMETRY
);
}
const
BOX2I
WORKSHEET_ITEM
::
ViewBBox
()
const
const
BOX2I
WORKSHEET_
VIEW
ITEM
::
ViewBBox
()
const
{
BOX2I
bbox
;
...
...
@@ -76,7 +76,7 @@ const BOX2I WORKSHEET_ITEM::ViewBBox() const
}
void
WORKSHEET_ITEM
::
ViewDraw
(
int
aLayer
,
GAL
*
aGal
)
const
void
WORKSHEET_
VIEW
ITEM
::
ViewDraw
(
int
aLayer
,
GAL
*
aGal
)
const
{
RENDER_SETTINGS
*
settings
=
m_view
->
GetPainter
()
->
GetSettings
();
wxString
fileName
(
m_fileName
.
c_str
(),
wxConvUTF8
);
...
...
@@ -128,14 +128,14 @@ void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal ) const
}
void
WORKSHEET_ITEM
::
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
void
WORKSHEET_
VIEW
ITEM
::
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
{
aCount
=
1
;
aLayers
[
0
]
=
ITEM_GAL_LAYER
(
WORKSHEET
);
}
void
WORKSHEET_ITEM
::
draw
(
const
WS_DRAW_ITEM_LINE
*
aItem
,
GAL
*
aGal
)
const
void
WORKSHEET_
VIEW
ITEM
::
draw
(
const
WS_DRAW_ITEM_LINE
*
aItem
,
GAL
*
aGal
)
const
{
aGal
->
SetIsStroke
(
true
);
aGal
->
SetIsFill
(
false
);
...
...
@@ -145,7 +145,7 @@ void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_LINE* aItem, GAL* aGal ) const
}
void
WORKSHEET_ITEM
::
draw
(
const
WS_DRAW_ITEM_RECT
*
aItem
,
GAL
*
aGal
)
const
void
WORKSHEET_
VIEW
ITEM
::
draw
(
const
WS_DRAW_ITEM_RECT
*
aItem
,
GAL
*
aGal
)
const
{
aGal
->
SetIsStroke
(
true
);
aGal
->
SetIsFill
(
false
);
...
...
@@ -155,7 +155,7 @@ void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_RECT* aItem, GAL* aGal ) const
}
void
WORKSHEET_ITEM
::
draw
(
const
WS_DRAW_ITEM_POLYGON
*
aItem
,
GAL
*
aGal
)
const
void
WORKSHEET_
VIEW
ITEM
::
draw
(
const
WS_DRAW_ITEM_POLYGON
*
aItem
,
GAL
*
aGal
)
const
{
std
::
deque
<
VECTOR2D
>
corners
;
BOOST_FOREACH
(
wxPoint
point
,
aItem
->
m_Corners
)
...
...
@@ -181,7 +181,7 @@ void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_POLYGON* aItem, GAL* aGal ) const
}
void
WORKSHEET_ITEM
::
draw
(
const
WS_DRAW_ITEM_TEXT
*
aItem
,
GAL
*
aGal
)
const
void
WORKSHEET_
VIEW
ITEM
::
draw
(
const
WS_DRAW_ITEM_TEXT
*
aItem
,
GAL
*
aGal
)
const
{
VECTOR2D
position
(
aItem
->
GetTextPosition
().
x
,
aItem
->
GetTextPosition
().
y
);
...
...
@@ -192,7 +192,7 @@ void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_TEXT* aItem, GAL* aGal ) const
}
void
WORKSHEET_ITEM
::
drawBorder
(
GAL
*
aGal
)
const
void
WORKSHEET_
VIEW
ITEM
::
drawBorder
(
GAL
*
aGal
)
const
{
VECTOR2D
origin
=
VECTOR2D
(
0.0
,
0.0
);
VECTOR2D
end
=
VECTOR2D
(
m_pageInfo
->
GetWidthMils
()
*
25400
,
...
...
include/worksheet_item.h
→
include/worksheet_
view
item.h
View file @
3c738fae
...
...
@@ -23,12 +23,12 @@
*/
/**
* @file worksheet_item.h
* @file worksheet_
view
item.h
* @brief Class that handles properties and drawing of worksheet layout.
*/
#ifndef WORKSHEET_ITEM_H
#define WORKSHEET_ITEM_H
#ifndef WORKSHEET_
VIEW
ITEM_H
#define WORKSHEET_
VIEW
ITEM_H
#include <base_struct.h>
...
...
@@ -44,10 +44,10 @@ namespace KiGfx
{
class
GAL
;
class
WORKSHEET_ITEM
:
public
EDA_ITEM
class
WORKSHEET_
VIEW
ITEM
:
public
EDA_ITEM
{
public
:
WORKSHEET_ITEM
(
const
std
::
string
&
aFileName
,
const
std
::
string
&
aSheetName
,
WORKSHEET_
VIEW
ITEM
(
const
std
::
string
&
aFileName
,
const
std
::
string
&
aSheetName
,
const
PAGE_INFO
*
aPageInfo
,
const
TITLE_BLOCK
*
aTitleBlock
);
/**
...
...
@@ -159,4 +159,4 @@ protected:
};
}
#endif
/* WORKSHEET_ITEM_H */
#endif
/* WORKSHEET_
VIEW
ITEM_H */
pcbnew/basepcbframe.cpp
View file @
3c738fae
...
...
@@ -53,7 +53,7 @@
#include <math/vector2d.h>
#include <trigo.h>
#include <pcb_painter.h>
#include <worksheet_item.h>
#include <worksheet_
view
item.h>
#include <tool/tool_manager.h>
#include <tool/tool_dispatcher.h>
...
...
@@ -240,7 +240,7 @@ void PCB_BASE_FRAME::ViewReloadBoard( const BOARD* aBoard ) const
}
// Add an entry for the worksheet layout
KiGfx
::
WORKSHEET_
ITEM
*
worksheet
=
new
KiGfx
::
WORKSHEET_
ITEM
(
KiGfx
::
WORKSHEET_
VIEWITEM
*
worksheet
=
new
KiGfx
::
WORKSHEET_VIEW
ITEM
(
std
::
string
(
aBoard
->
GetFileName
().
mb_str
()
),
std
::
string
(
GetScreenDesc
().
mb_str
()
),
&
GetPageSettings
(),
&
GetTitleBlock
()
);
...
...
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