]> git.lyx.org Git - features.git/blob - src/frontends/qt2/QVCLog.C
Replace LString.h with support/std_string.h,
[features.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 "support/std_sstream.h"
15 #include "qt_helpers.h"
16 #include "support/lstrings.h"
17 #include "ControlVCLog.h"
18
19 #include "QVCLog.h"
20 #include "QVCLogDialog.h"
21 #include "Qt2BC.h"
22
23 #include <qtextview.h>
24 #include <qpushbutton.h>
25
26
27 using namespace lyx::support;
28
29 typedef QController<ControlVCLog, QView<QVCLogDialog> > base_class;
30
31
32 QVCLog::QVCLog(Dialog & parent)
33         : base_class(parent, _("LyX: Version Control Log"))
34 {
35 }
36
37
38 void QVCLog::build_dialog()
39 {
40         dialog_.reset(new QVCLogDialog(this));
41
42         bcview().setCancel(dialog_->closePB);
43 }
44
45
46 void QVCLog::update_contents()
47 {
48         setTitle(bformat(_("Version control log for %1$s"),
49                          controller().getBufferFileName()));
50
51         dialog_->vclogTV->setText("");
52
53         ostringstream ss;
54         controller().getVCLogFile(ss);
55
56         dialog_->vclogTV->setText(toqstr(ss.str()));
57 }