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); }
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); }
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; }
void ChooseSocket::on_addressLE_textChanged(const QString &text) { Q_UNUSED(text) emit allowProceed(canProceed()); }