HAL
separated_graphics_net.cpp
Go to the documentation of this file.
1
#include "
gui/graph_widget/items/nets/separated_graphics_net.h
"
2
3
#include "
hal_core/netlist/net.h
"
4
5
#include "
gui/graph_widget/graph_widget_constants.h
"
6
7
namespace
hal
8
{
9
qreal
SeparatedGraphicsNet::sAlpha
;
10
11
void
SeparatedGraphicsNet::updateAlpha
()
12
{
13
if
(
sLod
>= graph_widget_constants::sNetFadeInLod &&
sLod
<= graph_widget_constants::sNetFadeOutLod)
14
sAlpha
= (
sLod
- graph_widget_constants::sNetFadeInLod) / (graph_widget_constants::sNetFadeOutLod - graph_widget_constants::sNetFadeInLod);
15
else
16
sAlpha
= 1;
17
}
18
19
SeparatedGraphicsNet::SeparatedGraphicsNet
(
Net
*
n
) :
GraphicsNet
(
n
)
20
{
21
}
22
23
void
SeparatedGraphicsNet::finalize
()
24
{
25
// RECT INTENTIONALLY SET SLIGHTLY TOO BIG
26
mRect
=
mShape
.
boundingRect
();
27
mRect
.
adjust
(-
sLineWidth
, -
sLineWidth
,
sLineWidth
,
sLineWidth
);
28
}
29
}
hal::GraphicsItem::sLod
static qreal sLod
Definition:
graphics_item.h:93
hal::GraphicsNet
The basic net class all other nets inherit from.
Definition:
graphics_net.h:43
hal::GraphicsNet::mShape
QPainterPath mShape
Definition:
graphics_net.h:101
hal::GraphicsNet::sLineWidth
static qreal sLineWidth
Definition:
graphics_net.h:94
hal::GraphicsNet::mRect
QRectF mRect
Definition:
graphics_net.h:100
hal::Net
Definition:
net.h:58
hal::SeparatedGraphicsNet::updateAlpha
static void updateAlpha()
Definition:
separated_graphics_net.cpp:11
hal::SeparatedGraphicsNet::SeparatedGraphicsNet
SeparatedGraphicsNet(Net *n)
Definition:
separated_graphics_net.cpp:19
hal::SeparatedGraphicsNet::finalize
virtual void finalize()
Definition:
separated_graphics_net.cpp:23
hal::SeparatedGraphicsNet::sAlpha
static qreal sAlpha
Definition:
separated_graphics_net.h:89
graph_widget_constants.h
hal
Definition:
parser_liberty.cpp:10
test.n
n
Definition:
test.py:6
net.h
QPainterPath::boundingRect
QRectF boundingRect() const const
QRectF::adjust
void adjust(qreal dx1, qreal dy1, qreal dx2, qreal dy2)
separated_graphics_net.h
plugins
gui
src
graph_widget
items
nets
separated_graphics_net.cpp
Generated on Fri Feb 14 2025 14:22:43 for HAL by
1.9.1