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 "ControlChanges.h"
15 #include "qt_helpers.h"
17 #include <qpushbutton.h>
18 #include <qtextview.h>
20 #include "QChangesDialog.h"
28 typedef QController<ControlChanges, QView<QChangesDialog> > base_class;
31 QChanges::QChanges(Dialog & parent)
32 : base_class(parent, _("LyX: Merge Changes"))
37 void QChanges::build_dialog()
39 dialog_.reset(new QChangesDialog(this));
41 bcview().setCancel(dialog_->closePB);
42 bcview().addReadOnly(dialog_->acceptPB);
43 bcview().addReadOnly(dialog_->rejectPB);
52 string author(controller().getChangeAuthor());
53 string date(controller().getChangeDate());
56 text += "Change by " + author + "\n\n";
58 text += "Change made at " + date + "\n";
60 dialog_->changeTV->setText(toqstr(text));
64 void QChanges::accept()
66 controller().accept();
70 void QChanges::reject()
72 controller().reject();