1 /*
2  cli_n_breadcrumbs_presenter.cpp     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_CLI_N_BREADCRUMBS_PRESENTER_H
20 #define M8RUI_CLI_N_BREADCRUMBS_PRESENTER_H
21 
22 #include <vector>
23 
24 #include "../../lib/src/mind/mind.h"
25 
26 #include <QtWidgets>
27 
28 #include "cli_n_breadcrumbs_view.h"
29 #include "main_window_presenter.h"
30 
31 namespace m8r {
32 
33 class MainWindowPresenter;
34 class CliAndBreadcrumbsView;
35 
36 class CliAndBreadcrumbsPresenter : public QObject
37 {
38     Q_OBJECT
39 
40 private:
41     MainWindowPresenter* mainPresenter;
42     CliAndBreadcrumbsView* view;
43     Mind* mind;
44 
45 public:
46     CliAndBreadcrumbsPresenter(
47             MainWindowPresenter* mainPresenter,
48             CliAndBreadcrumbsView* view,
49             Mind* mind);
50 
51     void executeListOutlines();
52     void executeListNotes();
53     void executeFts(QString& command);
54 
55 private slots:
56     void executeCommand();
57     void handleCliTextChanged(const QString& text);
58 };
59 
60 }
61 #endif // M8RUI_CLI_N_BREADCRUMBS_PRESENTER_H
62