Beispiel #1
0
void GameMenu::on_buttonOK_clicked() {
    qDebug() << "Ok Clicked";
    emit buttonOkClicked(cs->getChosenItems());

    if (cardPhase == CardPhase::CardDiscard) {
        cardPhase = CardPhase::CardNormal;
        waitingCardNum = 1;
    }
}
Beispiel #2
0
AddThread::AddThread(QWidget *parent) :
    QDialog(parent)
{
    vLayout = new QVBoxLayout(this);
      textEditUrls = new QTextEdit(this);
      textEditUrls->setToolTip( Tr::AT::textEditUrlsTooltip() );
      vLayout->addWidget(textEditUrls);
      //
      hLayoutDir = new QHBoxLayout();
        labelDir = new QLabel(Tr::AT::labelDirText(), this);
        hLayoutDir->addWidget(labelDir);
        //
        lineEditDir = new QLineEdit(this);
        hLayoutDir->addWidget(lineEditDir);
        //
        tbuttonSearchDir = new QToolButton(this);
        tbuttonSearchDir->setText("...");
        tbuttonSearchDir->setToolTip( Tr::AT::tbuttonSearchDirTooltip() );
        connect( tbuttonSearchDir, SIGNAL( clicked() ),
                 this, SLOT( tbuttonSearchDirClicked() ) );
        hLayoutDir->addWidget(tbuttonSearchDir);
      vLayout->addLayout(hLayoutDir);
      //
      hLayoutMode = new QHBoxLayout();
        hLayoutMode->addStretch();
        //
        checkBoxExternal = new QCheckBox(Tr::AT::checkBoxExternalText(), this);
        checkBoxExternal->setToolTip( Tr::AT::checkBoxExternalTooltip() );
        hLayoutMode->addWidget(checkBoxExternal);
        //
        checkBoxReplace = new QCheckBox(Tr::AT::checkBoxReplaceText(), this);
        checkBoxReplace->setToolTip( Tr::AT::checkBoxReplaceTooltip() );
        hLayoutMode->addWidget(checkBoxReplace);
      vLayout->addLayout(hLayoutMode);
      //
      hLayoutAttempt = new QHBoxLayout();
        hLayoutAttempt->addStretch();
        //
        labelAttemptPage = new QLabel(Tr::AT::labelAttemptPageText(), this);
        hLayoutAttempt->addWidget(labelAttemptPage);
        //
        spinBoxAttemptPage = new QSpinBox(this);
        spinBoxAttemptPage->setMinimum(1);
        spinBoxAttemptPage->setMaximum(5);
        hLayoutAttempt->addWidget(spinBoxAttemptPage);
        //
        labelAttemptFile = new QLabel(Tr::AT::labelAttemptFileText(), this);
        hLayoutAttempt->addWidget(labelAttemptFile);
        //
        spinBoxAttemptFile = new QSpinBox(this);
        spinBoxAttemptFile->setMinimum(1);
        spinBoxAttemptFile->setMaximum(5);
        hLayoutAttempt->addWidget(spinBoxAttemptFile);
      vLayout->addLayout(hLayoutAttempt);
      //
      hLayoutExtentions = new QHBoxLayout();
        labelExtentions = new QLabel(Tr::AT::labelExtentionsText(), this);
        hLayoutExtentions->addWidget(labelExtentions);
        //
        lineEditExtentions = new QLineEdit(this);
        lineEditExtentions->setToolTip( Tr::AT::lineEditExtentionsTooltip() );
        hLayoutExtentions->addWidget(lineEditExtentions);
        //
        buttonResetExtentions =
                new QPushButton(Tr::AT::buttonResetExtentionsText(), this);
        buttonResetExtentions->setToolTip(
                    Tr::AT::buttonResetExtentionsTooltip() );
        connect( buttonResetExtentions, SIGNAL( clicked() ),
                 this, SLOT( buttonResetExtentionsClicked() ) );
        hLayoutExtentions->addWidget(buttonResetExtentions);
      vLayout->addLayout(hLayoutExtentions);
      //
      hLayoutRestart = new QHBoxLayout();
        hLayoutRestart->addStretch();
        //
        checkBoxRestartEnabled =
                new QCheckBox(Tr::AT::checkBoxRestartEnabledText(), this);
        checkBoxRestartEnabled->setToolTip(
                    Tr::AT::checkBoxRestartEnabledTooltip() );
        hLayoutRestart->addWidget(checkBoxRestartEnabled);
        //
        spinBoxRestartInterval = new QSpinBox(this);
        spinBoxRestartInterval->setMinimum(1);
        spinBoxRestartInterval->setMaximum(360);
        hLayoutRestart->addWidget(spinBoxRestartInterval);
      vLayout->addLayout(hLayoutRestart);
      //
      hLayoutActions = new QHBoxLayout();
        hLayoutActions->addStretch();
        //
        checkBoxStart = new QCheckBox(Tr::AT::checkBoxStartText(), this);
        hLayoutActions->addWidget(checkBoxStart);
        //
        buttonCancel = new QPushButton(Tr::buttonCancelText(), this);
        connect( buttonCancel, SIGNAL( clicked() ),
                 this, SLOT( buttonCancelClicked() ) );
        hLayoutActions->addWidget(buttonCancel);
        //
        buttonOk = new QPushButton(Tr::buttonOkText(), this);
        connect( buttonOk, SIGNAL( clicked() ),
                 this, SLOT( buttonOkClicked() ) );
        hLayoutActions->addWidget(buttonOk);
      vLayout->addLayout(hLayoutActions);
    //
    readSettings();
}