]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QVCLog.C
dont use pragma impementation and interface anymore
[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 "LyXView.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 #include "BoostFormat.h"
27
28 typedef Qt2CB<ControlVCLog, Qt2DB<QVCLogDialog> > base_class;
29
30
31 QVCLog::QVCLog()
32         : base_class(qt_("VCLog"))
33 {
34 }
35
36
37 void QVCLog::build_dialog()
38 {
39         dialog_.reset(new QVCLogDialog(this));
40
41         bc().setCancel(dialog_->closePB);
42 }
43
44
45 void QVCLog::update_contents()
46 {
47 #if USE_BOOST_FORMAT
48         dialog_->setCaption(toqstr(boost::io::str(boost::format(_("Version control log for %1$s")) % controller().getBufferFileName())));
49 #else
50         dialog_->setCaption(toqstr(string(_("Version control log for ")) + controller().getBufferFileName()));
51 #endif
52         dialog_->vclogTV->setText("");
53
54         ostringstream ss;
55         controller().getVCLogFile(ss);
56
57         dialog_->vclogTV->setText(toqstr(ss.str()));
58 }