Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Properties | List of all members
pqFileChooserWidget Class Reference

input widget for files More...

#include <pqFileChooserWidget.h>

Inherits QWidget.

Collaboration diagram for pqFileChooserWidget:
Collaboration graph
[legend]

Signals

void filenamesChanged (const QStringList &)
 Signal emitted when the filename changes. More...
 
void filenameChanged (const QString &)
 

Public Member Functions

 pqFileChooserWidget (QWidget *p=nullptr)
 constructor More...
 
 ~pqFileChooserWidget () override
 destructor More...
 
QStringList filenames () const
 get the filename More...
 
void setFilenames (const QStringList &)
 set the filename More...
 
QString extension ()
 get the file extension for the file dialog More...
 
void setExtension (const QString &)
 set the file extension for the file dialog More...
 
bool forceSingleFile ()
 flag specifying whether this widget should accept multiple files More...
 
void setForceSingleFile (bool flag)
 
bool useDirectoryMode ()
 flag specifying whether this widget should use directory mode More...
 
void setUseDirectoryMode (bool flag)
 
bool acceptAnyFile ()
 flag specifying whether this widget should accept any file More...
 
void setAcceptAnyFile (bool flag)
 
void setServer (pqServer *server)
 set server to work on. More...
 
pqServerserver ()
 
QString singleFilename () const
 Convenience functions for when using only a single file (see forceSingleFile property). More...
 
void setSingleFilename (const QString &)
 Convenience functions for when using only a single file (see forceSingleFile property). More...
 
void setTitle (const QString &ttle)
 Get/set the title to use. More...
 
const QString & title () const
 Get/set the title to use. More...
 

Static Public Member Functions

static QStringList splitFilenames (const QString &filesString)
 Converts between a list of file names and delimited string of filenames (which is shown in the line edit box). More...
 
static QString joinFilenames (const QStringList &filesList)
 

Protected Slots

void chooseFile ()
 Called when the user hits the choose file button. More...
 
void handleFileLineEditChanged (const QString &fileString)
 Respond to changes with the filename in the line edit box. More...
 

Protected Member Functions

void emitFilenamesChanged (const QStringList &fileList)
 Takes a string with delimited files and emits the filenamesChanged and filenameChanged signals. More...
 

Protected Attributes

QString Extension
 
QLineEdit * LineEdit
 
pqServerServer
 
bool ForceSingleFile
 
bool UseDirectoryMode
 
bool AcceptAnyFile
 
QStringList FilenameList
 
bool UseFilenameList
 
QString Title
 

Properties

QStringList filenames
 
QString singleFilename
 
QString extension
 
bool useDirectoryMode
 
bool forceSingleFile
 
bool acceptAnyFile
 

Detailed Description

input widget for files

pqFileChooserWidget which consists of a tool button and a line edit hitting the tool button will bring up a file dialog, and the chosen file will be put in the line edit

Definition at line 26 of file pqFileChooserWidget.h.

Constructor & Destructor Documentation

◆ pqFileChooserWidget()

pqFileChooserWidget::pqFileChooserWidget ( QWidget *  p = nullptr)

constructor

◆ ~pqFileChooserWidget()

pqFileChooserWidget::~pqFileChooserWidget ( )
override

destructor

Member Function Documentation

◆ filenames()

QStringList pqFileChooserWidget::filenames ( ) const

get the filename

◆ setFilenames()

void pqFileChooserWidget::setFilenames ( const QStringList &  )

set the filename

◆ singleFilename()

QString pqFileChooserWidget::singleFilename ( ) const

Convenience functions for when using only a single file (see forceSingleFile property).

◆ setSingleFilename()

void pqFileChooserWidget::setSingleFilename ( const QString &  )

Convenience functions for when using only a single file (see forceSingleFile property).

◆ extension()

QString pqFileChooserWidget::extension ( )

get the file extension for the file dialog

◆ setExtension()

void pqFileChooserWidget::setExtension ( const QString &  )

set the file extension for the file dialog

◆ forceSingleFile()

bool pqFileChooserWidget::forceSingleFile ( )
inline

flag specifying whether this widget should accept multiple files

Definition at line 79 of file pqFileChooserWidget.h.

◆ setForceSingleFile()

void pqFileChooserWidget::setForceSingleFile ( bool  flag)
inline

Definition at line 80 of file pqFileChooserWidget.h.

◆ useDirectoryMode()

bool pqFileChooserWidget::useDirectoryMode ( )
inline

flag specifying whether this widget should use directory mode

Definition at line 89 of file pqFileChooserWidget.h.

◆ setUseDirectoryMode()

void pqFileChooserWidget::setUseDirectoryMode ( bool  flag)
inline

Definition at line 90 of file pqFileChooserWidget.h.

◆ acceptAnyFile()

bool pqFileChooserWidget::acceptAnyFile ( )
inline

flag specifying whether this widget should accept any file

Definition at line 99 of file pqFileChooserWidget.h.

◆ setAcceptAnyFile()

void pqFileChooserWidget::setAcceptAnyFile ( bool  flag)
inline

Definition at line 100 of file pqFileChooserWidget.h.

◆ setTitle()

void pqFileChooserWidget::setTitle ( const QString &  ttle)
inline

Get/set the title to use.

If an empty string is specified, a default one is created.

Definition at line 111 of file pqFileChooserWidget.h.

◆ title()

const QString& pqFileChooserWidget::title ( ) const
inline

Get/set the title to use.

If an empty string is specified, a default one is created.

Definition at line 112 of file pqFileChooserWidget.h.

◆ setServer()

void pqFileChooserWidget::setServer ( pqServer server)

set server to work on.

If server is nullptr, a local file dialog is used

◆ server()

pqServer* pqFileChooserWidget::server ( )

◆ splitFilenames()

static QStringList pqFileChooserWidget::splitFilenames ( const QString &  filesString)
inlinestatic

Converts between a list of file names and delimited string of filenames (which is shown in the line edit box).

Definition at line 126 of file pqFileChooserWidget.h.

◆ joinFilenames()

static QString pqFileChooserWidget::joinFilenames ( const QStringList &  filesList)
inlinestatic

Definition at line 130 of file pqFileChooserWidget.h.

◆ filenamesChanged

void pqFileChooserWidget::filenamesChanged ( const QStringList &  )
signal

Signal emitted when the filename changes.

The single string version is a convenience for when you are only grabbing the first file anyway.

◆ filenameChanged

void pqFileChooserWidget::filenameChanged ( const QString &  )
signal

◆ chooseFile

void pqFileChooserWidget::chooseFile ( )
protectedslot

Called when the user hits the choose file button.

◆ handleFileLineEditChanged

void pqFileChooserWidget::handleFileLineEditChanged ( const QString &  fileString)
protectedslot

Respond to changes with the filename in the line edit box.

◆ emitFilenamesChanged()

void pqFileChooserWidget::emitFilenamesChanged ( const QStringList &  fileList)
protected

Takes a string with delimited files and emits the filenamesChanged and filenameChanged signals.

Member Data Documentation

◆ Extension

QString pqFileChooserWidget::Extension
protected

Definition at line 151 of file pqFileChooserWidget.h.

◆ LineEdit

QLineEdit* pqFileChooserWidget::LineEdit
protected

Definition at line 152 of file pqFileChooserWidget.h.

◆ Server

pqServer* pqFileChooserWidget::Server
protected

Definition at line 153 of file pqFileChooserWidget.h.

◆ ForceSingleFile

bool pqFileChooserWidget::ForceSingleFile
protected

Definition at line 154 of file pqFileChooserWidget.h.

◆ UseDirectoryMode

bool pqFileChooserWidget::UseDirectoryMode
protected

Definition at line 155 of file pqFileChooserWidget.h.

◆ AcceptAnyFile

bool pqFileChooserWidget::AcceptAnyFile
protected

Definition at line 156 of file pqFileChooserWidget.h.

◆ FilenameList

QStringList pqFileChooserWidget::FilenameList
protected

Definition at line 157 of file pqFileChooserWidget.h.

◆ UseFilenameList

bool pqFileChooserWidget::UseFilenameList
protected

Definition at line 158 of file pqFileChooserWidget.h.

◆ Title

QString pqFileChooserWidget::Title
protected

Definition at line 159 of file pqFileChooserWidget.h.

Property Documentation

◆ filenames

QStringList pqFileChooserWidget::filenames
readwrite

Definition at line 29 of file pqFileChooserWidget.h.

◆ singleFilename

QString pqFileChooserWidget::singleFilename
readwrite

Definition at line 30 of file pqFileChooserWidget.h.

◆ extension

QString pqFileChooserWidget::extension
readwrite

Definition at line 31 of file pqFileChooserWidget.h.

◆ useDirectoryMode

bool pqFileChooserWidget::useDirectoryMode
readwrite

Definition at line 32 of file pqFileChooserWidget.h.

◆ forceSingleFile

bool pqFileChooserWidget::forceSingleFile
readwrite

Definition at line 33 of file pqFileChooserWidget.h.

◆ acceptAnyFile

bool pqFileChooserWidget::acceptAnyFile
readwrite

Definition at line 34 of file pqFileChooserWidget.h.


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