4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS.
24 * \brief GUI-I definition of file dialog interface
29 /// label, directory path button
30 typedef std::pair<QString, QString> Button;
34 Later, /**< modeless chooser, no result */
35 Chosen /**< string contains filename */
39 typedef std::pair<FileDialog::ResultType, QString> Result;
42 * Constructs a file dialog with title \param title.
44 * Up to two optional extra buttons are allowed for specifying
45 * additional directories in the navigation (an empty
46 * directory is interpreted as FileName::getcwd())
48 FileDialog(QString const & title);
52 void setButton1(QString const & label, QString const & dir);
53 void setButton2(QString const & label, QString const & dir);
55 /// Choose a file for opening, starting in directory \c path.
56 Result open(QString const & path, QStringList const & filters,
57 QString const & suggested = QString());
59 /// Choose a directory, starting in directory \c path.
60 Result opendir(QString const & path = QString(),
61 QString const & suggested = QString());
63 /// Choose a file for saving, starting in directory \c path.
64 Result save(QString const & path, QStringList const & filters,
65 QString const & suggested = QString());
67 /// Also retrieve the selected filter (selectedFilter can be 0 if
68 /// that output is not needed).
69 Result save(QString const & path, QStringList const & filters,
70 QString const & suggested, QString *selectedFilter);
84 #endif // FILEDIALOG_H