| 1482 | bool NetHackQtMapWindow::Destroy() { return FALSE; } |
| 1483 | |
| 1484 | NetHackQtMapWindow::NetHackQtMapWindow(NetHackQtClickBuffer& click_sink) : |
| 1485 | clicksink(click_sink), |
| 1486 | change(10), |
| 1487 | rogue_font(0) |
| 1488 | { |
| 1489 | viewport.addChild(this); |
| 1490 | |
| 1491 | setBackgroundColor(black); |
| 1492 | viewport.setBackgroundColor(black); |
| 1493 | |
| 1494 | pet_annotation = QPixmap(qt_compact_mode ? pet_mark_small_xpm : pet_mark_xpm); |
| 1495 | |
| 1496 | cursor.setX(0); |
| 1497 | cursor.setY(0); |
| 1498 | Clear(); |
| 1499 | |
| 1500 | connect(qt_settings,SIGNAL(tilesChanged()),this,SLOT(updateTiles())); |
| 1501 | connect(&viewport, SIGNAL(contentsMoving(int,int)), this, |
| 1502 | SLOT(moveMessages(int,int))); |
| 1503 | |
| 1504 | updateTiles(); |
| 1505 | //setFocusPolicy(StrongFocus); |
| 1506 | #ifdef SAFERHANGUP |
| 1507 | QTimer* deadman = new QTimer(this); |
| 1508 | connect(deadman, SIGNAL(timeout()), SLOT(timeout())); |
| 1509 | deadman->start(2000); // deadman timer every 2 seconds |
| 1510 | #endif |
| 1511 | } |
| 1512 | |
| 1513 | #ifdef SAFERHANGUP |
| 1514 | // The "deadman" timer is received by this slot |
nothing calls this directly
no test coverage detected