void Inquiry::setItemId(Id item_id) { setCurrentTab(2); setCurrentId(item_id); slotRefresh(); }
void Inquiry::setCardId(Id card_id) { setCurrentTab(1); setCurrentId(card_id); slotRefresh(); }
void Inquiry::setAccountId(Id account_id) { setCurrentTab(0); setCurrentId(account_id); slotRefresh(); }
void List::removeInput(QString const& _id) { input::Interface::removeInput(_id); if (_id == currentId_) { setCurrentId(""); } }
void WalkmeshManager::fill(Field *field, bool reload) { if((!reload && field->inf() == infFile) || !field) return; infFile = field->inf(); idFile = field->walkmesh(); caFile = field->camera(); scriptsAndTexts = field->scriptsAndTexts(); if(!idFile->isOpen() || !caFile->isOpen() || !infFile->isOpen()) { QMessageBox::warning(this, tr("Erreur d'ouverture"), tr("Erreur d'ouverture du walkmesh")); } int camCount = 0; if(walkmesh) { walkmesh->fill(field); } if(caFile->isOpen()) { camCount = caFile->cameraCount(); if(camList->count() != camCount) { camList->blockSignals(true); camList->clear(); for(int i=0 ; i<camCount ; ++i) { camList->addItem(tr("Caméra %1").arg(i)); } camList->blockSignals(false); } setCurrentCamera(0); } tabWidget->widget(0)->setEnabled(caFile->isOpen() && camCount > 0); if(idFile->isOpen()) { int triangleCount = idFile->triangleCount(); if(idList->count() != triangleCount) { idList->blockSignals(true); idList->clear(); for(int i=0 ; i<triangleCount ; ++i) { idList->addItem(tr("Triangle %1").arg(i)); } idList->blockSignals(false); } idList->setCurrentRow(0); setCurrentId(0); } tabWidget->widget(1)->setEnabled(idFile->isOpen()); if(infFile->isOpen()) { gateList->clear(); foreach(const Exit &gateway, infFile->exitLines()) { if(gateway.fieldID != 0x7FFF) { gateList->addItem(QString("%1 (%2)").arg(Data::field_names.value(gateway.fieldID)).arg(gateway.fieldID)); } else { gateList->addItem(tr("Inutilisé")); } } gateList->setCurrentRow(0); setCurrentGateway(0); doorList->clear(); int doorID = 0; foreach(const Trigger &trigger, infFile->triggers()) { if(trigger.background_parameter != 0xFF) { doorList->addItem(tr("Porte %1").arg(doorID)); } else { doorList->addItem(tr("Inutilisé")); } ++doorID; } doorList->setCurrentRow(0); setCurrentDoor(0); if(!infFile->isJap()) { arrowList->clear(); int arrowID = 0; foreach(const Arrow &arrow, infFile->arrows()) { if(arrow.type != 0) { arrowList->addItem(tr("Flèche %1").arg(arrowID)); } else { arrowList->addItem(tr("Inutilisé")); } ++arrowID; } arrowList->setCurrentRow(0); setCurrentArrow(0); }
void List::fromPropertyMap(PropertyMap const& _map) { input::Interface::fromPropertyMap(_map); _map("currentId",currentId_); setCurrentId(currentId_); }