CustusX  15.3.3-beta
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::OptimizedUpdateWidget Class Reference

Interface for all classes following the modified/prepaint paradigm. More...

#include <cxOptimizedUpdateWidget.h>

Inheritance diagram for cx::OptimizedUpdateWidget:
cx::BaseWidget cx::CheckBoxWidget cx::ColorSelectWidget cx::FilenameWidget cx::LabeledLineEditWidget cx::ScalarInteractionWidget cx::SliderRangeGroupWidget cx::ActiveToolWidget cx::ActiveVolumeWidget cx::AllFiltersWidget cx::ClippingWidget cx::ColorWidget cx::CompactFilterSetupWidget cx::ConsoleWidget cx::CroppingWidget cx::DataSelectWidget cx::DicomWidget cx::EraserWidget cx::FileWatcherWidget cx::FilterSetupWidget cx::FrameTreeWidget cx::HelpWidget cx::ImagePropertiesWidget cx::InfoWidget cx::LabeledComboBoxWidget cx::LapFrameToolCalibrationWidget cx::ManualImageRegistrationWidget cx::ManualPatientRegistrationWidget cx::MetricWidget cx::NavigationWidget cx::OverlayWidget cx::PipelineWidget cx::PipelineWidgetFilterLine cx::PlaybackWidget cx::PluginFrameworkWidget cx::PointSamplingWidget cx::PresetWidget cx::ProbeConfigWidget cx::ReconstructionWidget cx::RecordBaseWidget cx::RecordSessionWidget cx::RegistrationBaseWidget cx::RegistrationHistoryWidget cx::SamplerWidget cx::ShadingWidget cx::SoundSpeedConverterWidget cx::SpaceEditWidget cx::TabbedWidget cx::TemporalCalibrationWidget cx::ToolManagerWidget cx::ToolManualCalibrationWidget cx::ToolPropertiesWidget cx::ToolTipCalibrateWidget cx::ToolTipSampleWidget cx::TrackPadWidget cx::TransferFunction2DColorWidget cx::TransferFunction2DOpacityWidget cx::TransferFunction2DWidget cx::TransferFunction3DWidget cx::TransferFunctionAlphaWidget cx::TransferFunctionColorWidget cx::TransferFunctionWidget cx::Transform3DWidget cx::VideoConnectionWidget cx::SliderGroupWidget cx::SpinBoxAndDialGroupWidget cx::SpinBoxAndSliderGroupWidget cx::SpinBoxGroupWidget cx::SpinBoxInfiniteSliderGroupWidget

Public Slots

virtual void setModified ()
 

Public Member Functions

 OptimizedUpdateWidget (QWidget *parent=NULL)
 
virtual ~OptimizedUpdateWidget ()
 

Protected Member Functions

virtual void prePaintEvent ()
 
virtual void paintEvent (QPaintEvent *event)
 

Detailed Description

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.

Author
christiana
Date
Nov 15, 2012

Definition at line 62 of file cxOptimizedUpdateWidget.h.

Constructor & Destructor Documentation

cx::OptimizedUpdateWidget::OptimizedUpdateWidget ( QWidget *  parent = NULL)

Definition at line 41 of file cxOptimizedUpdateWidget.cpp.

virtual cx::OptimizedUpdateWidget::~OptimizedUpdateWidget ( )
inlinevirtual

Definition at line 67 of file cxOptimizedUpdateWidget.h.

Member Function Documentation

void cx::OptimizedUpdateWidget::paintEvent ( QPaintEvent *  event)
protectedvirtual

Override. Calls prePaintEvent() provided that setModified() has been called.

Reimplemented in cx::TransferFunctionColorWidget, and cx::TransferFunctionAlphaWidget.

Definition at line 46 of file cxOptimizedUpdateWidget.cpp.

virtual void cx::OptimizedUpdateWidget::prePaintEvent ( )
inlineprotectedvirtual
void cx::OptimizedUpdateWidget::setModified ( )
virtualslot

Call to trigger a call to prePaintEvent() prior to next paintEvent()

Definition at line 52 of file cxOptimizedUpdateWidget.cpp.


The documentation for this class was generated from the following files: