The FileChooser class provides a lineedit with a button on the right side to specify a file or directory. More...
#include <FileDialog.h>
Public Types | |
enum | Mode { File, Directory } |
Public Slots | |
virtual void | setButtonText (const QString &) |
Sets the browse button's text to txt. | |
virtual void | setFileName (const QString &fn) |
Sets the file name s. | |
virtual void | setFilter (const QString &) |
Sets the filter for choosing a file. | |
virtual void | setMode (Mode m) |
If m is File the widget is set to choose a file, otherwise it is set to choose a directory. | |
Signals | |
void | fileNameChanged (const QString &) |
void | fileNameSelected (const QString &) |
Public Member Functions | |
QString | buttonText () const |
Returns the button's text. | |
FileChooser (QWidget *parent=0) | |
Constructs a file chooser called name with the parent parent. | |
QString | fileName () const |
Returns the filename. | |
QString | filter () const |
Returns the set filter. | |
Mode | mode () const |
Returns true if this widgets is set to choose a file, if it is set to choose false is returned. | |
virtual | ~FileChooser () |
Properties | |
QString | buttonText |
Returns the browse button's text. | |
QString | fileName |
This property holds the file name. | |
QString | filter |
This property holds the set filter to choose a file. | |
Mode | mode |
This property holds whether the widgets selects either a file or a directory. |
The FileChooser class provides a lineedit with a button on the right side to specify a file or directory.
Definition at line 120 of file FileDialog.h.
Definition at line 131 of file FileDialog.h.
FileChooser::FileChooser | ( | QWidget * | parent = 0 |
) |
Constructs a file chooser called name with the parent parent.
Definition at line 347 of file FileDialog.cpp.
References draftlibs::fcgeo::connect(), and fileNameChanged().
FileChooser::~FileChooser | ( | ) | [virtual] |
Definition at line 369 of file FileDialog.cpp.
QString Gui::FileChooser::buttonText | ( | ) | const |
Returns the button's text.
QString Gui::FileChooser::fileName | ( | ) | const |
Returns the filename.
Referenced by Gui::PrefFileChooser::restorePreferences(), and Gui::PrefFileChooser::savePreferences().
void Gui::FileChooser::fileNameChanged | ( | const QString & | ) | [signal] |
Referenced by FileChooser().
void Gui::FileChooser::fileNameSelected | ( | const QString & | ) | [signal] |
QString Gui::FileChooser::filter | ( | ) | const |
Returns the set filter.
Mode Gui::FileChooser::mode | ( | ) | const |
Returns true if this widgets is set to choose a file, if it is set to choose false is returned.
void FileChooser::setButtonText | ( | const QString & | txt | ) | [virtual, slot] |
Sets the browse button's text to txt.
Definition at line 458 of file FileDialog.cpp.
void FileChooser::setFileName | ( | const QString & | fn | ) | [virtual, slot] |
Sets the file name s.
Definition at line 389 of file FileDialog.cpp.
Referenced by Gui::Dialog::DlgMacroExecuteImp::DlgMacroExecuteImp(), Gui::Dialog::DlgOnlineHelpImp::DlgOnlineHelpImp(), Gui::Dialog::DlgSettingsMacroImp::DlgSettingsMacroImp(), Gui::PrefFileChooser::restorePreferences(), Gui::Dialog::Ui_DlgSettingsMacro::retranslateUi(), and Gui::Dialog::TextureMapping::TextureMapping().
void FileChooser::setFilter | ( | const QString & | filter | ) | [virtual, slot] |
Sets the filter for choosing a file.
Definition at line 450 of file FileDialog.cpp.
Referenced by Gui::Dialog::DlgOnlineHelpImp::DlgOnlineHelpImp(), Gui::Dialog::Ui_DlgProjectUtility::retranslateUi(), and Gui::Dialog::TextureMapping::TextureMapping().
void FileChooser::setMode | ( | FileChooser::Mode | m | ) | [virtual, slot] |
If m is File the widget is set to choose a file, otherwise it is set to choose a directory.
Definition at line 429 of file FileDialog.cpp.
Referenced by RaytracingGui::Ui_DlgSettingsRay::setupUi(), Gui::Dialog::Ui_DlgSettingsMacro::setupUi(), Gui::Dialog::Ui_DlgProjectUtility::setupUi(), and Gui::Dialog::Ui_DlgMacroExecute::setupUi().
QString FileChooser::buttonText [read, write] |
Returns the browse button's text.
Definition at line 128 of file FileDialog.h.
QString FileChooser::fileName [read, write] |
This property holds the file name.
Set this property's value with setFileName() and get this property's value with fileName().
Definition at line 126 of file FileDialog.h.
Referenced by Gui::Dialog::DlgOnlineHelpImp::DlgOnlineHelpImp(), and Gui::Dialog::DlgSettingsMacroImp::DlgSettingsMacroImp().
QString FileChooser::filter [read, write] |
This property holds the set filter to choose a file.
This property is used only if FileChooser::Mode is set to File.
Definition at line 127 of file FileDialog.h.
FileChooser::Mode FileChooser::mode [read, write] |
This property holds whether the widgets selects either a file or a directory.
The default value of chooseFile is set to File.
Definition at line 125 of file FileDialog.h.