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

file chooser widget 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 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=NULL)
 constructor More...
 
 ~pqFileChooserWidget () override
 destructor More...
 
QStringList filenames () const
 get the filename More...
 
void setFilenames (const QStringList &)
 set the filename More...
 
QString singleFilename () const
 convienince functions for when using only a single file (see forceSingleFile property). More...
 
void setSingleFilename (const QString &)
 
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 ()
 
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

file chooser widget 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 48 of file pqFileChooserWidget.h.

Constructor & Destructor Documentation

◆ pqFileChooserWidget()

pqFileChooserWidget::pqFileChooserWidget ( QWidget *  p = NULL)

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

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

◆ setSingleFilename()

void pqFileChooserWidget::setSingleFilename ( const QString &  )

◆ 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 99 of file pqFileChooserWidget.h.

◆ setForceSingleFile()

void pqFileChooserWidget::setForceSingleFile ( bool  flag)
inline

Definition at line 100 of file pqFileChooserWidget.h.

◆ useDirectoryMode()

bool pqFileChooserWidget::useDirectoryMode ( )
inline

flag specifying whether this widget should use directory mode

Definition at line 109 of file pqFileChooserWidget.h.

◆ setUseDirectoryMode()

void pqFileChooserWidget::setUseDirectoryMode ( bool  flag)
inline

Definition at line 110 of file pqFileChooserWidget.h.

◆ acceptAnyFile()

bool pqFileChooserWidget::acceptAnyFile ( )
inline

flag specifying whether this widget should accept any file

Definition at line 119 of file pqFileChooserWidget.h.

◆ setAcceptAnyFile()

void pqFileChooserWidget::setAcceptAnyFile ( bool  flag)
inline

Definition at line 120 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 131 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 132 of file pqFileChooserWidget.h.

◆ setServer()

void pqFileChooserWidget::setServer ( pqServer server)

set server to work on.

If server is NULL, 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 146 of file pqFileChooserWidget.h.

◆ joinFilenames()

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

Definition at line 150 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 171 of file pqFileChooserWidget.h.

◆ LineEdit

QLineEdit* pqFileChooserWidget::LineEdit
protected

Definition at line 172 of file pqFileChooserWidget.h.

◆ Server

pqServer* pqFileChooserWidget::Server
protected

Definition at line 173 of file pqFileChooserWidget.h.

◆ ForceSingleFile

bool pqFileChooserWidget::ForceSingleFile
protected

Definition at line 174 of file pqFileChooserWidget.h.

◆ UseDirectoryMode

bool pqFileChooserWidget::UseDirectoryMode
protected

Definition at line 175 of file pqFileChooserWidget.h.

◆ AcceptAnyFile

bool pqFileChooserWidget::AcceptAnyFile
protected

Definition at line 176 of file pqFileChooserWidget.h.

◆ FilenameList

QStringList pqFileChooserWidget::FilenameList
protected

Definition at line 177 of file pqFileChooserWidget.h.

◆ UseFilenameList

bool pqFileChooserWidget::UseFilenameList
protected

Definition at line 178 of file pqFileChooserWidget.h.

◆ Title

QString pqFileChooserWidget::Title
protected

Definition at line 179 of file pqFileChooserWidget.h.

Property Documentation

◆ filenames

QStringList pqFileChooserWidget::filenames
readwrite

Definition at line 51 of file pqFileChooserWidget.h.

◆ singleFilename

QString pqFileChooserWidget::singleFilename
readwrite

Definition at line 52 of file pqFileChooserWidget.h.

◆ extension

QString pqFileChooserWidget::extension
readwrite

Definition at line 53 of file pqFileChooserWidget.h.

◆ useDirectoryMode

bool pqFileChooserWidget::useDirectoryMode
readwrite

Definition at line 54 of file pqFileChooserWidget.h.

◆ forceSingleFile

bool pqFileChooserWidget::forceSingleFile
readwrite

Definition at line 55 of file pqFileChooserWidget.h.

◆ acceptAnyFile

bool pqFileChooserWidget::acceptAnyFile
readwrite

Definition at line 56 of file pqFileChooserWidget.h.


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