mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	Rationale: - there was a lot of large objects passed by value, so potentially there's a speed bump from this - even for implicitly shared classes like QString/QList there's still a (small) cost for copying the objects when there's no reason to - it's the right thing to do!
		
			
				
	
	
		
			42 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
 | 
						|
class QgsMessageViewer: QDialog, QgsMessageOutput //, Ui::QgsMessageViewer
 | 
						|
{
 | 
						|
%TypeHeaderCode
 | 
						|
#include <qgsmessageviewer.h>
 | 
						|
%End
 | 
						|
 | 
						|
  public:
 | 
						|
    QgsMessageViewer( QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags );
 | 
						|
    ~QgsMessageViewer();
 | 
						|
 | 
						|
    virtual void setMessage( const QString& message, MessageType msgType );
 | 
						|
 | 
						|
    virtual void appendMessage( const QString& message );
 | 
						|
 | 
						|
    virtual void showMessage( bool blocking = true );
 | 
						|
 | 
						|
    virtual void setTitle( const QString& title );
 | 
						|
 | 
						|
    // Call one of the setMessage...() functions first.
 | 
						|
    // Subsequent calls to appendMessage use the format as determined
 | 
						|
    // by the call to setMessage...()
 | 
						|
 | 
						|
    // Treats the given text as html.
 | 
						|
    void setMessageAsHtml( const QString& msg );
 | 
						|
    // Treats the given text as plain text
 | 
						|
    void setMessageAsPlainText( const QString& msg );
 | 
						|
    // A checkbox that can be used for something like
 | 
						|
    // "don't show this message again"
 | 
						|
    void setCheckBoxText( const QString& text );
 | 
						|
    // Make the check box visible/invisible
 | 
						|
    void setCheckBoxVisible( bool visible );
 | 
						|
    // Sets the check state
 | 
						|
    void setCheckBoxState( Qt::CheckState state );
 | 
						|
    // Get checkbox state
 | 
						|
    Qt::CheckState checkBoxState();
 | 
						|
    // Specifies a QSettings tag to store/retrieve the checkbox
 | 
						|
    // state to/from. Use an empty QString to disable this feature.
 | 
						|
    void setCheckBoxQSettingsLabel( const QString& label );
 | 
						|
};
 | 
						|
 |