blob: cf1681d6bfceb2f7f18b51dba1c87beb3d702038 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef SHUNT_H
#define SHUNT_H
#include "Element.h"
class Shunt : public Element
{
public:
Shunt();
~Shunt();
virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
virtual void Move(wxPoint2DDouble position);
virtual void MoveNode(Element* element, wxPoint2DDouble position);
virtual void StartMove(wxPoint2DDouble position);
virtual void RotateNode(Element* parent, bool clockwise = true);
virtual void RemoveParent(Element* parent);
virtual bool NodeContains(wxPoint2DDouble position);
virtual bool SetNodeParent(Element* parent);
virtual void UpdateNodes();
protected:
void UpdateSwitchesPosition();
void UpdatePowerFlowArrowsPosition();
void DrawGround(wxPoint2DDouble position) const;
bool m_inserted = false;
};
#endif // SHUNT_H
|