bool DrawElement::setDrawWidget(OGLWidget *value) { if(value == pDrawWidget && value != NULL) { // qDebug() << "VALUE " << fboWrapper.errorStatus; if(fboWrapper.errorStatus != 0 && pDrawWidget->isInit()){ setFBOWrapper(pDrawWidget->initFboWrapper(pDrawWidget->getWax(),pDrawWidget->getWay()));//TODO for (int i = 0; i <effects.length(); i++) effects[i].setShaderWrapper(pDrawWidget->getShaderPrograms()[effects[i].getShaderWrapperIndex()]); } return false; } if(pDrawWidget != NULL) { disconnect(pDrawWidget, SIGNAL(startSignal()), this, SLOT(start())); disconnect(pDrawWidget, SIGNAL(stopSignal()), this, SLOT(stop())); disconnect(pDrawWidget, SIGNAL(pauseSignal()), this, SLOT(pause())); } pDrawWidget = value; connect(pDrawWidget, SIGNAL(startSignal()), this, SLOT(start())); connect(pDrawWidget, SIGNAL(stopSignal()), this, SLOT(stop())); connect(pDrawWidget, SIGNAL(pauseSignal()), this, SLOT(pause())); for (int i = 0; i <effects.length(); i++) effects[i].setShaderWrapper(pDrawWidget->getShaderPrograms()[effects[i].getShaderWrapperIndex()]); // qDebug() << "before alpha effect created"; // qDebug() << "pDrawWidget->getShaderPrograms().length:"<<pDrawWidget->getShaderPrograms().length(); if(fboWrapper.errorStatus != 0 && pDrawWidget->isInit()) { // qDebug()<<"BEFORE SETFBOWRAPPER"; setFBOWrapper(pDrawWidget->initFboWrapper(pDrawWidget->getWax(),pDrawWidget->getWay()));//TODO //qDebug()<<"AFTER SETFBOWRAPPER"; } return true; }
DrawElement::DrawElement(OGLWidget *drawWidget, QObject *parent) : QObject(parent) { playTimeUntilFreeze = 1000; group_wich_el_belong = NULL; startDrawTime = 0; pDrawWidget = drawWidget; bPause = false; x = 0; y = 0; z = 0; width = 100; height = 100; keyCouter = 0; lifeTime = -1; icon = QImage(); typeId = Element_type::Empty; fboWrapper.errorStatus = -1; show_text_cursor = false; use_anim_time = 2; if(pDrawWidget != NULL) { connect(pDrawWidget, SIGNAL(startSignal()), this, SLOT(start())); connect(pDrawWidget, SIGNAL(stopSignal()), this, SLOT(stop())); connect(pDrawWidget, SIGNAL(pauseSignal()), this, SLOT(pause())); } // qDebug() << "RRRR BEFORE"; // if (pDrawWidget) //fboWrapper=pDrawWidget->initFboWrapper(); //qDebug() << "RRRR AFTER"; }
void ListControll::stop() { emit stopSignal(); // time_sum = 0; isPlayPauseStop = 3; calcPointedBlocks(); }
void TimeDialog::Stop(){ if (mybox->currentIndex() == 0) { if (myfirsttimerid != 0) { killTimer(myfirsttimerid); emit(stopSignal()); } myfirsttimerid = 0; } else { if (mybox->currentIndex() == 1) { if (mysecondtimerid != 0) { killTimer(mysecondtimerid); emit(stopSignal()); } mysecondtimerid = 0; } } }
void ListControll::update() { emit updateSignal(); if (this->getMaxTrackTime() < getPlayTime()) { emit stopSignal(); isPlayPauseStop = 3; } }
void CallTab::stopButtonClicked() { #ifdef REN_DEBUG qWarning("CallTab::stopButtonClicked()"); #endif callButton->setEnabled(FALSE); stopButton->setEnabled(FALSE); ringButton->setEnabled(FALSE); // renyang-modify - 當停止通話時, 則不能要求對方的影像 // video_check->setEnabled(FALSE); // video_check->setChecked(false); emit stopSignal(callId); }
DrawElement::~DrawElement() { qDebug() << "delete DrawElement"; if(pDrawWidget != NULL) { pDrawWidget->deleteFBO(fboWrapper); disconnect(pDrawWidget, SIGNAL(startSignal()), this, SLOT(start())); disconnect(pDrawWidget, SIGNAL(stopSignal()), this, SLOT(stop())); disconnect(pDrawWidget, SIGNAL(pauseSignal()), this, SLOT(pause())); } if(group_wich_el_belong != NULL) { void *gr_temp = group_wich_el_belong; group_wich_el_belong->deInitGroupBlocks(); delete gr_temp; } qDebug() << "delete end"; }