X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvQPacsConnection.cxx;h=4ae0d33b9981bdddc7a31e98e2f2aa0b55c16b7f;hb=632adadb8b9230458aeab8ddccc736d674edc87a;hp=8f40ae6405b839e39cf5ea5d8c26a99cae94e35f;hpb=86d74c7664c5d6d11637ba376b639aa3c6e0e057;p=clitk.git diff --git a/vv/vvQPacsConnection.cxx b/vv/vvQPacsConnection.cxx index 8f40ae6..4ae0d33 100644 --- a/vv/vvQPacsConnection.cxx +++ b/vv/vvQPacsConnection.cxx @@ -16,7 +16,7 @@ vvQPacsConnection::vvQPacsConnection(QWidget *i_parent) :QDialog(i_parent) { ui.setupUi(this); - setWindowTitle(QString::fromUtf8("PACS CONNECTIONHHHH")); + setWindowTitle(QString::fromUtf8("PACS CONNECTION")); createTreeView(); ui.tabFilter->setTabText(0,QString(tr("Modality"))); ui.tabFilter->setTabText(1,QString(tr("Date"))); @@ -31,10 +31,18 @@ vvQPacsConnection::vvQPacsConnection(QWidget *i_parent) connect(ui.networkCombo,SIGNAL(currentIndexChanged(int)),this,SLOT(chooseServer(int))); connect(ui.removeNetworkButton,SIGNAL(clicked()),this,SLOT(removeServer())); connect(ui.NetworkButton,SIGNAL(clicked()),this,SLOT(modifyServer())); + connect(ui.exitButton,SIGNAL(clicked()),this,SLOT(close())); update(); } +// Exit window +bool vvQPacsConnection::close() +{ + QApplication::restoreOverrideCursor(); + return QWidget::close(); +} + // remote a Dicom Server in VV settings void vvQPacsConnection::removeServer() { @@ -47,8 +55,13 @@ void vvQPacsConnection::removeServer() // modify a Dicom Server in VV settings void vvQPacsConnection::modifyServer() { + int indexCombo = ui.networkCombo->currentIndex(); + removeDicomServer(m_nickname); AddDicomServer(ui.NameEdit->text().toStdString(),ui.AETitleEdit->text().toStdString(),ui.AdressEdit->text().toStdString(),ui.PortEdit->text().toStdString()); - removeServer(); + ui.networkCombo->clear(); + ui.networkCombo->addItem(QString()); + ui.networkCombo->addItems(getDicomServers()); + ui.networkCombo->setCurrentIndex(indexCombo); } // refresh the list of Dicom Servers available from VV settings @@ -306,7 +319,7 @@ std::vector< std::pair > vvQPacsConnection::getKeys() //gdcm::Tag tagsdc(8,1030); //keys.push_back(std::make_pair(tagsdc, "")); - //// Accession n° + //// Accession //gdcm::Tag tagacc(8,50); //keys.push_back(std::make_pair(tagacc, "")); @@ -383,7 +396,7 @@ void vvQPacsConnection::on_importButton_clicked() 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), + gdcm::CompositeNetworkFunctions::ConstructQuery(mQFactory.getMoveQuery().theRoot, mQFactory.getMoveQuery().theLevel ,mQFactory.getMoveQuery().keys, gdcm::eMove), getDicomClientPort(), getDicomClientAETitle().c_str(), m_aetitle.c_str(), path.toStdString().c_str() ); gdcm::Directory theDir; theDir.Load(path.toStdString().c_str()); @@ -393,7 +406,7 @@ void vvQPacsConnection::on_importButton_clicked() NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New(); nameGenerator->SetUseSeriesDetails(true); - //ds gérer recursive moi-meme pour progress ... + //ds gerer recursive moi-meme pour progress ... nameGenerator->SetInputDirectory(path.toStdString()); // insert in table