]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QVCLog.C
namespace grfx -> lyx::graphics
[lyx.git] / src / frontends / qt2 / QVCLog.C
1 /**
2  * \file QVCLog.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon
7  *
8  * Full author contact details are available in file CREDITS
9  */
10
11 #include <config.h>
12
13
14 #include "Lsstream.h"
15 #include "qt_helpers.h"
16 #include "support/lstrings.h"
17 #include "LyXView.h"
18 #include "ControlVCLog.h"
19
20 #include "QVCLog.h"
21 #include "QVCLogDialog.h"
22 #include "Qt2BC.h"
23
24 #include <qtextview.h>
25 #include <qpushbutton.h>
26
27 #include "support/BoostFormat.h"
28
29 using namespace lyx::support;
30
31 typedef QController<ControlVCLog, QView<QVCLogDialog> > base_class;
32
33
34 QVCLog::QVCLog(Dialog & parent)
35         : base_class(parent, _("LyX: Version Control Log"))
36 {
37 }
38
39
40 void QVCLog::build_dialog()
41 {
42         dialog_.reset(new QVCLogDialog(this));
43
44         bcview().setCancel(dialog_->closePB);
45 }
46
47
48 void QVCLog::update_contents()
49 {
50         setTitle(bformat(_("Version control log for %1$s"),
51                          controller().getBufferFileName()));
52
53         dialog_->vclogTV->setText("");
54
55         ostringstream ss;
56         controller().getVCLogFile(ss);
57
58         dialog_->vclogTV->setText(toqstr(ss.str()));
59 }