YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
messageWidget.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6#ifndef MESSAGEWIDGET_H
7#define MESSAGEWIDGET_H
8
9#include <QListWidget>
10#include <QAction>
11#include <QMenu>
12#include <QString>
13
20
21class MessageWidget : public QListWidget
22{
23 Q_OBJECT
24public:
25 explicit MessageWidget(QWidget *parent = 0);
26
27private:
28 QMenu *contextMenu;
29 QAction *clearLogAction;
30 QAction *saveLogAction;
31signals:
32
33private slots:
34 void onClearLog();
35 void onSaveLog();
36
37public:
38 void addMessage (QString text, int level=0);
39
40};
41
42#endif // MESSAGEWIDGET_H
void addMessage(QString text, int level=0)
MessageWidgetLevel
@ MESSAGE_LEVEL_INFO
@ MESSAGE_LEVEL_ERROR
@ MESSAGE_LEVEL_WARNING