VAPOR3 3.9.4
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PFileButton Class Referenceabstract

#include <PFileButton.h>

Inheritance diagram for PFileButton:
PWidget UWidget VContainer Updateable PFileReader PFileWriter

Public Member Functions

 PFileButton (const std::string label, Callback cb)
 
PFileButtonSetFileTypeFilter (const std::string &filter)
 Sets the fileTypeFilter parameter in the QFileDialog popup functions.
 
- 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

void updateGUI () const override
 
bool requireParamsMgr () const override
 
virtual QString selectPath (const std::string &defaultPath) const =0
 
void clicked ()
 
- 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
 

Protected Attributes

QString _fileTypeFilter = "All Files (*)"
 

Detailed Description

Creates a Qt text box and select button that allows users to pick a file path synced with the paramsdatabase using the PWidget interface.

Definition at line 13 of file PFileButton.h.

Constructor & Destructor Documentation

◆ PFileButton()

PFileButton::PFileButton ( const std::string  label,
Callback  cb 
)

Member Function Documentation

◆ clicked()

void PFileButton::clicked ( )
protected

◆ requireParamsMgr()

bool PFileButton::requireParamsMgr ( ) const
overrideprotectedvirtual

Reimplemented from PWidget.

◆ selectPath()

virtual QString PFileButton::selectPath ( const std::string &  defaultPath) const
protectedpure virtual

Implemented in PFileReader, and PFileWriter.

◆ SetFileTypeFilter()

PFileButton * PFileButton::SetFileTypeFilter ( const std::string &  filter)

Sets the fileTypeFilter parameter in the QFileDialog popup functions.

◆ updateGUI()

void PFileButton::updateGUI ( ) const
overrideprotectedvirtual

Implements PWidget.

Member Data Documentation

◆ _fileTypeFilter

QString PFileButton::_fileTypeFilter = "All Files (*)"
protected

Definition at line 28 of file PFileButton.h.


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