ui: Added tabs UI to top of main window (issue #215)
* Added tab bar to top of main window with UI/shortcuts similar to web browsers * ComponentManager offers components for 2 use-cases: application and tab * Application components: log view (status/errors), bookmarks, screen search, status bar, tabs, tooltips, dialogs and all tab views disabled * Tab components: graph, code, history and search * When a project is loaded there is always at least one tab, otherwise there is none * Each tab replaces the application views of the same name in the main layout when activated * Each tab has it's own TaskScheduler, to process tasks independent from other tabs * The application has a global TaskScheduler for application wide tasks * The singloton class TaskManager is responsible for managing the TaskSchedulers * MessageListeners and Messages hold an optional schedulerId, both must be set to only send to a specific TaskScheduler * Bookmark buttons where split off into a separate view per tab, bookmark managemement is done in the application * History menu processing is done by the QtMainWindow now * Screen search is an application component, the responders are always changed to the active tab * Plugin messages are opened in a new tab * Symbols can be opened in a new tab via middle click/context menu in graph, code, history dropdown * Full text index creation is mutexed now in PersistenStorage to make it fully thread-safe * All tabs are closed when switching projects * Tab contents are only animated when visible fortune cookie message = Catch your lucky star!
This commit is contained in:
@@ -24,45 +24,52 @@ class QtMainView
|
||||
, public MessageListener<MessageProjectNew>
|
||||
{
|
||||
public:
|
||||
QtMainView();
|
||||
QtMainView(const ViewFactory* viewFactory, StorageAccess* storageAccess);
|
||||
virtual ~QtMainView();
|
||||
|
||||
QtMainWindow* getMainWindow() const;
|
||||
|
||||
// ViewLayout implementation
|
||||
virtual void addView(View* view);
|
||||
virtual void removeView(View* view);
|
||||
void addView(View* view) override;
|
||||
void overrideView(View* view) override;
|
||||
void removeView(View* view) override;
|
||||
|
||||
virtual void showView(View* view);
|
||||
virtual void hideView(View* view);
|
||||
void showView(View* view) override;
|
||||
void hideView(View* view) override;
|
||||
|
||||
virtual void setViewEnabled(View* view, bool enabled);
|
||||
void setViewEnabled(View* view, bool enabled) override;
|
||||
|
||||
virtual View* findFloatingView(const std::string& name) const;
|
||||
View* findFloatingView(const std::string& name) const override;
|
||||
|
||||
virtual QStatusBar* getStatusBar();
|
||||
virtual void setStatusBar(QStatusBar* statusBar);
|
||||
void showOriginalViews() override;
|
||||
|
||||
QStatusBar* getStatusBar();
|
||||
void setStatusBar(QStatusBar* statusBar);
|
||||
|
||||
// MainView implementation
|
||||
virtual void loadLayout();
|
||||
virtual void saveLayout();
|
||||
void loadLayout() override;
|
||||
void saveLayout() override;
|
||||
|
||||
virtual void loadWindow(bool showStartWindow);
|
||||
void loadWindow(bool showStartWindow) override;
|
||||
|
||||
virtual void refreshView();
|
||||
void refreshView() override;
|
||||
|
||||
virtual void hideStartScreen();
|
||||
virtual void setTitle(const std::wstring& title);
|
||||
virtual void activateWindow();
|
||||
void hideStartScreen() override;
|
||||
void setTitle(const std::wstring& title) override;
|
||||
void activateWindow() override;
|
||||
|
||||
virtual void updateRecentProjectMenu();
|
||||
virtual void updateHistoryMenu(const std::vector<std::shared_ptr<MessageBase>>& historyMenuItems);
|
||||
virtual void updateBookmarksMenu(const std::vector<std::shared_ptr<Bookmark>>& bookmarks);
|
||||
void updateRecentProjectMenu() override;
|
||||
|
||||
void updateHistoryMenu(std::shared_ptr<MessageBase> message) override;
|
||||
void clearHistoryMenu() override;
|
||||
|
||||
void updateBookmarksMenu(const std::vector<std::shared_ptr<Bookmark>>& bookmarks) override;
|
||||
void clearBookmarksMenu() override;
|
||||
|
||||
private:
|
||||
void handleMessage(MessageForceEnterLicense* message);
|
||||
void handleMessage(MessageProjectEdit* message);
|
||||
void handleMessage(MessageProjectNew* message);
|
||||
void handleMessage(MessageForceEnterLicense* message) override;
|
||||
void handleMessage(MessageProjectEdit* message) override;
|
||||
void handleMessage(MessageProjectNew* message) override;
|
||||
|
||||
std::shared_ptr<QtMainWindow> m_window;
|
||||
std::vector<View*> m_views;
|
||||
|
||||
Reference in New Issue
Block a user