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 "controllers/ControlChanges.h"
20 #include <qpushbutton.h>
21 #include <qtextview.h>
29 typedef QController<ControlChanges, QView<QChangesDialog> > base_class;
32 QChanges::QChanges(Dialog & parent)
33 : base_class(parent, _("LyX: Merge Changes"))
38 void QChanges::build_dialog()
40 dialog_.reset(new QChangesDialog(this));
42 bcview().setCancel(dialog_->closePB);
43 bcview().addReadOnly(dialog_->acceptPB);
44 bcview().addReadOnly(dialog_->rejectPB);
53 string author(controller().getChangeAuthor());
54 string date(controller().getChangeDate());
57 text += "Change by " + author + "\n\n";
59 text += "Change made at " + date + "\n";
61 dialog_->changeTV->setText(toqstr(text));
65 void QChanges::accept()
67 controller().accept();
71 void QChanges::reject()
73 controller().reject();
76 } // namespace frontend