]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiInclude.h
the fun begins....
[lyx.git] / src / frontends / qt4 / GuiInclude.h
1 // -*- C++ -*-
2 /**
3  * \file GuiInclude.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUIINCLUDE_H
13 #define GUIINCLUDE_H
14
15 #include "GuiDialog.h"
16 #include "ControlInclude.h"
17 #include "ui_IncludeUi.h"
18
19 namespace lyx {
20 namespace frontend {
21
22 class GuiIncludeDialog : public GuiDialog, public Ui::IncludeUi
23 {
24         Q_OBJECT
25
26 public:
27         GuiIncludeDialog(LyXView & lv);
28
29 private Q_SLOTS:
30         void change_adaptor();
31         void editClicked();
32         void browseClicked();
33         void typeChanged(int v);
34         /// AFAIK, QValidator only works for QLineEdit so
35         /// I have to validate listingsED (QTextEdit) manually.
36         /// This function displays a hint or error message returned by
37         /// validate_listings_params
38         void set_listings_msg();
39
40 private:
41         void closeEvent(QCloseEvent * e);
42         /// parent controller
43         ControlInclude & controller() const;
44         ///
45         void updateLists();
46         ///
47         void showView();
48         /// validate listings parameters and return an error message, if any
49         docstring validate_listings_params();
50
51         ///
52         bool isValid();
53         /// Apply changes
54         void applyView();
55         /// update
56         void update_contents();
57         /// edit the child document, .lyx file will be opened in lyx
58         /// other formats will be edited by external applications.
59         void edit();
60         /// browse for a file
61         void browse();
62 };
63
64 } // namespace frontend
65 } // namespace lyx
66
67 #endif // GUIINCLUDE_H