]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QVCLog.C
ws cleanup
[lyx.git] / src / frontends / qt2 / QVCLog.C
1 /**
2  * \file QVCLog.C
3  * Copyright 2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author John Levon <moz@compsoc.man.ac.uk>
7  */
8
9 #include <config.h>
10 #include "Lsstream.h"
11
12 #ifdef __GNUG__
13 #pragma implementation
14 #endif
15
16 #include <qtextview.h>
17 #include <qpushbutton.h>
18
19 #include "QVCLogDialog.h"
20 #include "QVCLog.h"
21 #include "Qt2BC.h"
22 #include "gettext.h"
23
24 #include "QtLyXView.h"
25 #include "ControlVCLog.h"
26
27 typedef Qt2CB<ControlVCLog, Qt2DB<QVCLogDialog> > base_class;
28
29 QVCLog::QVCLog(ControlVCLog & c)
30         : base_class(c, _("VCLog"))
31 {
32 }
33
34
35 void QVCLog::build_dialog()
36 {
37         dialog_.reset(new QVCLogDialog(this));
38
39         bc().setCancel(dialog_->closePB);
40 }
41
42
43 void QVCLog::update_contents()
44 {
45         dialog_->setCaption(string(_("Version control log for ") + controller().getBufferFileName()).c_str());
46
47         dialog_->vclogTV->setText("");
48
49         stringstream ss;
50
51         dialog_->vclogTV->setText(controller().getVCLogFile(ss).str().c_str());
52 }