]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QChanges.h
* src/frontends/qt4/ui/TextLayoutUi.ui:
[lyx.git] / src / frontends / qt4 / QChanges.h
1 // -*- C++ -*-
2 /**
3  * \file QChanges.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 QCHANGES_H
13 #define QCHANGES_H
14
15 #include "QDialogView.h"
16 #include "ui/ChangesUi.h"
17 #include <QCloseEvent>
18 #include <QDialog>
19
20 namespace lyx {
21 namespace frontend {
22
23 class QChanges;
24
25 class QChangesDialog : public QDialog, public Ui::QChangesUi {
26         Q_OBJECT
27 public:
28
29         QChangesDialog(QChanges * form);
30
31 protected Q_SLOTS:
32
33         virtual void nextPressed();
34         virtual void acceptPressed();
35         virtual void rejectPressed();
36
37 protected:
38         virtual void closeEvent(QCloseEvent * e);
39
40 private:
41         QChanges * form_;
42 };
43
44 class ControlChanges;
45
46 class QChanges
47         : public QController<ControlChanges, QView<QChangesDialog> >
48 {
49 public:
50         friend class QChangesDialog;
51
52         QChanges(Dialog &);
53
54         void accept();
55
56         void reject();
57
58         void next();
59
60 private:
61         /// Apply changes
62         virtual void apply() {};
63         /// update
64         virtual void update_contents();
65         /// build the dialog
66         virtual void build_dialog();
67 };
68
69 } // namespace frontend
70 } // namespace lyx
71
72 #endif // QCHANGES_H