]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiInclude.h
cosmetics
[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();
44         ///
45         void updateLists();
46         /// validate listings parameters and return an error message, if any
47         docstring validate_listings_params();
48
49         ///
50         bool isValid();
51         /// Apply changes
52         void applyView();
53         /// update
54         void updateContents();
55         /// edit the child document, .lyx file will be opened in lyx
56         /// other formats will be edited by external applications.
57         void edit();
58         /// browse for a file
59         void browse();
60 };
61
62 } // namespace frontend
63 } // namespace lyx
64
65 #endif // GUIINCLUDE_H