casa
5.7.0-16
|
Subclass of QFileDialog with additional functionality. More...
#include <QtFileDialog.qo.h>
Public Slots | |
void | accept () |
Overrides QFileDialog::accept(). More... | |
Public Member Functions | |
QtFileDialog (QWidget *parent, Qt::WindowFlags flags) | |
Non-Static //. More... | |
QtFileDialog (QWidget *parent=NULL, const QString &caption=QString(), const QString &directory=lastDirectory(), const QString &filter=QString()) | |
~QtFileDialog () | |
Destructor. More... | |
Static Public Member Functions | |
static QString | qgetExistingDir (QWidget *parent=NULL, const QString &caption=QString(), const QString &directory=lastDirectory(), int histLimit=historyLimit()) |
Static //. More... | |
static casacore::String | getExistingDir (QWidget *parent=NULL, const QString &caption=QString(), const QString &directory=lastDirectory(), int histLimit=historyLimit()) |
static QString | qgetExistingFile (QWidget *parent=NULL, const QString &caption=QString(), const QString &directory=lastDirectory(), const QString &filter=QString(), int histLimit=historyLimit()) |
Returns an existing file using the given optional parent, caption, starting directory, and filter parameters. More... | |
static casacore::String | getExistingFile (QWidget *parent=NULL, const QString &caption=QString(), const QString &directory=lastDirectory(), const QString &filter=QString(), int histLimit=historyLimit()) |
static QString | qgetAnyFile (QWidget *parent=NULL, const QString &caption=QString(), const QString &directory=lastDirectory(), const QString &=QString(), int histLimit=historyLimit()) |
Returns a new filename using the given optional parent, caption, starting directory, and filter parameters. More... | |
static casacore::String | getAnyFile (QWidget *parent=NULL, const QString &caption=QString(), const QString &directory=lastDirectory(), const QString &filter=QString(), int histLimit=historyLimit()) |
static const QString & | lastDirectory () |
Gets/Sets the last directory to be used by a QtFileDialog. More... | |
static void | setNextDirectory (const QString &directory) |
static int | historyLimit () |
Gets/Sets the limit for the history size used by a QtFileDialog. More... | |
static void | setHistoryLimit (int limit) |
Private Slots | |
void | timeout () |
Signal for timer timeout. More... | |
Private Member Functions | |
void | initialize () |
To be called from the constructors. More... | |
Static Private Member Functions | |
static QString | qgetHelper (AcceptMode acceptMode, FileMode fileMode, QWidget *parent, const QString &caption, const QString &directory, const QString &filter, int histLimit) |
Helper method for the static qget* functions. More... | |
Private Attributes | |
QLabel * | chosenLabel |
Label to display the currently chosen file(s). More... | |
QTimer * | timer |
Timer. More... | |
Static Private Attributes | |
static QString | lastDirectory_ |
Static //. More... | |
static int | historyLimit_ |
Set history limit. More... | |
Subclass of QFileDialog with additional functionality.
IMPORTANT: This class needs to be checked when the Qt version changes! Specifically: 1) The label at the bottom assumes that the layout is a QGridLayout, where the first column is for a label and the rest can be used for a widget. 2) As of Qt 4.3.4, the QFileDialog::filesSelected() signal is NOT emitted whenever the selection changes, but only when the selection is finalized. Because we're using a label to keep track of the current selection, this class uses a timer to update the label at a set time to the current selection. This is slightly inefficient, but there's no better way to do it without making our own file chooser dialog.
Definition at line 49 of file QtFileDialog.qo.h.
casa::QtFileDialog::QtFileDialog | ( | QWidget * | parent, |
Qt::WindowFlags | flags | ||
) |
Non-Static //.
See QFileDialog constructors.
casa::QtFileDialog::QtFileDialog | ( | QWidget * | parent = NULL , |
const QString & | caption = QString() , |
||
const QString & | directory = lastDirectory() , |
||
const QString & | filter = QString() |
||
) |
casa::QtFileDialog::~QtFileDialog | ( | ) |
Destructor.
|
slot |
Overrides QFileDialog::accept().
|
inlinestatic |
Definition at line 99 of file QtFileDialog.qo.h.
References casacore::filter(), and qgetAnyFile().
|
inlinestatic |
Definition at line 64 of file QtFileDialog.qo.h.
References qgetExistingDir().
|
inlinestatic |
Definition at line 82 of file QtFileDialog.qo.h.
References casacore::filter(), and qgetExistingFile().
|
static |
Gets/Sets the limit for the history size used by a QtFileDialog.
-1 means it is not managed, which is the default.
|
private |
To be called from the constructors.
|
static |
Gets/Sets the last directory to be used by a QtFileDialog.
Blank means the current directory, which is the default.
|
inlinestatic |
Returns a new filename using the given optional parent, caption, starting directory, and filter parameters.
See QFileDialog.
Definition at line 93 of file QtFileDialog.qo.h.
References qgetHelper().
Referenced by getAnyFile().
|
inlinestatic |
Static //.
Returns an existing directory using the given optional parent, caption, and starting directory parameters. See QFileDialog.
Definition at line 58 of file QtFileDialog.qo.h.
References qgetHelper().
Referenced by getExistingDir().
|
inlinestatic |
Returns an existing file using the given optional parent, caption, starting directory, and filter parameters.
See QFileDialog.
Definition at line 75 of file QtFileDialog.qo.h.
References casacore::filter(), and qgetHelper().
Referenced by getExistingFile().
|
staticprivate |
Helper method for the static qget* functions.
Referenced by qgetAnyFile(), qgetExistingDir(), and qgetExistingFile().
|
static |
|
static |
|
privateslot |
Signal for timer timeout.
|
private |
Label to display the currently chosen file(s).
Definition at line 141 of file QtFileDialog.qo.h.
|
staticprivate |
Set history limit.
Definition at line 157 of file QtFileDialog.qo.h.
|
staticprivate |
|
private |
Timer.
Definition at line 144 of file QtFileDialog.qo.h.