Quantum GIS API Documentation
1.8
|
00001 /*************************************************************************** 00002 qgsmessageviewer.h - description 00003 ------------------- 00004 begin : Wed Jun 4 2003 00005 copyright : (C) 2002 by Gary E.Sherman 00006 email : sherman at mrcc.com 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 #ifndef QGSMESSAGEVIEWER_H 00018 #define QGSMESSAGEVIEWER_H 00019 00020 #include <ui_qgsmessageviewer.h> 00021 #include <qgisgui.h> 00022 #include "qgsmessageoutput.h" 00023 00024 #include <QString> 00025 00026 00030 class GUI_EXPORT QgsMessageViewer: public QDialog, public QgsMessageOutput, private Ui::QgsMessageViewer 00031 { 00032 Q_OBJECT 00033 public: 00034 QgsMessageViewer( QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags ); 00035 ~QgsMessageViewer(); 00036 00037 virtual void setMessage( const QString& message, MessageType msgType ); 00038 00039 virtual void appendMessage( const QString& message ); 00040 00041 virtual void showMessage( bool blocking = true ); 00042 00043 virtual void setTitle( const QString& title ); 00044 00045 // Call one of the setMessage...() functions first. 00046 // Subsequent calls to appendMessage use the format as determined 00047 // by the call to setMessage...() 00048 00049 // Treats the given text as html. 00050 void setMessageAsHtml( const QString& msg ); 00051 // Treats the given text as plain text 00052 void setMessageAsPlainText( const QString& msg ); 00053 // A checkbox that can be used for something like 00054 // "don't show this message again" 00055 void setCheckBoxText( const QString& text ); 00056 // Make the check box visible/invisible 00057 void setCheckBoxVisible( bool visible ); 00058 // Sets the check state 00059 void setCheckBoxState( Qt::CheckState state ); 00060 // Get checkbox state 00061 Qt::CheckState checkBoxState(); 00062 // Specifies a QSettings tag to store/retrieve the checkbox 00063 // state to/from. Use an empty QString to disable this feature. 00064 void setCheckBoxQSettingsLabel( QString label ); 00065 00066 private slots: 00067 void on_checkBox_toggled( bool ); 00068 00069 00070 private: 00071 QString mCheckBoxQSettingsLabel; 00072 }; 00073 00074 #endif