]> Creatis software - clitk.git/blob - vv/vvQPacsConnection.h
Merge branch 'master' into PacsConnection
[clitk.git] / vv / vvQPacsConnection.h
1 #ifndef __vvQPacsConnection_h_INCLUDED__
2 #define __vvQPacsConnection_h_INCLUDED__
3
4 #include <QWidget>
5 #include "ui_vvPacsConnection.h"
6 #include "gdcmCompositeNetworkFunctions.h"
7 #include <QStandardItemModel>
8 #include <QStringListModel>
9 #include <QFileDialog>
10 #include "vvDicomServerQueryFactory.h"
11
12   /**
13    * \ingroup GUI
14    */
15   //=====================================================================
16  //======================================================================
17
18
19
20 class vvQPacsConnection : public QDialog
21 {
22           Q_OBJECT
23 public:
24           //vvQPacsConnection(){}    
25           vvQPacsConnection(QWidget *parent=0);
26     
27           ~vvQPacsConnection(){}
28         void refreshNetworks();
29         std::vector <std::string> getFileNames();
30         void clearMove();
31
32 public slots:
33         void selectStudies(const QModelIndex &index);
34         void selectSeries(const QModelIndex &index);
35         void selectImages(const QModelIndex &index);
36         void selectImage(const QModelIndex &index);
37   private slots:
38     void on_scanButton_clicked();
39         void on_clearButton_clicked();
40         void on_optionsButton_clicked();
41         void on_check_ModAll_clicked(bool state);
42         void on_importButton_clicked();
43  void chooseServer(int index);
44  void removeServer();
45  void modifyServer();
46
47   private :
48
49                 
50           Ui::vvPacsConnection ui;
51         std::vector< std::pair<gdcm::Tag, std::string> > getKeys();
52         std::vector< std::pair<gdcm::Tag, std::string> > getStudyKeys(const std::string);
53         std::vector<gdcm::DataSet> findQuery(vvQuery i_query);
54
55         void manageStudiesFilter(bool i_enable);
56         void createTreeView();
57         void cleanTree();
58         void setNewPacs();
59         QStandardItemModel *Patientmodel;
60         QStandardItemModel *Studymodel;
61         QStandardItemModel *Seriesmodel;
62         QStandardItemModel *Imagesmodel;
63         void convertDataSet(std::vector<gdcm::DataSet> i_ds, QStandardItemModel *i_model, std::vector< std::pair<gdcm::Tag, std::string> > keys);
64         void manageSeriesFilter(bool i_enable);
65         std::vector< std::pair<gdcm::Tag, std::string> > fillMoveKeys();
66         std::string m_patient;
67         std::string m_study;
68         std::string m_series;
69         gdcm::EQueryLevel m_level;
70         std::string m_port;
71         std::string m_aetitle;
72         std::string m_adress;
73         std::string m_nickname;
74         vvDicomServerQueryFactory mQFactory;
75         vvQuery m_query;
76         vvQuery f_query;
77          gdcm::Directory::FilenamesType m_files;
78
79
80         
81   }; // class vvQPacsConnection
82   //=====================================================================
83
84   
85
86 #endif // __vvQPacsConnection_h_INCLUDED__
87
88