2003-02-09 00:11:51 +00:00
|
|
|
/**
|
|
|
|
* \file QChanges.C
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author John Levon
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "ControlChanges.h"
|
|
|
|
#include "qt_helpers.h"
|
|
|
|
|
|
|
|
#include <qpushbutton.h>
|
|
|
|
#include <qtextview.h>
|
|
|
|
|
|
|
|
#include "QChangesDialog.h"
|
|
|
|
#include "QChanges.h"
|
|
|
|
#include "Qt2BC.h"
|
|
|
|
|
|
|
|
typedef Qt2CB<ControlChanges, Qt2DB<QChangesDialog> > base_class;
|
|
|
|
|
|
|
|
|
|
|
|
QChanges::QChanges()
|
2003-02-16 05:08:14 +00:00
|
|
|
: base_class(qt_("LyX: Merge Changes"))
|
2003-02-09 00:11:51 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QChanges::build_dialog()
|
|
|
|
{
|
|
|
|
dialog_.reset(new QChangesDialog(this));
|
|
|
|
|
|
|
|
bc().setCancel(dialog_->closePB);
|
|
|
|
bc().addReadOnly(dialog_->acceptPB);
|
|
|
|
bc().addReadOnly(dialog_->rejectPB);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QChanges::next()
|
|
|
|
{
|
|
|
|
controller().find();
|
|
|
|
|
|
|
|
string text;
|
|
|
|
string author(controller().getChangeAuthor());
|
|
|
|
string date(controller().getChangeDate());
|
|
|
|
|
|
|
|
if (!author.empty())
|
|
|
|
text += "Change by " + author + "\n\n";
|
|
|
|
if (!date.empty())
|
|
|
|
text += "Change made at " + date + "\n";
|
|
|
|
|
|
|
|
dialog_->changeTV->setText(toqstr(text));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QChanges::accept()
|
|
|
|
{
|
|
|
|
controller().accept();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QChanges::reject()
|
|
|
|
{
|
|
|
|
controller().reject();
|
|
|
|
}
|