|  | @@ -41,42 +41,42 @@ int main(int argc, char *argv[])
 | 
											
												
													
														|  |      //QWidget *w_=new QWidget;
 |  |      //QWidget *w_=new QWidget;
 | 
											
												
													
														|  |      w.show();
 |  |      w.show();
 | 
											
												
													
														|  |  //初始化状态机
 |  |  //初始化状态机
 | 
											
												
													
														|  | -//    stateMachine* recvstate= new stateMachine("recvClient");
 |  | 
 | 
											
												
													
														|  | -//    QThread *thread_recvsate = new QThread();
 |  | 
 | 
											
												
													
														|  | -//    QThread *thread_sendstate = new QThread();
 |  | 
 | 
											
												
													
														|  | -//    //QThread *thread_handlePool = new QThread();
 |  | 
 | 
											
												
													
														|  | -//    stateMachine* sendstate= new stateMachine("sendClient") ;
 |  | 
 | 
											
												
													
														|  | -//    handlePool *handle = new handlePool();
 |  | 
 | 
											
												
													
														|  | 
 |  | +    stateMachine* recvstate= new stateMachine("recvClient");
 | 
											
												
													
														|  | 
 |  | +    QThread *thread_recvsate = new QThread();
 | 
											
												
													
														|  | 
 |  | +    QThread *thread_sendstate = new QThread();
 | 
											
												
													
														|  | 
 |  | +    //QThread *thread_handlePool = new QThread();
 | 
											
												
													
														|  | 
 |  | +    stateMachine* sendstate= new stateMachine("sendClient") ;
 | 
											
												
													
														|  | 
 |  | +    handlePool *handle = new handlePool(&w);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -//    recvstate->moveToThread(thread_recvsate);
 |  | 
 | 
											
												
													
														|  | -//    thread_recvsate->start();
 |  | 
 | 
											
												
													
														|  | -//    sendstate->moveToThread(thread_sendstate);
 |  | 
 | 
											
												
													
														|  | -//    thread_sendstate->start();
 |  | 
 | 
											
												
													
														|  | -//    //handle->moveToThread(thread_handlePool);
 |  | 
 | 
											
												
													
														|  | -//    //thread_handlePool->start();
 |  | 
 | 
											
												
													
														|  | 
 |  | +    recvstate->moveToThread(thread_recvsate);
 | 
											
												
													
														|  | 
 |  | +    thread_recvsate->start();
 | 
											
												
													
														|  | 
 |  | +    sendstate->moveToThread(thread_sendstate);
 | 
											
												
													
														|  | 
 |  | +    thread_sendstate->start();
 | 
											
												
													
														|  | 
 |  | +    //handle->moveToThread(thread_handlePool);
 | 
											
												
													
														|  | 
 |  | +    //thread_handlePool->start();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -//    QObject::connect(handle,SIGNAL(sendImg_handlePoolToSendstate(std::string)),sendstate,SLOT(getImg_handlePoolToSendstate(std::string)));
 |  | 
 | 
											
												
													
														|  | -//    QObject::connect(recvstate,SIGNAL(sendmsg_recvstateTohandlePool(std::string)),handle,SLOT(getmsg_recvstateTohandlePool(std::string)));
 |  | 
 | 
											
												
													
														|  | -//    QObject::connect(handle,SIGNAL(sendWidget_handlePoolToWidget(QWidget*)),&w,SLOT(getWidget_handlePoolToWidget(QWidget*)));
 |  | 
 | 
											
												
													
														|  | -    QVTKRenderer* render_ = new QVTKRenderer();
 |  | 
 | 
											
												
													
														|  | -    render_->init();
 |  | 
 | 
											
												
													
														|  | 
 |  | +    QObject::connect(handle,SIGNAL(sendImg_handlePoolToSendstate(std::string)),sendstate,SLOT(getImg_handlePoolToSendstate(std::string)));
 | 
											
												
													
														|  | 
 |  | +    QObject::connect(recvstate,SIGNAL(sendmsg_recvstateTohandlePool(std::string)),handle,SLOT(getmsg_recvstateTohandlePool(std::string)));
 | 
											
												
													
														|  | 
 |  | +    //QObject::connect(handle,SIGNAL(sendWidget_handlePoolToWidget(QWidget*)),&w,SLOT(getWidget_handlePoolToWidget(QWidget*)));
 | 
											
												
													
														|  | 
 |  | +//    QVTKRenderer* render_ = new QVTKRenderer();
 | 
											
												
													
														|  | 
 |  | +//    render_->init();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -    QString m_filePath="F:\\czm\\adicode\\CAE_Solution\\CAE_Solution\\tf.ugrid";
 |  | 
 | 
											
												
													
														|  | -    //if(m_filePath.isEmpty())return;
 |  | 
 | 
											
												
													
														|  | -    MeshManager *meshmanager = MeshManager::getInstance();
 |  | 
 | 
											
												
													
														|  | 
 |  | +//    QString m_filePath="F:\\czm\\adicode\\CAE_Solution\\CAE_Solution\\tf.ugrid";
 | 
											
												
													
														|  | 
 |  | +//    //if(m_filePath.isEmpty())return;
 | 
											
												
													
														|  | 
 |  | +//    MeshManager *meshmanager = MeshManager::getInstance();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -    bool f = meshmanager->LoadData(m_filePath);
 |  | 
 | 
											
												
													
														|  | -    cout<<"f:"<<f<<endl;
 |  | 
 | 
											
												
													
														|  | -    if(f){
 |  | 
 | 
											
												
													
														|  | -        if(render_){
 |  | 
 | 
											
												
													
														|  | -            meshmanager->DisplayMesh(render_);
 |  | 
 | 
											
												
													
														|  | -            render_->ZoomToExtents();
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -    }
 |  | 
 | 
											
												
													
														|  | 
 |  | +//    bool f = meshmanager->LoadData(m_filePath);
 | 
											
												
													
														|  | 
 |  | +//    cout<<"f:"<<f<<endl;
 | 
											
												
													
														|  | 
 |  | +//    if(f){
 | 
											
												
													
														|  | 
 |  | +//        if(render_){
 | 
											
												
													
														|  | 
 |  | +//            meshmanager->DisplayMesh(render_);
 | 
											
												
													
														|  | 
 |  | +//            render_->ZoomToExtents();
 | 
											
												
													
														|  | 
 |  | +//        }
 | 
											
												
													
														|  | 
 |  | +//    }
 | 
											
												
													
														|  |      //w.addTab(render_->GetWidget(),"test");
 |  |      //w.addTab(render_->GetWidget(),"test");
 | 
											
												
													
														|  |      //render_->Update();
 |  |      //render_->Update();
 | 
											
												
													
														|  |      //render_->GetWidget()->show();
 |  |      //render_->GetWidget()->show();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -     w.addTab(render_->GetWidget(),"test");
 |  | 
 | 
											
												
													
														|  | 
 |  | +     //w.addTab(render_->GetWidget(),"test");
 | 
											
												
													
														|  |      return a.exec();
 |  |      return a.exec();
 | 
											
												
													
														|  |  }
 |  |  }
 |