VAPOR3 3.9.4
Classes | Public Member Functions | Protected Member Functions | List of all members
PShowIf Class Reference

Shows and hides PWidgets based on a logic test. More...

#include <PShowIf.h>

Inheritance diagram for PShowIf:
PWidgetWrapper PWidget UWidget VContainer Updateable

Public Member Functions

 PShowIf (std::string tag)
 
PShowIfEquals (long l)
 
PShowIfEquals (std::string s)
 
PShowIfDimensionEquals (unsigned int dim)
 
PShowIfNot ()
 
PShowIfThen (PWidget *p)
 
PShowIfElse (PWidget *p)
 
PShowIfThen (const PGroup::List &list)
 
PShowIfElse (const PGroup::List &list)
 
- Public Member Functions inherited from PWidgetWrapper
 PWidgetWrapper (PWidget *p)
 
 PWidgetWrapper (std::string tag, PWidget *p)
 
- Public Member Functions inherited from PWidget
 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

bool isShown () const override
 
- Protected Member Functions inherited from PWidgetWrapper
void updateGUI () const override
 
virtual VAPoR::ParamsBasegetWrappedParams () const
 
- Protected Member Functions inherited from PWidget
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
 

Detailed Description

Shows and hides PWidgets based on a logic test.

Author
Stas Jaroszynski

For example: (new PShowIf("param_tag"))->Not()->Equals("Hi")->Then( PWidgets here will only show if param_tag != "Hi" )->Else( PWidgets here will only show if param_tag == "Hi" );

Definition at line 18 of file PShowIf.h.

Constructor & Destructor Documentation

◆ PShowIf()

PShowIf::PShowIf ( std::string  tag)

Member Function Documentation

◆ DimensionEquals()

PShowIf * PShowIf::DimensionEquals ( unsigned int  dim)

◆ Else() [1/2]

PShowIf * PShowIf::Else ( const PGroup::List list)

◆ Else() [2/2]

PShowIf * PShowIf::Else ( PWidget p)

◆ Equals() [1/2]

PShowIf * PShowIf::Equals ( long  l)

◆ Equals() [2/2]

PShowIf * PShowIf::Equals ( std::string  s)

◆ isShown()

bool PShowIf::isShown ( ) const
overrideprotectedvirtual

Reimplemented from PWidget.

◆ Not()

PShowIf * PShowIf::Not ( )

◆ Then() [1/2]

PShowIf * PShowIf::Then ( const PGroup::List list)

◆ Then() [2/2]

PShowIf * PShowIf::Then ( PWidget p)

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