// Implementation of QTreeJobDialog. Mostly ripped from
// QTreeChangeDialog.
#include "qtreejobdialog.h"
QTreeJobDialog::QTreeJobDialog( QWidget* parent, StrBuf desc )
:QDialog( parent )
{
setCaption( "Job Info" );
mainlayout = new QVBoxLayout( this, 5, 10 );
descview = new QTextEdit( this );
descview->setReadOnly( true );
descview->setTextFormat( RichText );
descview->setText( desc.Text() );
mainlayout->addWidget( descview );
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 );
show();
// This is the only unique thing about this class.
descview->scrollToAnchor( "jobtext" );
}
QTreeJobDialog::~QTreeJobDialog()
{
}