#include <Libs/Widgets/ctkFileDialog.h>
|
virtual void | accept () |
| Reimplemented to override the return key behavior. More...
|
|
|
QScopedPointer< ctkFileDialogPrivate > | d_ptr |
|
Customizable QFileDialog. An extra widget can be added at the bottom of the dialog under the file format combobox. The Accept button is also controllable using setAcceptButtonEnable(). The behavior of the "return" key is the following:
- it selects the directory written in the line edit or it
- it accepts the dialog if the directory is already selected.
Definition at line 42 of file ctkFileDialog.h.
◆ Superclass
◆ ctkFileDialog()
ctkFileDialog::ctkFileDialog |
( |
QWidget * |
parent = 0 , |
|
|
const QString & |
caption = QString() , |
|
|
const QString & |
directory = QString() , |
|
|
const QString & |
filter = QString() |
|
) |
| |
|
explicit |
Constructor By default, behaves like a QFileDialog
- See also
- QFileDialog()
◆ ~ctkFileDialog()
virtual ctkFileDialog::~ctkFileDialog |
( |
| ) |
|
|
virtual |
◆ accept()
virtual void ctkFileDialog::accept |
( |
| ) |
|
|
protectedvirtual |
Reimplemented to override the return key behavior.
◆ bottomWidget()
Q_INVOKABLE QWidget* ctkFileDialog::bottomWidget |
( |
| ) |
const |
Return the extra widget if any.
◆ clearSelection
void ctkFileDialog::clearSelection |
( |
| ) |
|
|
slot |
Deselect all selected directories or files.
◆ eventFilter()
bool ctkFileDialog::eventFilter |
( |
QObject * |
obj, |
|
|
QEvent * |
event |
|
) |
| |
◆ fileSelectionChanged
void ctkFileDialog::fileSelectionChanged |
( |
const QStringList & |
selected | ) |
|
|
signal |
Signals QFileDialog::file[s]Selected() are fired only when the Ok button is pressed, fileSelectionChanged(QStringList) is emitted when the selection is changed, not just when the dialog is accepted.
◆ onSelectionChanged
void ctkFileDialog::onSelectionChanged |
( |
| ) |
|
|
protectedslot |
◆ selectionMode()
QAbstractItemView::SelectionMode ctkFileDialog::selectionMode |
( |
| ) |
const |
◆ setAcceptButtonEnable
void ctkFileDialog::setAcceptButtonEnable |
( |
bool |
enable | ) |
|
|
slot |
Can be used to prevent the accept button to be enabled. It's typically a slot that can be connected to assure that the user doesn't accept the dialog if a value is not set in the extra bottom widget.
◆ setBottomWidget()
Q_INVOKABLE void ctkFileDialog::setBottomWidget |
( |
QWidget * |
widget, |
|
|
const QString & |
label = QString() |
|
) |
| |
Add an extra widget under the file format combobox. If a label is given, it will appear in the first column. The widget is reparented to ctkFileDialog
◆ setSelectionMode()
void ctkFileDialog::setSelectionMode |
( |
QAbstractItemView::SelectionMode |
mode | ) |
|
Set the selection mode the views operate in.
- Warning
- The selection mode must explicitly be set each time QFileDialog::setFileMode(FileMode mode) is invoked. This is required because the QFileDialog::setFileMode(FileMode mode) method is not virtual and it internally resets the selection mode.
- See also
- clearSelection()
◆ d_ptr
QScopedPointer<ctkFileDialogPrivate> ctkFileDialog::d_ptr |
|
protected |
◆ SelectionMode
QAbstractItemView::SelectionMode ctkFileDialog::SelectionMode |
|
readwrite |
The documentation for this class was generated from the following file: