Files
nethack/win/Qt4/qt4xcmd.h
Ray Chason c13eed7369 Qt4: Hide buttons not matching typed command
There are way too many buttons on the extended command window.
Let the user type a letter or two, and hide the buttons that don't
match.
2018-09-10 21:13:32 +03:00

34 lines
627 B
C++

// Copyright (c) Warwick Allison, 1999.
// Qt4 conversion copyright (c) Ray Chason, 2012-2014.
// NetHack may be freely redistributed. See license for details.
// qt4xcmd.h -- extended command widget
#ifndef QT4XCMD_H
#define QT4XCMD_H
namespace nethack_qt4 {
class NetHackQtExtCmdRequestor : public QDialog {
Q_OBJECT
protected:
virtual void keyPressEvent(QKeyEvent *event);
public:
NetHackQtExtCmdRequestor(QWidget *parent);
int get();
private:
QLabel *prompt;
QVector<QPushButton *> buttons;
void enableButtons();
private slots:
void cancel();
};
} // namespace nethack_qt4
#endif