21
21
#include <ui_qgsmessageviewer.h>
22
22
#include <qgisgui.h>
24
class QgsMessageViewer: public QDialog, private Ui::QgsMessageViewer
23
#include "qgsmessageoutput.h"
29
* A generic message view for displaying QGIS messages.
31
class GUI_EXPORT QgsMessageViewer: public QDialog, public QgsMessageOutput, private Ui::QgsMessageViewer
27
QgsMessageViewer(QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags);
35
QgsMessageViewer( QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags );
28
36
~QgsMessageViewer();
38
virtual void setMessage( const QString& message, MessageType msgType );
40
virtual void appendMessage( const QString& message );
42
virtual void showMessage( bool blocking = true );
44
virtual void setTitle( const QString& title );
29
46
// Call one of the setMessage...() functions first.
30
47
// Subsequent calls to appendMessage use the format as determined
31
48
// by the call to setMessage...()
33
50
// Treats the given text as html.
34
void setMessageAsHtml(const QString& msg);
51
void setMessageAsHtml( const QString& msg );
35
52
// Treats the given text as plain text
36
void setMessageAsPlainText(const QString& msg);
37
void appendMessage(const QString& msg);
38
// A checkbox that can be used for something like
53
void setMessageAsPlainText( const QString& msg );
54
// A checkbox that can be used for something like
39
55
// "don't show this message again"
40
void setCheckBoxText(const QString& text);
56
void setCheckBoxText( const QString& text );
41
57
// Make the check box visible/invisible
42
void setCheckBoxVisible(bool visible);
58
void setCheckBoxVisible( bool visible );
43
59
// Sets the check state
44
void setCheckBoxState(Qt::CheckState state);
45
// The state of the checkbox
60
void setCheckBoxState( Qt::CheckState state );
46
62
Qt::CheckState checkBoxState();
63
// Specifies a QSettings tag to store/retrieve the checkbox
64
// state to/from. Use an empty QString to disable this feature.
65
void setCheckBoxQSettingsLabel( QString label );
68
void on_checkBox_toggled( bool );
72
QString mCheckBoxQSettingsLabel;