]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiLog.h
8305e72aeb55a0e6392b0426cf243013e7c486a0
[lyx.git] / src / frontends / qt4 / GuiLog.h
1 // -*- C++ -*-
2 /**
3  * \file GuiLog.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 Angus Leeming
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUILOG_H
14 #define GUILOG_H
15
16 #include "GuiDialog.h"
17 #include "ui_LogUi.h"
18
19 #include "support/FileName.h"
20
21
22 namespace lyx {
23 namespace frontend {
24
25 class LogHighlighter;
26
27 class GuiLog : public GuiDialog, public Ui::LogUi
28 {
29         Q_OBJECT
30
31 public:
32         GuiLog(LyXView & lv);
33
34 private Q_SLOTS:
35         void updateContents();
36
37 private:
38         void closeEvent(QCloseEvent * e);
39         /// Apply changes
40         void applyView() {}
41
42         /// log syntax highlighter
43         LogHighlighter * highlighter;
44
45         /** \param data should contain "<logtype> <logfile>"
46          *  where <logtype> is one of "latex", "literate", "lyx2lyx", "vc".
47          */
48         bool initialiseParams(std::string const & data);
49         ///
50         void clearParams();
51         ///
52         void dispatchParams() {}
53         ///
54         bool isBufferDependent() const { return true; }
55
56         /// The title displayed by the dialog reflects the \c LogType
57         docstring title() const;
58         /// put the log file into the ostream
59         void getContents(std::ostream & ss) const;
60
61 private:
62         /// Recognized log file-types
63         enum LogType {
64                 LatexLog,
65                 LiterateLog,
66                 Lyx2lyxLog,
67                 VCLog
68         };
69
70         LogType type_;
71         support::FileName logfile_;
72 };
73
74
75 } // namespace frontend
76 } // namespace lyx
77
78 #endif // GUILOG_H