Horizon
horizon-eda-1.3.0
src
core
tools
tool_place_power_symbol.hpp
1
#pragma once
2
#include "core/tool.hpp"
3
#include "schematic/power_symbol.hpp"
4
#include "tool_place_junction.hpp"
5
#include <forward_list>
6
7
namespace
horizon {
8
9
class
ToolPlacePowerSymbol
:
public
ToolPlaceJunction
{
10
public
:
11
ToolPlacePowerSymbol
(
IDocument
*c, ToolID tid);
12
bool
can_begin
()
override
;
13
std::set<InToolActionID> get_actions()
const override
14
{
15
using
I = InToolActionID;
16
return
{
17
I::LMB, I::CANCEL, I::RMB, I::ROTATE, I::MIRROR,
18
};
19
}
20
21
protected
:
22
void
create_attached()
override
;
23
void
delete_attached()
override
;
24
bool
begin_attached()
override
;
25
bool
update_attached(
const
ToolArgs
&args)
override
;
26
bool
check_line(
LineNet
*li)
override
;
27
PowerSymbol
*sym =
nullptr
;
28
std::forward_list<PowerSymbol *> symbols_placed;
29
Net
*net =
nullptr
;
30
31
private
:
32
bool
do_merge(
Net
*other);
33
};
34
}
// namespace horizon
horizon::IDocument
Definition:
idocument.hpp:5
horizon::LineNet
LineNet is similar to Line, except it denotes electrical connection.
Definition:
line_net.hpp:23
horizon::Net
Definition:
net.hpp:15
horizon::ToolPlacePowerSymbol::can_begin
bool can_begin() override
Definition:
tool_place_power_symbol.cpp:14
horizon::ToolPlaceJunction
Definition:
tool_place_junction.hpp:7
horizon::ToolArgs
This is what a Tool receives when the user did something.
Definition:
tool.hpp:23
horizon::ToolPlacePowerSymbol
Definition:
tool_place_power_symbol.hpp:9
horizon::PowerSymbol
GND symbols and the like.
Definition:
power_symbol.hpp:22
Generated by
1.8.20