CmEditorWindowManager.cpp 611 B

123456789101112131415161718192021222324
  1. #include "CmEditorWindowManager.h"
  2. #include "CmException.h"
  3. namespace CamelotEditor
  4. {
  5. void EditorWindowManager::registerWindowFactory(EditorWindowFactory* factory)
  6. {
  7. assert(factory != nullptr);
  8. mFactories[factory->getWindowName()] = factory;
  9. }
  10. QtEditorWindow* EditorWindowManager::create(const QString& name) const
  11. {
  12. auto iterFind = mFactories.find(name);
  13. if(iterFind == mFactories.end())
  14. CM_EXCEPT(InvalidParametersException, "Window with the name: \"" + name.toStdString() + "\" doesn't exist.");
  15. //QtEditorWindow* window = iterFind->second.create(parent);
  16. }
  17. }