General Purpose Geodetic Library
SgGuiLogger.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is a part of Space Geodetic Library. The library is used by
4  * nuSolve, a part of CALC/SOLVE system, and designed to make analysis of
5  * geodetic VLBI observations.
6  * Copyright (C) 2010-2020 Sergei Bolotin.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef SG_GUI_LOGGER_H
24 #define SG_GUI_LOGGER_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 
33 #include <SgLogger.h>
34 
35 
36 #if QT_VERSION >= 0x050000
37 # include <QtWidgets/QPlainTextEdit>
38 #else
39 # include <QtGui/QPlainTextEdit>
40 #endif
41 #include <QtGui/QTextCharFormat>
42 
43 
44 
45 /*=====================================================================================================*/
46 class SgGuiLogger : public QPlainTextEdit, public SgLogger
47 {
48  Q_OBJECT
49 public:
50  SgGuiLogger(QWidget*, int=100, bool=true, const QString& ="logger.log");
51  virtual ~SgGuiLogger(){};
52 protected:
53  QTextCharFormat errFormat;
54  QTextCharFormat wrnFormat;
55  QTextCharFormat infFormat;
56  QTextCharFormat dbgFormat;
57 
58  virtual inline QString ClassName() const {return "SgGuiLogger";};
59  virtual void makeOutput(LogLevel, const QString &, bool);
60  virtual void clearSpool();
61 };
62 /*=====================================================================================================*/
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 /*=====================================================================================================*/
73 #endif // SG_GUI_LOGGER_H
SgGuiLogger(QWidget *, int=100, bool=true, const QString &="logger.log")
Definition: SgGuiLogger.cpp:36
virtual QString ClassName() const
Definition: SgGuiLogger.h:58
QTextCharFormat errFormat
Definition: SgGuiLogger.h:51
virtual ~SgGuiLogger()
Definition: SgGuiLogger.h:51
QTextCharFormat wrnFormat
Definition: SgGuiLogger.h:54
QTextCharFormat dbgFormat
Definition: SgGuiLogger.h:56
virtual void makeOutput(LogLevel, const QString &, bool)
Definition: SgGuiLogger.cpp:66
QTextCharFormat infFormat
Definition: SgGuiLogger.h:55
virtual void clearSpool()
Definition: SgGuiLogger.cpp:95