3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
14 #include "QChangesDialog.h"
16 #include "qt_helpers.h"
18 #include "support/lstrings.h"
20 #include "controllers/ControlChanges.h"
22 #include <qpushbutton.h>
23 #include <q3textview.h>
25 using lyx::support::bformat;
32 typedef QController<ControlChanges, QView<QChangesDialog> > base_class;
35 QChanges::QChanges(Dialog & parent)
36 : base_class(parent, _("Merge Changes"))
41 void QChanges::build_dialog()
43 dialog_.reset(new QChangesDialog(this));
45 bcview().setCancel(dialog_->closePB);
46 bcview().addReadOnly(dialog_->acceptPB);
47 bcview().addReadOnly(dialog_->rejectPB);
51 void QChanges::update_contents()
62 string author(controller().getChangeAuthor());
63 string date(controller().getChangeDate());
66 text += bformat(_("Change by %1$s\n\n"), author);
68 text += bformat(_("Change made at %1$s\n"), date);
70 dialog_->changeTV->setText(toqstr(text));
74 void QChanges::accept()
76 controller().accept();
80 void QChanges::reject()
82 controller().reject();
85 } // namespace frontend