JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
|
Guard Class (RAII construct) for JKQTPlotter that disables replotting on construction and reenables it on destruction. More...
#include <jkqtplotter.h>
Public Member Functions | |
JKQTPlotterUpdateGuard (const JKQTPlotterUpdateGuard &)=delete | |
JKQTPlotterUpdateGuard (JKQTPlotter *plot, bool forceRedraw=false) | |
JKQTPlotterUpdateGuard (JKQTPlotterUpdateGuard &&other) | |
~JKQTPlotterUpdateGuard () | |
JKQTPlotterUpdateGuard & | operator= (const JKQTPlotterUpdateGuard &)=delete |
JKQTPlotterUpdateGuard & | operator= (JKQTPlotterUpdateGuard &&other) |
void | release (bool forceRedraw=false) |
release the lock, if forceRedraw equals true JKQTPlotter::redrawPlot() is called in any case, if it is false , JKQTPlotter::redrawPlot() is called only if JKQTPlotter::isPlotUpdateEnabled() was true on construction of the guard | |
Private Attributes | |
bool | m_forceRedraw |
bool | m_oldEnabled |
JKQTPlotter * | m_plot |
Guard Class (RAII construct) for JKQTPlotter that disables replotting on construction and reenables it on destruction.
This class can be used to forbid replotting (to improve performance) while setting up a plot. The redraw is called on destruction of the guard,i.e. typically when leaving the block that encapsulates the plot construction.
JKQTPlotterUpdateGuard::JKQTPlotterUpdateGuard | ( | JKQTPlotter * | plot, |
bool | forceRedraw = false |
||
) |
JKQTPlotterUpdateGuard::~JKQTPlotterUpdateGuard | ( | ) |
|
delete |
JKQTPlotterUpdateGuard::JKQTPlotterUpdateGuard | ( | JKQTPlotterUpdateGuard && | other | ) |
|
delete |
JKQTPlotterUpdateGuard & JKQTPlotterUpdateGuard::operator= | ( | JKQTPlotterUpdateGuard && | other | ) |
void JKQTPlotterUpdateGuard::release | ( | bool | forceRedraw = false | ) |
release the lock, if forceRedraw equals true
JKQTPlotter::redrawPlot() is called in any case, if it is false
, JKQTPlotter::redrawPlot() is called only if JKQTPlotter::isPlotUpdateEnabled() was true
on construction of the guard
|
private |
|
private |
|
private |