]> git.lyx.org Git - lyx.git/blob - src/frontends/qt/GuiLyXFiles.h
Remove obsolete (and false) comment.
[lyx.git] / src / frontends / qt / GuiLyXFiles.h
1 // -*- C++ -*-
2 /**
3  * \file GuiLyXFiles.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jürgen Spitzmüller
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUILYXFILES_H
13 #define GUILYXFILES_H
14
15 #include "GuiDialog.h"
16 #include "FancyLineEdit.h"
17 #include "ui_LyXFilesUi.h"
18
19 #include <vector>
20
21 class QListWidgetItem;
22
23 namespace lyx {
24
25 class Format;
26
27 namespace frontend {
28
29 class GuiLyXFiles : public GuiDialog, public Ui::LyXFilesUi
30 {
31         Q_OBJECT
32
33 public:
34         GuiLyXFiles(GuiView & lv);
35         /// A way to pass params to the dialog directly
36         void passParams(std::string const & data);
37         /// A way to pass params to the dialog directly
38         void selectItem(QString const item);
39 Q_SIGNALS:
40         void fileSelected(QString const file);
41
42 private Q_SLOTS:
43         void changed_adaptor();
44         void on_fileTypeCO_activated(int);
45         void on_languageCO_activated(int);
46         void on_filesLW_itemDoubleClicked(QTreeWidgetItem *, int);
47         void on_filesLW_itemClicked(QTreeWidgetItem *, int);
48         void on_browsePB_pressed();
49         void slotButtonBox(QAbstractButton *);
50         void filterLabels();
51         void resetFilter();
52
53 private:
54         ///
55         bool isValid();
56         /// Apply from dialog
57         void applyView();
58         /// Update the dialog
59         void updateContents();
60
61         ///
62         bool initialiseParams(std::string const & data);
63         ///
64         void paramsToDialog();
65         ///
66         void clearParams() {}
67         ///
68         void dispatchParams();
69         ///
70         bool isBufferDependent() const { return false; }
71         ///
72         FuncCode getLfun() const;
73         ///
74         QString const getSuffix();
75         ///
76         bool translateName() const;
77         ///
78         QMap<QString, QString> getFiles();
79         /// Get the full file path in the selected localization
80         QString const getRealPath(QString relpath = QString());
81         ///
82         void setLanguage();
83
84 private:
85         /// contains the search box
86         FancyLineEdit * filter_;
87         ///
88         QString type_;
89         ///
90         QString file_;
91         /// All languages (code, guiname)
92         QMap<QString, QString> all_languages_;
93         /// Languages available for files (code. guiname)
94         QMap<QString, QString> available_languages_;
95         ///
96         typedef QMap<QString, QMap<QString, QString>> localizationsMap;
97         ///
98         localizationsMap localizations_;
99         /// Possible GUI language representations
100         std::vector<std::string> guilangs_;
101         /// The real GUI lang as stored in available_languages_
102         QString guilang_;
103         /// The last used language
104         QString savelang_;
105 };
106
107 } // namespace frontend
108 } // namespace lyx
109
110 #endif // GUILYXFILES_H