CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
ctkFileDialog Class Reference

#include <Libs/Widgets/ctkFileDialog.h>

Inheritance diagram for ctkFileDialog:
Inheritance graph
[legend]
Collaboration diagram for ctkFileDialog:
Collaboration graph
[legend]

Public Types

typedef QFileDialog Superclass
 

Public Slots

void setAcceptButtonEnable (bool enable)
 

Signals

void fileSelectionChanged (const QStringList &selected)
 

Public Member Functions

Q_INVOKABLE QWidget * bottomWidget () const
 Return the extra widget if any. More...
 
 ctkFileDialog (QWidget *parent=0, const QString &caption=QString(), const QString &directory=QString(), const QString &filter=QString())
 
bool eventFilter (QObject *obj, QEvent *event)
 Internally used. More...
 
Q_INVOKABLE void setBottomWidget (QWidget *widget, const QString &label=QString())
 
virtual ~ctkFileDialog ()
 

Protected Slots

void onSelectionChanged ()
 

Protected Member Functions

virtual void accept ()
 Reimplemented to override the return key behavior. More...
 

Protected Attributes

QScopedPointer< ctkFileDialogPrivate > d_ptr
 

Detailed Description

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:

Definition at line 41 of file ctkFileDialog.h.

Member Typedef Documentation

◆ Superclass

typedef QFileDialog ctkFileDialog::Superclass

Definition at line 47 of file ctkFileDialog.h.

Constructor & Destructor Documentation

◆ 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

Member Function Documentation

◆ 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.

◆ eventFilter()

bool ctkFileDialog::eventFilter ( QObject *  obj,
QEvent *  event 
)

Internally used.

◆ 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

◆ 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

Member Data Documentation

◆ d_ptr

QScopedPointer<ctkFileDialogPrivate> ctkFileDialog::d_ptr
protected

Definition at line 84 of file ctkFileDialog.h.


The documentation for this class was generated from the following file: