bool PanelEscenario::escenarioValido() const { bool escenarioValido = true; std::string mensaje("Antes de poder guardar debe realizar las siguientes " "correciones:\n"); if (!(entrada->lineaEntradaValida())) { escenarioValido = false; mensaje += "- La línea de entrada de pajaros no tiene puntos de inicio " "y fin válidos\n"; } if (!(entrada->porcentajesPajarosValidos())) { escenarioValido = false; mensaje += "- Los porcentajes de aparición de los pájaros no suman 100%\n"; } if (!(lienzo->cantidadJugadoresValida())) { escenarioValido = false; mensaje += "- El numero de jugadores debe ser "; mensaje += (char)(cantidadJugadores + '0'); mensaje += "\n"; } if (!(lienzo->cantidadCatapultasValida())) { escenarioValido = false; mensaje += "- El numero de catapultas debe ser "; mensaje += (char)(cantidadJugadores + '0'); mensaje += "\n"; } if (!(lienzo->hayMonticulo())) { escenarioValido = false; mensaje += "- Debe haber un montículo"; } if (!escenarioValido) informable->mostrarDialogo(mensaje); return escenarioValido; }
void Widget::keyPressEvent(QKeyEvent *event) { if(event->key()==Qt::Key_Up) pmap->moveBy(0,-20); if(event->key()==Qt::Key_Down) pmap->moveBy(0,20); if(event->key()==Qt::Key_Right) pmap->moveBy(20,0); if(event->key()==Qt::Key_Left) pmap->moveBy(-20,0); QString msj="posicion(" + QString::number(pmap->x())+", "+QString::number(pmap->y())+")"; emit mensaje(msj); //Widget::keyPressEvent(event); }
void FindAssociation::findCallback(void* callbackData, T_DIMSE_C_FindRQ* /*rq*/, int responseCount, T_DIMSE_C_FindRSP* rsp, DcmDataset *responseIdentifiers) { FindCallbackInfo* pCallback = (FindCallbackInfo*) callbackData; if (pCallback->pCaller->GetMaxResults() > 0 && responseCount > pCallback->pCaller->GetMaxResults()) { LOG_DEBUG(pCallback->pCaller->ambitolog, "findCallback(): Ignoring response num " << responseCount << ". The maximum number of responses was " << pCallback->pCaller->GetMaxResults()); rsp->DimseStatus = STATUS_FIND_Cancel_MatchingTerminatedDueToCancelRequest; pCallback->pCaller->Stop(); ASC_releaseAssociation(pCallback->assoc); return; } wxString mess = wxString::Format(_("%d results has been found"), (int)(responseCount) ); std::string mensaje(mess.ToUTF8()); LOG_DEBUG(pCallback->pCaller->ambitolog, "Processing response num " << responseCount); if(!pCallback->pCaller->NotificarProgreso(0.0f, mensaje)) { rsp->DimseStatus = STATUS_FIND_Cancel_MatchingTerminatedDueToCancelRequest; pCallback->pCaller->Stop(); ASC_releaseAssociation(pCallback->assoc); LOG_INFO(pCallback->pCaller->ambitolog, "Operation canceled by user"); return; } else { DcmDataset* response = new DcmDataset(*responseIdentifiers); if (pCallback->pCaller->bPushResults) { pCallback->pCaller->result.push(response); //push into Ginkgo data... if (pCallback->pCaller->pResultsWrapper != NULL && pCallback->pCaller->pDicomServer.IsValid()) { GIL::DICOM::DICOMManager mgr( response, pCallback->pCaller->pDicomServer->GetDefaultCharset() ); GNC::GCS::Ptr<GIL::DICOM::DicomDataset> base = new GIL::DICOM::DicomDataset(); mgr.CargarJerarquia((*base), DCM_MaxReadLength); pCallback->pCaller->pResultsWrapper->push_back(base); } } else { LOG_DEBUG("C-FIND", "No results found"); } pCallback->pCaller->OnResponseReceived(response); } }
Widget::Widget(QWidget *parent) : QWidget(parent) { setFocusPolicy(Qt::ClickFocus); _scene= new QGraphicsScene(this); pmap =_scene->addPixmap(QPixmap("D:/Programacíon Avanzada SC/helloQtGraphics/nave.png")); _view= new QGraphicsView(_scene,this); _view->setFocusPolicy(Qt::NoFocus); QPushButton *btn= new QPushButton("dont Press this button",this); connect(btn,SIGNAL(clicked()),this,SLOT (btnClicked())); QLabel *lbl=new QLabel("Hola mundo",this); connect(this,SIGNAL(mensaje(QString)),lbl,SLOT(setText(QString))); QVBoxLayout *mainLayout=new QVBoxLayout; mainLayout->addWidget(lbl); mainLayout->addWidget(btn); mainLayout->addWidget(_view); this->setLayout(mainLayout); }
void EstructuraDeExamen::enqueue(int){mensaje();}
int EstructuraDeExamen::dequeue(){ mensaje(); return 0; }
void EstructuraDeExamen::push(int){mensaje();}
int EstructuraDeExamen::top(){ mensaje(); return 0; }
void EstructuraDeExamen::changePriority(int item, int key){mensaje();}
int EstructuraDeExamen::removeItem(){ mensaje(); return 0; }
void EstructuraDeExamen::addItem(int item, int key){mensaje();}
int EstructuraDeExamen::rigth(){ mensaje(); return 0; }
int EstructuraDeExamen::left(){ mensaje(); return 0; }
int EstructuraDeExamen::denqueueRigth(){ mensaje(); return 0; }
int EstructuraDeExamen::denqueueLeft(){ mensaje(); return 0; }
int EstructuraDeExamen::first(){ mensaje(); return 0; }