Player::Player(QWidget* parent) {
theLabel = new QLabel (parent);
parent->layout()->addWidget(theLabel);
+ modifyable = true;
}
return currentLine;
}
+void Player::setWaiting(QString labeltext) {
+ theLabel->setText(labeltext);
+ modifyable = false;
+}
+
void Player::resetText() {
currentLine.clear();
theLabel->setText(currentLine);
+ modifyable = true;
}
void Player::handleKey(QString str) {
+ if (!modifyable)
+ return;
if (str.length() == 1) {
currentLine += str;
} else if (!hasName() && str == "Return") {