コード例 #1
0
ファイル: gridwidget.cpp プロジェクト: rsxee/NTScout
void GridWidget::checkIfCanProceed()
{
    bool country = false;
    bool nationality = false;
    for (int i = 0; i < selectedWidgets.count(); ++i) {
        country |= selectedWidgets.at(i)->isCountrySelected();
        nationality |= selectedWidgets.at(i)->isNationalitySelected();
    }
    emit canProceed(country && nationality);
}
コード例 #2
0
bool PausedCommandDecorator::executeCommand(IncomingCommand* pCommand)
{
	if (!pDecoree) return false;
	if (canProceed(pCommand->getCommandCode())){
		bool isIncomingCommandResumable = pExecStorage->getExecutor(
			pCommand->getCommandCode())->isCommandResumable();
		handleIncomingCommand(pCommand->getCommandCode(), isIncomingCommandResumable);
	}
	return pDecoree->executeCommand(pCommand);
}
コード例 #3
0
QVariantHash PageDestinations::values() const
{
    QVariantHash ret = m_args;
    GenericPage *page = qobject_cast<GenericPage*>(ui->stackedWidget->currentWidget());
    if (page) {
        ret = page->values();
    } else if (canProceed()) {
        ret = selectedItemValues();
    }
    return ret;
}
コード例 #4
0
void ChooseSocket::on_addressLE_textChanged(const QString &text)
{
    Q_UNUSED(text)
    emit allowProceed(canProceed());
}