QGIS API Documentation
3.14.0-Pi (9f7028fd23)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
z
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
c
e
f
g
h
k
l
m
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Functions
a
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
n
o
p
q
r
s
t
u
w
Typedefs
a
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
w
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
core
qgsmessagelog.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmessagelog.h - interface for logging messages
3
----------------------
4
begin : October 2011
5
copyright : (C) 2011 by Juergen E. Fischer
6
email : jef at norbit dot de
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSMESSAGELOG_H
17
#define QGSMESSAGELOG_H
18
19
#include <QString>
20
#include <QObject>
21
22
#include "qgis_core.h"
23
#include "
qgis.h
"
24
38
class
CORE_EXPORT
QgsMessageLog
:
public
QObject
39
{
40
Q_OBJECT
41
42
public
:
43
47
QgsMessageLog
() =
default
;
48
56
static
void
logMessage(
const
QString &message,
const
QString &tag = QString(),
Qgis::MessageLevel
level =
Qgis::Warning
,
bool
notifyUser =
true
);
57
58
signals:
59
66
void
messageReceived(
const
QString &message,
const
QString &tag,
Qgis::MessageLevel
level );
67
68
//TODO QGIS 4.0 - remove received argument
69
78
void
messageReceived(
bool
received );
79
80
private
:
81
82
void
emitMessage(
const
QString &message,
const
QString &tag,
Qgis::MessageLevel
level,
bool
notifyUser =
true
);
83
84
int
mAdviseBlockCount = 0;
85
86
friend
class
QgsMessageLogNotifyBlocker
;
87
88
};
89
103
class
CORE_EXPORT
QgsMessageLogNotifyBlocker
104
{
105
public
:
106
112
QgsMessageLogNotifyBlocker
();
113
115
QgsMessageLogNotifyBlocker
(
const
QgsMessageLogNotifyBlocker
&other ) =
delete
;
116
118
QgsMessageLogNotifyBlocker
&operator=(
const
QgsMessageLogNotifyBlocker
&other ) =
delete
;
119
120
~
QgsMessageLogNotifyBlocker
();
121
122
private
:
123
124
#ifdef SIP_RUN
125
QgsMessageLogNotifyBlocker
(
const
QgsMessageLogNotifyBlocker
&other );
126
#endif
127
};
128
136
class
CORE_EXPORT
QgsMessageLogConsole
:
public
QObject
137
{
138
Q_OBJECT
139
140
public
:
141
145
QgsMessageLogConsole
();
146
147
protected
:
148
157
QString formatLogMessage(
const
QString &message,
const
QString &tag,
Qgis::MessageLevel
level =
Qgis::Info
)
const
;
158
159
public
slots:
160
168
virtual
void
logMessage(
const
QString &message,
const
QString &tag,
Qgis::MessageLevel
level );
169
};
170
171
#endif
Qgis::Warning
@ Warning
Definition:
qgis.h:104
QgsMessageLogNotifyBlocker
Temporarily blocks the application QgsMessageLog (see QgsApplication::messageLog()) from emitting the...
Definition:
qgsmessagelog.h:103
qgis.h
Qgis::Info
@ Info
Definition:
qgis.h:103
QgsMessageLog
Definition:
qgsmessagelog.h:38
Qgis::MessageLevel
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition:
qgis.h:101
QgsMessageLogConsole
Default implementation of message logging interface.
Definition:
qgsmessagelog.h:136
Generated on Mon Jun 22 2020 05:14:09 for QGIS API Documentation by
1.8.17