]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QInclude.h
delete unneeded Menubar virtual interface.
[lyx.git] / src / frontends / qt4 / QInclude.h
1 // -*- C++ -*-
2 /**
3  * \file QInclude.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 QINCLUDE_H
13 #define QINCLUDE_H
14
15 #include "QDialogView.h"
16
17 #include "ui_IncludeUi.h"
18
19 #include <QDialog>
20
21 namespace lyx {
22 namespace frontend {
23
24 class QInclude;
25
26 class QIncludeDialog : public QDialog, public Ui::QIncludeUi {
27         Q_OBJECT
28 public:
29         QIncludeDialog(QInclude * form);
30
31         void updateLists();
32
33         virtual void show();
34         /// validate listings parameters and return an error message, if any
35         docstring validate_listings_params();
36 protected Q_SLOTS:
37         virtual void change_adaptor();
38         virtual void editClicked();
39         virtual void browseClicked();
40         virtual void typeChanged(int v);
41         /// AFAIK, QValidator only works for QLineEdit so
42         /// I have to validate listingsED (QTextEdit) manually.
43         /// This function displays a hint or error message returned by
44         /// validate_listings_params
45         void set_listings_msg();
46 protected:
47         virtual void closeEvent(QCloseEvent * e);
48 private:
49         QInclude * form_;
50 };
51
52
53 class ControlInclude;
54
55 ///
56 class QInclude : public QController<ControlInclude, QView<QIncludeDialog> >
57 {
58 public:
59         ///
60         friend class QIncludeDialog;
61         ///
62         QInclude(Dialog &);
63 protected:
64         virtual bool isValid();
65 private:
66         /// Apply changes
67         virtual void apply();
68         /// update
69         virtual void update_contents();
70         /// build the dialog
71         virtual void build_dialog();
72
73         /// edit the child document, .lyx file will be opened in lyx
74         /// other formats will be edited by external applications.
75         void edit();
76
77         /// browse for a file
78         void browse();
79 };
80
81 } // namespace frontend
82 } // namespace lyx
83
84 #endif // QINCLUDE_H