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 #pragma implementation
17 #include "ControlChanges.h"
18 #include "qt_helpers.h"
20 #include <qpushbutton.h>
21 #include <qtextview.h>
23 #include "QChangesDialog.h"
27 typedef Qt2CB<ControlChanges, Qt2DB<QChangesDialog> > base_class;
31 : base_class(qt_("Changes"))
36 void QChanges::build_dialog()
38 dialog_.reset(new QChangesDialog(this));
40 bc().setCancel(dialog_->closePB);
41 bc().addReadOnly(dialog_->acceptPB);
42 bc().addReadOnly(dialog_->rejectPB);
51 string author(controller().getChangeAuthor());
52 string date(controller().getChangeDate());
55 text += "Change by " + author + "\n\n";
57 text += "Change made at " + date + "\n";
59 dialog_->changeTV->setText(toqstr(text));
63 void QChanges::accept()
65 controller().accept();
69 void QChanges::reject()
71 controller().reject();