]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiChanges.h
dc9b063503fc23101fed5073325591954d6d39b4
[lyx.git] / src / frontends / qt4 / GuiChanges.h
1 // -*- C++ -*-
2 /**
3  * \file GuiChanges.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  * \author Michael Gerz
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUICHANGES_H
14 #define GUICHANGES_H
15
16 #include "GuiDialog.h"
17 #include "ui_ChangesUi.h"
18 #include "support/docstring.h"
19
20
21 namespace lyx {
22 namespace frontend {
23
24 class GuiChanges : public GuiDialog, public Ui::ChangesUi, public Controller
25 {
26         Q_OBJECT
27
28 public:
29         GuiChanges(LyXView & lv);
30
31 protected Q_SLOTS:
32         /// accept the current change
33         void acceptChange();
34         /// reject the current change
35         void rejectChange();
36         /// find the next change and highlight it
37         void nextChange();
38
39 private:
40         void closeEvent(QCloseEvent * e);
41         Controller & controller() { return *this; }
42         void updateContents();
43
44         /// Nothing to initialise in this case.
45         bool initialiseParams(std::string const &) { return true; }
46         ///
47         void clearParams() {}
48         ///
49         void dispatchParams() {}
50         ///
51         bool isBufferDependent() const { return true; }
52         /// always true since dispatchParams() is empty
53         bool canApply() const { return true; }
54
55         /// return date of change
56         docstring changeDate() const;
57         /// return author of change
58         docstring changeAuthor() const;
59 };
60
61 } // namespace frontend
62 } // namespace lyx
63
64 #endif // GUICHANGES_H