6 #include <QDoubleValidator> 13 #include "ui_controlpanel.h" 15 namespace frechet {
namespace view {
203 void showIcon(QLabel* label,
int status);
210 void setIcon(QLabel* label, QString text, QString tooltip=
"");
230 void singleStep(QAbstractSlider*,
double factor);
235 void pageStep(QAbstractSlider*,
double factor);
239 #endif // CONTROLPANEL_H static const int DECIMALS
number of decimals in the epsilon control
void onCurveFinished(bool)
called when the curve algorithm finishes; update the "curve" panel to show latest results
void singleStep(QAbstractSlider *, double factor)
perform a single step on a slider
static QString POLY_STATUS[]
texts to display for algorithm results
ControlPanel(QWidget *parent=0)
default constructor
void updateGreedyResult(const k::kAlgorithm::Greedy &kalg)
update results of the k-Frechet greedy algorithm
void setEpsilonWithoutNotify(double eps)
update the value of epsilon without raising signals
void onBFButton()
called when the user clicks the "Show" button in the "brute-force" section. Triggers showOptimalResul...
global definitions for all algorithms.
int toSliderValue(double x)
map an epsilon value to a slider location
QString toString(double x)
format a number for display, with appropriate locale
Results of the Greedy algorithm.
void onEdit()
called after the user has edited the value of epsilon. Triggers epsilonChanged(), which in turn trigg...
QLabel * movieLabel
label that display the rotating icon
void showIcon(QLabel *label, int status)
show a status icon in the control panel
void onGreedyButton()
called when the user clicks the "Show" button in the "greedy" section. Triggers showGreedyResult(),...
double fromSliderValue(int i)
map a slider location to a value of epsilon
void pageStep(QAbstractSlider *, double factor)
perform a page step on a slider
void updatePolyResult()
update the "Polygon" pabel to show the lastest results of the poly-algorithm
void onShowBounds(bool)
called when the user clicks the "Show Bounds" button
double eps
the current value of epsilon
void onAlgorithmChanged(int algorithm)
called when the user selects a algorithm panel. Calls on FrechetViewApplication to update the current...
void lockInput(bool)
not used anymore...
double eps_step
step size for epsilon slider control
static QMovie * loaderMovie
displays a rotatin icon (during a long-running algorithm)
void setEpsilon(double eps, bool notify)
updates the value of epsilon
void setEpsilonWithNotify(double eps)
update the value of epsilon and raise signals
bool curve_was_ok
latest result of the decision algorithm for curves
void saveSettings(QSettings &settings, QString group)
store settings to application preferences
void setIcon(QLabel *label, QString text, QString tooltip="")
show a status icon in the control panel
void updateOptimalResult(const k::kAlgorithm::BruteForce &bfres)
update results of the k-Frechet brute-force algorithm
void restoreSettings(QSettings &settings, QString group)
load settings from application preferences
Ui::ControlPanel ui
UI elements (auto-generated by Qt)
results of the brute-force algorithm
void clearResults()
reset the k-Frechet panel
void showOptimalResult()
raised when the user clicks the "Show" button in the k-Frechet panel. Updates the free-space diagram ...
QDoubleValidator * epsValidator
validator for epsilon input
void wheelEvent(QWheelEvent *) override
Result
negative values for k indicate the special conditions of the computation
QLocale locale
locale used for number formatting
void epsilonChanged(double eps)
raised when the value of epsilon changes (e.g. when the user operates the slider control)....
void onSlider(int value)
called when the user moves the slider control for epsilon. Triggers epsilonChanged(),...
void keyPressEvent(QKeyEvent *event) override
void hideResult()
raised when the user clicks the "Hide" button in the k-Frechet panel. Resets the free-space diagram t...
double toDouble(QString text)
parse a number input
void updateResults()
update the k-Frechet panel to show the latest results of the k-Frechet algorithm
void setEpsilonMax(double eps_max)
update the maximum value of epsilon; adjusts the slider control
void showGreedyResult()
raised when the user clicks the "Show" button in the k-Frechet panel. Updates the free-space diagram ...