ResultsView Class Reference

View for showing the simulation results. More...

#include <resultsView.hpp>

Collaboration diagram for ResultsView:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ResultsView (wxWindow *parent, wxWindowID id, SimulationManager *controller)
 Constructor.
virtual ~ResultsView ()
 Destructor.
void updateGrid (Grid grid, bool changed)
 Sets the result view grid.
void updateInitialGrid (Grid grid, bool changed)
 Sets the initial grid.
void updateRowList (wxArrayString strings)
 Updates the row listbox.
void selectRow (unsigned int row)
 Selects a simulation row.
void updateInformationList (wxArrayString strings)
 Updates the event listbox.
void selectInformation (unsigned int information)
 Selects an event.
void updatePathList (wxArrayString strings)
 Updates the simulation path listbox.
void selectPath (unsigned int path)
 Selects a simulation step.
void errorMsg (wxString message)
 Shows an error message.
void setTable (TruthTable table)
 Sets the truth table to be shown.
void setResult (bool success)
 Sets the simulation result.
void setInputs (vector< coordinate > inputs)
 Sets the initial layout input coordinates.
void setOutputs (vector< coordinate > outputs)
 Sets the initial layout output coordinates.

Private Member Functions

void initControls ()
 Window controls initialization.
void initSizers ()
 Window sizers (layout) initialization.
void OnRowsSelected (wxCommandEvent &event)
 Row selection event method.
void OnInformationSelected (wxCommandEvent &event)
 Event selection event method.
void OnPathSelected (wxCommandEvent &event)
 Simulation step selection event method.

Private Attributes

SimulationManagercontroller
 Simulation manager.
wxListBox * listRows
wxListBox * listInformation
wxListBox * listPath
wxStaticText * labelResult
wxStaticText * labelRows
wxStaticText * labelInformation
wxStaticText * labelPath
LayoutCanvascanvasResult
LayoutCanvascanvasInitial
TruthTableCanvastCanvas

Detailed Description

View for showing the simulation results.

This view gives information of the simulation results. It also allows the user to select different rows, events and simulation steps to be shown.

Author:
Bernat Rāfales Mulet <the_bell@users.sourceforge.net>
Version:
Revision
1.3

Definition at line 39 of file resultsView.hpp.


Constructor & Destructor Documentation

ResultsView::ResultsView wxWindow *  parent,
wxWindowID  id,
SimulationManager controller
 

Constructor.

Parameters:
parent the parent window.
id the window id.
controller the simulation controller.

Definition at line 47 of file resultsView.cpp.

ResultsView::~ResultsView  )  [virtual]
 

Destructor.

Definition at line 63 of file resultsView.cpp.


Member Function Documentation

void ResultsView::errorMsg wxString  message  ) 
 

Shows an error message.

Parameters:
message the error message to be shown.

Definition at line 224 of file resultsView.cpp.

void ResultsView::initControls  )  [private]
 

Window controls initialization.

Definition at line 69 of file resultsView.cpp.

References canvasInitial, canvasResult, ID_CANVAS, ID_CANVASINITIAL, ID_LISTINFORMATION, ID_LISTPATH, ID_LISTROWS, ID_TABLE, labelInformation, labelPath, labelResult, labelRows, listInformation, listPath, listRows, TruthTableCanvas::setEditable(), and tCanvas.

Here is the call graph for this function:

void ResultsView::initSizers  )  [private]
 

Window sizers (layout) initialization.

Definition at line 86 of file resultsView.cpp.

References canvasInitial, canvasResult, labelInformation, labelPath, labelResult, labelRows, listInformation, listPath, listRows, and tCanvas.

void ResultsView::OnInformationSelected wxCommandEvent &  event  )  [private]
 

Event selection event method.

Parameters:
event the event.

Definition at line 244 of file resultsView.cpp.

References controller, and SimulationManager::informationSelected().

Here is the call graph for this function:

void ResultsView::OnPathSelected wxCommandEvent &  event  )  [private]
 

Simulation step selection event method.

Parameters:
event the event.

Definition at line 254 of file resultsView.cpp.

References controller, and SimulationManager::pathSelected().

Here is the call graph for this function:

void ResultsView::OnRowsSelected wxCommandEvent &  event  )  [private]
 

Row selection event method.

Parameters:
event the event.

Definition at line 234 of file resultsView.cpp.

References controller, and SimulationManager::rowSelected().

Here is the call graph for this function:

void ResultsView::selectInformation unsigned int  information  ) 
 

Selects an event.

Parameters:
information the event index.

Definition at line 194 of file resultsView.cpp.

References listInformation.

void ResultsView::selectPath unsigned int  path  ) 
 

Selects a simulation step.

Parameters:
path the step index.

Definition at line 214 of file resultsView.cpp.

References listPath.

void ResultsView::selectRow unsigned int  row  ) 
 

Selects a simulation row.

Parameters:
row the row index.

Definition at line 174 of file resultsView.cpp.

References listRows.

void ResultsView::setInputs vector< coordinate inputs  ) 
 

Sets the initial layout input coordinates.

Parameters:
inputs the inputs coordinates.

Definition at line 295 of file resultsView.cpp.

References canvasInitial, and LayoutCanvas::setAssignedInputs().

Referenced by SimulationManager::results().

Here is the call graph for this function:

void ResultsView::setOutputs vector< coordinate outputs  ) 
 

Sets the initial layout output coordinates.

Parameters:
outputs the outputs coordinates.

Definition at line 305 of file resultsView.cpp.

References canvasInitial, and LayoutCanvas::setAssignedOutputs().

Referenced by SimulationManager::results().

Here is the call graph for this function:

void ResultsView::setResult bool  success  ) 
 

Sets the simulation result.

Parameters:
success true if the simulation was successful, false otherwise.

Definition at line 275 of file resultsView.cpp.

References labelResult.

void ResultsView::setTable TruthTable  table  ) 
 

Sets the truth table to be shown.

Parameters:
table the truth table.

Definition at line 264 of file resultsView.cpp.

References TruthTableCanvas::setNewTable(), and tCanvas.

Referenced by SimulationManager::results().

Here is the call graph for this function:

void ResultsView::updateGrid Grid  grid,
bool  changed
 

Sets the result view grid.

Parameters:
grid the new grid.
changed true if the grid is from a different space, false if it's the same space with changes.

Definition at line 142 of file resultsView.cpp.

References canvasResult, and LayoutCanvas::setGrid().

Here is the call graph for this function:

void ResultsView::updateInformationList wxArrayString  strings  ) 
 

Updates the event listbox.

Parameters:
strings the string array to set on the listbox.

Definition at line 184 of file resultsView.cpp.

References listInformation.

void ResultsView::updateInitialGrid Grid  grid,
bool  changed
 

Sets the initial grid.

Parameters:
grid the new grid.
changed true if the grid is from a different space, false if it's the same space with changes.

Definition at line 154 of file resultsView.cpp.

References canvasInitial, and LayoutCanvas::setGrid().

Referenced by SimulationManager::results().

Here is the call graph for this function:

void ResultsView::updatePathList wxArrayString  strings  ) 
 

Updates the simulation path listbox.

Parameters:
strings the array string to be set.

Definition at line 204 of file resultsView.cpp.

References listPath.

void ResultsView::updateRowList wxArrayString  strings  ) 
 

Updates the row listbox.

Parameters:
strings the items to set.

Definition at line 164 of file resultsView.cpp.

References listRows.


Member Data Documentation

LayoutCanvas* ResultsView::canvasInitial [private]
 

Definition at line 75 of file resultsView.hpp.

Referenced by initControls(), initSizers(), setInputs(), setOutputs(), and updateInitialGrid().

LayoutCanvas* ResultsView::canvasResult [private]
 

Definition at line 74 of file resultsView.hpp.

Referenced by initControls(), initSizers(), and updateGrid().

SimulationManager* ResultsView::controller [private]
 

Simulation manager.

Definition at line 66 of file resultsView.hpp.

Referenced by OnInformationSelected(), OnPathSelected(), and OnRowsSelected().

wxStaticText* ResultsView::labelInformation [private]
 

Definition at line 72 of file resultsView.hpp.

Referenced by initControls(), and initSizers().

wxStaticText* ResultsView::labelPath [private]
 

Definition at line 73 of file resultsView.hpp.

Referenced by initControls(), and initSizers().

wxStaticText* ResultsView::labelResult [private]
 

Definition at line 70 of file resultsView.hpp.

Referenced by initControls(), initSizers(), and setResult().

wxStaticText* ResultsView::labelRows [private]
 

Definition at line 71 of file resultsView.hpp.

Referenced by initControls(), and initSizers().

wxListBox* ResultsView::listInformation [private]
 

Definition at line 68 of file resultsView.hpp.

Referenced by initControls(), initSizers(), selectInformation(), and updateInformationList().

wxListBox* ResultsView::listPath [private]
 

Definition at line 69 of file resultsView.hpp.

Referenced by initControls(), initSizers(), selectPath(), and updatePathList().

wxListBox* ResultsView::listRows [private]
 

Definition at line 67 of file resultsView.hpp.

Referenced by initControls(), initSizers(), selectRow(), and updateRowList().

TruthTableCanvas* ResultsView::tCanvas [private]
 

Definition at line 76 of file resultsView.hpp.

Referenced by initControls(), initSizers(), and setTable().


The documentation for this class was generated from the following files:
Generated on Fri Sep 1 23:59:29 2006 for NanoComp by  doxygen 1.4.6