]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiLyXFiles.h
GuiLyXFiles: minor generalization
[lyx.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 class QListWidgetItem;
20
21 namespace lyx {
22
23 class Format;
24
25 namespace frontend {
26
27 class GuiLyXFiles : public GuiDialog, public Ui::LyXFilesUi
28 {
29         Q_OBJECT
30
31 public:
32         GuiLyXFiles(GuiView & lv);
33
34 private Q_SLOTS:
35         void changed_adaptor();
36         void on_fileTypeCO_activated(int);
37         void on_filesLW_itemDoubleClicked(QTreeWidgetItem *, int);
38         void on_browsePB_pressed();
39         void slotButtonBox(QAbstractButton *);
40         void filterLabels();
41         void resetFilter();
42
43 private:
44         ///
45         bool isValid();
46         /// Apply from dialog
47         void applyView();
48         /// Update the dialog
49         void updateContents();
50
51         ///
52         bool initialiseParams(std::string const & data);
53         ///
54         void paramsToDialog(QString const & command);
55         ///
56         void clearParams() {}
57         ///
58         void dispatchParams();
59         ///
60         bool isBufferDependent() const { return false; }
61         ///
62         FuncCode getLfun() const;
63         ///
64         QString const getSuffix();
65         ///
66         void getFiles(QMap<QString, QString> &, QString const);
67
68 private:
69         /// contains the search box
70         FancyLineEdit * filter_;
71         ///
72         QString type_;
73         ///
74         QString file_;
75 };
76
77 } // namespace frontend
78 } // namespace lyx
79
80 #endif // GUILYXFILES_H