Source Code (Use browser search to find items of interest.)

Class Index

klyx'InsertLabelDialog (./klyx/src/InsertLabelDialog.h:21)

class InsertLabelDialog : public QDialog
{
    Q_OBJECT

public:

    InsertLabelDialog ( QWidget *parent=0, const char *name=0, WFlags f=0 );

    QString getLabel() const;
  
    void setLabel( const QString& s );
  
    void setFocus();

  
protected slots:

    /**
     * Clear input field
     */
    void clearClicked();

  
protected:

    QLineEdit *edit;
};



klyx'InsertLabelDialog::InsertLabelDialog() (./klyx/src/InsertLabelDialog.C:18)

InsertLabelDialog::InsertLabelDialog( QWidget* parent, 
				      const char* name, WFlags f )
    : QDialog( parent, name, true, f )
{
    setCaption( i18n( "Insert Label" ) );
    QVBoxLayout *layout = new QVBoxLayout( this, 10 );

    QLabel* label = new QLabel( i18n( "Enter new label to insert:" ), this );
    label->setMinimumSize( label->sizeHint() );
    layout->addWidget( label );
    edit = new QLineEdit( this );
    edit->setFixedHeight( edit->sizeHint().height() );
    layout->addWidget( edit );
    layout->addSpacing( 5 );

    KButtonBox *bbox = new KButtonBox( this );
    bbox->addStretch( 5 );
    QPushButton* okPB = bbox->addButton( i18n( "OK" ) );
    okPB->setDefault( true );
    connect( okPB, SIGNAL( clicked() ), SLOT( accept() ) );
    bbox->addStretch( 10 );
    QPushButton* cancelPB = bbox->addButton( i18n( "Cancel" ) );
    connect( cancelPB, SIGNAL( clicked() ), SLOT( reject() ) );
    bbox->addStretch( 10 );
    QPushButton* clearPB = bbox->addButton( i18n( "Clear" ) );
    connect( clearPB, SIGNAL( clicked() ), SLOT( clearClicked() ) );
    bbox->addStretch( 5 );
    bbox->layout();
    layout->addWidget( bbox );
    layout->activate();
    resize( sizeHint() );
}




klyx'InsertLabelDialog::clearClicked() (./klyx/src/InsertLabelDialog.C:53)

void InsertLabelDialog::clearClicked()
{
    edit->setText( "" );
}




klyx'InsertLabelDialog::getLabel() (./klyx/src/InsertLabelDialog.C:60)

QString InsertLabelDialog::getLabel() const
{
    return edit->text();
}




klyx'InsertLabelDialog::setFocus() (./klyx/src/InsertLabelDialog.C:67)

void InsertLabelDialog::setFocus()
{
    edit->setFocus();
}




klyx'InsertLabelDialog::setLabel() (./klyx/src/InsertLabelDialog.C:74)

void InsertLabelDialog::setLabel( const QString& text )
{
    edit->setText( text );
}