ui: basic search view
- Added a basic SearchView (+ controller and qt implementation) - SearchView can set the active element of other views by dispatching a message. - SearchView adjusts its text when the active element is changed by other views. - Added wrappers for Button and EditBox that allow the usage of simple callback functions.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#ifndef SEARCH_CONTROLLER_H
|
||||
#define SEARCH_CONTROLLER_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "component/controller/Controller.h"
|
||||
#include "utility/messaging/MessageListener.h"
|
||||
#include "utility/messaging/type/MessageActivateToken.h"
|
||||
|
||||
class GraphAccess;
|
||||
class SearchView;
|
||||
|
||||
class SearchController
|
||||
: public Controller
|
||||
, public MessageListener<MessageActivateToken>
|
||||
{
|
||||
public:
|
||||
SearchController(std::shared_ptr<GraphAccess> graphAccess);
|
||||
~SearchController();
|
||||
|
||||
void search(const std::string& s);
|
||||
//void autocomplete(const std::string& s);
|
||||
|
||||
private:
|
||||
virtual void handleMessage(MessageActivateToken* message);
|
||||
SearchView* getView();
|
||||
|
||||
std::shared_ptr<GraphAccess> m_graphAccess;
|
||||
};
|
||||
|
||||
#endif // SEARCH_CONTROLLER_H
|
||||
Reference in New Issue
Block a user