Source Code (Use browser search to find items of interest.)
Class Index
katomic'ConfigBox (./kdegames/katomic/configbox.h:16)
class ConfigBox : public QDialog
{
Q_OBJECT
public:
ConfigBox ( QWidget *, const char* name );
~ConfigBox();
protected slots:
void quitConfig();
signals:
void speedChanged();
private:
QSlider *speed;
QLCDNumber *disp;
QPushButton *ok, *cancel;
};
katomic'ConfigBox::ConfigBox() (./kdegames/katomic/configbox.cpp:19)
ConfigBox::ConfigBox ( QWidget *parent, const char *name)
: QDialog ( parent, name, TRUE )
{
setCaption(i18n("Options"));
QGridLayout *lay = new QGridLayout (this, 1, 1, 10);
QGroupBox *gb = new QGroupBox(i18n("General"), this);
lay->addMultiCellWidget(gb, 0, 0, 0, 2);
QGridLayout *glay = new QGridLayout (gb, 1, 1, 10);
glay->addWidget(new QLabel(i18n("Animation Speed"),gb), 1, 0);
disp = new QLCDNumber(gb);
glay->addWidget(disp,0, 2);
speed = new QSlider(1, 10, 1, 1, QSlider::Horizontal, gb);
glay->addMultiCellWidget(speed, 1, 1, 1, 3);
connect(speed, SIGNAL(valueChanged(int)), disp, SLOT(display(int)));
speed->setValue(settings.anim_speed);
ok = new QPushButton(i18n("OK"), this);
lay->addWidget(ok, 1, 1);
connect(ok, SIGNAL(clicked()), this, SLOT(quitConfig()) );
cancel = new QPushButton(i18n("Cancel"), this);
lay->addWidget(cancel, 1, 2);
connect(cancel, SIGNAL(clicked()), this, SLOT(reject()) );
}
katomic'ConfigBox::quitConfig() (./kdegames/katomic/configbox.cpp:55)
void ConfigBox::quitConfig()
{
settings.anim_speed = speed->value();
settings.changed = true;
emit speedChanged();
accept();
}
katomic'ConfigBox::~ConfigBox() (./kdegames/katomic/configbox.cpp:65)
ConfigBox::~ConfigBox()
{
}