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

« back to all changes in this revision

Viewing changes to src/cadxcore/api/initwx.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2013-10-24 21:28:17 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20131024212817-ej1skb9og09d3ht6
Tags: 3.5.0.1137.31+dfsg-1
New upstream release [October 2013]

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *  $Id: initwx.cpp $
4
4
 *  Ginkgo CADx Project
5
5
 *
6
 
 *  Copyright 2008-12 MetaEmotion S.L. All rights reserved.
 
6
 *  Copyright 2008-14 MetaEmotion S.L. All rights reserved.
7
7
 *  http://ginkgo-cadx.com
8
8
 *
9
9
 *  This file is licensed under LGPL v3 license.
64
64
#include <vtkPolyDataMapper.h>
65
65
 
66
66
#include <itkObject.h>
 
67
#include <vtkThreadedStreamingPipeline.h>
 
68
#include <itkMultiThreader.h>
67
69
#if defined(_GINKGO_DEBUG) && !defined(OMITIR_VENTANA_ERRORES_VTK)
68
70
#include <vtkObject.h>
69
71
#endif
112
114
#include <main/controllers/thumbnailcontroller.h>
113
115
#include <main/controllers/historytoolscontroller.h>
114
116
#include <main/controllers/hangingprotocolcontroller.h>
 
117
#include <main/controllers/autocleaningcontroller.h>
115
118
 
116
119
#include <main/gui/mainwindow/ventanaprincipal.h>
117
120
 
274
277
        curl_global_init(CURL_GLOBAL_ALL);
275
278
 
276
279
        WriteHeaderLog();
277
 
 
 
280
        
 
281
        //esto es para que no casque
 
282
        m_pServer = NULL;
278
283
        #if defined(SINGLE_INSTANCE)
279
284
 
280
285
        //check numero de instancias del programa
285
290
        #else
286
291
        const wxString name(wxT("40000"));
287
292
        #endif
288
 
        //esto es para que no casque
289
 
        m_pServer = NULL;
290
293
        //comprobación una instancia
291
294
        //If using a single instance, use IPC to
292
295
        // communicate with the other instance
394
397
        #else
395
398
        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.help", _Std("Online manual"), "url_manual", _Std("URL of manual"), true, "http://doc.ginkgo-cadx.com/", true);
396
399
        #endif
397
 
        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.help", _Std("Online support"), "url_support", _Std("URL of online support"), true, _Std("http://ginkgo-cadx.com/en/services/"), true);
 
400
        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.help", _Std("Online support"), "url_support", _Std("URL of online support"), true, _Std("http://ginkgo-cadx.com/"), true);
398
401
        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.update", _Std("Program Updates"), "check_updates", _Std("Warn about newest Ginkgo CADx updates"), false, "http://updates.ginkgo-cadx.com/version3.xml", true);
399
402
        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.update", _Std("Program Updates"), "update_period", _Std("Update period (days)"), false, "2", true);
400
403
        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.seguridad",_Std("Security"), "setup_security", _Std("Setup Security"), false, "", false);
413
416
        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.importacion", _Std("Import"), "quality", _Std("Set compression, 0 implies no compression (0..14)"), false, "1", true);
414
417
        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.importacion", _Std("Import"), "codec", _Std("Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG Lossless)"), false, "0", true);
415
418
        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.importacion", _Std("Import"), "mantener", _Std("Don't change image codec (if possible)"), false, "", true);
 
419
        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.importacion", _Std("Import"), "skip_demographic", _Std("Skip demographic step if it's possible"), false, "", false);
416
420
 
417
421
        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.hl7", _Std("HL7 Service"), "autostart", _Std("Automatically start HL7 Sender service"), false, "", true);
418
422
        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.integracion", _Std("XML dicomization"), "send_message", _Std("Send Hl7 message when importing"), false, "", false);
437
441
 
438
442
        //
439
443
 
 
444
        itk::MultiThreader::SetGlobalDefaultNumberOfThreads(4);
 
445
        itk::MultiThreader::SetGlobalMaximumNumberOfThreads(4);
 
446
        vtkThreadedStreamingPipeline::SetMultiThreadedEnabled(true);
 
447
        vtkThreadedStreamingPipeline::SetAutoPropagatePush(true);
 
448
 
440
449
        /*
441
450
        vtkPolyDataMapper* m = vtkPolyDataMapper::New();
442
451
        m->GlobalImmediateModeRenderingOn();
455
464
        itk::Object::GlobalWarningDisplayOff();
456
465
#endif
457
466
 
 
467
 
458
468
        wxThread::SetConcurrency(wxThread::GetCPUCount());
459
469
 
460
470
        m_pVentanaLogo = NULL;
497
507
 
498
508
                {
499
509
                        wxWindowDisabler dis;
500
 
                        m_pVentanaPrincipal = new VentanaPrincipal(wxString::FromUTF8(GNC::Entorno::Instance()->GetApplicationName().c_str()));
 
510
                        m_pVentanaPrincipal = new VentanaPrincipal(NULL, wxString::FromUTF8(GNC::Entorno::Instance()->GetApplicationName().c_str()));
501
511
                        m_pVentanaPrincipal->Hide();
502
512
                        SetTopWindow(m_pVentanaPrincipal);
503
513
                }
591
601
#if defined(_GINKGO_ENABLE_SPLASH)
592
602
        m_pVentanaLogo = NULL;
593
603
#endif
 
604
        //launch auto cleaning controller...
 
605
        GNC::GCS::AutoCleaningController::Instance();
594
606
 
595
607
        return TRUE;
596
608
}
624
636
                LOG_ERROR("Core", _Std("Error unregistering tools: ") << ex.str())
625
637
        }
626
638
 
 
639
        GNC::GCS::AutoCleaningController::FreeInstance();
627
640
        GNC::GCS::ThumbnailController::FreeInstance();
628
641
        GNC::GCS::HangingProtocolController::FreeInstance();
629
642
        GNC::GCS::ControladorVistas::FreeInstance();