VAPOR3 3.9.4
Public Member Functions | Protected Member Functions | Friends | List of all members
PWidget Class Referenceabstract

#include <PWidget.h>

Inheritance diagram for PWidget:
UWidget VContainer Updateable PAnnotationColorbarWidget PAxisAnnotationWidget PButton PCameraProjectionWidget PCopyRegionAnnotationWidget PCopyRegionWidget PDatasetTransformWidget PDisplay PFileButton PGroup PLabel PLineItem PMetadataSection PMultiVarSelector POpenVariableMetadataWidget POrientationSelector PProjectionStringSection PRendererTransformWidget PSection PTFEditor PTFMapWidget< T > PTimestepInput PTotalTimestepsDisplay PTrackballWidget PTransformWidget PWidgetWrapper

Public Member Functions

 PWidget (const std::string &tag, QWidget *widget)
 
void Update (VAPoR::ParamsBase *params, VAPoR::ParamsMgr *paramsMgr=nullptr, VAPoR::DataMgr *dataMgr=nullptr) override
 Follows the Vapor GUI update function convention. Update the element.
 
PWidgetShowBasedOnParam (const std::string &tag, int whenEqualTo=true)
 
PWidgetEnableBasedOnParam (const std::string &tag, int whenEqualTo=true)
 
PWidgetSetTooltip (const std::string &text)
 
void setToolTip (const QString &)=delete
 
- Public Member Functions inherited from UWidget
 VContainer (QWidget *w)
 
- Public Member Functions inherited from VContainer
 VContainer (QWidget *w)
 
void AddBottomStretch ()
 
void SetPadding (int left, int top, int right, int bottom)
 
QLayout * layout () const =delete
 
void setLayout (QLayout *)=delete
 
virtual void Update (VAPoR::ParamsBase *params, VAPoR::ParamsMgr *paramsMgr=nullptr, VAPoR::DataMgr *dataMgr=nullptr)=0
 

Protected Member Functions

virtual void updateGUI () const =0
 
virtual bool requireParamsMgr () const
 
virtual bool requireDataMgr () const
 
virtual bool isShown () const
 
virtual bool isEnabled () const
 
const std::string & getTag () const
 
VAPoR::ParamsBasegetParams () const
 
VAPoR::ParamsMgrgetParamsMgr () const
 
VAPoR::DataMgrgetDataMgr () const
 
SettingsParamsgetSettingsParams () const
 
void setParamsDouble (double v)
 
void setParamsLong (long v)
 
void setParamsString (const std::string &v)
 
double getParamsDouble () const
 
long getParamsLong () const
 
std::string getParamsString () const
 
template<class T >
T * getParams () const
 

Friends

class PDynamicMixin
 
template<class , typename >
class PWidgetHLIBase
 

Detailed Description

A Qt Widget that is automatically synced with the Params database. The Update method must be called as per Vapor's convensions All other public methods are self-explanitory. To see a demo and example of how to use these widgets, see ParamsWidgetDemo

Definition at line 24 of file PWidget.h.

Constructor & Destructor Documentation

◆ PWidget()

PWidget::PWidget ( const std::string &  tag,
QWidget *  widget 
)

Member Function Documentation

◆ EnableBasedOnParam()

PWidget * PWidget::EnableBasedOnParam ( const std::string &  tag,
int  whenEqualTo = true 
)

tag must be a key referencing a long value in the Params Database. If the associated value is equal to whenEqualTo, the current widget will be shown/enabled, and hidden/disabled otherwise.

◆ getDataMgr()

VAPoR::DataMgr * PWidget::getDataMgr ( ) const
protected

◆ getParams() [1/2]

VAPoR::ParamsBase * PWidget::getParams ( ) const
protected

◆ getParams() [2/2]

template<class T >
T * PWidget::getParams ( ) const
inlineprotected

Definition at line 97 of file PWidget.h.

References getParams(), and VAssert.

◆ getParamsDouble()

double PWidget::getParamsDouble ( ) const
protected

◆ getParamsLong()

long PWidget::getParamsLong ( ) const
protected

◆ getParamsMgr()

VAPoR::ParamsMgr * PWidget::getParamsMgr ( ) const
protected

◆ getParamsString()

std::string PWidget::getParamsString ( ) const
protected

◆ getSettingsParams()

SettingsParams * PWidget::getSettingsParams ( ) const
protected

◆ getTag()

const std::string & PWidget::getTag ( ) const
protected

◆ isEnabled()

virtual bool PWidget::isEnabled ( ) const
inlineprotectedvirtual

Definition at line 71 of file PWidget.h.

◆ isShown()

virtual bool PWidget::isShown ( ) const
inlineprotectedvirtual

Reimplemented in PRegionSelector1D, PShowIf, and PVariableSelector.

Definition at line 70 of file PWidget.h.

◆ requireDataMgr()

virtual bool PWidget::requireDataMgr ( ) const
inlineprotectedvirtual

◆ requireParamsMgr()

virtual bool PWidget::requireParamsMgr ( ) const
inlineprotectedvirtual

Reimplemented in PButton, PCopyRegionWidget, PFileButton, PFileSelector, and PTFMapWidget< T >.

Definition at line 68 of file PWidget.h.

◆ setParamsDouble()

void PWidget::setParamsDouble ( double  v)
protected

◆ setParamsLong()

void PWidget::setParamsLong ( long  v)
protected

◆ setParamsString()

void PWidget::setParamsString ( const std::string &  v)
protected

◆ setToolTip()

void PWidget::setToolTip ( const QString &  )
delete

◆ SetTooltip()

PWidget * PWidget::SetTooltip ( const std::string &  text)

Wrapping QWidget::setToolTip in case we want to add additional functionality such as automatic tool-tips without having to refactor.

◆ ShowBasedOnParam()

PWidget * PWidget::ShowBasedOnParam ( const std::string &  tag,
int  whenEqualTo = true 
)

tag must be a key referencing a long value in the Params Database. If the associated value is equal to whenEqualTo, the current widget will be shown/enabled, and hidden/disabled otherwise.

◆ Update()

void PWidget::Update ( VAPoR::ParamsBase params,
VAPoR::ParamsMgr paramsMgr = nullptr,
VAPoR::DataMgr dataMgr = nullptr 
)
overridevirtual

Follows the Vapor GUI update function convention. Update the element.

Implements Updateable.

◆ updateGUI()

virtual void PWidget::updateGUI ( ) const
protectedpure virtual

Friends And Related Function Documentation

◆ PDynamicMixin

friend class PDynamicMixin
friend

Definition at line 93 of file PWidget.h.

◆ PWidgetHLIBase

template<class , typename >
friend class PWidgetHLIBase
friend

Definition at line 94 of file PWidget.h.


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