]> git.lyx.org Git - features.git/blob - src/frontends/qt4/GuiLyXFiles.h
Compilation fix
[features.git] / src / frontends / qt4 / 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
36 private Q_SLOTS:
37         void changed_adaptor();
38         void on_fileTypeCO_activated(int);
39         void on_languageCO_activated(int);
40         void on_filesLW_itemDoubleClicked(QTreeWidgetItem *, int);
41         void on_filesLW_itemClicked(QTreeWidgetItem *, int);
42         void on_browsePB_pressed();
43         void slotButtonBox(QAbstractButton *);
44         void filterLabels();
45         void resetFilter();
46
47 private:
48         ///
49         bool isValid();
50         /// Apply from dialog
51         void applyView();
52         /// Update the dialog
53         void updateContents();
54
55         ///
56         bool initialiseParams(std::string const & data);
57         ///
58         void paramsToDialog();
59         ///
60         void clearParams() {}
61         ///
62         void dispatchParams();
63         ///
64         bool isBufferDependent() const { return false; }
65         ///
66         FuncCode getLfun() const;
67         ///
68         QString const getSuffix();
69         ///
70         bool translateName() const;
71         ///
72         void getFiles(QMap<QString, QString> &, QString const);
73         /// Get the full file path in the selected localization
74         QString const getRealPath();
75
76 private:
77         /// contains the search box
78         FancyLineEdit * filter_;
79         ///
80         QString type_;
81         ///
82         QString file_;
83         /// All languages (code, guiname)
84         QMap<QString, QString> all_languages_;
85         /// Languages available for files (code. guiname)
86         QMap<QString, QString> available_languages_;
87         ///
88         typedef QMap<QString, QMap<QString, QString>> localizationsMap;
89         ///
90         localizationsMap localizations_;
91         /// Possible GUI language representations
92         std::vector<std::string> guilangs_;
93         /// The real GUI lang as stored in available_languages_
94         QString guilang_;
95         /// The last used language
96         QString savelang_;
97 };
98
99 } // namespace frontend
100 } // namespace lyx
101
102 #endif // GUILYXFILES_H