]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiLog.h
3e4de5abbb6ff6b910c71b0241ec35bd99b8c34e
[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(GuiView & lv);
33
34 private Q_SLOTS:
35         void updateContents();
36         // copy log to clipboard
37         void on_copyPB_clicked();
38
39 private:
40         void closeEvent(QCloseEvent * e);
41         /// Apply changes
42         void applyView() {}
43
44         /// log syntax highlighter
45         LogHighlighter * highlighter;
46
47         /** \param data should contain "<logtype> <logfile>"
48          *  where <logtype> is one of "latex", "literate", "lyx2lyx", "vc".
49          */
50         bool initialiseParams(std::string const & data);
51         ///
52         void clearParams();
53         ///
54         void dispatchParams() {}
55         ///
56         bool isBufferDependent() const { return true; }
57
58         /// The title displayed by the dialog reflects the \c LogType
59         docstring title() const;
60         /// put the log file into the ostream
61         void getContents(std::ostream & ss) const;
62
63 private:
64         /// Recognized log file-types
65         enum LogType {
66                 LatexLog,
67                 LiterateLog,
68                 Lyx2lyxLog,
69                 VCLog
70         };
71
72         LogType type_;
73         support::FileName logfile_;
74 };
75
76
77 } // namespace frontend
78 } // namespace lyx
79
80 #endif // GUILOG_H