%1
" ""; PinForm::PinForm(QWidget *obj_parent) : QWidget(obj_parent), ui(new Ui::PinForm) { ui->setupUi(this); move(QApplication::desktop()->screen()->rect().center() - rect().center()); setFixedSize(size()); setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTitleHint); connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(hide())); } void PinForm::setPin(QString name, int pin) { qDebug() << "Got pin from user " << name; ui->deviceLabel->setText(tr("Device: %1 (PS Vita)").arg(name)); ui->pinLabel->setText(pinFormat.arg(QString::number(pin), 8, QChar('0'))); show(); } void PinForm::startCountdown() { timer.setInterval(1000); counter = 300; connect(&timer, SIGNAL(timeout()), this, SLOT(decreaseTimer())); timer.start(); } void PinForm::decreaseTimer() { counter--; if(counter == 0) { timer.stop(); hide(); } ui->timeLabel->setText(tr("Time remaining: %1 seconds").arg(counter)); } PinForm::~PinForm() { delete ui; }