4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Jürgen Spitzmüller
9 * Full author contact details are available in file CREDITS.
15 #include "GuiDialog.h"
16 #include "FancyLineEdit.h"
17 #include "ui_LyXFilesUi.h"
25 class GuiLyXFiles : public GuiDialog, public Ui::LyXFilesUi
30 GuiLyXFiles(GuiView & lv);
31 /// A way to pass params to the dialog directly
32 void passParams(std::string const & data);
33 /// A way to pass params to the dialog directly
34 void selectItem(QString const & item);
36 void fileSelected(QString const file);
39 void fileSelectionChanged();
40 void on_fileTypeCO_activated(int);
41 void on_languageCO_activated(int);
42 void on_filesLW_itemDoubleClicked(QTreeWidgetItem *, int);
43 void on_filesLW_itemClicked(QTreeWidgetItem *, int);
44 void on_browsePB_pressed();
45 void slotButtonBox(QAbstractButton *);
51 bool isValid() override;
53 void applyView() override;
55 void updateContents() override;
58 bool initialiseParams(std::string const & data) override;
60 void paramsToDialog();
62 void clearParams() override {}
64 void dispatchParams() override;
66 bool isBufferDependent() const override { return false; }
68 FuncCode getLfun() const override;
70 QString const getSuffix();
72 bool translateName() const;
74 QMap<QString, QString> getFiles();
75 /// Get the full file path in the selected localization
76 QString const getRealPath(QString relpath = QString());
81 /// contains the search box
82 FancyLineEdit * filter_;
87 /// All languages (code, guiname)
88 QMap<QString, QString> all_languages_;
89 /// Languages available for files (code. guiname)
90 QMap<QString, QString> available_languages_;
92 typedef QMap<QString, QMap<QString, QString>> localizationsMap;
94 localizationsMap localizations_;
95 /// Possible GUI language representations
96 std::vector<std::string> guilangs_;
97 /// The real GUI lang as stored in available_languages_
99 /// The last used language
103 } // namespace frontend
106 #endif // GUILYXFILES_H