BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The UpdateTimer class accumulates update requests during certain period of time, and at the end of this period emits special signal.
Used in ColorMap plot to avoid often replot of CustomPlot.
Definition at line 27 of file UpdateTimer.h.
Public Slots | |
void | scheduleUpdate () |
Signals | |
void | timeToUpdate () |
Public Member Functions | |
UpdateTimer (int timerInterval, QObject *parent=nullptr) | |
void | reset () |
void | setWallclockTimer (int timerInterval) |
Private Slots | |
void | onTimerTimeout () |
Private Attributes | |
bool | m_is_busy |
QTimer * | m_timer |
int | m_timer_interval |
Timer in msec. More... | |
qint64 | m_update_request_count |
Number of requests accumulated so far. More... | |
|
explicit |
Definition at line 18 of file UpdateTimer.cpp.
References m_timer, m_timer_interval, and onTimerTimeout().
|
privateslot |
Definition at line 53 of file UpdateTimer.cpp.
References m_is_busy, m_update_request_count, and timeToUpdate().
Referenced by UpdateTimer().
void UpdateTimer::reset | ( | ) |
Definition at line 30 of file UpdateTimer.cpp.
References m_is_busy, m_timer, and m_update_request_count.
Referenced by ScriptPanel::hideEvent(), AutosaveController::onDocumentDestroyed(), AutosaveController::setAutosaveTime(), and AutosaveController::setDocument().
|
slot |
Definition at line 42 of file UpdateTimer.cpp.
References m_is_busy, m_timer, m_timer_interval, and m_update_request_count.
Referenced by AutosaveController::onDocumentModified(), ScriptPanel::onSampleModified(), Plot1D::replot(), SpecularPlot::replot(), ColorMap::replot(), and ScriptPanel::showEvent().
void UpdateTimer::setWallclockTimer | ( | int | timerInterval | ) |
Definition at line 37 of file UpdateTimer.cpp.
References m_timer_interval.
Referenced by AutosaveController::setAutosaveTime().
|
signal |
|
private |
Definition at line 48 of file UpdateTimer.h.
Referenced by onTimerTimeout(), reset(), and scheduleUpdate().
|
private |
Definition at line 49 of file UpdateTimer.h.
Referenced by UpdateTimer(), reset(), and scheduleUpdate().
|
private |
Timer in msec.
Definition at line 47 of file UpdateTimer.h.
Referenced by UpdateTimer(), scheduleUpdate(), and setWallclockTimer().
|
private |
Number of requests accumulated so far.
Definition at line 46 of file UpdateTimer.h.
Referenced by onTimerTimeout(), reset(), and scheduleUpdate().