22 #ifndef SGPLOTCONTROLLER_HPP
23 #define SGPLOTCONTROLLER_HPP
29 #include "sgsolution_maxminmax.hpp"
107 QComboBox *_actionCombo,
108 QScrollBar * _iterSlider,
109 QScrollBar * _stepSlider,
110 QComboBox * _solutionModeCombo);
QComboBox * stateCombo
Points to the stateCombo QComboBox selector.
Definition: sgplotcontroller.hpp:94
void synchronizeIterSlider()
Synchronizes iterSlider.
Definition: sgplotcontroller.cpp:198
void synchronizeStepSlider()
Synchronizes stepSlider.
Definition: sgplotcontroller.cpp:218
QComboBox * solutionModeCombo
Points to the solutionMode QComboBox selector.
Definition: sgplotcontroller.hpp:98
Handles the plot settings for SGSolutionHandler.
Definition: sgplotcontroller.hpp:41
void actionChanged()
Signal to the solutionHandler that the action changed.
int getStepSliderPosition() const
Returns the position of the stepSlider.
Definition: sgplotcontroller.hpp:131
int actionIndex
Definition: sgplotcontroller.hpp:72
void moveBackwards()
Decrements the current iteration.
Definition: sgplotcontroller.hpp:159
list< SGIteration_MaxMinMax >::const_iterator getCurrentIter() const
Access method for the current SGIteration_MaxMinMax pointer.
Definition: sgplotcontroller.hpp:125
const SGStep & getCurrentStep() const
Access method for the current SGStep pointer.
Definition: sgplotcontroller.hpp:129
A single step of the max-min-max algorithm.
Definition: sgstep.hpp:36
void prevAction()
Decrements the action.
Definition: sgplotcontroller.cpp:249
@ Progress
Definition: sgplotcontroller.hpp:61
void moveForwards()
Increments the current iteration.
Definition: sgplotcontroller.hpp:149
@ Final
Definition: sgplotcontroller.hpp:62
void setCurrentDirection(SGPoint point, int state)
Definition: sgplotcontroller.cpp:170
bool hasSolution() const
Returns true if a solution has been loaded.
Definition: sgplotcontroller.hpp:133
list< SGIteration_MaxMinMax >::const_iterator currentIter
Points to the current SGiteration.
Definition: sgplotcontroller.hpp:86
void iterSliderUpdate(int value)
Slot when the iter and start sliders are moved.
Definition: sgplotcontroller.cpp:235
void setSolution(SGSolution_MaxMinMax *newSoln)
Sets the solution.
Definition: sgplotcontroller.cpp:45
QScrollBar * iterSlider
Points to the iterSlider QScrollBar for selecting the current iteration.
Definition: sgplotcontroller.hpp:100
void changeMode(int newMode)
Toggles the solution mode.
Definition: sgplotcontroller.cpp:335
int iteration
The current iteration.
Definition: sgplotcontroller.hpp:74
PlotMode
Plot mode for the detailPlot.
Definition: sgplotcontroller.hpp:50
void synchronizeSliders()
Synchronizes sliders with controls.
Definition: sgplotcontroller.cpp:192
SGPlotController(QComboBox *_stateCombo, QComboBox *_actionCombo, QScrollBar *_iterSlider, QScrollBar *_stepSlider, QComboBox *_solutionModeCombo)
Constructor.
Definition: sgplotcontroller.cpp:24
void solutionChanged()
Signal to the state and action models that the solution changed.
PlotMode getPlotMode() const
Access method for the current plot mode.
Definition: sgplotcontroller.hpp:121
bool setIteration(int newIter)
Sets the current iteration.
Definition: sgplotcontroller.cpp:140
void iterationChanged()
Signal to solutionHandler that the iteration changed.
Records the progress of SGSolver_MaxMinMax::solve().
Definition: sgsolution_maxminmax.hpp:40
void nextAction()
Increments the action.
Definition: sgplotcontroller.cpp:292
void setPlotMode(PlotMode newMode)
Sets the plot mode.
Definition: sgplotcontroller.hpp:141
SGSolution_MaxMinMax * soln
The current solution object.
Definition: sgplotcontroller.hpp:77
QScrollBar * stepSlider
Definition: sgplotcontroller.hpp:103
A vector in .
Definition: sgpoint.hpp:35
SolutionMode
Solution mode.
Definition: sgplotcontroller.hpp:60
void stateChanged()
Signal to the actionCombo that the state changed.
SolutionMode getMode() const
Access method for the current solution mode.
Definition: sgplotcontroller.hpp:123
PlotMode plotMode
The current plot mode.
Definition: sgplotcontroller.hpp:80
bool setState(int newState)
Sets the current state.
Definition: sgplotcontroller.cpp:83
int getState() const
Access method for the current state.
Definition: sgplotcontroller.hpp:113
void changeAction(int newAction)
Sets the action.
Definition: sgplotcontroller.cpp:350
SolutionMode mode
The current solution mode.
Definition: sgplotcontroller.hpp:83
int getCurrentIterIndex() const
Access method for the current SGIteration_MaxMinMax pointer.
Definition: sgplotcontroller.hpp:127
bool setAction(int newAction)
Sets the current action.
Definition: sgplotcontroller.cpp:99
@ Directions
Definition: sgplotcontroller.hpp:51
int getActionIndex() const
Access method for the current action index.
Definition: sgplotcontroller.hpp:117
int action
Current action.
Definition: sgplotcontroller.hpp:69
int getIteration() const
Access method for the current iteration number.
Definition: sgplotcontroller.hpp:119
bool solnLoaded
Indicates when an SGSolution object has been loaded.
Definition: sgplotcontroller.hpp:91
int getAction() const
Access method for the current action.
Definition: sgplotcontroller.hpp:115
int state
Current state.
Definition: sgplotcontroller.hpp:67
QComboBox * actionCombo
Points to the actionCombo QComboBox selector.
Definition: sgplotcontroller.hpp:96
list< SGStep >::const_iterator currentStep
Points to the current step.
Definition: sgplotcontroller.hpp:88
bool setActionIndex(int newActionIndex)
Sets the current action index.
Definition: sgplotcontroller.cpp:116
const SGSolution_MaxMinMax * getSolution() const
Returns the current solution.
Definition: sgplotcontroller.hpp:135
@ Generation
Definition: sgplotcontroller.hpp:52