]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOWxGimmickTools.cpp
memory leak tracking
[creaImageIO.git] / src2 / creaImageIOWxGimmickTools.cpp
index f2f082a74f7503795220f7dd6a5f79007cd897c1..fc978c76c28b9028f54b52c10be9f467ef3b0db3 100644 (file)
@@ -1,5 +1,6 @@
 #include <creaImageIOWxGimmickTools.h>
 
+
 namespace creaImageIO
 {
        /**
@@ -11,29 +12,29 @@ namespace creaImageIO
                _currentDir = mCurrentDirectory;
                _addFiles = true;
 
-               _inputPath   = new wxTextCtrl(this, wxID_ANY, _T(""), wxDefaultPosition, wxSize(150,30));
-               _outputPath  = new wxTextCtrl(this, wxID_ANY, _T(""), wxDefaultPosition, wxSize(150,30));
+               _inputPath   = new wxTextCtrl(this, wxID_ANY, _T(""), wxDefaultPosition, wxSize(400,30));
+               _outputPath  = new wxTextCtrl(this, wxID_ANY, _T(""), wxDefaultPosition, wxSize(400,30));
                _addCheckBox = new wxCheckBox(this, -1,       _T("Add Images to Database?") );
                _addCheckBox->SetValue(_addFiles);
 
-               wxButton *inputDir  = new wxButton(this,wxID_ANY,_T("Input Directory"),  wxDefaultPosition, wxSize(150,30) );
-               wxButton *outputDir = new wxButton(this,wxID_ANY,_T("Output Directory"), wxDefaultPosition, wxSize(150,30) );
+               wxButton *inputDir  = new wxButton(this,wxID_ANY,_T("Input Directory"),  wxDefaultPosition, wxSize(140,30) );
+               wxButton *outputDir = new wxButton(this,wxID_ANY,_T("Output Directory"), wxDefaultPosition, wxSize(140,30) );
 
                Connect( inputDir->GetId(),     wxEVT_COMMAND_BUTTON_CLICKED ,  (wxObjectEventFunction) &WxGimmickTools::onInputDir ); 
                Connect( outputDir->GetId(),    wxEVT_COMMAND_BUTTON_CLICKED ,  (wxObjectEventFunction) &WxGimmickTools::onOutputDir );
                Connect( _addCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &WxGimmickTools::onAddToDatabase );
 
-               wxFlexGridSizer * textSizer     = new wxFlexGridSizer(1,2);
-               textSizer->Add( new wxStaticText(this,-1,_T("Transform a Bruker image into Dicom format."))  , 1, wxGROW );
-               textSizer->Add( new wxStaticText(this,-1,_T("If checkbox is selected images will be loaded into the DB."))  , 1, wxGROW );
+               wxFlexGridSizer *textSizer = new wxFlexGridSizer(1,2);
+               textSizer->Add( new wxStaticText(this, -1, _T("Transform a Bruker image into Dicom format.")),                1, wxGROW );
+               textSizer->Add( new wxStaticText(this, -1, _T("If checkbox is selected images will be loaded into the DB.")), 1, wxGROW );
 
-               wxFlexGridSizer * sizer = new wxFlexGridSizer(2,5);
+               wxFlexGridSizer *sizer  = new wxFlexGridSizer(2,5);
                sizer->Add( new wxStaticText(this, -1, _T(" ")), 1, wxGROW );
                sizer->Add( new wxStaticText(this, -1, _T(" ")), 1, wxGROW );
-               sizer->Add( _inputPath, 1, wxGROW );
-               sizer->Add( inputDir, 1, wxGROW );
-               sizer->Add( _outputPath, 1, wxGROW );
-               sizer->Add( outputDir, 1, wxGROW );
+               sizer->Add( _inputPath,   1, wxGROW );
+               sizer->Add( inputDir,     1, wxGROW );
+               sizer->Add( _outputPath,  1, wxGROW );
+               sizer->Add( outputDir,    1, wxGROW );
                sizer->Add( new wxStaticText(this, -1, _T(" ")), 1, wxGROW );
                sizer->Add( new wxStaticText(this, -1, _T(" ")), 1, wxGROW );
                sizer->Add( _addCheckBox, 1, wxGROW );
@@ -53,12 +54,12 @@ namespace creaImageIO
 
        wxString WxGimmickTools::getInputDir()
        {
-               return _inputPath->GetLabel();
+               return _inputPath->GetValue();
        }
 
        wxString WxGimmickTools::getOutputDir()
        {
-               return _outputPath->GetLabel();
+               return _outputPath->GetValue();
        }
 
        bool WxGimmickTools::getCheckBoxValue()
@@ -72,10 +73,8 @@ namespace creaImageIO
                wxDirDialog* FD = new wxDirDialog( 0, _T("Select the Input Directory"), _currentDir, style);
                              
                if (FD->ShowModal()==wxID_OK)
-               {
-                         
+               {  
                        _inputPath->SetValue(FD->GetPath());
-
                }
        }