• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

editorcreator.h

Go to the documentation of this file.
00001 #ifndef EDITORCREATOR_H
00002 #define EDITORCREATOR_H
00003 
00004 #include <QDebug>
00005 
00006 #include "baseeditor.h"
00007 #include "projecteditor.h"
00008 #include "calibrationeditor.h"
00009 
00013 template <class T>
00014 class EditorCreator {
00015 public:
00016     static BaseEditor* createEditor(){
00017         return new T;
00018     }
00019 
00020     static EditorCreator *instance(){
00021         EditorCreator editor;
00022         return &editor;
00023     }
00024 
00025 protected:
00026     EditorCreator(){};
00027     EditorCreator(EditorCreator &){};
00028 };
00029 
00030 Q_DECLARE_METATYPE(BaseEditor* (*)());
00031 
00032 #endif // EDITORCREATOR_H

Generated on Tue Aug 24 2010 15:58:55 for Smartlet by  doxygen 1.7.1