MCPcopy Create free account
hub / github.com/NetHack/NetHack / NetHackQtStringRequestor

Method NetHackQtStringRequestor

win/Qt/qt_streq.cpp:27–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25// end temporary
26
27NetHackQtStringRequestor::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
47void NetHackQtStringRequestor::resizeEvent(QResizeEvent*)
48{

Callers

nothing calls this directly

Calls 1

setFontMethod · 0.45

Tested by

no test coverage detected