ui: implemented gui abstraction and dummy view

- added abstract class tree for gui elements.
- implemented concrete gui classes that wrap the qt specific content.
- implemented first DummyView which plays nice with the ViewManager.

review id = 12
This commit is contained in:
malte_langkabel
2014-05-07 13:00:17 +02:00
parent 387618d922
commit 37d0dd33a4
51 changed files with 812 additions and 58 deletions
+20 -8
View File
@@ -1,10 +1,13 @@
#include "component/ComponentFactory.h"
#include "component/view/DummyView.h"
#include "component/controller/DummyController.h"
std::shared_ptr<ComponentFactory> ComponentFactory::create(
const std::shared_ptr<ViewManager>& viewManager,
const std::shared_ptr<GuiElementFactory>& guiElementFactory,
const std::shared_ptr<CodeAccess>& codeAccess,
const std::shared_ptr<GraphAccess>& graphAccess)
std::shared_ptr<ViewManager> viewManager,
std::shared_ptr<GuiElementFactory> guiElementFactory,
std::shared_ptr<CodeAccess> codeAccess,
std::shared_ptr<GraphAccess> graphAccess)
{
std::shared_ptr<ComponentFactory> ptr(new ComponentFactory());
ptr->m_viewManger = viewManager;
@@ -14,10 +17,19 @@ std::shared_ptr<ComponentFactory> ComponentFactory::create(
return ptr;
}
ComponentFactory::ComponentFactory()
{
}
ComponentFactory::~ComponentFactory()
{
}
std::shared_ptr<Component> ComponentFactory::createDummyComponent()
{
std::shared_ptr<View> view = std::make_shared<DummyView>(m_viewManger, m_guiElementFactory);
std::shared_ptr<Controller> controller = std::make_shared<DummyController>();
std::shared_ptr<Component> component = std::make_shared<Component>(view, controller);
return component;
}
ComponentFactory::ComponentFactory()
{
}