~ubuntu-branches/ubuntu/wily/qgis/wily

« back to all changes in this revision

Viewing changes to src/gui/qgsmessageviewer.h

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#include <ui_qgsmessageviewer.h>
22
22
#include <qgisgui.h>
23
 
 
24
 
class QgsMessageViewer: public QDialog, private Ui::QgsMessageViewer
 
23
#include "qgsmessageoutput.h"
 
24
 
 
25
#include <QString>
 
26
 
 
27
 
 
28
/** \ingroup gui
 
29
 * A generic message view for displaying QGIS messages.
 
30
 */
 
31
class GUI_EXPORT QgsMessageViewer: public QDialog, public QgsMessageOutput, private Ui::QgsMessageViewer
25
32
{
 
33
    Q_OBJECT
26
34
  public:
27
 
    QgsMessageViewer(QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags);
 
35
    QgsMessageViewer( QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags );
28
36
    ~QgsMessageViewer();
 
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
 
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...()
32
49
 
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 );
 
61
    // Get checkbox 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 );
 
66
 
 
67
  private slots:
 
68
    void on_checkBox_toggled( bool );
 
69
 
 
70
 
 
71
  private:
 
72
    QString mCheckBoxQSettingsLabel;
47
73
};
48
74
 
49
75
#endif