qSlicerCoreApplication.h

Go to the documentation of this file.
00001 /*=auto=========================================================================
00002 
00003  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) 
00004  All Rights Reserved.
00005 
00006  See Doc/copyright/copyright.txt
00007  or http://www.slicer.org/copyright/copyright.txt for details.
00008 
00009  Program:   3D Slicer
00010 
00011 =========================================================================auto=*/
00012 
00013 #ifndef __qSlicerCoreApplication_h
00014 #define __qSlicerCoreApplication_h
00015 
00017 #include <qCTKPimpl.h>
00018 
00020 #include <QApplication>
00021 
00022 #include "vtkSlicerConfigure.h" // For Slicer3_USE_KWWIDGETS, Slicer3_USE_PYTHONQT
00023 
00024 #include "qSlicerBaseQTCoreExport.h"
00025 
00026 class vtkSlicerApplicationLogic;
00027 class vtkMRMLScene;
00028 class qSlicerModuleManager;
00029 class qSlicerCoreIOManager;
00030 class qSlicerCoreCommandOptions; 
00031 class qSlicerCoreApplicationPrivate;
00032 class qCTKSettings;
00033 #ifdef Slicer3_USE_PYTHONQT
00034 class qSlicerPythonManager;
00035 #endif
00036 
00037 class Q_SLICER_BASE_QTCORE_EXPORT qSlicerCoreApplication : public QApplication
00038 {
00039   Q_OBJECT
00040 
00041 public:
00042 
00043   typedef QApplication Superclass;
00044   qSlicerCoreApplication(int &argc, char **argv);
00045   virtual ~qSlicerCoreApplication();
00046 
00049   static qSlicerCoreApplication* application();
00050 
00057   void initialize(bool& exitWhenDone);
00058   
00062   bool initialized() const;
00063 
00066   vtkMRMLScene* mrmlScene() const;
00067 
00072   void setMRMLScene(vtkMRMLScene * scene);
00073 
00074 #ifdef Slicer3_USE_KWWIDGETS
00075 
00080   void initializePaths(const QString& programPath);
00081   
00087   void setInitialized(bool initialized);
00088   
00093   void setAppLogic(vtkSlicerApplicationLogic* appLogic);
00094 
00100   void setModuleManager(qSlicerModuleManager* moduleManager);
00101 
00102 #endif //Slicer3_USE_KWWIDGETS
00103 
00105   vtkSlicerApplicationLogic* appLogic() const;
00106   
00109   QString slicerHome() const;
00110 
00114   void setSlicerHome(const QString& slicerHome);
00115 
00119   QString intDir()const;
00120 
00123   bool isInstalled();
00124 
00125 #ifdef Slicer3_USE_PYTHONQT
00128   qSlicerPythonManager* pythonManager()const;
00129 #endif
00130 
00133   qSlicerModuleManager* moduleManager()const;
00134 
00137   qSlicerCoreIOManager* coreIOManager()const;
00138 
00141   void setCoreIOManager(qSlicerCoreIOManager* ioManager);
00142 
00145   qSlicerCoreCommandOptions* coreCommandOptions()const;
00146 
00149   void setCoreCommandOptions(qSlicerCoreCommandOptions* options);
00150 
00154   qCTKSettings* settings();
00155 
00160   void disableSettings();
00161 
00163   void clearSettings();
00164 
00165 protected:
00166   
00168   virtual void handlePreApplicationCommandLineArguments();
00169 
00170 protected slots:
00171 
00173   virtual void handleCommandLineArguments();
00174 
00175 signals:
00176   void currentMRMLSceneChanged(vtkMRMLScene* mrmlScene);
00177 
00178 private:
00179   QCTK_DECLARE_PRIVATE(qSlicerCoreApplication);
00180 };
00181 
00182 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1