QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
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
22#include "qgis_gui.h"
23#include "qgis_sip.h"
24#include "qgsguiutils.h"
25#include "qgsmessagelog.h"
26
27#include <QMenu>
28#include <QString>
29
30class QStatusBar;
31class QCloseEvent;
32
37class GUI_EXPORT QgsMessageLogViewer : public QDialog, private Ui::QgsMessageLogViewer
38{
39 Q_OBJECT
40 public:
45 QgsMessageLogViewer( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
46
47 public slots:
48
52 void logMessage( const QString &message, const QString &tag, Qgis::MessageLevel level );
53
59 void showTab( const QString &tag );
60
61 protected:
62 void closeEvent( QCloseEvent *e ) override;
63 void reject() override;
64 bool eventFilter( QObject *obj, QEvent *ev ) override;
65
66 private slots:
67 void showContextMenuForTabBar( QPoint point );
68 void closeTab( int index );
69
70 private:
71 QString mClickedAnchor;
72 QMenu *mTabBarContextMenu = nullptr;
73 int mMessageLoggedCount = 0;
74};
75
76#endif
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition qgis.h:156
void closeEvent(QCloseEvent *e) override
bool eventFilter(QObject *obj, QEvent *ev) override
void showTab(const QString &tag)
Activates the tab whose title matches the given tag, if any.
QgsMessageLogViewer(QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
Create a new message log viewer.
void logMessage(const QString &message, const QString &tag, Qgis::MessageLevel level)
Logs a message to the viewer.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53