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
qgsmessageoutput.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmessageoutput.h - interface for showing messages
3
----------------------
4
begin : April 2006
5
copyright : (C) 2006 by Martin Dobias
6
email : wonder.sk at gmail dot com
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
17
#ifndef QGSMESSAGEOUTPUT_H
18
#define QGSMESSAGEOUTPUT_H
19
20
#include <QString>
21
#include "
qgis_sip.h
"
22
#include <QObject>
23
24
#include "qgis_core.h"
25
26
class
QgsMessageOutput
;
27
typedef
QgsMessageOutput
*( *MESSAGE_OUTPUT_CREATOR )()
SIP_SKIP
;
28
29
42
class
CORE_EXPORT
QgsMessageOutput
43
{
44
public
:
45
47
enum
MessageType
{ MessageText, MessageHtml };
48
49
virtual
~
QgsMessageOutput
() =
default
;
50
52
virtual
void
setMessage(
const
QString &message, MessageType msgType ) = 0;
53
55
virtual
void
appendMessage(
const
QString &message ) = 0;
56
58
virtual
void
setTitle(
const
QString &title ) = 0;
59
61
virtual
void
showMessage(
bool
blocking =
true
) = 0;
62
67
static
void
showMessage(
const
QString &title,
const
QString &message, MessageType msgType );
68
73
// TODO: implementation where Python class could be passed
74
static
void
setMessageOutputCreator(
MESSAGE_OUTPUT_CREATOR
f )
SIP_SKIP
;
75
80
static
QgsMessageOutput
*createMessageOutput();
81
82
private
:
83
85
static
MESSAGE_OUTPUT_CREATOR
mMessageOutputCreator;
86
};
87
88
96
class
CORE_EXPORT
QgsMessageOutputConsole
:
public
QObject,
public
QgsMessageOutput
97
{
98
Q_OBJECT
99
100
public
:
101
105
QgsMessageOutputConsole
() =
default
;
106
107
void
setMessage
(
const
QString &message,
MessageType
msgType )
override
;
108
109
void
appendMessage
(
const
QString &message )
override
;
110
111
void
setTitle
(
const
QString &title )
override
;
112
114
void
showMessage
(
bool
blocking =
true
)
override
;
115
116
signals:
117
119
void
destroyed();
120
121
private
:
122
124
QString mMessage;
125
127
QString mTitle;
128
129
MessageType
mMsgType =
MessageText
;
130
};
131
132
#endif
QgsMessageOutput::setMessage
virtual void setMessage(const QString &message, MessageType msgType)=0
Sets message, it won't be displayed until.
QgsMessageOutputConsole
Default implementation of message output interface.
Definition:
qgsmessageoutput.h:96
QgsMessageOutput::showMessage
virtual void showMessage(bool blocking=true)=0
display the message to the user and deletes itself
QgsMessageOutput
Definition:
qgsmessageoutput.h:42
SIP_SKIP
#define SIP_SKIP
Definition:
qgis_sip.h:126
qgis_sip.h
QgsMessageOutput::setTitle
virtual void setTitle(const QString &title)=0
Sets title for the messages.
QgsMessageOutput::MessageType
MessageType
message can be in plain text or in html format
Definition:
qgsmessageoutput.h:47
QgsMessageOutput::MessageText
@ MessageText
Definition:
qgsmessageoutput.h:47
MESSAGE_OUTPUT_CREATOR
QgsMessageOutput *(* MESSAGE_OUTPUT_CREATOR)()
Definition:
qgsmessageoutput.h:27
QgsMessageOutput::appendMessage
virtual void appendMessage(const QString &message)=0
message to be appended to the current text
Generated on Mon Jun 22 2020 05:14:09 for QGIS API Documentation by
1.8.17