Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 /* $Id$ */
18 #ifndef QGSMESSAGEVIEWER_H
19 #define QGSMESSAGEVIEWER_H
20 
21 #include <ui_qgsmessageviewer.h>
22 #include <qgisgui.h>
23 #include "qgsmessageoutput.h"
24 
25 #include <QString>
26 
27 
31 class GUI_EXPORT QgsMessageViewer: public QDialog, public QgsMessageOutput, private Ui::QgsMessageViewer
32 {
33  Q_OBJECT
34  public:
35  QgsMessageViewer( QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags );
37 
38  virtual void setMessage( const QString& message, MessageType msgType );
39 
40  virtual void appendMessage( const QString& message );
41 
42  virtual void showMessage( bool blocking = true );
43 
44  virtual void setTitle( const QString& title );
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 check box 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 QSettings tag to store/retrieve the checkbox
64  // state to/from. Use an empty QString to disable this feature.
65  void setCheckBoxQSettingsLabel( QString label );
66 
67  private slots:
68  void on_checkBox_toggled( bool );
69 
70 
71  private:
73 };
74 
75 #endif