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

Class Index

ksmiletris'NewScoreDialog (./kdegames/ksmiletris/newscoredialog.h:31)

class NewScoreDialog : public QDialog {
public:
	NewScoreDialog(QWidget *parent=0, const char *name=0);
	const char *name();

private:
	QLineEdit *le;
};

ksmiletris'NewScoreDialog::NewScoreDialog() (./kdegames/ksmiletris/newscoredialog.cpp:34)

NewScoreDialog::NewScoreDialog(QWidget *parent, const char *name)
        : QDialog(parent, name, true)
{
	setCaption(i18n("New High Score"));

	QPushButton *ok, *cancel;
	ok = new QPushButton(i18n("OK"), this);
	ok->setGeometry(10, 60, 70, 30);
	ok->setDefault(true);
	connect(ok, SIGNAL(clicked()), SLOT(accept()));
	cancel = new QPushButton(i18n("Cancel"), this);
	cancel->setGeometry(140, 60, 70, 30);
	connect(cancel, SIGNAL(clicked()), SLOT(reject()));

	QLabel *label = new QLabel(i18n("Enter name"), this);
	label->move(10, 10);
	le = new QLineEdit(this);
	le->move(label->x() + label->width(), 10);
	le->setFocus();
}


ksmiletris'NewScoreDialog::name() (./kdegames/ksmiletris/newscoredialog.cpp:55)

const char *NewScoreDialog::name()
{
	return le->text();
}