1 /* Copyright (c) 2015  Gerald Knizia
2  *
3  * This file is part of the IboView program (see: http://www.iboview.org)
4  *
5  * IboView is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, version 3.
8  *
9  * IboView is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with bfint (LICENSE). If not, see http://www.gnu.org/licenses/
16  *
17  * Please see IboView documentation in README.txt for:
18  * -- A list of included external software and their licenses. The included
19  *    external software's copyright is not touched by this agreement.
20  * -- Notes on re-distribution and contributions to/further development of
21  *    the IboView software
22  */
23 
24 #ifndef IV_STATUS_H
25 #define IV_STATUS_H
26 
27 #include <QStatusBar>
28 #include <QFrame>
29 #include <QLabel>
30 #include <QString>
31 
32 // should log class should also go here? or into a separate file to avoid
33 // recompiling *everything* whenever the status bar implementation changes?
34 
35 // this defines the colors used.
36 enum FStatusClass {
37    STATUS_Idle,
38    STATUS_Confused,
39    STATUS_Working,
40    STATUS_WorkingBg,
41    STATUS_Warning,
42    STATUS_Error,
43    STATUS_Unknown
44 };
45 
46 // class FStatusBar : public QStatusBar
47 class FStatusBar : public QFrame
48 {
49    Q_OBJECT
50 public:
51    typedef QFrame FBase;
52    explicit FStatusBar(QWidget *parent);
53 
54    void SetStatus(FStatusClass Class, QString Text);
55 //    void Finished();
56 protected:
57    QLabel *m_pStatusText;
58    FStatusClass m_LastStatus;
59 };
60 
61 QString GetStatusStyle(FStatusClass Class);
62 
63 
64 
65 #endif // IV_STATUS_H
66