22 #include <QHBoxLayout>
24 #include <QPushButton>
29 const int default_interval = 10;
30 const std::vector<int> slider_to_interval = {1, 2, 3, 4, 5, 10, 15, 20,
31 25, 30, 50, 100, 200, 500, 1000};
32 const QString slider_tooltip =
"Updates fit progress every Nth iteration";
38 , m_startButton(new QPushButton)
39 , m_stopButton(new QPushButton)
40 , m_intervalSlider(new QSlider)
41 , m_updateIntervalLabel(new QLabel)
42 , m_iterationsCountLabel(new QLabel)
45 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
58 m_intervalSlider->setRange(0,
static_cast<int>(slider_to_interval.size()) - 1);
70 auto* layout =
new QHBoxLayout;
71 layout->setSpacing(0);
73 layout->addSpacing(5);
75 layout->addSpacing(5);
77 layout->addSpacing(2);
79 layout->addSpacing(5);
148 auto svalue =
static_cast<size_t>(value);
149 return svalue < slider_to_interval.size() ? slider_to_interval[svalue] : default_interval;
Defines class CautionSign.
Defines class DesignerHelper.
Defines class FitSuiteItem.
JobStatus
The JobStatus enum lists the possible states of a job.
@ Fitting
the job is busy fitting
The CautionSign controls appearance of CautionSignWidget on top of parent widget.
void clear()
Clears caution message;.
void setCautionMessage(const QString &cautionMessage)
Shows caution sign on the screen. If clear of previous caution sign had happened just few msec ago,...
static int getLabelFontSize()
static int getPortFontSize()
int iterationCount() const
static bool isIterationCountPropertyName(const QString &name)
void setUpdateInterval(int interval)
void jobStatusChanged(const JobStatus status)
FitSuiteItem * fitSuiteItem()
void unsubscribe(const void *caller)
Cancels all subscriptions of given caller.
void setOnPropertyChange(std::function< void(QString)> f, const void *caller=nullptr)
ModelMapper * mapper()
Returns the current model mapper of this item. Creates new one if necessary.
Defines namespace GUI::Constants.
const unsigned int RUN_FIT_CONTROL_WIDGET_HEIGHT
QString const & name(EShape k)