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

Method NetHackQtMenuWindow

outdated/win/Qt3/qt3_win.cpp:2697–2739  ·  view source on GitHub ↗

Table view columns: [pick-count] [accel] [glyph] [string] Maybe accel should be near string. We'll see. pick-count normally blank. double-clicking or click-on-count gives pop-up entry string is green when selected

Source from the content-addressed store, hash-verified

2695// string is green when selected
2696//
2697NetHackQtMenuWindow::NetHackQtMenuWindow(NetHackQtKeyBuffer& ks) :
2698 QTableView(),
2699 keysource(ks),
2700 dialog(new NetHackQtMenuDialog()),
2701 prompt(0),
2702 pressed(-1)
2703{
2704 setNumCols(4);
2705 setCellHeight(QMAX(qt_settings->glyphs().height()+1,fontMetrics().height()));
2706 setBackgroundColor(lightGray);
2707 setFrameStyle(Panel|Sunken);
2708 setLineWidth(2);
2709
2710 ok=new QPushButton("Ok",dialog);
2711 connect(ok,SIGNAL(clicked()),dialog,SLOT(accept()));
2712
2713 cancel=new QPushButton("Cancel",dialog);
2714 connect(cancel,SIGNAL(clicked()),dialog,SLOT(reject()));
2715
2716 all=new QPushButton("All",dialog);
2717 connect(all,SIGNAL(clicked()),this,SLOT(All()));
2718
2719 none=new QPushButton("None",dialog);
2720 connect(none,SIGNAL(clicked()),this,SLOT(ChooseNone()));
2721
2722 invert=new QPushButton("Invert",dialog);
2723 connect(invert,SIGNAL(clicked()),this,SLOT(Invert()));
2724
2725 search=new QPushButton("Search",dialog);
2726 connect(search,SIGNAL(clicked()),this,SLOT(Search()));
2727
2728 QPoint pos(0,ok->height());
2729 recreate(dialog,0,pos);
2730 prompt.recreate(dialog,0,pos);
2731
2732 setBackgroundColor(lightGray);
2733
2734 connect(dialog,SIGNAL(Resized()),this,SLOT(Layout()));
2735
2736 setTableFlags(Tbl_autoHScrollBar|Tbl_autoVScrollBar
2737 |Tbl_smoothScrolling|Tbl_clipCellPainting);
2738 setFocusPolicy(StrongFocus);
2739}
2740
2741NetHackQtMenuWindow::~NetHackQtMenuWindow()
2742{

Callers

nothing calls this directly

Calls 1

heightMethod · 0.45

Tested by

no test coverage detected