OpenWalnut  1.5.0dev
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
WPropertyTransferFunctionWidget Class Reference

Implements a property widget for WPropDouble. More...

#include <WPropertyTransferFunctionWidget.h>

+ Inheritance diagram for WPropertyTransferFunctionWidget:
+ Collaboration diagram for WPropertyTransferFunctionWidget:

Public Member Functions

 WPropertyTransferFunctionWidget (WPropTransferFunction property, QGridLayout *propertyGrid, QWidget *parent=0)
 Constructor. More...
 
virtual ~WPropertyTransferFunctionWidget ()
 Destructor. More...
 
- Public Member Functions inherited from WPropertyWidget
 WPropertyWidget (std::shared_ptr< WPropertyBase > property, QGridLayout *propertyGrid, QWidget *parent=0)
 Constructor. More...
 
virtual ~WPropertyWidget ()
 Destructor. More...
 
std::shared_ptr< WPropertyBasegetProperty ()
 Returns the handled property. More...
 
virtual void invalidate (bool invalid=true)
 This method marks this widget as invalid. More...
 
virtual std::string getTooltip () const
 Gets the tooltip that should be used for this widget. More...
 
QWidget * getParameterWidgets ()
 Returns the parameter widget for this property. More...
 
QWidget * getInformationWidgets ()
 Returns the info widget for this property. More...
 
virtual void requestUpdate ()
 Request an update of the property widget. More...
 
void forceInformationMode (bool force=true)
 Force the widget to use the information widgets. More...
 
- Public Member Functions inherited from WTransferFunctionGuiNotificationClass
virtual ~WTransferFunctionGuiNotificationClass ()
 default destructor More...
 

Protected Member Functions

virtual void guiUpdate (const WTransferFunction &tf)
 Called when the gui has new data. More...
 
virtual void update ()
 Called whenever the widget should update. More...
 
- Protected Member Functions inherited from WPropertyWidget
virtual bool event (QEvent *event)
 Custom event dispatcher. More...
 

Protected Attributes

WPropTransferFunction m_transferFunctionProperty
 The integer property represented by this widget. More...
 
QHBoxLayout m_layout
 The slider allowing modification of the integer value. More...
 
double m_min
 The current minimum value. More...
 
double m_max
 The current maximum value. More...
 
QHBoxLayout m_infoLayout
 Used to show the property as text. More...
 
WTransferFunctionWidget m_transferFunction
 the current transfer function More...
 
WTransferFunction lastTransferFunction
 the previously used transfer function More...
 
bool modifying
 internal synchronization flag More...
 
- Protected Attributes inherited from WPropertyWidget
std::shared_ptr< WPropertyBasem_property
 The property handled by the widget. More...
 
QGridLayout * m_propertyGrid
 The grid used to layout label and widget. More...
 
WScaleLabel m_label
 The label used to name the property. More...
 
QWidget m_separator
 Separator after each property. More...
 
bool m_useLabel
 If set to true, the widgets uses the control layout to combine the widget with a label. More...
 
QWidget m_parameterWidgets
 The widget containing a layout and provides the edit widgets for the property. More...
 
QWidget m_informationWidgets
 The widget containing a layout and provides the widgets for showing information properties. More...
 
bool m_invalid
 Flag denoting whether the widget is set to an invalid value. More...
 
boost::signals2::connection m_connection
 The connection for propertyChangeNotifier(). More...
 
QColor m_sepCol
 The color to use for separators. More...
 
QColor m_labelCol
 The color to use for the property labels. More...
 
QColor m_propertyCol
 The color to use for property widgets. More...
 
QColor m_errorCol
 Color used for indicating errors. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from WPropertyWidget
static WPropertyWidgetconstruct (WPropertyBase::SPtr property, QGridLayout *propertyGrid=NULL, QWidget *parent=NULL)
 Constructs a proper widget for the specified property. More...
 

Detailed Description

Implements a property widget for WPropDouble.

Definition at line 42 of file WPropertyTransferFunctionWidget.h.

Constructor & Destructor Documentation

◆ WPropertyTransferFunctionWidget()

WPropertyTransferFunctionWidget::WPropertyTransferFunctionWidget ( WPropTransferFunction  property,
QGridLayout *  propertyGrid,
QWidget *  parent = 0 
)

Constructor.

Creates a new widget appropriate for the specified property.

Parameters
propertythe property to handle
parentthe parent widget.
propertyGridthe grid used to layout the labels and property widgets

Definition at line 38 of file WPropertyTransferFunctionWidget.cpp.

References m_infoLayout, WPropertyWidget::m_informationWidgets, m_layout, WPropertyWidget::m_parameterWidgets, m_transferFunction, and update().

+ Here is the call graph for this function:

◆ ~WPropertyTransferFunctionWidget()

WPropertyTransferFunctionWidget::~WPropertyTransferFunctionWidget ( )
virtual

Destructor.

Definition at line 66 of file WPropertyTransferFunctionWidget.cpp.

Member Function Documentation

◆ guiUpdate()

void WPropertyTransferFunctionWidget::guiUpdate ( const WTransferFunction tf)
protectedvirtual

Called when the gui has new data.

Parameters
tfNew transfer function

Implements WTransferFunctionGuiNotificationClass.

Definition at line 145 of file WPropertyTransferFunctionWidget.cpp.

References lastTransferFunction, m_transferFunctionProperty, and modifying.

◆ update()

void WPropertyTransferFunctionWidget::update ( )
protectedvirtual

Member Data Documentation

◆ lastTransferFunction

WTransferFunction WPropertyTransferFunctionWidget::lastTransferFunction
protected

the previously used transfer function

Definition at line 117 of file WPropertyTransferFunctionWidget.h.

Referenced by guiUpdate(), and update().

◆ m_infoLayout

QHBoxLayout WPropertyTransferFunctionWidget::m_infoLayout
protected

Used to show the property as text.

The layout used for the pure output (information properties)

Definition at line 111 of file WPropertyTransferFunctionWidget.h.

Referenced by WPropertyTransferFunctionWidget().

◆ m_layout

QHBoxLayout WPropertyTransferFunctionWidget::m_layout
protected

The slider allowing modification of the integer value.

The edit field showing the value of the slider Layout used to position the label and the checkbox

Definition at line 91 of file WPropertyTransferFunctionWidget.h.

Referenced by WPropertyTransferFunctionWidget().

◆ m_max

double WPropertyTransferFunctionWidget::m_max
protected

The current maximum value.

Definition at line 101 of file WPropertyTransferFunctionWidget.h.

◆ m_min

double WPropertyTransferFunctionWidget::m_min
protected

The current minimum value.

Definition at line 96 of file WPropertyTransferFunctionWidget.h.

◆ m_transferFunction

WTransferFunctionWidget WPropertyTransferFunctionWidget::m_transferFunction
protected

the current transfer function

Definition at line 114 of file WPropertyTransferFunctionWidget.h.

Referenced by update(), and WPropertyTransferFunctionWidget().

◆ m_transferFunctionProperty

WPropTransferFunction WPropertyTransferFunctionWidget::m_transferFunctionProperty
protected

The integer property represented by this widget.

Definition at line 76 of file WPropertyTransferFunctionWidget.h.

Referenced by guiUpdate(), and update().

◆ modifying

bool WPropertyTransferFunctionWidget::modifying
protected

internal synchronization flag

Definition at line 122 of file WPropertyTransferFunctionWidget.h.

Referenced by guiUpdate(), and update().


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