artdaq_mfextensions  v1_05_00
MsgBox.cpp
1 
2 #include "ErrorHandler/MsgBox.h"
3 
4 using namespace novadaq::errorhandler;
5 
6 MsgBox::MsgBox(QString const& title, NodeInfo const& info, QDialog* parent)
7  : QDialog(parent), node(info)
8 {
9  setupUi(this);
10 
11  connect(btnRefresh, SIGNAL(clicked()), this, SLOT(refreshMsgs()));
12 
13  // write node name
14  labelNodeName->setText(title);
15 
16  // print messages
17  txtMessages->setHtml(node.msgs_to_string());
18  txtMessages->moveCursor(QTextCursor::End);
19 }
20 
21 void MsgBox::refreshMsgs()
22 {
23  txtMessages->clear();
24  txtMessages->setHtml(node.msgs_to_string());
25  txtMessages->moveCursor(QTextCursor::End);
26 }