Source Code (Use browser search to find items of interest.)
Class Index
kimage'KIntegerInputDialog (./koffice/kimage/kintegerinputdialog.h:29)
class KIntegerInputDialog : public KDialog
{
Q_OBJECT
public:
KIntegerInputDialog( QWidget *parent = 0, const char *name = 0, const char *inputtitle = 0, WFlags f = 0 );
~KIntegerInputDialog();
void setValue( const int& theValue );
int getValue( int& theValue);
private:
KIntNumInput* m_pLineEdit;
};
kimage'KIntegerInputDialog::KIntegerInputDialog() (./koffice/kimage/kintegerinputdialog.cc:34)
KIntegerInputDialog::KIntegerInputDialog(QWidget *parent, const char *name, const char *inputtitle, WFlags f )
: KDialog( parent, name, TRUE, f )
{
// Layout
QGridLayout* grid = new QGridLayout( this, 4, 4, 15, 7 );
// Inputline
m_pLineEdit = new KIntNumInput(0, this, 10, "inputtext");
grid->addMultiCellWidget( m_pLineEdit, 1, 1, 0, 3 );
// Label
QLabel* label = new QLabel( m_pLineEdit, inputtitle, this );
grid->addWidget( label, 0, 0 );
// OK-Button
QPushButton* buttonOK = new QPushButton( this, "ButtonOK" );
buttonOK->setText( i18n( "OK" ) );
buttonOK->setAutoRepeat(false);
buttonOK->setAutoResize(false);
buttonOK->setAutoDefault(true);
buttonOK->setDefault(true);
buttonOK->resize( buttonOK->sizeHint() );
connect( buttonOK, SIGNAL( clicked() ), this, SLOT( accept() ) );
grid->addWidget( buttonOK, 3, 2 );
// Cancel-Button
QPushButton* buttonCancel = new QPushButton( this, "ButtonCancel" );
buttonCancel->setText( i18n( "Cancel" ) );
buttonCancel->resize( buttonOK->sizeHint() );
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
grid->addWidget( buttonCancel, 3, 3 );
// Dialog
grid->setRowStretch( 0, 0 );
grid->setRowStretch( 1, 0 );
grid->setRowStretch( 2, 1 );
grid->setRowStretch( 3, 0 );
grid->setColStretch( 0, 0 );
grid->setColStretch( 1, 1 );
grid->setColStretch( 2, 0 );
grid->setColStretch( 3, 0 );
m_pLineEdit->setFocus();
setMinimumSize( label->sizeHint().width() + m_pLineEdit->sizeHint().width() + buttonOK->sizeHint().width() + 30,
label->sizeHint().height() + buttonOK->sizeHint().height() + buttonCancel->sizeHint().height() + 40);
}
kimage'KIntegerInputDialog::~KIntegerInputDialog() (./koffice/kimage/kintegerinputdialog.cc:82)
KIntegerInputDialog::~KIntegerInputDialog()
{
}
kimage'KIntegerInputDialog::setValue() (./koffice/kimage/kintegerinputdialog.cc:86)
void KIntegerInputDialog::setValue( const int& theValue )
{
m_pLineEdit->setValue( theValue );
}
kimage'KIntegerInputDialog::getValue() (./koffice/kimage/kintegerinputdialog.cc:91)
int KIntegerInputDialog::getValue( int& theValue)
{
int result;
setValue( theValue );
result = exec();
if( result == Accepted )
theValue = m_pLineEdit->value();
return result;
}