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

Function centerOnMain

outdated/win/Qt3/qt3_win.cpp:189–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189static void
190centerOnMain( QWidget* w )
191{
192 QWidget* m = qApp->mainWidget();
193 if (!m) m = qApp->desktop();
194 QPoint p = m->mapToGlobal(QPoint(0,0));
195 w->move( p.x() + m->width()/2 - w->width()/2,
196 p.y() + m->height()/2 - w->height()/2 );
197}
198
199NetHackQtLineEdit::NetHackQtLineEdit() :
200 QLineEdit(0)

Callers 7

ChooseMethod · 0.70
GetMethod · 0.70
SelectMenuMethod · 0.70
DisplayMethod · 0.70
doMenuItemMethod · 0.70
ExecMethod · 0.70
getMethod · 0.70

Calls 3

mainWidgetMethod · 0.80
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected