1 /*
2  status_bar_view.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_STATUS_BAR_VIEW_H
20 #define M8RUI_STATUS_BAR_VIEW_H
21 
22 #include <QtWidgets>
23 
24 #include "look_n_feel.h"
25 
26 namespace m8r {
27 
28 class StatusBarView
29 {
30 private:
31     QStatusBar* statusBar;
32 
33     LookAndFeels& lookAndFeel;
34     QFont font;
35 
36 public:
37     StatusBarView(QStatusBar* qStatusBar, LookAndFeels& lookAndFeel);
38     StatusBarView(const StatusBarView&) = delete;
39     StatusBarView(const StatusBarView&&) = delete;
40     StatusBarView &operator=(const StatusBarView&) = delete;
41     StatusBarView &operator=(const StatusBarView&&) = delete;
42     virtual ~StatusBarView();
43 
44     void setLookAndFeel(LookAndFeels& lookAndFeel);
45 
46     void showInfo(const QString& message) const;
47     void showWarning(const QString& message) const;
48     void showError(const QString& message) const;
49 };
50 
51 }
52 
53 #endif // M8RUI_STATUS_BAR_VIEW_H
54