2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiLog.h
|
2006-03-05 17:24:44 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author John Levon
|
2007-10-06 11:45:53 +00:00
|
|
|
* \author Angus Leeming
|
2006-03-05 17:24:44 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
#ifndef GUILOG_H
|
|
|
|
#define GUILOG_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
#include "GuiDialog.h"
|
2007-08-11 15:48:15 +00:00
|
|
|
#include "ui_LogUi.h"
|
2007-04-24 19:37:34 +00:00
|
|
|
|
2007-10-06 11:45:53 +00:00
|
|
|
#include "support/FileName.h"
|
|
|
|
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2007-04-24 19:37:34 +00:00
|
|
|
class LogHighlighter;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-10-09 19:34:27 +00:00
|
|
|
class GuiLog : public GuiDialog, public Ui::LogUi
|
2006-03-05 17:24:44 +00:00
|
|
|
{
|
2007-09-05 20:33:29 +00:00
|
|
|
Q_OBJECT
|
2007-10-06 11:45:53 +00:00
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
public:
|
2007-11-23 09:44:02 +00:00
|
|
|
GuiLog(GuiView & lv);
|
2007-10-06 11:45:53 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
private Q_SLOTS:
|
2007-10-06 11:45:53 +00:00
|
|
|
void updateContents();
|
2007-10-11 18:15:30 +00:00
|
|
|
// copy log to clipboard
|
|
|
|
void on_copyPB_clicked();
|
2007-10-06 11:45:53 +00:00
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
private:
|
|
|
|
/// Apply changes
|
2007-09-05 20:33:29 +00:00
|
|
|
void applyView() {}
|
|
|
|
|
2007-03-26 04:25:49 +00:00
|
|
|
/// log syntax highlighter
|
2007-04-24 19:37:34 +00:00
|
|
|
LogHighlighter * highlighter;
|
2007-10-06 11:45:53 +00:00
|
|
|
|
|
|
|
/** \param data should contain "<logtype> <logfile>"
|
|
|
|
* where <logtype> is one of "latex", "literate", "lyx2lyx", "vc".
|
|
|
|
*/
|
|
|
|
bool initialiseParams(std::string const & data);
|
|
|
|
///
|
|
|
|
void clearParams();
|
|
|
|
///
|
|
|
|
void dispatchParams() {}
|
|
|
|
///
|
|
|
|
bool isBufferDependent() const { return true; }
|
|
|
|
|
|
|
|
/// The title displayed by the dialog reflects the \c LogType
|
|
|
|
docstring title() const;
|
|
|
|
/// put the log file into the ostream
|
|
|
|
void getContents(std::ostream & ss) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
/// Recognized log file-types
|
|
|
|
enum LogType {
|
|
|
|
LatexLog,
|
|
|
|
LiterateLog,
|
|
|
|
Lyx2lyxLog,
|
|
|
|
VCLog
|
|
|
|
};
|
|
|
|
|
|
|
|
LogType type_;
|
|
|
|
support::FileName logfile_;
|
2007-03-26 04:25:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-10-06 11:45:53 +00:00
|
|
|
#endif // GUILOG_H
|