logic: Use ControllerProxy in Bookmarking UI classes instead of messaging
* changed ControllerProxy to template class * allow passing method pointers and arguments to ControllerProxy * replaced some messages with ControllerProxy calls * moved logic from BookmarkView into BookmarkController
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef QT_BOOKMARK_VIEW_H
|
||||
#define QT_BOOKMARK_VIEW_H
|
||||
|
||||
#include "component/controller/BookmarkController.h"
|
||||
#include "component/controller/helper/ControllerProxy.h"
|
||||
#include "component/view/BookmarkView.h"
|
||||
|
||||
#include "qt/utility/QtThreadedFunctor.h"
|
||||
@@ -25,6 +27,13 @@ public:
|
||||
virtual void refreshView();
|
||||
|
||||
virtual void setCreateButtonState(const CreateButtonState& state);
|
||||
|
||||
virtual void displayBookmarkCreator(
|
||||
const std::vector<std::string>& names, const std::vector<BookmarkCategory>& categories, Id nodeId);
|
||||
virtual void displayBookmarkEditor(
|
||||
std::shared_ptr<Bookmark> bookmark, const std::vector<BookmarkCategory>& categories);
|
||||
|
||||
virtual void displayBookmarks(const std::vector<std::shared_ptr<Bookmark>>& bookmarks);
|
||||
virtual void enableDisplayBookmarks(bool enable);
|
||||
|
||||
virtual bool bookmarkBrowserIsVisible() const;
|
||||
@@ -34,13 +43,10 @@ private slots:
|
||||
void showBookmarksClicked();
|
||||
|
||||
private:
|
||||
virtual void displayBookmarks(const std::vector<std::shared_ptr<Bookmark>>& bookmarks);
|
||||
virtual void displayBookmarkCreator(const std::vector<std::string>& names, const std::vector<BookmarkCategory>& categories, Id nodeId);
|
||||
virtual void displayBookmarkEditor(std::shared_ptr<Bookmark> bookmark, const std::vector<BookmarkCategory>& categories);
|
||||
|
||||
void setStyleSheet();
|
||||
void refreshStyle();
|
||||
|
||||
ControllerProxy<BookmarkController> m_controllerProxy;
|
||||
QtThreadedLambdaFunctor m_onQtThread;
|
||||
|
||||
QFrame* m_widget;
|
||||
|
||||
Reference in New Issue
Block a user