XX CMake Package
Loading...
Searching...
No Matches
XXQtMessageDocument.h
Go to the documentation of this file.
1#ifndef XXQtMessageDocumentH
2#define XXQtMessageDocumentH
3
4#include "XXLogExportDef.h"
5#include <QTextDocument>
6
7#include <QTextCursor>
8
9namespace XX
10{
11 namespace QtMessage
12 {
15
16 class XXLOG_DECLSPEC Document : public QTextDocument
17 {
18 Q_OBJECT
19
20 public:
21 Document(QObject* parent, int maxLines = -1);
23
24 private:
25 QColor symbolColor(const QtMsgType& type);
26 QColor messageColor(const QtMsgType& type);
27
28 void outputMessage(QtMsgType type, const QMessageLogContext& context, const QString& msg);
29
30 private:
31 const int maxLines;
32 QTextCursor cursor;
33 };
34 } // namespace QtMessage
35} // namespace XX
36
37#endif // NOT XXQtMessageDocumentH
#define XXLOG_DECLSPEC
Definition XXLogExportDef.h:11
Document(QObject *parent, int maxLines=-1)
Definition XXQtMessageDocument.h:12
Definition XXPopulatedAbstract.h:11