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 FileDialog(FileDialog const &);
30 void operator=(FileDialog const &);
32 /// label, directory path button
33 typedef std::pair<QString, QString> Button;
37 Later, /**< modeless chooser, no result */
38 Chosen /**< string contains filename */
42 typedef std::pair<FileDialog::ResultType, QString> Result;
45 * Constructs a file dialog with title \param title.
47 * Up to two optional extra buttons are allowed for specifying
48 * additional directories in the navigation (an empty
49 * directory is interpreted as FileName::getcwd())
51 FileDialog(QString const & title);
55 void setButton1(QString const & label, QString const & dir);
56 void setButton2(QString const & label, QString const & dir);
58 /// Choose a file for opening, starting in directory \c path.
59 Result open(QString const & path, QStringList const & filters,
60 QString const & suggested = QString());
62 /// Choose a directory, starting in directory \c path.
63 Result opendir(QString const & path = QString(),
64 QString const & suggested = QString());
66 /// Choose a file for saving, starting in directory \c path.
67 Result save(QString const & path, QStringList const & filters,
68 QString const & suggested = QString());
70 /// Also retrieve the selected filter (selectedFilter can be 0 if
71 /// that output is not needed).
72 Result save(QString const & path, QStringList const & filters,
73 QString const & suggested, QString *selectedFilter);
87 #endif // FILEDIALOG_H