1 /* 2 main_menu_presenter.h MindForger thinking notebook 3 4 Copyright (C) 2016-2020 Martin Dvorak <martin.dvorak@mindforger.com> 5 6 This program is free software; you can redistribute it and/or 7 modify it under the terms of the GNU General Public License 8 as published by the Free Software Foundation; either version 2 9 of the License, or (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 #ifndef M8RUI_MAIN_MENU_PRESENTER_H 20 #define M8RUI_MAIN_MENU_PRESENTER_H 21 22 #include <QtWidgets> 23 24 #include "main_menu_view.h" 25 #include "main_window_presenter.h" 26 27 namespace m8r { 28 29 class MainMenuView; 30 class MainWindowPresenter; 31 32 /** 33 * @brief The MindForger main menu. 34 * 35 * Declares and implements actions w/ application logic, 36 * binds them using slots/signals and adds them to menu View. 37 */ 38 class MainMenuPresenter : public QObject 39 { 40 Q_OBJECT 41 42 private: 43 MainMenuView* view; 44 45 MainWindowPresenter* mainWindowPresenter; 46 Configuration& config; 47 48 public: 49 MainMenuPresenter(MainWindowPresenter* mainWindowPresenter); 50 MainMenuPresenter(const MainMenuPresenter&) = delete; 51 MainMenuPresenter(const MainMenuPresenter&&) = delete; 52 MainMenuPresenter &operator=(const MainMenuPresenter&) = delete; 53 MainMenuPresenter &operator=(const MainMenuPresenter&&) = delete; 54 virtual ~MainMenuPresenter(); 55 getView()56 MainMenuView* getView() { return view; } 57 58 void showFacetDashboard(); 59 void showFacetOrganizer(); 60 void showFacetNavigator(); 61 62 void showFacetOutlineList(); 63 void showFacetOutlineView(); 64 void showFacetNoteEdit(); 65 66 void showFacetMindThink(); 67 void showFacetMindSleep(); 68 69 void showFacetMindAutolink(bool enabled); 70 71 void showFacetLiveNotePreview(bool enabled); 72 73 void addRecentDirectoryOrFile(const QString& path); 74 }; 75 76 } 77 78 #endif // M8RUI_MAIN_MENU_PRESENTER_H 79