logic: code controller communication

- Replaced CodeAccess with LocationAccess.
- Implemented basic functionality for CodeController.
- Added messaging to the project.
- Added QtThreadedFunctor to enable our Messaging thread to invoke calls on the QtThread.
- Added GraphController.

fortune cookie message = Good news from someone dear is coming soon.
This commit is contained in:
malte_langkabel
2014-07-02 16:42:33 +02:00
parent a8e32af5dd
commit 400e2629d2
37 changed files with 441 additions and 78 deletions
+18 -1
View File
@@ -9,6 +9,7 @@
class GuiWidgetWrapper;
class ViewLayout;
class Component;
class View
{
@@ -26,14 +27,20 @@ public:
virtual void initGui() = 0;
void setComponent(Component* component);
int getMinWidth() const;
int getMinHeight() const;
Vec2i getMinSize() const;
protected:
View(ViewLayout* viewLayout, const Vec2i& minSize);
View(ViewLayout* viewLayout, const Vec2i& minSize); // make public
template <typename ControllerType>
ControllerType* getController();
private:
Component* m_component;
ViewLayout* const m_viewLayout;
std::shared_ptr<GuiWidgetWrapper> m_widgetWrapper;
Vec2i m_minSize;
@@ -52,4 +59,14 @@ std::shared_ptr<T> View::create(ViewLayout* viewLayout)
return ptr;
}
template <typename ControllerType>
ControllerType* View::getController()
{
if (m_component)
{
return m_component->getController<ControllerType>();
}
return NULL;
}
#endif // VIEW_H