// Implementation of QTreeChangeDialog.
#include "qtreechangedialog.h"
QTreeChangeDialog::QTreeChangeDialog( QWidget* parent, StrBuf desc )
: QDialog( parent )
{
setCaption( "Change Info" );
mainlayout = new QVBoxLayout( this, 5, 10 );
// Put the description in a textview.
descview = new QTextEdit( this );
descview->setReadOnly( true );
descview->setTextFormat( RichText );
descview->setText( desc.Text() );
mainlayout->addWidget( descview );
// Add an "OK" button to make it go away.
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 );
}
QTreeChangeDialog::~QTreeChangeDialog()
{
delete descview;
delete ok;
delete oklayout;
delete mainlayout;
}