22 #ifndef SGSOLUTIONHANDLER_V2_HPP
23 #define SGSOLUTIONHANDLER_V2_HPP
25 #include "sgplotsettings.hpp"
26 #include "sgsolution_maxminmax.hpp"
27 #include "sgcustomplot.hpp"
28 #include "sgsimulationhandler.hpp"
29 #include "sgplotcontroller.hpp"
30 #include "sgstatecombomodel.hpp"
31 #include "sgactioncombomodel.hpp"
133 QCPRange
getBounds(
const QVector<double> & x)
const;
136 const QCPScatterStyle & style);
183 void nextActionSignal();
184 void prevActionSignal();
189 int state,
bool isDetailPlot);
193 int state,
bool isDetailPlot);
QCPItemLine * sgToQCPItemLine(SGCustomPlot *plot, const SGPoint &point, const SGPoint &dir)
Converts point,dir into a QCPItemLine associated with the given plot.
Definition: sgsolutionhandler.cpp:648
QVBoxLayout * getLayout() const
Returns the layout.
Definition: sgsolutionhandler.hpp:158
QWidget * parent
The parent widget, which is an SGMainWindow object.
Definition: sgsolutionhandler.hpp:82
Handles the widgets for displaying the solution.
Definition: sgsolutionhandler.hpp:70
void nextAction()
Increments the action profile through the SGPlotController.
Definition: sgsolutionhandler.hpp:180
Handles the plot settings for SGSolutionHandler.
Definition: sgplotcontroller.hpp:41
QVBoxLayout * layout
Master layout for the solution handler.
Definition: sgsolutionhandler.hpp:102
QCPRange getBounds(const QVector< double > &x) const
Gets bounds for the plots.
Definition: sgsolutionhandler.cpp:659
void inspectPoint(SGPoint point, int state, bool isDetailPlot)
Inspect point slot.
Definition: sgsolutionhandler.cpp:677
void moveBackwards()
Decrements the current iteration.
Definition: sgplotcontroller.hpp:159
void moveForwards()
Increments the current iteration.
Definition: sgplotcontroller.hpp:149
void moveForwards()
Increments the iteration through the SGPlotController.
Definition: sgsolutionhandler.hpp:175
QPen defaultZeroLinePen
Default pen for zero lines.
Definition: sgsolutionhandler.hpp:120
vector< SGCustomPlot * > statePlots
Vector of state plots.
Definition: sgsolutionhandler.hpp:96
QPen defaultGridLinePen
Default pen for grid lines.
Definition: sgsolutionhandler.hpp:117
void configureGridLines(SGCustomPlot *plot)
Turns on or off grid lines and zero lines.
Definition: sgsolutionhandler.cpp:451
QCPCurve * vectorToQCPCurve(SGCustomPlot *plot, const SGPoint &point, const SGPoint &dir)
Converts point,dir into a QCPCurve associated with the given plot.
Definition: sgsolutionhandler.cpp:628
void addPoint(const SGPoint &point, QCustomPlot *plot, const QCPScatterStyle &style)
Adds a point to the indicated graph in the indicated scatter style.
Definition: sgsolutionhandler.cpp:616
QGridLayout * statePlotsLayout
Layout holding the state plots.
Definition: sgsolutionhandler.hpp:105
const SGSolution_MaxMinMax & getSolution() const
Returns a const reference to the solution.
Definition: sgsolutionhandler.hpp:154
QAction * equalizeAxesAction
Action for equalizing axes.
Definition: sgsolutionhandler.hpp:111
QAction * getEqualizeAxesAction() const
Returns the equalize axes action.
Definition: sgsolutionhandler.hpp:169
void plotSolution()
Plots the solution from start to end.
Definition: sgsolutionhandler.cpp:209
Definition: sgplotsettings.hpp:28
A customized version of QCustomPlot.
Definition: sgcustomplot.hpp:41
Records the progress of SGSolver_MaxMinMax::solve().
Definition: sgsolution_maxminmax.hpp:40
SGCustomPlot * detailPlot
Left hand plot that shows construction of a point.
Definition: sgsolutionhandler.hpp:92
SGPlotController * controller
A pointer to the associated plot controller.
Definition: sgsolutionhandler.hpp:79
A vector in .
Definition: sgpoint.hpp:35
QAction * detailedTitlesAction
Action to toggle detailed titles.
Definition: sgsolutionhandler.hpp:108
void setSolution(const SGSolution_MaxMinMax &newSoln)
Sets the solution to newSoln.
Definition: sgsolutionhandler.cpp:168
Widget for forward simulating an equilibrium.
Definition: sgsimulationhandler.hpp:54
bool solnLoaded
True if a solution has been loaded.
Definition: sgsolutionhandler.hpp:88
void replotSlot()
Replot slot.
Definition: sgsolutionhandler.hpp:195
QString generatePlotTitle(int state, int action, bool addIterRev)
Generates title for the detail plot.
Definition: sgsolutionhandler.cpp:553
SGSolution_MaxMinMax soln
Solution.
Definition: sgsolutionhandler.hpp:77
void prevAction()
Decrements the action profile through the SGPlotController.
Definition: sgsolutionhandler.hpp:178
void moveBackwards()
Decrements the iteration through the SGPlotController.
Definition: sgsolutionhandler.hpp:173
double payoffBound
A bound on the size of payoffs.
Definition: sgsolutionhandler.hpp:85
SGPlotSettings plotSettings
Plot settings.
Definition: sgsolutionhandler.hpp:99
void simulateEquilibrium(SGPoint point, int state, bool isDetailPlot)
Simulate equilibrium slot.
Definition: sgsolutionhandler.cpp:686
SGSolutionHandler(QWidget *parent=0)
Constructor.
Definition: sgsolutionhandler.cpp:24
QAction * getDetailedTitlesAction() const
Returns the detailed titles action.
Definition: sgsolutionhandler.hpp:162
SGSimulationHandler * simHandler
Pointer to simulation handler.
Definition: sgsolutionhandler.hpp:114