36 enum SyncMachineModel { SM_MODEL_1 = 0, SM_MODEL_2, SM_MODEL_3, SM_MODEL_4, SM_MODEL_5 };
42 virtual bool Contains(wxPoint2DDouble position)
const {
return m_rect.Contains(position); }
44 virtual void DrawDC(wxPoint2DDouble translation,
double scale, wxGraphicsContext* gc)
const;
45 virtual void DrawDC(wxPoint2DDouble translation,
double scale, wxDC& dc)
const;
46 virtual bool Intersects(wxRect2DDouble rect)
const {
return m_rect.Intersects(rect); }
47 virtual void Move(wxPoint2DDouble position);
49 virtual void StartMove(wxPoint2DDouble position);
55 virtual void Rotate(
bool clockwise =
true);
57 virtual void DrawDCSymbol(wxGraphicsContext* gc)
const {}
58 virtual void DrawDCSymbol(wxDC& dc)
const {}
62 void UpdateSwitchesPosition();
63 void UpdatePowerFlowArrowsPosition();
PowerFlowDirection
Direction of power flow arrows.
Class that can contain all control elements. Can identify (using RTTI) the elements from a generic li...
Solves in the time the control system. Can solve the control system directly from a ControlEditor or ...
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Abstract class for rotary machines power elements.
virtual void RemoveParent(Element *parent)
Remove a parent.
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element's rect intersects other rect.
virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection)
Set the direction of the power flow.
virtual void Move(wxPoint2DDouble position)
Move the element other position.
virtual void DrawDC(wxPoint2DDouble translation, double scale, wxGraphicsContext *gc) const
Draw the element using GDI+.
virtual void UpdateNodes()
Update the nodes according to the parents. If a parent is removed, use this method.
virtual bool NodeContains(wxPoint2DDouble position)
Check if a node contains a point. If contains, set the attributes related to node movement.
virtual void RotateNode(Element *parent, bool clockwise=true)
Rotate a node.
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus,...
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
virtual void Rotate(bool clockwise=true)
Rotate the element.
virtual void MoveNode(Element *element, wxPoint2DDouble position)
Move a node. StartMove(wxPoint2DDouble position) before start moving.
virtual bool SetNodeParent(Element *parent)
Set a perent to the node. If all conditions are met, a new parent are added to the element and the po...
Abstract class of power elements.