- int sel = 0;
- //QModelIndexList list = ui.imagesTreeView-selectedIndexes();
- QModelIndexList indices = ui.imagesTreeView->selectionModel()->selectedRows();
- QModelIndexList::iterator it = indices.begin();
- for(; it != indices.end(); it++)
- sel = it->row();
- QModelIndex index;
- QVariant elt= Patientmodel->data(index.sibling(ui.patientTreeView->selectionModel()->selectedRows().first().row(),1));
-
-
- gdcm::ERootType theRoot = gdcm::ePatientRootType;//ePatientRootType;
- std::vector<gdcm::DataSet> theDataSet;
- std::vector< std::pair<gdcm::Tag, std::string> > keys;
-
-
- // Study Description
- // gdcm::Tag tagsdc(0x0010,0x0020);
- //keys.push_back(std::make_pair(tagsdc, elt.toString().toStdString()));
-
-
- // Study Description
-
-
- //gdcm::SmartPointer<gdcm::BaseRootQuery> theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, m_level ,fillMoveKeys(), true);
-
- bool didItWork = gdcm::CompositeNetworkFunctions::CMove(m_adress.c_str(),atoi(m_port.c_str()), m_query, getDicomClientPort(),
- getDicomClientAETitle().c_str(), m_aetitle.c_str(),"D:\\move" );
- gdcm::Directory theDir;
- theDir.Load("D:\\move");
+ 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(), path.toStdString().c_str() );
+ gdcm::Directory theDir;
+ theDir.Load(path.toStdString().c_str());