Defines a component for choosing a file or directory. More...
#include <ResourceChooser.h>
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 | |
FileChooser * | m_fchooser |
File chooser component. More... | |
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.
te::qt::widgets::ResourceChooser::ResourceChooser | ( | QWidget * | parent = 0 | ) |
Constructor.
Qt include files.
Definition at line 16 of file ResourceChooser.cpp.
References te::qt::widgets::FileChooser::FILE, te::qt::widgets::FileChooser::FOLDER, m_fchooser, and setResource().
te::qt::widgets::ResourceChooser::~ResourceChooser | ( | ) |
Destructor.
Definition at line 45 of file ResourceChooser.cpp.
|
static |
use the static when the ResourceChooser have to be presented as a Dialog.
initialPath | |
parent |
Definition at line 59 of file ResourceChooser.cpp.
References getSelectedResource(), m_fchooser, setFilterPattern(), and te::qt::widgets::FileChooser::setInitialPath().
Referenced by te::qt::widgets::PluginManagerDialog::addPlugins().
QString te::qt::widgets::ResourceChooser::getSelectedResource | ( | ) |
Returns the selected resource.
Definition at line 49 of file ResourceChooser.cpp.
Referenced by getResource().
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.
filter | Pattern to be applied. |
Definition at line 54 of file ResourceChooser.cpp.
Referenced by getResource().
|
protectedslot |
This is called when the user changes the type of resource to search.
id |
Definition at line 94 of file ResourceChooser.cpp.
Referenced by ResourceChooser().
|
protected |
File chooser component.
Definition at line 98 of file ResourceChooser.h.
Referenced by getResource(), and ResourceChooser().