Commit 43fdee67 authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

only alarm view shows handler error entries

parent e2e7c519
......@@ -133,8 +133,9 @@ void AlarmTreeWidget::refresh(const CuData &v) {
printf("\e[1;34mAlarmTreeWidget::refresh: attribute %s is empty <<<<<<<<<<<<<<<< \e[0m\n", qstoc(src));
QStringList data;
setToolTip(QuString(v, "msg"));
/* remove the filter */
if (err) {
// error: err flag is true and message is not of type "cannot extract data..."
// only AlarmType adds an entry for each error
if (err && m_type == AlarmType) {
data << m_gen_error_item(v);
perr("%s: %s\n", qstoc(src), qstoc(toolTip()));
m_src_err.insert(src);
......
......@@ -15,7 +15,7 @@ class AlarmTreeWidget : public QTreeWidget
{
Q_OBJECT
public:
enum Type {AlarmType, InternalErrorTyp };
enum Type {AlarmType, DisabledAlarmType };
enum Columns { DATET, MICROSEC, ALARM, STATUS, ACK, LEVEL, SILENCED, DEVICE, MESSAGE, COLUMN_COUNT };
AlarmTreeWidget(QWidget *parent);
......
......@@ -59,6 +59,10 @@ Alarm::Alarm(CumbiaPool *cu_p, QWidget *parent) : QWidget(parent)
connect(ui->pBAckAll, SIGNAL(clicked()), this, SLOT(ackAll()));
connect(ui->pBStopSound, SIGNAL(clicked()), this, SLOT(stopSound()));
// view types
ui->treeWidgetAlarms->setType(AlarmTreeWidget::AlarmType);
ui->twDisabledAlarms->setType(AlarmTreeWidget::DisabledAlarmType);
/* silence alarm */
connect(ui->treeWidgetAlarms, SIGNAL(silence()), this, SLOT(silence()));
connect(ui->treeWidgetAlarms, SIGNAL(silence()), this, SLOT(stopSound()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment