Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cs
gui
alarm-ng
Commits
43fdee67
Commit
43fdee67
authored
May 04, 2021
by
Giacomo Strangolino
Browse files
only alarm view shows handler error entries
parent
e2e7c519
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/AlarmTreeWidget.cpp
View file @
43fdee67
...
...
@@ -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
);
...
...
src/AlarmTreeWidget.h
View file @
43fdee67
...
...
@@ -15,7 +15,7 @@ class AlarmTreeWidget : public QTreeWidget
{
Q_OBJECT
public:
enum
Type
{
AlarmType
,
InternalError
Typ
};
enum
Type
{
AlarmType
,
DisabledAlarm
Typ
e
};
enum
Columns
{
DATET
,
MICROSEC
,
ALARM
,
STATUS
,
ACK
,
LEVEL
,
SILENCED
,
DEVICE
,
MESSAGE
,
COLUMN_COUNT
};
AlarmTreeWidget
(
QWidget
*
parent
);
...
...
src/alarm.cpp
View file @
43fdee67
...
...
@@ -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
()));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment