JadepixDecoder::~JadepixDecoder() { if (jadepix_rawFile) delete jadepix_rawFile; ReSet(); std::cout << "Decode is finished. " << std::endl; };
void KG3DTransformation::UpdateByMatrix(const D3DXMATRIX& mat) { AffineParts affineParts; ReSet(); MatrixDecomposeAffine(mat, affineParts); m_ScalingRotation.x = affineParts.u.x; m_ScalingRotation.y = affineParts.u.y; m_ScalingRotation.z = affineParts.u.z; m_ScalingRotation.w = affineParts.u.w; m_Scaling.x = affineParts.k.x; m_Scaling.y = affineParts.k.y; m_Scaling.z = affineParts.k.z; m_Rotation.x = affineParts.q.x; m_Rotation.y = affineParts.q.y; m_Rotation.z = affineParts.q.z; m_Rotation.w = affineParts.q.w; ASSERT_FLOAT_IS_VALIED(m_Rotation.x); m_Translation.x = affineParts.t.x; m_Translation.y = affineParts.t.y; m_Translation.z = affineParts.t.z; m_bSleep = FALSE; UpdateTransformation(); }
void Transfer::UpLoad(const QString& file_name){ ReSet(); if(is_transfering_){ return; } MessagePop("start upload!"); upload_file_ = file_name; upload_file_name_ = QFileInfo(upload_file_).fileName(); QStringList split_at = g_configuer->current_ftp_.value_.split("@"); if(split_at.size() != 2){ return; } QStringList host_port = split_at[0].split(":"); if(host_port.size() != 2){ return; } QStringList user_passwd = split_at[1].split(":"); if(user_passwd.size() != 2){ return; } qDebug()<<host_port[0]<<host_port[1].toInt(); ftp_.connectToHost(host_port[0],host_port[1].toInt()); ftp_.login(user_passwd[0],user_passwd[1]); list_step_ = IN_ROOT; ftp_.list(); }
void Transfer::OnMkdirFinish(bool error){ if(error){ ReSet(); } switch(list_step_){ case IN_ROOT:{ ftp_.cd(HOST_NAME); }break; case IN_HOST:{ ftp_.cd(g_configuer->user_name_); }break; default: ReSet(); break; } }
void CAStarData::UpdateSize(uint32 nWidth, uint32 nHeight, uint32 nAllNodeNum) { Ast(nAllNodeNum >= nWidth * nHeight && nWidth >= m_nWidth && nHeight >= m_nHeight); if (m_nAllNodeNum != nAllNodeNum) { m_nAllNodeNum = nAllNodeNum; if (m_pNodeArray) { delete [] m_pNodeArray; m_pNodeArray = NULL; } m_pNodeArray = new CNode[m_nAllNodeNum]; ReSet(); } if (m_nWidth != nWidth) { m_nWidth = nWidth; for (int i = 0; i < 8; ++i) { m_nNodeOffset[i] = m_nWidth * ms_nOffset[i * 2 + 1] + ms_nOffset[i * 2]; } } m_nHeight = nHeight; }
void Transfer::OnRmFileFinish(bool error){ if(error){ ReSet(); } // if(have_no_file_) // PutFile(); // else // ftp_.list(); }
uint32 CAStarData::GetSearchId() { if (m_nSearchId == static_cast<uint32>(-1)) { ReSet(); } ++m_nSearchId; return m_nSearchId; }
void Transfer::OnCdFinish(bool error){ if(!error){ ftp_.list(); list_step_++; } else{ ReSet(); } }
bool CSingleBuffer::ReadFlush(int nLen) { m_nTail += nLen; if( 0==GetUseLength() ) { ReSet(); return true; } return false; }
void CSingleBuffer::ReadFlush(int nLen) { assert( (m_nTail + nLen)<=m_nHead ); m_nTail += nLen; if( true==IsEmpty() ) { ReSet(); } }
~tagDataMem() { // ???? ReSet(); while(NULL != pFreeDataHead) { DATAHEAD* pTempDataHead = pFreeDataHead; pFreeDataHead = pFreeDataHead->pNext; delete pTempDataHead; pTempDataHead = NULL; } free(pDataMem); pDataMem = NULL; nDataPos = 0; }
Transfer::Transfer(QWidget *parent) : QDialog(parent), ui(new Ui::Transfer) { ui->setupUi(this); connect(&ftp_,SIGNAL(commandFinished(int,bool)), this,SLOT(OnFtpCommandFinished(int,bool))); connect(&ftp_,SIGNAL(listInfo(const QUrlInfo&)), this,SLOT(OnListInfo(const QUrlInfo&))); connect(&ftp_,SIGNAL(dataTransferProgress(qint64,qint64)), this,SLOT(OnDataTransferProgress(qint64,qint64))); setWindowTitle(tr("PP´«ÊäÖÐ")); setWindowFlags(Qt::FramelessWindowHint|Qt::WindowStaysOnTopHint); // this->setAutoFillBackground(false); // animation_ = new QPropertyAnimation(this,"pos"); // connect(animation_,SIGNAL(finished()), // this,SLOT(OnAnimationFinished())); connect(&hide_time_,SIGNAL(timeout()), this,SLOT(hide())); this->setObjectName("sld_rate"); ReSet(); redc_ = new RedC; redc_->Init(); connect(redc_,SIGNAL(TransferError(const QString&)), this,SLOT(OnDownLoadError(const QString&))); connect(redc_,SIGNAL(DataTransferProgress(qint64,qint64)), this,SLOT(OnDownLoadProgress(qint64,qint64))); connect(redc_,SIGNAL(DownLoadFinish(const QString&)), this,SLOT(OnDownLoadFinish(const QString&))); }
void Transfer::OnListFinish(bool error){ if(error){ ReSet(); return ; } switch(list_step_){ case IN_ROOT:{ if(have_host_){ ftp_.cd(HOST_NAME); } else{ ftp_.mkdir(HOST_NAME); } }break; case IN_HOST:{ if(have_user_dir_){ ftp_.cd(g_configuer->user_name_); } else{ ftp_.mkdir(g_configuer->user_name_); } }break; case IN_USER_NAME:{ if(have_no_file_){ PutFile(); } else{ have_no_file_ = true; ftp_.list(); } }break; default: break; } }
void Transfer::OnFtpCommandFinished(int,bool error){ switch(ftp_.currentCommand()){ case QFtp::ConnectToHost:{ if(error){ MessagePop("connect fail..."); } else{ MessagePop("connect ok..."); } }break; case QFtp::Login:{ if(error){ MessagePop("login fail..."); } else{ MessagePop("login ok..."); } }break; case QFtp::Close:{ if(error){ MessagePop("close fail..."); } }break; case QFtp::List:{ if(error){ MessagePop("list fail..."); } else{ MessagePop("list ok..."); } OnListFinish(error); }break; case QFtp::Cd:{ if(error){ MessagePop("cd fail..."); } else{ MessagePop("cd ok..."); } OnCdFinish(error); }break; case QFtp::Put: if(error){ MessagePop("put fail..."); } else{ MessagePop("put ok..."); } ReSet(); break; case QFtp::Remove: if(error){ MessagePop("rm fail..."); } else{ MessagePop("rm ok..."); } OnRmFileFinish(error); break; case QFtp::Mkdir:{ if(error){ MessagePop("mkdir fail..."); } else{ MessagePop("mkdir ok..."); } OnMkdirFinish(error); } break; default: if(error){ MessagePop(QString("op[%d] fail...").arg(ftp_.currentCommand())); } break; } }
KG3DTransformation::KG3DTransformation(void) { ReSet(); }