Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Forms::ApplWnd Class Referencefinal

Main Frame of the Antares UI application. More...

#include <main.h>

Inheritance diagram for Antares::Forms::ApplWnd:
Antares::Component::Frame::WxLocalFrame Antares::Component::Frame::IFrame

Public Member Functions

Constructor & Destructor
 ApplWnd ()
 Default constructor.
 
virtual ~ApplWnd ()
 Destructor.
 
Study
wxString openStudyFolder (bool autoLoad=true)
 Ask to the user a study folder from a standard dialog box.
 
void startAntares ()
 Starting sequence, delayed after the creation of the main form.
 
wxMenuItem * menuRecentFiles () const
 Get the wxMenuItem associated to the recent files.
 
void requestUpdateGUIAfterStudyIO (const bool studyOpened)
 Emit an event to update the GUI after a study has been loaded or closed.
 
Component::MainPanelmainPanel () const
 Get the component used for the main panel.
 
void hideAllComponentsRelatedToTheStudy ()
 
Map::Componentmap () const
 Get the component used for the map.
 
Grid operator (for selected cells)

A grid operator computes an operation (Sum, average...) on all selected cells of the grid that currently has the focus. The result of this computation is displayed in the status bar.

See also
Antares::Component::Datagrid::Component::onGridEnter()
Antares::Component::Datagrid::Component::onGridLeave()
Component::Datagrid::Selection::IOperatorgridOperatorSelectedCells () const
 Get the current grid operator for selected cells.
 
void gridOperatorSelectedCells (Component::Datagrid::Selection::IOperator *v)
 Set the grid operator for selected cells.
 
void gridOperatorSelectedCellsUpdateResult (wxGrid *grid)
 Update the GUI to display the result of the grid operator.
 
void disableGridOperatorIfGrid (wxGrid *grid)
 Disable the grid operator.
 
Title of the Window
void title ()
 
void title (const wxString &s)
 
bool wouldYouLikeToSaveTheStudy ()
 Ask the user if the study must be saved.
 
void loadUserNotes ()
 
void saveUserNotes ()
 
void loadSets ()
 
void saveSets ()
 
void saveStudy ()
 Save the study.
 
void saveStudyAs (const Yuni::String &path, bool copyoutput, bool copyuserdata, bool copylogs)
 Save the study as...
 
void exportMap (const Yuni::String &path, bool transparentBackground, const wxColour &backgroundColor, const std::list< uint16_t > &layers, int nbSplitParts, Antares::Map::mapImageFormat format)
 Export the map.
 
void selectSystem ()
 Select the first page of the main notebook.
 
void createAllComponentsNeededByTheMainNotebook ()
 Create all components for displaying a study.
 
void showStudyLogs ()
 Display the logs window.
 
void refreshStudyLogs ()
 
void evtOnViewOutput (wxCommandEvent &evt)
 
void evtOnOpenOutputInExplorer (wxCommandEvent &evt)
 
Extras
bool isScenarioBuilderOpened () const
 Get if the scenario builder page is opened.
 
void backgroundTimerStop () const
 Stop all timers.
 
Main Notebook
uint mainNotebookCurrentEquipmentPage () const
 Get the current equipment page.
 
void backToInputData ()
 Select the input data notebook page.
 
Clipboard Support
void copyToClipboard ()
 Copy to the clipboard items present in the inspector.
 
void pasteFromClipboard (bool showDialog=false)
 Try to paste data from the clipboard.
 
void pasteFromClipboard (const Yuni::String &text, bool showDialog)
 Perform the 'paste' operation from a given text.
 
WIP Events (Work In Progress)
void showWIP ()
 Show the WIP status.
 
void hideWIP ()
 Hide the WIP status.
 
bool isInWIPMode () const
 Get if the WIP mode is enabled.
 
- Public Member Functions inherited from Antares::Component::Frame::WxLocalFrame
 WxLocalFrame (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name=wxT("registered-frame"))
 
virtual bool Destroy () override
 
virtual void frameRaise () override
 Raise the frame to the top level.
 
virtual Yuni::String frameTitle () const override
 Get the frame title.
 
virtual int frameID () const override
 
virtual void SetTitle (const wxString &title) override
 
- Public Member Functions inherited from Antares::Component::Frame::IFrame

Static Public Member Functions

static ApplWndInstance ()
 Get the instance of the main window.
 

Menu event

template<class WindowT >
class Disabler
 
class MainFormData
 
class Window::StudyLogs
 

Internal data

Yuni::Event< void()> onApplicationQuit
 Event: The application is about to quit.
 
MainFormDatadata ()
 retrieve the internal data
 
const MainFormDatadata () const
 Retrieve the internal data (const)
 
void viewLatestOutput ()
 

Logs

void beginUpdateLogs () const
 Avoid display logs.
 
void endUpdateLogs () const
 end update
 
void connectLogCallback ()
 Reconnect the logs to the main callback.
 
void selectAllDefaultPages ()
 Select all default pages for all notebooks.
 
void refreshMenuInput ()
 
void refreshMenuOutput ()
 Refresh the simulation results list.
 
void refreshMenuOptions (Data::Study::Ptr study)
 Refresh the simulation options.
 
void forceFocus ()
 Assign the focus to this form and refresh it.
 
void delayForceFocus ()
 Force the focus (delayed)
 
void resetDragAndDrop ()
 Reset the drag and drop target.
 
void forceRefresh ()
 Force the refresh of the window and all its children.
 
wxAuiManager & AUIManager ()
 Get the AUI manager.
 
const wxAuiManager & AUIManager () const
 
void resetDefaultStatusBarText ()
 Reset the default text for the status bar.
 
void launchAnalyzer (const Yuni::String &filename)
 Launch the processor.
 
void launchConstraintsBuilder (const Yuni::String &filename)
 Launch the processor.
 

Additional Inherited Members

- Public Types inherited from Antares::Component::Frame::IFrame
using Vector = std::vector<IFrame*>
 Vector.
 

Detailed Description

Main Frame of the Antares UI application.

Member Function Documentation

◆ gridOperatorSelectedCellsUpdateResult()

void Antares::Forms::ApplWnd::gridOperatorSelectedCellsUpdateResult ( wxGrid * grid)

Update the GUI to display the result of the grid operator.

This method should be called each time the cells selection changes.

Parameters
gridThe wxGrid that has currently the focus (may be NULL)

◆ hideWIP()

void Antares::Forms::ApplWnd::hideWIP ( )

Hide the WIP status.

This method should not be called directly. Use Antares::WIP::Leave() instead or the class WIP::Locker.

◆ launchAnalyzer()

void Antares::Forms::ApplWnd::launchAnalyzer ( const Yuni::String & filename)

Launch the processor.

Parameters
filenameA filename which contains all required informations for the analyzer

◆ launchConstraintsBuilder()

void Antares::Forms::ApplWnd::launchConstraintsBuilder ( const Yuni::String & filename)

Launch the processor.

Parameters
filenameA filename which contains all required informations for the constraints builder

◆ openStudyFolder()

wxString Antares::Forms::ApplWnd::openStudyFolder ( bool autoLoad = true)

Ask to the user a study folder from a standard dialog box.

Parameters
autoLoadTrue to automatically launch the loading of the study This behavior may not be wanted because we may want to properly destroyed some components before
Returns
The path to the study. Empty if nothing to do

◆ pasteFromClipboard() [1/2]

void Antares::Forms::ApplWnd::pasteFromClipboard ( bool showDialog = false)

Try to paste data from the clipboard.

Parameters
showDialogTrue to make advanced settings available to the user

◆ pasteFromClipboard() [2/2]

void Antares::Forms::ApplWnd::pasteFromClipboard ( const Yuni::String & text,
bool showDialog )

Perform the 'paste' operation from a given text.

Parameters
textA text, which should come from the clipboard
showDialogTrue to make advanced settings available to the user

◆ requestUpdateGUIAfterStudyIO()

void Antares::Forms::ApplWnd::requestUpdateGUIAfterStudyIO ( const bool studyOpened)

Emit an event to update the GUI after a study has been loaded or closed.

Parameters
studyOpenedTrue if a study has been loaded, false otherwise

◆ selectAllDefaultPages()

void Antares::Forms::ApplWnd::selectAllDefaultPages ( )

Select all default pages for all notebooks.

This method should be used when performing major tasks on the study (new, open)

◆ showWIP()

void Antares::Forms::ApplWnd::showWIP ( )

Show the WIP status.

This method should not be called directly. Use Antares::WIP::Leave() instead or the class WIP::Locker.

◆ wouldYouLikeToSaveTheStudy()

bool Antares::Forms::ApplWnd::wouldYouLikeToSaveTheStudy ( )

Ask the user if the study must be saved.

Returns
False if the operation must be cancelled

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