Power System Platform  2018w15a
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Workspace Class Reference

This class manages the graphical and power elements. It is responsible for handling the user's interaction with the elements. More...

#include <Workspace.h>

Inheritance diagram for Workspace:
Inheritance graph
[legend]
Collaboration diagram for Workspace:
Collaboration graph
[legend]

Public Types

enum  WorkspaceMode {
  MODE_EDIT = 0, MODE_MOVE_ELEMENT, MODE_MOVE_PICKBOX, MODE_MOVE_NODE,
  MODE_DRAG, MODE_DRAG_INSERT, MODE_DRAG_INSERT_TEXT, MODE_INSERT,
  MODE_INSERT_TEXT, MODE_SELECTION_RECT, MODE_PASTE, MODE_DRAG_PASTE
}
 

Public Member Functions

 Workspace (wxWindow *parent, wxString name=wxEmptyString, wxStatusBar *statusBar=NULL, wxGLContext *sharedGLContext=NULL)
 
wxString GetName () const
 
std::vector< Element * > GetElementList () const
 
std::vector< Text * > GetTextList () const
 
std::vector< Element * > GetAllElements () const
 
WorkspaceMode GetWorkspaceMode () const
 
CameraGetCamera () const
 
void CopySelection ()
 
bool Paste ()
 
wxFileName GetSavedPath () const
 
void SetName (wxString name)
 
void SetElementList (std::vector< Element *> elementList)
 
void SetTextList (std::vector< Text *> textList)
 
void SetStatusBarText (wxString text)
 
void SetWorkspaceMode (WorkspaceMode mode)
 
void SetSavedPath (wxFileName savedPath)
 
void SetJustOpened (bool justOpened)
 
void Redraw ()
 
wxGLContext * GetOpenGLContext ()
 
void RotateSelectedElements (bool clockwise=true)
 
void DeleteSelectedElements ()
 
bool GetElementsCorners (wxPoint2DDouble &leftUpCorner, wxPoint2DDouble &rightDownCorner, std::vector< Element *> elementList)
 
void Fit ()
 
void UnselectAll ()
 
void ValidateBusesVoltages (Element *initialBus)
 
void ValidateElementsVoltages ()
 
void UpdateElementsID ()
 
bool UpdateTextElements ()
 
int GetElementNumber (ElementID elementID)
 
void IncrementElementNumber (ElementID elementID)
 
PropertiesDataGetProperties () const
 
std::vector< double > GetStabilityTimeVector () const
 
bool IsContinuousCalculationActive () const
 
void SetContinuousCalculationActive (bool value=true)
 
bool RunPowerFlow ()
 
bool RunFault ()
 
bool RunSCPower ()
 
bool RunStaticStudies ()
 
bool RunStability ()
 

Protected Member Functions

virtual void OnMiddleDoubleClick (wxMouseEvent &event)
 
virtual void OnIdle (wxIdleEvent &event)
 
virtual void OnTimer (wxTimerEvent &event)
 
virtual void OnLeftDoubleClick (wxMouseEvent &event)
 
virtual void OnRightClickDown (wxMouseEvent &event)
 
virtual void OnLeftClickUp (wxMouseEvent &event)
 
virtual void OnScroll (wxMouseEvent &event)
 
virtual void OnMiddleDown (wxMouseEvent &event)
 
virtual void OnMiddleUp (wxMouseEvent &event)
 
virtual void OnMouseMotion (wxMouseEvent &event)
 
virtual void OnKeyDown (wxKeyEvent &event)
 
virtual void OnLeftClickDown (wxMouseEvent &event)
 
virtual void OnPaint (wxPaintEvent &event)
 
virtual void OnPopupClick (wxCommandEvent &event)
 
void SetViewport ()
 
void UpdateStatusBar ()
 

Protected Attributes

wxGLContext * m_glContext = NULL
 
wxStatusBar * m_statusBar = NULL
 
Cameram_camera = NULL
 
wxTipWindow * m_tipWindow = NULL
 
wxString m_name
 
WorkspaceMode m_mode = MODE_EDIT
 
std::vector< PowerElement * > m_elementList
 
int m_elementNumber [NUM_ELEMENTS]
 
std::vector< Text * > m_textList
 
wxFileName m_savedPath
 
wxRect2DDouble m_selectionRect
 
wxPoint2DDouble m_startSelRect
 
PropertiesDatam_properties = NULL
 
std::vector< double > m_stabilityTimeVector
 
bool m_continuousCalc = false
 
bool m_disconnectedElement = false
 
bool m_justOpened = false
 

Detailed Description

This class manages the graphical and power elements. It is responsible for handling the user's interaction with the elements.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
19/09/2017

The documentation for this class was generated from the following files: