#include "qt/view/QtViewFactory.h" #include "component/view/GraphViewStyle.h" #include "qt/view/QtCodeView.h" #include "qt/view/QtCompositeView.h" #include "qt/view/QtDialogView.h" #include "qt/view/QtErrorView.h" #include "qt/view/QtGraphView.h" #include "qt/view/QtGraphViewStyleImpl.h" #include "qt/view/QtLogView.h" #include "qt/view/QtMainView.h" #include "qt/view/QtRefreshView.h" #include "qt/view/QtSearchView.h" #include "qt/view/QtStatusBarView.h" #include "qt/view/QtTabbedView.h" #include "qt/view/QtUndoRedoView.h" QtViewFactory::QtViewFactory() { } QtViewFactory::~QtViewFactory() { } std::shared_ptr QtViewFactory::createMainView() const { return std::make_shared(); } std::shared_ptr QtViewFactory::createCompositeView( ViewLayout* viewLayout, CompositeView::CompositeDirection direction, const std::string& name ) const { std::shared_ptr ptr = std::make_shared(viewLayout, direction, name); ptr->init(); ptr->addToLayout(); return ptr; } std::shared_ptr QtViewFactory::createTabbedView(ViewLayout* viewLayout, const std::string& name) const { std::shared_ptr ptr = std::make_shared(viewLayout, name); ptr->init(); ptr->addToLayout(); return ptr; } std::shared_ptr QtViewFactory::createCodeView(ViewLayout* viewLayout) const { return View::createInitAndAddToLayout(viewLayout); } std::shared_ptr QtViewFactory::createErrorView(ViewLayout* viewLayout) const { return View::createInitAndAddToLayout(viewLayout); } std::shared_ptr QtViewFactory::createLogView(ViewLayout* viewLayout) const { return View::createInitAndAddToLayout(viewLayout); } std::shared_ptr QtViewFactory::createGraphView(ViewLayout* viewLayout) const { GraphViewStyle::setImpl(std::make_shared()); return View::createInitAndAddToLayout(viewLayout); } std::shared_ptr QtViewFactory::createRefreshView(ViewLayout* viewLayout) const { return View::createInitAndAddToLayout(viewLayout); } std::shared_ptr QtViewFactory::createSearchView(ViewLayout* viewLayout) const { return View::createInitAndAddToLayout(viewLayout); } std::shared_ptr QtViewFactory::createStatusBarView(ViewLayout* viewLayout) const { return View::createAndInit(viewLayout); } std::shared_ptr QtViewFactory::createUndoRedoView(ViewLayout* viewLayout) const { return View::createInitAndAddToLayout(viewLayout); } std::shared_ptr QtViewFactory::createDialogView(ViewLayout* viewLayout, StorageAccess* storageAccess) const { return std::make_shared(dynamic_cast(viewLayout)->getMainWindow(), storageAccess); }