Logo Search packages:      
Sourcecode: kcpuload version File versions  Download package

SpeedDialog::SpeedDialog ( int  defaultSpeed,
QWidget *  parent 
)

Constructor.

Definition at line 28 of file speeddialog.cpp.

References updateSpeed().

                                                          :
        KDialogBase(parent, "speed dialog", true,
        i18n("Select Speed"), Ok|Cancel, Ok),
        speed(defaultSpeed) {
    QHBox* page = makeHBoxMainWidget();

    new QLabel(i18n("Update interval in milliseconds:"), page);

    KComboBox* speedBox = new KComboBox(true, page);

    QIntValidator* val = new QIntValidator(this);
    val->setBottom(1);
    speedBox->setValidator(val);

    QString speedStr;
    for (int i = 0; stockSpeed[i]; i++) {
        speedStr.setNum(stockSpeed[i]);
        speedBox->insertItem(speedStr);
    }

    speedStr.setNum(defaultSpeed);
    speedBox->setCurrentText(speedStr);

    connect(speedBox, SIGNAL(textChanged(const QString&)),
        this, SLOT(updateSpeed(const QString&)));
}


Generated by  Doxygen 1.6.0   Back to index