casa
$Rev:20696$
|
Subclass of QFileDialog with additional functionality. More...
#include <QtFileDialog.qo.h>
Public Slots | |
void | accept () |
Overrides QFileDialog::accept(). | |
Public Member Functions | |
QtFileDialog (QWidget *parent, Qt::WindowFlags flags) | |
Non-Static //. | |
QtFileDialog (QWidget *parent=NULL, const QString &caption=QString(), const QString &directory=lastDirectory(), const QString &filter=QString()) | |
~QtFileDialog () | |
Destructor. | |
Static Public Member Functions | |
static QString | qgetExistingDir (QWidget *parent=NULL, const QString &caption=QString(), const QString &directory=lastDirectory(), int histLimit=historyLimit()) |
Static //. | |
static 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. | |
static 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. | |
static 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. | |
static void | setNextDirectory (const QString &directory) |
static int | historyLimit () |
Gets/Sets the limit for the history size used by a QtFileDialog. | |
static void | setHistoryLimit (int limit) |
Private Slots | |
void | timeout () |
Signal for timer timeout. | |
Private Member Functions | |
void | initialize () |
To be called from the constructors. | |
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. | |
Private Attributes | |
QLabel * | chosenLabel |
Label to display the currently chosen file(s). | |
QTimer * | timer |
Timer. | |
Static Private Attributes | |
static QString | lastDirectory_ |
Static //. | |
static int | historyLimit_ |
Set history limit. |
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 52 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() |
||
) |
Destructor.
void casa::QtFileDialog::accept | ( | ) | [slot] |
Overrides QFileDialog::accept().
static String casa::QtFileDialog::getAnyFile | ( | QWidget * | parent = NULL , |
const QString & | caption = QString() , |
||
const QString & | directory = lastDirectory() , |
||
const QString & | filter = QString() , |
||
int | histLimit = historyLimit() |
||
) | [inline, static] |
Definition at line 102 of file QtFileDialog.qo.h.
static String casa::QtFileDialog::getExistingDir | ( | QWidget * | parent = NULL , |
const QString & | caption = QString() , |
||
const QString & | directory = lastDirectory() , |
||
int | histLimit = historyLimit() |
||
) | [inline, static] |
Definition at line 67 of file QtFileDialog.qo.h.
static String casa::QtFileDialog::getExistingFile | ( | QWidget * | parent = NULL , |
const QString & | caption = QString() , |
||
const QString & | directory = lastDirectory() , |
||
const QString & | filter = QString() , |
||
int | histLimit = historyLimit() |
||
) | [inline, static] |
Definition at line 85 of file QtFileDialog.qo.h.
static int casa::QtFileDialog::historyLimit | ( | ) | [static] |
Gets/Sets the limit for the history size used by a QtFileDialog.
-1 means it is not managed, which is the default.
void casa::QtFileDialog::initialize | ( | ) | [private] |
To be called from the constructors.
static const QString& casa::QtFileDialog::lastDirectory | ( | ) | [static] |
Gets/Sets the last directory to be used by a QtFileDialog.
Blank means the current directory, which is the default.
static QString casa::QtFileDialog::qgetAnyFile | ( | QWidget * | parent = NULL , |
const QString & | caption = QString() , |
||
const QString & | directory = lastDirectory() , |
||
const QString & | = QString() , |
||
int | histLimit = historyLimit() |
||
) | [inline, static] |
Returns a new filename using the given optional parent, caption, starting directory, and filter parameters.
See QFileDialog.
Definition at line 96 of file QtFileDialog.qo.h.
static QString casa::QtFileDialog::qgetExistingDir | ( | QWidget * | parent = NULL , |
const QString & | caption = QString() , |
||
const QString & | directory = lastDirectory() , |
||
int | histLimit = historyLimit() |
||
) | [inline, static] |
Static //.
Returns an existing directory using the given optional parent, caption, and starting directory parameters. See QFileDialog.
Definition at line 61 of file QtFileDialog.qo.h.
static QString casa::QtFileDialog::qgetExistingFile | ( | QWidget * | parent = NULL , |
const QString & | caption = QString() , |
||
const QString & | directory = lastDirectory() , |
||
const QString & | filter = QString() , |
||
int | histLimit = historyLimit() |
||
) | [inline, static] |
Returns an existing file using the given optional parent, caption, starting directory, and filter parameters.
See QFileDialog.
Definition at line 78 of file QtFileDialog.qo.h.
static QString casa::QtFileDialog::qgetHelper | ( | AcceptMode | acceptMode, |
FileMode | fileMode, | ||
QWidget * | parent, | ||
const QString & | caption, | ||
const QString & | directory, | ||
const QString & | filter, | ||
int | histLimit | ||
) | [static, private] |
Helper method for the static qget* functions.
static void casa::QtFileDialog::setHistoryLimit | ( | int | limit | ) | [static] |
static void casa::QtFileDialog::setNextDirectory | ( | const QString & | directory | ) | [static] |
void casa::QtFileDialog::timeout | ( | ) | [private, slot] |
Signal for timer timeout.
QLabel* casa::QtFileDialog::chosenLabel [private] |
Label to display the currently chosen file(s).
Definition at line 144 of file QtFileDialog.qo.h.
int casa::QtFileDialog::historyLimit_ [static, private] |
Set history limit.
Definition at line 160 of file QtFileDialog.qo.h.
QString casa::QtFileDialog::lastDirectory_ [static, private] |
QTimer* casa::QtFileDialog::timer [private] |
Definition at line 147 of file QtFileDialog.qo.h.