| 3851 | }; |
| 3852 | |
| 3853 | void NetHackQtMainWindow::doMenuItem(int id) |
| 3854 | { |
| 3855 | switch (id) { |
| 3856 | case 1000: |
| 3857 | centerOnMain(qt_settings); |
| 3858 | qt_settings->show(); |
| 3859 | break; |
| 3860 | case 2000: |
| 3861 | QMessageBox::about(this, "About Qt NetHack", aboutMsg()); |
| 3862 | break; |
| 3863 | case 3000: { |
| 3864 | QDialog dlg(this,0,TRUE); |
| 3865 | (new QVBoxLayout(&dlg))->setAutoAdd(TRUE); |
| 3866 | QTextBrowser browser(&dlg); |
| 3867 | NetHackMimeSourceFactory ms; |
| 3868 | browser.setMimeSourceFactory(&ms); |
| 3869 | browser.setSource(QDir::currentDirPath()+"/Guidebook.html"); |
| 3870 | if ( qt_compact_mode ) |
| 3871 | dlg.showMaximized(); |
| 3872 | dlg.exec(); |
| 3873 | } |
| 3874 | break; |
| 3875 | default: |
| 3876 | if ( id >= 0 ) |
| 3877 | doKeys(macro[id]); |
| 3878 | } |
| 3879 | } |
| 3880 | |
| 3881 | void NetHackQtMainWindow::doKeys(const QString& k) |
| 3882 | { |
nothing calls this directly
no test coverage detected