NorMIT-nav
2023.01.05-dev+develop.0da12
An IGT application
|
Interface for all classes following the modified/prepaint paradigm. More...
#include <cxOptimizedUpdateWidget.h>
Public Slots | |
virtual void | setModified () |
Public Member Functions | |
OptimizedUpdateWidget (QWidget *parent=NULL) | |
virtual | ~OptimizedUpdateWidget () |
void | forcePrePaint () |
Protected Member Functions | |
virtual void | prePaintEvent () |
virtual void | paintEvent (QPaintEvent *event) |
Interface for all classes following the modified/prepaint paradigm.
Use this class when the widget is modified several times between each repaint. Instead of doing expensive computations upon setModified(), the computations are rather deferred to a pre paint step. This is similar to the VTK modified/update paradigm.
NOTE: In order for this to work, the widget itself must have a visible region. If the widget is completely covered by child widgets or other widgets, no paintEvent will come, and the prePaintEvent will not be called. See ScalarInteractionWidget for an example of how to hack this if necessary.
Definition at line 41 of file cxOptimizedUpdateWidget.h.
cx::OptimizedUpdateWidget::OptimizedUpdateWidget | ( | QWidget * | parent = NULL | ) |
Definition at line 20 of file cxOptimizedUpdateWidget.cpp.
|
inlinevirtual |
Definition at line 46 of file cxOptimizedUpdateWidget.h.
void cx::OptimizedUpdateWidget::forcePrePaint | ( | ) |
Definition at line 25 of file cxOptimizedUpdateWidget.cpp.
|
protectedvirtual |
Override. Calls prePaintEvent() provided that setModified() has been called.
Reimplemented in cx::TransferFunctionColorWidget, and cx::TransferFunctionAlphaWidget.
Definition at line 30 of file cxOptimizedUpdateWidget.cpp.
|
inlineprotectedvirtual |
Implement to perform expensive operations that need only be called once per paint. Use setModified() to trigger this method.
Reimplemented in cx::ScalarInteractionWidget, cx::ConsoleWidget, cx::ICPRegistrationBaseWidget, cx::ImageLandmarksWidget, cx::CenterlinePointsWidget, cx::ToolPropertiesWidget, cx::LandmarkRegistrationWidget, cx::BrowserWidget, cx::ElastixWidget, cx::LandmarkImage2ImageRegistrationWidget, cx::BronchoscopyRegistrationWidget, cx::CenterlineRegistrationWidget, cx::SelectClippersForDataWidget, cx::MeshPropertiesWidget, cx::PatientLandMarksWidget, cx::ClipperWidget, cx::DicomWidget, cx::FrameTreeWidget, cx::ViewGroupPropertiesWidget, cx::SamplerWidget, cx::BronchoscopyImage2ImageRegistrationWidget, and cx::SingleMetricWidget.
Definition at line 60 of file cxOptimizedUpdateWidget.h.
|
virtualslot |
Call to trigger a call to prePaintEvent() prior to next paintEvent()
Definition at line 36 of file cxOptimizedUpdateWidget.cpp.