~ubuntu-branches/ubuntu/wily/ginkgocadx/wily-proposed

« back to all changes in this revision

Viewing changes to src/cadxcore/main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2014-01-09 07:37:09 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20140109073709-rpuh5x3p3finvtze
Tags: 3.6.0.1228.33+dfsg-1
New upstream release [December 2013]

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include <wx/imaglist.h>
32
32
#include <wx/msgdlg.h>
33
33
 
 
34
#include <main/controllers/anonusagestats.h>
 
35
 
34
36
 
35
37
#define CLOUD_STUDY_UID "studyInstanceUID"
36
38
#define CLOUD_MD5 "md5File"
119
121
 
120
122
bool GNC::GUI::GinkgoCloudSearchDialog::Show(bool show)
121
123
{
 
124
        if (show) {
 
125
                LOG_STAT(ANON_STAT_DLG_CLOUD_SEARCH)
 
126
        }
122
127
        if (IsIconized()) {
123
128
                Iconize(false);
124
129
        }
424
429
        
425
430
        for (GNC::GCS::CloudFindCommandParams::Results::const_iterator itTuples = results.begin(); itTuples != results.end(); ++itTuples) {
426
431
                const GNC::GCS::CloudFindCommandParams::ResultTuple& tuple = (*itTuples);
427
 
                wxTreeItemId studyTreeId = m_pTreeListResults->AppendItem(topTreeId, wxString::FromUTF8(tuple.find(CLOUD_DESCRIPTION)->second.c_str()));
428
 
                m_pTreeListResults->SetItemText(studyTreeId, MODALITY_COLUMN, wxString::FromUTF8(tuple.find(CLOUD_MODALITIES)->second.c_str()));
429
 
                m_pTreeListResults->SetItemText(studyTreeId, CREATOR_USER_NAME_COLUMN, wxString::FromUTF8(tuple.find(CLOUD_CREATOR_USER_NAME)->second.c_str()));
430
 
                m_pTreeListResults->SetItemText(studyTreeId, LAST_MODIFICATOR_USER_NAME_COLUMN, wxString::FromUTF8(tuple.find(CLOUD_LAST_MOD_USER_NAME)->second.c_str()));
431
 
                wxDateTime wxDate;
432
 
                wxString dateStr = wxString::FromUTF8(tuple.find(CLOUD_DATE)->second.c_str());
433
 
                wxDate.ParseFormat( dateStr, wxT("%Y-%m-%d %H:%M:%S"), wxDefaultDateTime);
 
432
                wxTreeItemId studyTreeId;
 
433
                if (tuple.find(CLOUD_DESCRIPTION) != tuple.end()) {
 
434
                        studyTreeId = m_pTreeListResults->AppendItem(topTreeId, wxString::FromUTF8(tuple.find(CLOUD_DESCRIPTION)->second.c_str()));
 
435
                } else {
 
436
                        studyTreeId = m_pTreeListResults->AppendItem(topTreeId, _("?"));
 
437
                }
 
438
                if (tuple.find(CLOUD_MODALITIES) != tuple.end()) {
 
439
                        m_pTreeListResults->SetItemText(studyTreeId, MODALITY_COLUMN, wxString::FromUTF8(tuple.find(CLOUD_MODALITIES)->second.c_str()));
 
440
                } else {
 
441
                        m_pTreeListResults->SetItemText(studyTreeId, MODALITY_COLUMN, _("?"));
 
442
                }
 
443
                if (tuple.find(CLOUD_CREATOR_USER_NAME) != tuple.end()) {
 
444
                        m_pTreeListResults->SetItemText(studyTreeId, CREATOR_USER_NAME_COLUMN, wxString::FromUTF8(tuple.find(CLOUD_CREATOR_USER_NAME)->second.c_str()));
 
445
                } else {
 
446
                        m_pTreeListResults->SetItemText(studyTreeId, CREATOR_USER_NAME_COLUMN, _("?"));
 
447
                }
 
448
                if (tuple.find(CLOUD_CREATOR_USER_NAME) != tuple.end()) {
 
449
                        m_pTreeListResults->SetItemText(studyTreeId, LAST_MODIFICATOR_USER_NAME_COLUMN, wxString::FromUTF8(tuple.find(CLOUD_LAST_MOD_USER_NAME)->second.c_str()));
 
450
                } else {
 
451
                        m_pTreeListResults->SetItemText(studyTreeId, LAST_MODIFICATOR_USER_NAME_COLUMN, _("?"));
 
452
                }
 
453
 
 
454
                if (tuple.find(CLOUD_DATE) != tuple.end()) {
 
455
                        wxDateTime wxDate;
 
456
                        wxString dateStr = wxString::FromUTF8(tuple.find(CLOUD_DATE)->second.c_str());
 
457
                        wxDate.ParseFormat( dateStr, wxT("%Y-%m-%d %H:%M:%S"), wxDefaultDateTime);
434
458
                
435
 
                if(wxDate.IsValid()){
436
 
                        dateStr = wxString(wxDate.Format(_("%m/%d/%Y %H:%M:%S"), wxDateTime::TimeZone(wxDateTime::GMT1)));
437
 
                }
438
 
                m_pTreeListResults->SetItemText(studyTreeId, DATE_COLUMN, dateStr);
439
 
                m_pTreeListResults->SetItemText(studyTreeId, URL_COLUMN, wxString::FromUTF8(tuple.find(CLOUD_URL)->second.c_str()));
 
459
                        if(wxDate.IsValid()){
 
460
                                dateStr = wxString(wxDate.Format(_("%m/%d/%Y %H:%M:%S"), wxDateTime::TimeZone(wxDateTime::GMT1)));
 
461
                        }
 
462
                        m_pTreeListResults->SetItemText(studyTreeId, DATE_COLUMN, dateStr);
 
463
                }
 
464
                if (tuple.find(CLOUD_URL) != tuple.end()) {
 
465
                        m_pTreeListResults->SetItemText(studyTreeId, URL_COLUMN, wxString::FromUTF8(tuple.find(CLOUD_URL)->second.c_str()));
 
466
                }
440
467
                m_pTreeListResults->SetItemText(studyTreeId, BUCKET_ID_COLUMN, wxString::FromUTF8(bucketId.c_str()));
441
468
 
442
469
                //