// Implementation of QTreeDiffDialog. Most of this code was
// ripped from QTreeChangeDialog.
#include "qtreediffdialog.h"
QTreeDiffDialog::QTreeDiffDialog( QWidget* parent, StrBuf diffs )
:QDialog( parent )
{
setCaption( "Diffs" );
mainlayout = new QVBoxLayout( this, 5, 10 );
diffview = new QTextEdit( this );
diffview->setReadOnly( true );
diffview->setTextFormat( RichText );
diffview->setText( diffs.Text() );
mainlayout->addWidget( diffview );
oklayout = new QHBoxLayout( mainlayout );
oklayout->addStretch( -1 );
ok = new QPushButton( "OK", this );
oklayout->addWidget( ok );
oklayout->addStretch( -1 );
connect( ok, SIGNAL( clicked() ), this, SLOT( accept() ) );
ok->setAutoDefault( TRUE );
ok->setFocus();
setGeometry( 100, 100, 500, 500 );
}
QTreeDiffDialog::~QTreeDiffDialog()
{
delete diffview;
delete ok;
delete oklayout;
delete mainlayout;
}