Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Map::Component Class Referencefinal

Standard study MAP. More...

#include <component.h>

Inheritance diagram for Antares::Map::Component:
Antares::Component::Panel

Public Member Functions

Constructor & Destructor
 Component (wxWindow *parent)
 Default Constructor.
 
virtual ~Component ()
 Destructor.
 
Study
void attachStudy (Data::Study::Ptr study)
 Attach a study to the map to reflect changes.
 
void detachStudy (bool canRefresh=true)
 Detach the study (if any) currently attached to the map.
 
Data::Study::Ptr attachedStudy ()
 Get the study attached to the map.
 
Import Export
bool loadFromStudy (Data::Study &study)
 Load the map's settings from an existing Antares study.
 
bool loadFromAttachedStudy ()
 Load the map's settings from the attached study.
 
bool saveToStudy (Data::Study &study, bool incremental=true)
 Save the map's settings to a study.
 
bool saveToAttachedStudy (bool incremental=true)
 Save the map's settings to the attached study (if any)
 
bool saveToImageFile (const AnyString &filePath, const MapRenderOptions &options)
 Save the map into an image file.
 
void clear ()
 
UI
void recenterView ()
 Recenter scrollbars to the center of the map.
 
void onCenterXY (void *)
 
void setFocus ()
 Set the focus to the map.
 
uint selectedAreaCount () const
 Get how many areas have been selected.
 
void drawerVisible ()
 
void showLayerAll ()
 
void forceReload ()
 
void refresh ()
 
void refreshHeaderInformations ()
 Refresh the header informations (how many areas/connexions)
 
void renameNodeFromArea (const Data::Area *area)
 
Edition
void unselectAll (bool canRefresh=true)
 Select all nodes of type "area".
 
void selectAll ()
 Select all nodes of type "area".
 
void reverseSelection ()
 Reverse the selection.
 
void selectOnly (const Data::Area::Vector &areas)
 Select only items from a list of areas.
 
void selectOnly (const Data::Area::Vector &areas, const Data::AreaLink::Vector &links)
 Select only items from a list of areas and links.
 
- Public Member Functions inherited from Antares::Component::Panel
 Panel (wxWindow *parent)
 Constructor.
 
virtual ~Panel ()
 Destructor.
 
virtual void onMouseDown (wxMouseEvent &)
 Click down.
 
virtual void onMouseUp (wxMouseEvent &)
 Click up.
 
virtual void onMouseClick ()
 The panel has been clicked (delayed)
 
virtual void onMouseEnter ()
 The mouse has entered.
 
virtual void onMouseLeave ()
 The mouse has leaved.
 
virtual void onMouseMoved (int, int)
 The mouse has moved.
 

Cache management

Yuni::Event< void(int, int)> onPopupEvent
 Popup event.
 
Yuni::Event< void(const wxString &)> onStatusBarText
 Status bar event.
 
Yuni::Event< void(Component &)> onDblClick
 Event: Double-Click on a item.
 
void reimportNodeColors (const Data::Area *area)
 Refresh the internal cache about the color of a single area.
 
void moveNodeFromAreaX (const Data::Area *area, int x)
 Refresh the internal cache about the X-coordinate of a single area.
 
void moveNodeFromAreaY (const Data::Area *area, int y)
 Refresh the internal cache about the X-coordinate of a single area.
 
size_t getActiveLayerID ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Antares::Component::Panel
static void OnMouseMoveFromExternalComponent ()
 Event triggered by any other component (not derived from Panel)
 
- Protected Member Functions inherited from Antares::Component::Panel
virtual bool triggerMouseClickEvent () const
 

Detailed Description

Standard study MAP.

Member Function Documentation

◆ attachedStudy()

Data::Study::Ptr Antares::Map::Component::attachedStudy ( )

Get the study attached to the map.

Returns
A pointer to a Study structure, or NULL

◆ attachStudy()

void Antares::Map::Component::attachStudy ( Data::Study::Ptr study)

Attach a study to the map to reflect changes.

The user is responsible for deleting the study. However to not forget to detach it just before

Parameters
studyThe study to attach

◆ loadFromAttachedStudy()

bool Antares::Map::Component::loadFromAttachedStudy ( )

Load the map's settings from the attached study.

Returns
True if the operation succeeded, False otherwise

◆ loadFromStudy()

bool Antares::Map::Component::loadFromStudy ( Data::Study & study)

Load the map's settings from an existing Antares study.

Parameters
studyThe study to import the data from
Returns
True if the operation succeeded, False otherwise

◆ saveToAttachedStudy()

bool Antares::Map::Component::saveToAttachedStudy ( bool incremental = true)

Save the map's settings to the attached study (if any)

Parameters
incrementalModify the study only for detected changes
Returns
True if the operation succeeded, False otherwise

◆ saveToImageFile()

bool Antares::Map::Component::saveToImageFile ( const AnyString & filePath,
const MapRenderOptions & options )

Save the map into an image file.

Parameters
filePath
Returns
True if the operation succeeded, False otherwise

◆ saveToStudy()

bool Antares::Map::Component::saveToStudy ( Data::Study & study,
bool incremental = true )

Save the map's settings to a study.

Parameters
studyThe target study
incrementalModify the study only for detected changes
Returns
True if the operation succeded, False otherwise

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