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
+30
View File
@@ -1,5 +1,35 @@
#include "component/view/View.h"
#include "component/view/ViewManager.h"
View::View(std::shared_ptr<ViewManager> viewManager, std::shared_ptr<GuiElement> rootElement, const Vec2i& minSize)
: m_viewManager(viewManager)
, m_rootElement(rootElement)
, m_minSize(minSize)
{
m_viewManager->addView(this);
}
View::~View()
{
m_viewManager->removeView(this);
}
std::shared_ptr<GuiElement> View::getRootElement()
{
return m_rootElement;
}
int View::getMinWidth() const
{
return m_minSize.x;
}
int View::getMinHeight() const
{
return m_minSize.y;
}
Vec2i View::getMinSize() const
{
return m_minSize;
}