Source Code (Use browser search to find items of interest.)
Class Index
kghostview'MessagesDialog (./kdegraphics/kghostview/messages.h:12)
class MessagesDialog : public QDialog {
Q_OBJECT
public:
MessagesDialog( QWidget *parent, const char *name );
QMultiLineEdit *messageBox;
QPushButton* cancel;
QFrame *frame;
public slots:
void clear();
protected slots:
void resizeEvent( QResizeEvent * );
};
kghostview'MessagesDialog::MessagesDialog() (./kdegraphics/kghostview/messages.cpp:26)
MessagesDialog::MessagesDialog( QWidget *parent, const char *name )
: QDialog( parent, name )
{
setFocusPolicy(QWidget::StrongFocus);
setCaption(i18n("Ghostscript messages"));
QBoxLayout *topLayout = new QVBoxLayout( this, 0, 10 );
frame = new QFrame ( this );
if ( style() == WindowsStyle ) {
frame ->setFrameStyle( QFrame::WinPanel | QFrame::Sunken);
} else {
frame ->setFrameStyle( QFrame::Panel | QFrame::Sunken);
frame ->setLineWidth(2);
}
topLayout->addWidget( frame, 10 );
messageBox = new QMultiLineEdit( frame );
messageBox->setFrameStyle( QFrame::NoFrame );
messageBox->setFont( KGlobal::fixedFont() );
messageBox->setReadOnly( TRUE );
QFontMetrics fm( KGlobal::fixedFont() );
frame->setMinimumWidth( 80*fm.width(" ") );
// CREATE BUTTONS
KButtonBox *bbox = new KButtonBox( this );
bbox->addStretch( 10 );
QPushButton* clear = bbox->addButton( i18n("&Clear") );
connect( clear, SIGNAL(clicked()), SLOT(clear()) );
cancel = bbox->addButton( i18n("&Dismiss") );
connect( cancel, SIGNAL(clicked()), SLOT(reject()) );
bbox->layout();
QBoxLayout *pushLayout = new QHBoxLayout( 10 );
topLayout->addLayout( pushLayout, 0 );
topLayout->addSpacing( 10 );
pushLayout->addWidget( bbox, 0 );
pushLayout->addSpacing( 10 );
topLayout->activate();
resize( 250, 250 );
}
kghostview'MessagesDialog::clear() (./kdegraphics/kghostview/messages.cpp:78)
void MessagesDialog::clear() {
messageBox->setText( "" );
}
kghostview'MessagesDialog::resizeEvent() (./kdegraphics/kghostview/messages.cpp:82)
void MessagesDialog::resizeEvent( QResizeEvent * )
{
messageBox->setGeometry( 2, 2, frame->width()-4, frame->height()-4 );
}