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=0) | |
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 |
Returns the browse button's text. More... | |
QString | fileName |
QString | filter |
Mode | mode |
Detailed Description
The FileChooser class provides a lineedit with a button on the right side to specify a file or directory.
Member Enumeration Documentation
◆ AcceptMode
◆ Mode
Constructor & Destructor Documentation
◆ FileChooser()
FileChooser::FileChooser | ( | QWidget * | parent = 0 | ) |
Constructs a file chooser called name with the parent parent.
References fileNameChanged().
◆ ~FileChooser()
|
virtual |
Member Function Documentation
◆ acceptMode()
AcceptMode Gui::FileChooser::acceptMode | ( | ) | const |
Returns the accept mode.
◆ buttonText()
QString Gui::FileChooser::buttonText | ( | ) | const |
Returns the button's text.
◆ fileName()
QString Gui::FileChooser::fileName | ( | ) | const |
Returns the filename.
◆ fileNameChanged
|
signal |
Referenced by FileChooser().
◆ fileNameSelected
|
signal |
◆ filter()
QString Gui::FileChooser::filter | ( | ) | const |
Returns the set filter.
◆ mode()
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.
◆ resizeEvent()
|
protected |
◆ setAcceptMode()
void Gui::FileChooser::setAcceptMode | ( | AcceptMode | mode | ) |
Sets the accept mode.
◆ setButtonText
|
virtualslot |
Sets the browse button's text to txt.
◆ setFileName
|
virtualslot |
Sets the file name s.
Referenced by Gui::PrefFileChooser::restorePreferences().
◆ setFilter
|
virtualslot |
◆ setMode
|
virtualslot |
If m is File the widget is set to choose a file, otherwise it is set to choose a directory.
Property Documentation
◆ acceptMode
|
readwrite |
◆ buttonText
|
readwrite |
Returns the browse button's text.
◆ fileName
|
readwrite |
This property holds the file name. Set this property's value with setFileName() and get this property's value with fileName().
- See also
- fileName(), setFileName().
Referenced by Gui::PrefFileChooser::restorePreferences(), and Gui::PrefFileChooser::savePreferences().
◆ filter
|
readwrite |
This property holds the set filter to choose a file. This property is used only if FileChooser::Mode is set to File.
- See also
- chooseFile(), filter(), setFilter().
Referenced by setFilter().
◆ mode
|
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(), gzip_utf8.GzipFile::writable(), and gzip_utf8.GzipFile::write().
The documentation for this class was generated from the following files:
- src/Gui/FileDialog.h
- src/Gui/FileDialog.cpp