Files
nethack/win/Qt/qt_plsel.h
PatR 706977a1e7 Qt: character selection
For Qt's character selection widget, only allow the [Play] button
to be used when the character name field is non-blank.  When that
field is blank, show "(required)" there.

Catch up with SYSCF for checking generic names like "player".

Fix up handling for some conditionally unused variables.
2020-10-28 01:43:53 -07:00

55 lines
1.1 KiB
C++

// Copyright (c) Warwick Allison, 1999.
// Qt4 conversion copyright (c) Ray Chason, 2012-2014.
// NetHack may be freely redistributed. See license for details.
// qt_plsel.h -- player selector dialog
#ifndef QT4PLSEL_H
#define QT4PLSEL_H
namespace nethack_qt_ {
class NetHackQtKeyBuffer;
class NetHackQtPlayerSelector : private QDialog {
Q_OBJECT
public:
enum { R_None=-1, R_Quit=-2, R_Rand=-3 };
NetHackQtPlayerSelector(NetHackQtKeyBuffer&);
public slots:
void Quit();
void Random();
void Randomize();
void plnamePlayVsQuit();
void selectName(const QString& n);
void selectRole(int current, int, int previous, int);
void selectRace(int current, int, int previous, int);
void setupOthers();
void selectGender(int);
void selectAlignment(int);
public:
bool Choose();
private:
QTableWidget* role;
QTableWidget* race;
QRadioButton **gender;
QRadioButton **alignment;
bool fully_specified_role;
int chosen_gend;
int chosen_align;
QPushButton *rand_btn;
QPushButton *play_btn;
QPushButton *quit_btn;
};
} // namespace nethack_qt_
#endif