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 typedef std::pair<FileDialog::ResultType, QStringList> Results;
48 * Constructs a file dialog with title \param title.
50 * Up to two optional extra buttons are allowed for specifying
51 * additional directories in the navigation (an empty
52 * directory is interpreted as FileName::getcwd())
54 FileDialog(QString const & title);
58 void setButton1(QString const & label, QString const & dir);
59 void setButton2(QString const & label, QString const & dir);
61 /// Choose a file for opening, starting in directory \c path.
62 Result open(QString const & path, QStringList const & filters,
63 QString const & suggested = QString());
64 /// Choose several files for opening, starting in directory \c path.
65 Results openMulti(QString const & path, QStringList const & filters,
66 QString const & suggested = QString(), bool multi = true);
68 /// Choose a directory, starting in directory \c path.
69 Result opendir(QString const & path = QString(),
70 QString const & suggested = QString());
72 /// Choose a file for saving, starting in directory \c path.
73 Result save(QString const & path, QStringList const & filters,
74 QString const & suggested = QString());
76 /// Also retrieve the selected filter (selectedFilter can be 0 if
77 /// that output is not needed).
78 Result save(QString const & path, QStringList const & filters,
79 QString const & suggested, QString *selectedFilter);
93 #endif // FILEDIALOG_H