// clean the different model Trees
void vvQPacsConnection::cleanTree()
{
- Patientmodel->removeRows(0,Patientmodel->rowCount(),QModelIndex());
- Studymodel->removeRows(0,Patientmodel->rowCount(),QModelIndex());
- Seriesmodel->removeRows(0,Patientmodel->rowCount(),QModelIndex());
- Imagesmodel->removeRows(0,Patientmodel->rowCount(),QModelIndex());
+ Patientmodel->removeRows(0,Patientmodel->rowCount());
+ Studymodel->removeRows(0,Patientmodel->rowCount());
+ Seriesmodel->removeRows(0,Patientmodel->rowCount());
+ Imagesmodel->removeRows(0,Patientmodel->rowCount());
}
Seriesmodel->removeRows(0, Seriesmodel->rowCount(),QModelIndex());
Imagesmodel->removeRows(0, Imagesmodel->rowCount(),QModelIndex());
manageSeriesFilter(true);
- m_query = mQFactory.getQueryPatient("",m_patient);
convertDataSet( findQuery( mQFactory.getQueryforStudy(m_patient, false)) , Studymodel, mQFactory.getQueryKeysforStudy("",true));
}
+void vvQPacsConnection::clearMove()
+{
+}
void vvQPacsConnection::selectSeries(const QModelIndex &index)
{
m_study= Studymodel->data(index.sibling(index.row(),3)).toString().toStdString();
Seriesmodel->removeRows(0, Seriesmodel->rowCount());
Imagesmodel->removeRows(0, Imagesmodel->rowCount());
- m_query = mQFactory.getQueryforSeries(m_patient,m_study, false);
convertDataSet( findQuery( mQFactory.getQueryforSeries(m_patient,m_study, false)), Seriesmodel, mQFactory.getSeriesKeys("","",true));
}
{
m_series = Seriesmodel->data(index.sibling(index.row(),2)).toString().toStdString();
Imagesmodel->removeRows(0, Imagesmodel->rowCount(),QModelIndex());
- m_query = mQFactory.getQueryforImages(m_patient,m_study, m_series, false);
convertDataSet( findQuery( mQFactory.getQueryforImages(m_patient,m_study, m_series, false) ), Imagesmodel, mQFactory.getQueryKeysforImages("","","",true));
}
void vvQPacsConnection::on_importButton_clicked()
{
-
+ setCursor(QCursor(Qt::WaitCursor));
+ QString path = QDir::homePath() +QString::fromStdString("/.move");
+ QDir dirpath (path);
+ if (dirpath.exists())
+ {
+ QFileInfoList list = dirpath.entryInfoList( QDir::Files);
+ QFileInfoList::iterator it_file = dirpath.entryInfoList( QDir::Files).begin();
+ for(int i = 0; i < list.length() ; i++)
+ {
+ QFile::remove(list.at(i).filePath());
+ }
+ }
+ else
+ {
+ dirpath.mkdir(path);
+ }
bool didItWork = gdcm::CompositeNetworkFunctions::CMove(m_adress.c_str(),atoi(m_port.c_str()),
gdcm::CompositeNetworkFunctions::ConstructQuery(mQFactory.getMoveQuery().theRoot, mQFactory.getMoveQuery().theLevel ,mQFactory.getMoveQuery().keys,true),
- getDicomClientPort(), getDicomClientAETitle().c_str(), m_aetitle.c_str(),"D:\\move" );
+ getDicomClientPort(), getDicomClientAETitle().c_str(), m_aetitle.c_str(), path.toStdString().c_str() );
gdcm::Directory theDir;
- theDir.Load("D:\\move");
+ theDir.Load(path.toStdString().c_str());
m_files = theDir.GetFilenames();
+
accept();
+ setCursor(QCursor(Qt::ArrowCursor));
}
+
+
std::vector <std::string> vvQPacsConnection::getFileNames()
{
std::vector <std::string> filenames;