1 /*
2  outline_view_splitter.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_OUTLINE_VIEW_SPLITTER_H
20 #define M8RUI_OUTLINE_VIEW_SPLITTER_H
21 
22 #include <QtWidgets>
23 
24 #include "outline_view.h"
25 #include "outline_tree_view.h"
26 #include "assoc_leaderboard_view.h"
27 
28 namespace m8r {
29 
30 /**
31  * @brief Outline view splitter.
32  *
33  * - Splitter ----------
34  * | OutlineView       |
35  * |   OutlineLabel    |
36  * |   OutlineTreeView |
37  * ---------------------
38  * | AALeaderboardView |
39  * ---------------------
40  *
41  */
42 class OutlineViewSplitter : public QSplitter
43 {
44     Q_OBJECT
45 
46 private:
47     OutlineView* outlineView;
48     AssocLeaderboardView* assocLeaderboardView;
49 
50 public:
51     explicit OutlineViewSplitter(QWidget* parent);
52     OutlineViewSplitter(const OutlineViewSplitter&) = delete;
53     OutlineViewSplitter(const OutlineViewSplitter&&) = delete;
54     OutlineViewSplitter &operator=(const OutlineViewSplitter&) = delete;
55     OutlineViewSplitter &operator=(const OutlineViewSplitter&&) = delete;
56     ~OutlineViewSplitter();
57 
refreshHeader(const std::string & name)58     void refreshHeader(const std::string& name) { outlineView->refreshHeader(name); }
getNameLabel()59     const QPushButton* getNameLabel() const { return outlineView->getNameLabel(); }
getOutlineTree()60     OutlineTreeView* getOutlineTree() const { return outlineView->getOutlineTree(); }
getAssocLeaderboard()61     AssocLeaderboardView* getAssocLeaderboard() const { return assocLeaderboardView; }
62 };
63 
64 }
65 #endif // M8RUI_OUTLINE_VIEW_SPLITTER_H
66