QGIS API Documentation  2.4.0-Chugiak
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsmessagelogviewer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmessagelogviewer.h - description
3  -------------------
4  begin : October 2011
5  copyright : (C) 2011 by Juergen E. Fischer
6  email : jef at norbit dot de
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 #ifndef QGSMESSAGELOGVIEWER_H
18 #define QGSMESSAGELOGVIEWER_H
19 
20 #include <ui_qgsmessagelogviewer.h>
21 #include <qgisgui.h>
22 #include "qgsmessagelog.h"
23 
24 #include <QString>
25 
26 class QStatusBar;
27 class QToolButton;
28 class QShowEvent;
29 class QHideEvent;
30 
35 class GUI_EXPORT QgsMessageLogViewer: public QDialog, private Ui::QgsMessageLogViewer
36 {
37  Q_OBJECT
38  public:
39  QgsMessageLogViewer( QStatusBar *statusBar = 0, QWidget *parent = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
41 
43  void setShowToolTips( bool enabled ) { mShowToolTips = enabled; }
45  bool showToolTips() const { return mShowToolTips; }
46 
47  public slots:
48  void logMessage( QString message, QString tag, QgsMessageLog::MessageLevel level );
49 
50  protected:
51  void showEvent( QShowEvent * );
52  void hideEvent( QHideEvent * );
53 
54  private:
55  QToolButton *mButton;
56  int mCount;
58 
59  private slots:
60  void closeTab( int index );
61  void buttonToggled( bool checked );
62  void buttonDestroyed();
63 };
64 
65 #endif
static const Qt::WindowFlags ModalDialogFlags
Definition: qgisgui.h:47
static unsigned index
bool showToolTips() const
A generic message for displaying QGIS log messages.
void setShowToolTips(bool enabled)