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 | AcceptMode { AcceptOpen , AcceptSave } |
enum | Mode { File , Directory } |
Public Slots | |
virtual void | setButtonText (const QString &) |
Sets the browse button's text to txt. More... | |
virtual void | setFileName (const QString &fn) |
Sets the file name s. More... | |
virtual void | setFilter (const QString &) |
Sets the filter for choosing a file. More... | |
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. More... | |
Signals | |
void | fileNameChanged (const QString &) |
void | fileNameSelected (const QString &) |
Public Member Functions | |
AcceptMode | acceptMode () const |
Returns the accept mode. More... | |
QString | buttonText () const |
Returns the button's text. More... | |
FileChooser (QWidget *parent=nullptr) | |
Constructs a file chooser called name with the parent parent. More... | |
QString | fileName () const |
Returns the filename. More... | |
QString | filter () const |
Returns the set filter. More... | |
Mode | mode () const |
Returns true if this widgets is set to choose a file, if it is set to choose false is returned. More... | |
void | setAcceptMode (AcceptMode mode) |
Sets the accept mode. More... | |
virtual | ~FileChooser () |
Protected Member Functions | |
void | resizeEvent (QResizeEvent *) |
Properties | |
AcceptMode | acceptMode |
QString | buttonText |
QString | fileName |
This property holds the file name. More... | |
QString | filter |
This property holds the set filter to choose a file. More... | |
Mode | mode |
This property holds whether the widgets selects either a file or a directory. More... | |
The FileChooser class provides a lineedit with a button on the right side to specify a file or directory.
FileChooser::FileChooser | ( | QWidget * | parent = nullptr | ) |
Constructs a file chooser called name with the parent parent.
References draftgeoutils.intersections::connect(), and fileNameChanged().
|
virtual |
AcceptMode Gui::FileChooser::acceptMode | ( | ) | const |
Returns the accept mode.
QString FileChooser::buttonText | ( | ) | const |
Returns the button's text.
Returns the browse button's text.
QString FileChooser::fileName | ( | ) | const |
Returns the filename.
|
signal |
|
signal |
QString FileChooser::filter | ( | ) | const |
Returns the set filter.
FileChooser::Mode FileChooser::mode | ( | ) | const |
Returns true if this widgets is set to choose a file, if it is set to choose false is returned.
Referenced by draftguitools.gui_offset.Offset::action(), gzip_utf8.GzipFile::close(), Commands.SphereCreator::enter(), gzip_utf8.GzipFile::filename(), gzip_utf8.GzipFile::flush(), Commands.SphereCreator::leave(), draftguitools.gui_offset.Offset::numericRadius(), gzip_utf8.GzipFile::read(), gzip_utf8.GzipFile::readable(), gzip_utf8.GzipFile::rewind(), gzip_utf8.GzipFile::seek(), draftguitools.gui_trackers.archDimTracker::setString(), gzip_utf8.GzipFile::writable(), and gzip_utf8.GzipFile::write().
|
protected |
void Gui::FileChooser::setAcceptMode | ( | AcceptMode | mode | ) |
Sets the accept mode.
|
virtualslot |
Sets the browse button's text to txt.
References Gui::QtTools::horizontalAdvance().
|
virtualslot |
Sets the file name s.
Referenced by Gui::PrefFileChooser::restorePreferences(), and Gui::Dialog::TextureMapping::TextureMapping().
|
virtualslot |
Sets the filter for choosing a file.
References filter.
Referenced by Gui::Dialog::DlgProjectUtility::DlgProjectUtility(), Ui_TaskWeldingSymbol::retranslateUi(), Gui::Dialog::Ui_DlgProjectUtility::setupUi(), and Gui::Dialog::TextureMapping::TextureMapping().
|
virtualslot |
If m is File the widget is set to choose a file, otherwise it is set to choose a directory.
Referenced by Gui::Dialog::Ui_DlgMacroExecute::setupUi(), Gui::Dialog::Ui_DlgProjectUtility::setupUi(), TechDrawGui::Ui_SymbolChooser::setupUi(), Ui_DlgStartPreferences::setupUi(), FemGui::Ui_DlgSettingsFemGeneralImp::setupUi(), FemGui::Ui_DlgSettingsFemMaterialImp::setupUi(), Gui::Dialog::Ui_DlgSettingsMacro::setupUi(), RaytracingGui::Ui_DlgSettingsRay::setupUi(), Ui_TaskWeldingSymbol::setupUi(), and TechDrawGui::Ui_DlgPrefsTechDrawGeneralImp::setupUi().
|
readwrite |
|
readwrite |
|
readwrite |
This property holds the file name.
Set this property's value with setFileName() and get this property's value with fileName().
Referenced by Gui::PrefFileChooser::restorePreferences(), and Gui::PrefFileChooser::savePreferences().
|
readwrite |
This property holds the set filter to choose a file.
This property is used only if FileChooser::Mode is set to File.
Referenced by setFilter().
|
readwrite |
This property holds whether the widgets selects either a file or a directory.
The default value of chooseFile is set to File.
Referenced by draftguitools.gui_offset.Offset::action(), gzip_utf8.GzipFile::close(), Commands.SphereCreator::enter(), gzip_utf8.GzipFile::filename(), gzip_utf8.GzipFile::flush(), Commands.SphereCreator::leave(), draftguitools.gui_offset.Offset::numericRadius(), gzip_utf8.GzipFile::read(), gzip_utf8.GzipFile::readable(), gzip_utf8.GzipFile::rewind(), gzip_utf8.GzipFile::seek(), draftguitools.gui_trackers.archDimTracker::setString(), gzip_utf8.GzipFile::writable(), and gzip_utf8.GzipFile::write().