QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsmessageviewer.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmessageviewer.h - description
3
-------------------
4
begin : Wed Jun 4 2003
5
copyright : (C) 2002 by Gary E.Sherman
6
email : sherman at mrcc.com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
#ifndef QGSMESSAGEVIEWER_H
18
#define QGSMESSAGEVIEWER_H
19
20
#include "ui_qgsmessageviewer.h"
21
22
#include "qgis_gui.h"
23
#include "
qgsguiutils.h
"
24
#include "
qgsmessageoutput.h
"
25
26
#include <QString>
27
32
class
GUI_EXPORT
QgsMessageViewer
:
public
QDialog,
public
QgsMessageOutput
,
private
Ui::QgsMessageViewer
33
{
34
Q_OBJECT
35
public
:
36
QgsMessageViewer
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags,
bool
deleteOnClose =
true
);
37
38
void
setMessage
(
const
QString &message,
Qgis::StringFormat
format )
override
;
39
40
void
appendMessage
(
const
QString &message )
override
;
41
42
void
showMessage
(
bool
blocking =
true
)
override
;
43
44
void
setTitle
(
const
QString &title )
override
;
45
46
// Call one of the setMessage...() functions first.
47
// Subsequent calls to appendMessage use the format as determined
48
// by the call to setMessage...()
49
50
// Treats the given text as html.
51
void
setMessageAsHtml
(
const
QString &msg );
52
// Treats the given text as plain text
53
void
setMessageAsPlainText
(
const
QString &msg );
54
// A checkbox that can be used for something like
55
// "don't show this message again"
56
void
setCheckBoxText
(
const
QString &text );
57
// Make the checkbox visible/invisible
58
void
setCheckBoxVisible
(
bool
visible );
59
// Sets the check state
60
void
setCheckBoxState
( Qt::CheckState state );
61
// Get checkbox state
62
Qt::CheckState
checkBoxState
();
63
// Specifies a QgsSettings tag to store/retrieve the checkbox
64
// state to/from. Use an empty QString to disable this feature.
65
void
setCheckBoxQgsSettingsLabel
(
const
QString &label );
66
67
private
slots:
68
void
checkBox_toggled(
bool
);
69
70
71
private
:
72
QString mCheckBoxQgsSettingsLabel;
73
};
74
75
#endif
Qgis::StringFormat
StringFormat
Format of log message.
Definition
qgis.h:175
QgsMessageOutput
Interface for showing messages from QGIS in GUI independent way.
Definition
qgsmessageoutput.h:45
QgsMessageOutput::showMessage
virtual void showMessage(bool blocking=true)=0
display the message to the user and deletes itself
QgsMessageOutput::appendMessage
virtual void appendMessage(const QString &message)=0
message to be appended to the current text
QgsMessageOutput::setMessage
virtual void setMessage(const QString &message, Qgis::StringFormat format)=0
Sets message, it won't be displayed until.
QgsMessageOutput::setTitle
virtual void setTitle(const QString &title)=0
Sets title for the messages.
QgsMessageViewer::setCheckBoxQgsSettingsLabel
void setCheckBoxQgsSettingsLabel(const QString &label)
Definition
qgsmessageviewer.cpp:111
QgsMessageViewer::setCheckBoxVisible
void setCheckBoxVisible(bool visible)
Definition
qgsmessageviewer.cpp:96
QgsMessageViewer::setMessageAsPlainText
void setMessageAsPlainText(const QString &msg)
Definition
qgsmessageviewer.cpp:49
QgsMessageViewer::setCheckBoxState
void setCheckBoxState(Qt::CheckState state)
Definition
qgsmessageviewer.cpp:101
QgsMessageViewer::setMessageAsHtml
void setMessageAsHtml(const QString &msg)
Definition
qgsmessageviewer.cpp:44
QgsMessageViewer::QgsMessageViewer
QgsMessageViewer(QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags, bool deleteOnClose=true)
Definition
qgsmessageviewer.cpp:25
QgsMessageViewer::setCheckBoxText
void setCheckBoxText(const QString &text)
Definition
qgsmessageviewer.cpp:91
QgsMessageViewer::checkBoxState
Qt::CheckState checkBoxState()
Definition
qgsmessageviewer.cpp:106
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgsguiutils.h
qgsmessageoutput.h
Generated on
for QGIS API Documentation by
1.17.0