te::qt::widgets::ResourceChooser Class Reference

Defines a component for choosing a file or directory. More...

#include <ResourceChooser.h>

Inheritance diagram for te::qt::widgets::ResourceChooser:

Public Member Functions

QString getSelectedResource ()
 Returns the selected resource. More...
 
 ResourceChooser (QWidget *parent=0)
 Constructor. More...
 
void setFilterPattern (const QString &filter)
 Setts a pattern for filtering the searched files. More...
 
 ~ResourceChooser ()
 Destructor. More...
 

Static Public Member Functions

static QString getResource (const QString &initialPath, const QString &filter, QWidget *parent=0)
 use the static when the ResourceChooser have to be presented as a Dialog. More...
 

Protected Slots

void setResource (int id)
 This is called when the user changes the type of resource to search. More...
 

Protected Attributes

FileChooserm_fchooser
 File chooser component. More...
 

Detailed Description

Defines a component for choosing a file or directory.

This class is used for choosing a file or a directory. Its also possible to inform the file extensions to be searched. This way the client can change the filter for the files to be listed when searching. The component is composed of a line edit containing the complete path of the file or directory selected and a tool button used to open de choose file / directory dialog.

Definition at line 51 of file ResourceChooser.h.

Constructor & Destructor Documentation

te::qt::widgets::ResourceChooser::ResourceChooser ( QWidget *  parent = 0)

Constructor.

te::qt::widgets::ResourceChooser::~ResourceChooser ( )

Destructor.

Member Function Documentation

static QString te::qt::widgets::ResourceChooser::getResource ( const QString &  initialPath,
const QString &  filter,
QWidget *  parent = 0 
)
static

use the static when the ResourceChooser have to be presented as a Dialog.

Parameters
initialPath
parent
Returns
QString te::qt::widgets::ResourceChooser::getSelectedResource ( )

Returns the selected resource.

void te::qt::widgets::ResourceChooser::setFilterPattern ( const QString &  filter)

Setts a pattern for filtering the searched files.

This class uses internally the FileChooser component. For more details about on how define filter pattern see its documentation.

Parameters
filterPattern to be applied.
See also
te::qt::widgets::FileChooser
void te::qt::widgets::ResourceChooser::setResource ( int  id)
protectedslot

This is called when the user changes the type of resource to search.

Parameters
id

Member Data Documentation

FileChooser* te::qt::widgets::ResourceChooser::m_fchooser
protected

File chooser component.

Definition at line 98 of file ResourceChooser.h.


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