| 25 | // end temporary |
| 26 | |
| 27 | NetHackQtStringRequestor::NetHackQtStringRequestor(QWidget *parent, |
| 28 | const char *p, const char *cancelstr, const char *okaystr) : |
| 29 | QDialog(parent), |
| 30 | prompt(QString::fromLatin1(p),this), |
| 31 | input(this,"input") |
| 32 | { |
| 33 | if (qt_settings) |
| 34 | input.setFont(qt_settings->normalFixedFont()); |
| 35 | |
| 36 | cancel=new QPushButton(cancelstr,this); |
| 37 | connect(cancel,SIGNAL(clicked()),this,SLOT(reject())); |
| 38 | |
| 39 | okay = new QPushButton(okaystr, this); |
| 40 | connect(okay,SIGNAL(clicked()),this,SLOT(accept())); |
| 41 | connect(&input,SIGNAL(returnPressed()),this,SLOT(accept())); |
| 42 | okay->setDefault(true); |
| 43 | |
| 44 | setFocusPolicy(Qt::StrongFocus); |
| 45 | } |
| 46 | |
| 47 | void NetHackQtStringRequestor::resizeEvent(QResizeEvent*) |
| 48 | { |