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:
@@ -1,11 +1,32 @@
|
||||
#ifndef CONTROLLER_H
|
||||
#define CONTROLLER_H
|
||||
|
||||
#include "component/Component.h"
|
||||
|
||||
class Controller
|
||||
{
|
||||
public:
|
||||
Controller();
|
||||
virtual ~Controller();
|
||||
|
||||
void setComponent(Component* component);
|
||||
|
||||
protected:
|
||||
template <typename ViewType>
|
||||
ViewType* getView();
|
||||
|
||||
private:
|
||||
Component* m_component;
|
||||
|
||||
};
|
||||
|
||||
|
||||
template <typename ViewType>
|
||||
ViewType* Controller::getView()
|
||||
{
|
||||
if (m_component)
|
||||
return m_component->getView<ViewType>();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif // CONTROLLER_H
|
||||
|
||||
Reference in New Issue
Block a user