]> Creatis software - creaImageIO.git/blob - src/creaImageIOWxPACSConnectionPanel.cpp
36b22d45683899d8abaa04ad377d447e0eb553eb
[creaImageIO.git] / src / creaImageIOWxPACSConnectionPanel.cpp
1 #include <creaImageIOWxPACSConnectionPanel.h>
2 #include <creaImageIOPACSConnection.h>
3 #include <creaImageIOSystem.h>
4
5 namespace creaImageIO
6 {
7   // CTor
8   WxPACSConnectionPanel::WxPACSConnectionPanel(wxWindow *parent, wxDialog* dial, WxGimmickView* view)
9  :   wxPanel( parent, 
10                   -1, wxDefaultPosition, 
11                   wxDefaultSize,
12                   wxRESIZE_BORDER | 
13               wxSYSTEM_MENU  |
14                   wxCLOSE_BOX |
15                   wxMAXIMIZE_BOX | 
16                   wxMINIMIZE_BOX | 
17                   wxCAPTION  
18                ),       
19                    dialog(dial),
20                    mView(view)
21   {
22     GimmickDebugMessage(1,"WxPACSConnectionPanel::WxPACSConnectionPanel"
23                         <<std::endl);
24         wxStaticText * dicId=new wxStaticText(this,-1,_T(" DICOM Identification: "), wxPoint(5,5));
25         wxStaticText * aet=new wxStaticText(this,-1,_T(" AETitle: "), wxPoint(5,25));
26         aeTitle=new wxTextCtrl(this, wxID_ANY, _T("MyAeTitle"), wxPoint(75,25), wxSize(220,20));
27
28         wxStaticText * pn=new wxStaticText(this,-1,_T(" Port Number: "), wxPoint(5,53));
29         pNumber=new wxTextCtrl(this, wxID_ANY, _T("3306"), wxPoint(75,50), wxSize(220,20));
30         wxStaticText * adv1=new wxStaticText(this,-1,_T(" (1 - 131072) "), wxPoint(300,53));
31
32         wxStaticText * ad=new wxStaticText(this,-1,_T(" Address: "), wxPoint(5,80));
33         address=new wxTextCtrl(this, wxID_ANY, _T("localhost"), wxPoint(75,75), wxSize(220,20));
34         
35         wxButton *query = new wxButton(this,wxID_ANY,_T("Query PACS Server"), wxPoint(5,110) );
36         Connect( query->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxPACSConnectionPanel::OnQueryPACS ); 
37    
38     Layout(); 
39   }
40
41   /// Destructor
42   WxPACSConnectionPanel::~WxPACSConnectionPanel()
43   {
44     GimmickDebugMessage(1,"WxPACSConnectionPanel::~WxPACSConnectionPanel"
45                         <<std::endl);
46   }
47
48   void WxPACSConnectionPanel::OnQueryPACS(wxCommandEvent& event)
49   {
50           PACSConnection* pc=new PACSConnection(crea::wx2std(aeTitle->GetValue()));
51           //mView->OnListenerCallback(crea::wx2std(drives->GetValue()),addFiles, removeFiles);
52           //dialog->Destroy();
53   }
54   
55 //======================================================================
56   
57 //====================================================================== 
58
59 } // EO namespace creaImageIO
60
61