Jafar
|
00001 #ifndef _VIEWER_MANAGER_HPP_ 00002 #define _VIEWER_MANAGER_HPP_ 00003 00004 #include <QList> 00005 00006 namespace jafar { 00007 namespace qdisplay { 00008 00009 class Viewer; 00010 00016 class ViewerManager { 00017 public: 00023 ViewerManager(); 00024 ~ViewerManager(); 00028 inline static void registerViewer( jafar::qdisplay::Viewer* v) 00029 { 00030 if(instance()) instance()->m_list.append( v); 00031 } 00035 inline static void unregisterViewer( jafar::qdisplay::Viewer* v) 00036 { 00037 if(instance()) instance()->m_list.removeAll( v); 00038 } 00043 inline static ViewerManager* instance() { return s_instance; } 00047 inline QList<Viewer*> viewers() { return m_list; } 00051 static void closeAllViewer(); 00052 private: 00053 static ViewerManager* s_instance; 00054 QList<Viewer*> m_list; 00055 }; 00056 } 00057 } 00058 00059 #endif
Generated on Wed Oct 15 2014 00:37:25 for Jafar by doxygen 1.7.6.1 |